From 3bf200184a7ad49b618265cfd33af6510a9acc6b Mon Sep 17 00:00:00 2001 From: Marie Birner Date: Mon, 19 Feb 2024 17:09:20 +0100 Subject: [PATCH 1/3] [TASK] style index list --- output/style.css | 38 ++++++++++++++++++++++++++++++++++++++ src/main.rs | 2 +- templates/style.css | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+), 1 deletion(-) diff --git a/output/style.css b/output/style.css index 2d30120..9bed520 100644 --- a/output/style.css +++ b/output/style.css @@ -177,3 +177,41 @@ body > footer { font-style: italic; padding: calc(var(--pico-spacing) / 3) 0; } + +/* List index.html */ +ol { + counter-reset: index; + padding: 0; + width: 100%; +} + +/* List element index.html */ +ol li { + counter-increment: index; + display: flex; + align-items: center; + padding: 12px 0; + box-sizing: border-box; +} + + +/* Element counter */ +ol li::before { + content: "§"; + font-size: 1.5rem; + text-align: right; + font-weight: bold; + padding-right: 12px; + align-self: flex-start; + background-image: linear-gradient(to bottom, aquamarine, orangered); + background-attachment: fixed; + -webkit-background-clip: text; + background-clip: text; + -webkit-text-fill-color: transparent; +} + + +/* Element separation */ +ol li + li { + border-top: var(--pico-contrast-focus) solid 1px; +} \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index def9fbd..9dc5202 100644 --- a/src/main.rs +++ b/src/main.rs @@ -111,7 +111,7 @@ fn main() { .replace("{{title}}", &lawname); li_of_files.push_str(&format!( - "
  • {lawname}

  • \n" + "
  • {lawname}
  • " )); fs::write(&format!("output/{law_name}.html"), &site).expect("Unable to write file"); } diff --git a/templates/style.css b/templates/style.css index 2d30120..9bed520 100644 --- a/templates/style.css +++ b/templates/style.css @@ -177,3 +177,41 @@ body > footer { font-style: italic; padding: calc(var(--pico-spacing) / 3) 0; } + +/* List index.html */ +ol { + counter-reset: index; + padding: 0; + width: 100%; +} + +/* List element index.html */ +ol li { + counter-increment: index; + display: flex; + align-items: center; + padding: 12px 0; + box-sizing: border-box; +} + + +/* Element counter */ +ol li::before { + content: "§"; + font-size: 1.5rem; + text-align: right; + font-weight: bold; + padding-right: 12px; + align-self: flex-start; + background-image: linear-gradient(to bottom, aquamarine, orangered); + background-attachment: fixed; + -webkit-background-clip: text; + background-clip: text; + -webkit-text-fill-color: transparent; +} + + +/* Element separation */ +ol li + li { + border-top: var(--pico-contrast-focus) solid 1px; +} \ No newline at end of file From ba4b54490a24305a702b18b4d4d209a6dc2aa374 Mon Sep 17 00:00:00 2001 From: Marie Birner Date: Mon, 19 Feb 2024 17:51:02 +0100 Subject: [PATCH 2/3] [TASK] add footer styling --- output/style.css | 8 +++++++- templates/index.html | 4 ++-- templates/law.html | 4 ++-- templates/style.css | 8 +++++++- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/output/style.css b/output/style.css index 9bed520..6ce7d78 100644 --- a/output/style.css +++ b/output/style.css @@ -119,6 +119,12 @@ button { body > footer { padding-block: calc(var(--pico-block-spacing-vertical) * 2); + background: linear-gradient(180deg, black, transparent); +} + +:root:not([data-theme=dark]) body > footer, +[data-theme=light] body > footer { + background: linear-gradient(180deg, rgba(0,0,0,.1), transparent); } /* approx 800px */ @@ -203,7 +209,7 @@ ol li::before { font-weight: bold; padding-right: 12px; align-self: flex-start; - background-image: linear-gradient(to bottom, aquamarine, orangered); + background-image: linear-gradient(to bottom, #08AEEA, #2AF598); background-attachment: fixed; -webkit-background-clip: text; background-clip: text; diff --git a/templates/index.html b/templates/index.html index 41e0755..023f198 100644 --- a/templates/index.html +++ b/templates/index.html @@ -19,8 +19,8 @@ {{content}} -