diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2021-11-23 00:37:31 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2021-11-23 00:37:31 +0100 |
| commit | 1773e20839c75a01fd14af3015c0a054c5b83807 (patch) | |
| tree | 7ee3c6278dd7e000866aa20f634259a8ba425e88 | |
| parent | 78f4d23b295f992e3066b878e0f5ef8dcf21ae51 (diff) | |
Add close button on trip index
| -rw-r--r-- | example/static/style/base.css | 7 | ||||
| -rw-r--r-- | src/site.cc | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/example/static/style/base.css b/example/static/style/base.css index d77b27b..cdfbe23 100644 --- a/example/static/style/base.css +++ b/example/static/style/base.css @@ -14,6 +14,13 @@ a.maps { font-size: 90%; } +body > a#close { + position: absolute; + right: 1em; + top: 1em; + display: block; +} + .subtitle { text-color: lightgrey; font-size: 90%; diff --git a/src/site.cc b/src/site.cc index ebc12a7..b54e862 100644 --- a/src/site.cc +++ b/src/site.cc @@ -281,6 +281,11 @@ private: body->add_tag("h1", std::string(trip.title())); + body->add_tag("a", "X") + ->attr("href", "..") + ->attr("id", "close") + ->attr("title", "Close"); + auto* list = body->add_tag("p")->add_tag("ul")->attr("class", "days"); for (size_t i = 0; i < trip.day_count(); ++i) { auto& day = trip.day(i); |
