From a5fb5dbe8da6758464b4adc39508d53e8f726399 Mon Sep 17 00:00:00 2001 From: Laurens Weijs Date: Wed, 21 Aug 2024 13:54:40 +0200 Subject: [PATCH] # This is a combination of 2 commits. # This is the 1st commit message: mend # This is the commit message #2: Delete alert --- amt/site/static/css/layout.css | 64 ---------------- amt/site/static/js/amt.js | 2 +- amt/site/static/package-lock.json | 35 +++++++++ amt/site/static/package.json | 7 ++ amt/site/templates/footer.html.j2 | 12 +++ amt/site/templates/header.html.j2 | 87 ++++++++++++++++------ amt/site/templates/layouts/base.html.j2 | 10 ++- amt/site/templates/projects/new.html.j2 | 98 +++++++++++++++++++++---- package-lock.json | 6 ++ 9 files changed, 217 insertions(+), 104 deletions(-) create mode 100644 amt/site/static/package-lock.json create mode 100644 amt/site/static/package.json create mode 100644 package-lock.json diff --git a/amt/site/static/css/layout.css b/amt/site/static/css/layout.css index faaaa6954..29dd80c62 100644 --- a/amt/site/static/css/layout.css +++ b/amt/site/static/css/layout.css @@ -76,74 +76,10 @@ footer { height: 2rem; } -.header { - margin-bottom: 2em; - border-bottom-color: var(--clr-accent-200); - border-bottom-style: solid; - border-bottom-width: 0.5em; -} - -.header a { - color: inherit; - text-decoration: none; - -} - -.header_top { - padding-inline: 0.75em; - padding-block: 0.5em; - color: var(--clr-accent-600); - font-size: 1.125em; - line-height: 1.5em; - white-space: nowrap; -} - -.header_logo_image { - aspect-ratio: 1 / 1; - max-width: 180px; - display: block; -} - .language_selection { margin-inline-end: clamp(1rem, 2vw, 4rem);; } -.header_nav { - background-color: var(--clr-accent-400); - height: 50px; - color: var(--clr-neutral-100); - text-decoration: none; - display: flex; - gap: clamp(0.1rem, 1vw, 2rem);; - justify-content: flex-end; -} - -.header_nav > div { - align-self: center; -} - -.header_nav a { - border-block-end: 0.1em solid; - border-block-end-color: var(--clr-accent-200); - border-block-end-style: dashed; - padding-block: 0.2em; -} - -.header_nav a:hover { - color: var(--clr-accent-600); - background-color: var(--clr-accent-200); - flex-grow: 1; - border-width: 1.25em; - border-radius: 0.5em; -} - -.header_nav_container ul { - display: flex; - justify-content: space-between; - align-items: center; - gap: clamp(1rem, 2vw, 4rem);; -} - .margin-bottom--large { margin-bottom: 1em; } diff --git a/amt/site/static/js/amt.js b/amt/site/static/js/amt.js index cfa1ceb0a..f165fbbff 100644 --- a/amt/site/static/js/amt.js +++ b/amt/site/static/js/amt.js @@ -2,7 +2,7 @@ window.onload = function () { // TODO (robbert): we need (better) event handling and displaying of server errors document.body.addEventListener('htmx:sendError', function(evt) { - document.getElementById("errorContainer").innerHTML = "

Placeholder: Error while connecting to server +
+
+ {% trans %}Language{% endtrans %}: + + {% for available_translation in available_translations %} + {{ + available_translation }} + {% endfor %} +
+
diff --git a/amt/site/templates/header.html.j2 b/amt/site/templates/header.html.j2 index f8e39064a..c50070b59 100644 --- a/amt/site/templates/header.html.j2 +++ b/amt/site/templates/header.html.j2 @@ -1,26 +1,71 @@
-
- - {% trans %}Algorithm Management Toolkit{% endtrans %} ({{ version }}) -
-
-
- +
+ +
diff --git a/amt/site/templates/layouts/base.html.j2 b/amt/site/templates/layouts/base.html.j2 index f45d9caad..a661be21b 100644 --- a/amt/site/templates/layouts/base.html.j2 +++ b/amt/site/templates/layouts/base.html.j2 @@ -17,15 +17,21 @@ - + {% endblock %} {% block styles %} + + + + + + {% endblock %} - + {% block header %} {% include 'header.html.j2' %} {% endblock %} diff --git a/amt/site/templates/projects/new.html.j2 b/amt/site/templates/projects/new.html.j2 index 5b4fe7787..41c55ff02 100644 --- a/amt/site/templates/projects/new.html.j2 +++ b/amt/site/templates/projects/new.html.j2 @@ -1,21 +1,87 @@ {% extends 'layouts/base.html.j2' %} {% block content %} -

{% trans %}New Project{% endtrans %}

- -
- {% trans %}Project name{% endtrans %} - -
- {% trans %}Selected Instruments{% endtrans %} - {% for instrument in instruments %} -
- +
+
+
+
+
+

{% trans %}New project{% endtrans %}

+
+ +
+
+ + Keyboard inputs + +
+
+ +
+ +
+
+
+ +
+ {% trans %}Select 1 or more instruments{% endtrans %} +
+
+ {% for instrument in instruments %} +
+ + {% endfor %} +
+
+
+
- {% endfor %} -
- - -
-
+

+ +

+ + + + + + {% endblock %} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..1466346f3 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "amt", + "lockfileVersion": 3, + "requires": true, + "packages": {} +}