From 148035ed0dc98baf12d7879c3d4f349ee24b5e8f Mon Sep 17 00:00:00 2001 From: J-Klinke Date: Fri, 14 Jun 2024 16:51:55 +0200 Subject: [PATCH 1/5] improved toolbar, implemented filter --- src/main/resources/static/filter.svg | 49 +++++++++++++++++++++++++ src/main/resources/static/main.css | 18 +++++---- src/main/resources/templates/index.html | 11 +++++- 3 files changed, 69 insertions(+), 9 deletions(-) create mode 100644 src/main/resources/static/filter.svg diff --git a/src/main/resources/static/filter.svg b/src/main/resources/static/filter.svg new file mode 100644 index 0000000..d90e5c0 --- /dev/null +++ b/src/main/resources/static/filter.svg @@ -0,0 +1,49 @@ + + + + diff --git a/src/main/resources/static/main.css b/src/main/resources/static/main.css index 62eb72d..706751a 100644 --- a/src/main/resources/static/main.css +++ b/src/main/resources/static/main.css @@ -30,12 +30,9 @@ header { display: flex; flex-direction: row; float: right; -} - -#search-bar { + gap: .5rem; background-color: var(--fg-color, darkgrey); padding: .5rem 1rem; - width: 100%; border-radius: 1.5rem; } @@ -44,6 +41,9 @@ header { border: none; color: var(--text-color); } +#search-entry:focus-visible { + outline: none; +} .datasets { padding-inline: var(--pad-datasets); @@ -78,7 +78,7 @@ header { gap: .5em; } /* Buttons */ -.upvote-btn, .downvote-btn, .search-btn { +.upvote-btn, .downvote-btn, .search-btn, .filter-btn { background: var(--icon-url) no-repeat; background-size: contain; border: none; @@ -103,11 +103,15 @@ header { --icon-url: url(looking-glass.svg); --icon-size: 1rem; } +.filter-btn{ + --icon-url: url(filter.svg); + --icon-size: 1rem; +} -:is(.upvote-btn, .downvote-btn, .search-btn):is(:hover, :focus-visible) { +:is(.upvote-btn, .downvote-btn, .search-btn, .filter-btn):is(:hover, :focus-visible) { filter: brightness(1.5); } -:is(.upvote-btn, .downvote-btn, .search-btn):active { +:is(.upvote-btn, .downvote-btn, .search-btn, .filter-btn):active { filter: brightness(1.75); } diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 7654302..b65b530 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -14,10 +14,17 @@
-
From 5a682e1800b63e2849d08f8a66b945a08475a76e Mon Sep 17 00:00:00 2001 From: J-Klinke Date: Mon, 17 Jun 2024 15:11:16 +0200 Subject: [PATCH 2/5] basic implementation of add button --- src/main/resources/static/main.css | 9 +++++++++ src/main/resources/templates/index.html | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/src/main/resources/static/main.css b/src/main/resources/static/main.css index 706751a..d3c8a35 100644 --- a/src/main/resources/static/main.css +++ b/src/main/resources/static/main.css @@ -7,11 +7,13 @@ --min-card-size: 60ch; --corner-radius: 1rem; font-size: 12pt; + font-family: sans-serif; } body { background-color: var(--bg-color, black); color: var(--text-color, white); + margin: 0; } main { @@ -26,6 +28,13 @@ header { margin-inline: .75rem; } +#add-btn { + position: fixed; + top: 0; + left: 0; + z-index: 1; +} + #tool-bar { display: flex; flex-direction: row; diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index cc670ee..efc3f69 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -7,6 +7,10 @@ + + + + +

Welcome to DataDash

From b721973d05b99121b64310f029571aa2984ea475 Mon Sep 17 00:00:00 2001 From: J-Klinke Date: Mon, 17 Jun 2024 15:42:20 +0200 Subject: [PATCH 3/5] implemented sort-by, implemented divider, fixed class/id in css --- src/main/resources/static/main.css | 20 ++++++-- src/main/resources/static/sort.svg | 61 +++++++++++++++++++++++++ src/main/resources/templates/index.html | 29 +++++++----- 3 files changed, 93 insertions(+), 17 deletions(-) create mode 100644 src/main/resources/static/sort.svg diff --git a/src/main/resources/static/main.css b/src/main/resources/static/main.css index d3c8a35..1f1581a 100644 --- a/src/main/resources/static/main.css +++ b/src/main/resources/static/main.css @@ -87,7 +87,7 @@ header { gap: .5em; } /* Buttons */ -.upvote-btn, .downvote-btn, .search-btn, .filter-btn { +.upvote-btn, .downvote-btn, #search-btn, #filter-btn, #sort-btn { background: var(--icon-url) no-repeat; background-size: contain; border: none; @@ -108,19 +108,29 @@ header { transform: rotate(180deg); } -.search-btn { +#search-btn { --icon-url: url(looking-glass.svg); --icon-size: 1rem; } -.filter-btn{ +#filter-btn { --icon-url: url(filter.svg); --icon-size: 1rem; } -:is(.upvote-btn, .downvote-btn, .search-btn, .filter-btn):is(:hover, :focus-visible) { +#sort-btn { + --icon-url: url(sort.svg); + --icon-size: 1rem; +} + +.divider { + width: .05rem; + background-color: #222; +} + +:is(.upvote-btn, .downvote-btn, #search-btn, #filter-btn, #sort-btn):is(:hover, :focus-visible) { filter: brightness(1.5); } -:is(.upvote-btn, .downvote-btn, .search-btn, .filter-btn):active { +:is(.upvote-btn, .downvote-btn, #search-btn, #filter-btn, #sort-btn):active { filter: brightness(1.75); } diff --git a/src/main/resources/static/sort.svg b/src/main/resources/static/sort.svg new file mode 100644 index 0000000..a259268 --- /dev/null +++ b/src/main/resources/static/sort.svg @@ -0,0 +1,61 @@ + + + + diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index efc3f69..995a140 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -4,7 +4,7 @@ DataDash - + @@ -18,17 +18,22 @@
- - - + +
+ + +
From 1fe7a2ca29238dd85c0dbf4022602c7ce98c9859 Mon Sep 17 00:00:00 2001 From: J-Klinke Date: Mon, 17 Jun 2024 15:49:50 +0200 Subject: [PATCH 4/5] changed css path to be correct --- src/main/resources/templates/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 995a140..b1677be 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -4,7 +4,7 @@ DataDash - + From d5889341e6fa1cd633f8e914cf2ec2be1ab0d794 Mon Sep 17 00:00:00 2001 From: J-Klinke Date: Tue, 18 Jun 2024 11:43:14 +0200 Subject: [PATCH 5/5] proper add button implementation --- src/main/resources/static/add-button-mask.svg | 105 ++++++++++++++++++ src/main/resources/static/main.css | 17 ++- src/main/resources/templates/index.html | 5 +- 3 files changed, 119 insertions(+), 8 deletions(-) create mode 100644 src/main/resources/static/add-button-mask.svg diff --git a/src/main/resources/static/add-button-mask.svg b/src/main/resources/static/add-button-mask.svg new file mode 100644 index 0000000..221de76 --- /dev/null +++ b/src/main/resources/static/add-button-mask.svg @@ -0,0 +1,105 @@ + + + + + diff --git a/src/main/resources/static/main.css b/src/main/resources/static/main.css index 1f1581a..0711eca 100644 --- a/src/main/resources/static/main.css +++ b/src/main/resources/static/main.css @@ -29,12 +29,19 @@ header { } #add-btn { + width: 7rem; + height: 7rem; + content: url("add-button-mask.svg"); + background: linear-gradient(135deg, pink, darkblue); + clip-path: polygon(0% 0%, 100% 0%, 0% 100%); + + cursor: pointer; + position: fixed; top: 0; left: 0; z-index: 1; } - #tool-bar { display: flex; flex-direction: row; @@ -50,6 +57,7 @@ header { border: none; color: var(--text-color); } + #search-entry:focus-visible { outline: none; } @@ -124,13 +132,14 @@ header { .divider { width: .05rem; - background-color: #222; + height: 1rem; + background-color: var(--bg-color); } -:is(.upvote-btn, .downvote-btn, #search-btn, #filter-btn, #sort-btn):is(:hover, :focus-visible) { +:is(.upvote-btn, .downvote-btn, #search-btn, #filter-btn, #sort-btn, #add-btn):is(:hover, :focus-visible) { filter: brightness(1.5); } -:is(.upvote-btn, .downvote-btn, #search-btn, #filter-btn, #sort-btn):active { +:is(.upvote-btn, .downvote-btn, #search-btn, #filter-btn, #sort-btn, #add-btn):active { filter: brightness(1.75); } diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index b1677be..172c714 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -7,10 +7,7 @@ - - - + - +

Welcome to DataDash