From 1bfa0fdbcb74da43730ed93249e16b77a9f85385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 13 Aug 2020 22:26:05 +0200 Subject: Change static.css to scss. --- Makefile | 9 +- static/.gitignore | 5 +- static/Makefile | 11 + static/style.css | 980 ------------------------------------------------------ static/style.scss | 977 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 998 insertions(+), 984 deletions(-) create mode 100644 static/Makefile delete mode 100644 static/style.css create mode 100644 static/style.scss diff --git a/Makefile b/Makefile index cc30e302..afa6ffd0 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ -.PHONY: all clean test +.PHONY: all clean test \ + static GUILE_SITE_DIR=$(shell guile -c "(display (%site-dir))") GUILE_CCACHE_DIR=$(shell guile -c "(display (%site-ccache-dir))") @@ -12,13 +13,17 @@ GUILE_C_FLAGS = -Lmodule \ -Wmacro-use-before-definition -Warity-mismatch \ -Wduplicate-case-datum -Wbad-case-datum -all: $(GO_FILES) README +all: $(GO_FILES) README static + +static: + $(MAKE) -C static obj/%.scm.go: %.scm @mkdir -p obj guild compile $(GUILE_C_FLAGS) -o $@ $< clean: + $(MAKE) -C static clean -rm -r obj install: diff --git a/static/.gitignore b/static/.gitignore index b99de213..c90a6b1b 100644 --- a/static/.gitignore +++ b/static/.gitignore @@ -1,2 +1,3 @@ -tipped-4.7.0 -jquery-3.* +style.css +.*-cache +*.map diff --git a/static/Makefile b/static/Makefile new file mode 100644 index 00000000..f848b784 --- /dev/null +++ b/static/Makefile @@ -0,0 +1,11 @@ +.PHONY: all clean + +TARGETS := style.css + +all: $(TARGETS) + +clean: + rm $(TARGETS) + +%.css: %.scss + scss $< $@ diff --git a/static/style.css b/static/style.css deleted file mode 100644 index 79fd06ab..00000000 --- a/static/style.css +++ /dev/null @@ -1,980 +0,0 @@ -html { - height: 100%; -} - -html, body { - height: 100%; - margin: 0; -} - -.root { - display: grid; - margin: 0; - max-width: 100%; - height: 100%; - - grid-template-columns: auto auto 20em; - grid-template-rows: auto; - - grid-template-areas: - "main main nav" - "main main cal" - "main main details" - "main main events" - "footer footer events"; -} - -@media (max-aspect-ratio: 3/4) { - .root { - grid-template-areas: - "main main" - "nav events" - "cal events" - "details events" - ". events" - "footer events"; - grid-template-rows: 70% auto; - grid-template-columns: 50% auto; - } -} - -.hidelink { - color: inherit; - text-decoration: none; -} - -.root main { - min-width: 0; /* for wide */ - min-height: 0; /* for tall */ - - /* apparently required if one wants to have multiple - items within main, without it overflowing - */ - display: flex; - flex-direction: column; -} - -/* Page footer ----------------------------------------- -*/ -.root footer { - margin: 0.5em; - color: ray; - font-size: 8pt; - - display: flex; - justify-content: space-between; - - flex-direction: row; -} - -@media (max-aspect-ratio: 3/4) { - .root footer { - flex-direction: column; - } -} - -.root footer span { - margin: 0 1em; - white-space: nowrap; -} - - -/* Change View ----------------------------------------- -"Buttons" for changing between weekly and monthly layout -*/ - -.calnav { - display: flex; - flex-direction: column; - padding-left: 2em; - padding-right: 2em; -} - -.change-view { - display: flex; - flex-direction: row; - justify-content: space-between; - - padding-top: 1ex; - padding-bottom: 1ex; -} - -#jump-to > form { - display: flex; -} - -#jump-to input { - flex-grow: 2; - margin-right: 1em; -} - -#jump-to button, #jump-to a { - /* Same as height, figure out way to force this */ - width: 2.5em; -} - -/* button --------------------------------------------------- -*/ - -.btn { - padding: 0; - - /* if a */ - text-decoration: none; - - /* if button */ - border: none; - background-color: inherit; -} - -.btn > div { - padding: 0.5em; - background-color: #3399ff; - color: white; - - box-sizing: border-box; - width: 100%; - height: 100%; - - display: flex; - justify-content: center; - align-items: center; - - /* shouldn't be needed, but otherwise wont align with a text input - inside a shared flex-container. - It however seems to make and