From b9ef4eb2faa38ff1592d3e252d6835fe9bc5c036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 26 Apr 2020 19:15:40 +0200 Subject: Made .btn own css class. --- module/output/html.scm | 6 ++++-- static/style.css | 18 ++++++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/module/output/html.scm b/module/output/html.scm index b62b106a..6b2849ad 100644 --- a/module/output/html.scm +++ b/module/output/html.scm @@ -649,7 +649,8 @@ ;; Small calendar and navigation (nav (@ (class "calnav") (style "grid-area: nav")) (div (@ (class "change-view")) - (a (@ (href "/week/" ,(date->string + (a (@ (class "btn") + (href "/week/" ,(date->string (if (= 1 (day start-date)) (start-of-week start-date (get-config 'week-start)) start-date) @@ -658,7 +659,8 @@ "weekly") - (a (@ (href "/month/" ,(date->string (set (day start-date) 1) "~1") + (a (@ (class "btn") + (href "/month/" ,(date->string (set (day start-date) 1) "~1") ".html")) "monthly"))) diff --git a/static/style.css b/static/style.css index 07f25fa3..03e60cf3 100644 --- a/static/style.css +++ b/static/style.css @@ -91,26 +91,32 @@ html, body { "Buttons" for changing between weekly and monthly layout */ - .change-view { display: flex; flex-direction: row; justify-content: space-evenly; } -.change-view a { +.change-view .btn { + margin-top: 1ex; + margin-bottom: 1ex; +} + +.btn { padding: 0.5em; background-color: #3399ff; - text-decoration: none; color: white; box-shadow: 1ex 1ex gray; - margin-top: 1ex; - margin-bottom: 1ex; + /* if a */ + text-decoration: none; + + /* if button */ + border: none; } -.change-view a:active { +.btn:active { transform: translate(1ex, 1ex); box-shadow: none; } -- cgit v1.2.3