Skip to content

Commit

Permalink
Integrated ROOS design system (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurensWe authored Aug 29, 2024
2 parents 61522b1 + c8ee057 commit 4fc108b
Show file tree
Hide file tree
Showing 21 changed files with 3,802 additions and 1,668 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG NVM_VERSION
LABEL [email protected] \
organization=MinBZK \
license=EUPL-1.2 \
org.opencontainers.image.description="Transparency of Algorithmic Decision making" \
org.opencontainers.image.description="Algoritm Management Toolkit" \
org.opencontainers.image.source=https://github.com/MinBZK/amt \
org.opencontainers.image.licenses=EUPL-1.2

Expand Down
Binary file removed amt/site/static/fonts/ROsanswebtextbold.woff
Binary file not shown.
Binary file removed amt/site/static/fonts/ROsanswebtextitalic.woff
Binary file not shown.
Binary file removed amt/site/static/fonts/ROsanswebtextregular.woff
Binary file not shown.
1 change: 0 additions & 1 deletion amt/site/static/images/logo.svg

This file was deleted.

95 changes: 1 addition & 94 deletions amt/site/static/scss/layout.scss
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
@font-face {
font-family: "Rijksoverheid Sans";
src: url("../fonts/ROsanswebtextregular.woff") format("opentype");
font-style: normal;
font-weight: 400;
}

@font-face {
font-family: "Rijksoverheid Sans";
src: url("../fonts/ROsanswebtextitalic.woff") format("opentype");
font-style: italic;
font-weight: 400;
}

@font-face {
font-family: "Rijksoverheid Sans";
src: url("../fonts/ROsanswebtextbold.woff") format("opentype");
font-weight: 700;
font-style: normal;
}

:root {
--clr-neutral-800: hsl(234deg 29% 20%);
--clr-neutral-700: hsl(235deg 18% 26%);
Expand All @@ -27,7 +6,7 @@
--clr-accent-600: hsl(211deg 69% 27%);
--clr-accent-400: hsl(203deg 100% 39%);
--clr-accent-200: hsl(203deg 63.8% 81.6%);
--ff-base: "Rijksoverheid Sans", sans-serif;
--ff-base: "RijksoverheidSansWebText", sans-serif;
--fw-regular: 400;
--fw-bold: 700;
--fs-300: 0.825rem;
Expand Down Expand Up @@ -62,42 +41,6 @@ main {
margin-inline: clamp(1rem, 2vw, 4rem);
}

footer {
margin-block-start: 2em;
border-block-start-color: var(--clr-accent-200);
border-block-start-style: solid;
border-block-start-width: 0.5rem;
background-color: hsl(203deg 100% 39%);
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);
}
Expand All @@ -108,42 +51,6 @@ footer {
color: inherit;
}

.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;
}
Expand Down
62 changes: 60 additions & 2 deletions amt/site/templates/footer.html.j2
Original file line number Diff line number Diff line change
@@ -1,2 +1,60 @@
<footer>
</footer>
<div class="rvo-footer-bg">
<footer class="utrecht-page-footer rvo-footer rvo-footer--lg">
<div class="rvo-footer-column">
<h3 class="utrecht-heading-3 rvo-footer-menu-title">{% trans %}Algorithm Management
Toolkit{% endtrans %}</h3>
<ul class="rvo-footer-menu">
<li class="rvo-footer-menu-item">
<a
class="rvo-link rvo-link--with-icon rvo-link--no-underline"
href="#"
>
<span
class="utrecht-icon rvo-icon rvo-icon-delta-naar-rechts rvo-icon--sm rvo-icon--wit rvo-link__icon--before"
role="img"
aria-label="Delta naar rechts"
></span>
Over ons
</a>
</li>
<li class="rvo-footer-menu-item">
<a
class="rvo-link rvo-link--with-icon rvo-link--no-underline"
href="#"
>
<span
class="utrecht-icon rvo-icon rvo-icon-delta-naar-rechts rvo-icon--sm rvo-icon--wit rvo-link__icon--before"
role="img"
aria-label="Delta naar rechts"
></span>
Contact
</a>
</li>

</ul>
</div>


<div class="rvo-footer-column">
<h3 class="utrecht-heading-3 rvo-footer-menu-title">{% trans %}Language{% endtrans %}</h3>
<ul class="rvo-footer-menu">
{% for available_translation in available_translations %}
<li class="rvo-footer-menu-item">
<a {% if available_translation == language %}class="selected"{% endif %}
id="langselect-{{ available_translation }}"
class="rvo-link rvo-link--with-icon rvo-link--no-underline"
href="javascript:setCookie('lang', '{{ available_translation }}', 9999); window.location.reload()"
>
<span
class="utrecht-icon rvo-icon rvo-icon-wereldbol rvo-icon--sm rvo-icon--wit rvo-link__icon--before"
role="img"
aria-label="Delta naar rechts"
></span>
{{ available_translation }}
</a>
</li>
{% endfor %}
</ul>
</div>
</footer>
</div>
72 changes: 53 additions & 19 deletions amt/site/templates/header.html.j2
Original file line number Diff line number Diff line change
@@ -1,26 +1,60 @@
<header class="header">
<div class="header-top">
<a href="/"></a><img class="header-logo-image" src="{{ url_for_cache('static', path='images/logo.svg') }}" /></a>
<span>{% trans %}Algorithm Management Toolkit{% endtrans %} ({{ version }})</span>
<div class="rvo-header__logo-wrapper">
<div class="rvo-logo rvo-header__logo-img">
<div class="rvo-logo__emblem">
<img src="/static/dist/@nl-rvo/assets-1.0.0-alpha.360/images/emblem.svg">
</div>
<div class="rvo-logo__wordmark">
<p class="rvo-logo__title">{% trans %}Algorithm Management Toolkit{% endtrans %} ({{ version }})</p>
</div>
</div>
</div>
<div class="header-nav">
<div class="header-nav-container">
<nav>
<ul>
<li><a href="/projects/new">{% trans %}New project{% endtrans %}</a></li>
<li><a href="/projects/">{% trans %}Projects{% endtrans %}</a></li>
<div class="rvo-layout-column rvo-layout-gap--md">
<div class="rvo-topnav__background rvo-topnav__background--horizontal-rule">
<nav class="rvo-topnav rvo-topnav--md">
<ul class="rvo-topnav__list">
<li class="rvo-topnav__item">
<a class="rvo-link rvo-topnav__link rvo-link--logoblauw" href="#">
<span
class="utrecht-icon rvo-icon rvo-icon-home rvo-icon--md rvo-icon--wit"
role="img"
aria-label="Home"
></span>
Home
</a>
</li>
<li class="rvo-topnav__item">
<a class="rvo-link rvo-topnav__link rvo-link--logoblauw" href="/projects/">
<span
class="utrecht-icon rvo-icon rvo-icon-publicatie rvo-icon--md rvo-icon--wit"
role="img"
aria-label="Publicatie"
></span>
{% trans %}Projects{% endtrans %}
</a>
</li>
<li class="rvo-topnav__item">
<a class="rvo-link rvo-topnav__link rvo-link--logoblauw" href="/projects/new">
<span
class="utrecht-icon rvo-icon rvo-icon-plus rvo-icon--md rvo-icon--wit"
role="img"
aria-label="Plus"
></span>
{% trans %}New project{% endtrans %}
</a>
</li>
<li class="rvo-topnav__item rvo-topnav__item--align-right">
<a class="rvo-link rvo-topnav__link rvo-link--logoblauw" href="#">
<span
class="utrecht-icon rvo-icon rvo-icon-versleutelen rvo-icon--md rvo-icon--wit"
role="img"
aria-label="Versleutelen"
></span>
Uitloggen
</a>
</li>
</ul>
</nav>
</div>
<div class="language-selection">
<span>{% trans %}Language{% endtrans %}:</span>

{% for available_translation in available_translations %}
<a {% if available_translation==language %}class="selected" {% endif %}
id="langselect-{{ available_translation }}"
href="javascript:setCookie('lang','{{ available_translation }}',9999); window.location.reload()">{{
available_translation }}</a>
{% endfor %}
</div>
</div>
</header>
5 changes: 1 addition & 4 deletions amt/site/templates/layouts/base.html.j2.webpack
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,16 @@
<% } %>
<script type="text/javascript" src="{{ url_for_cache('static', path='vendor/htmx/js/json-enc.js') }}"></script>
<script type="text/javascript" src="{{ url_for_cache('static', path='vendor/htmx/js/response-targets.js') }}"></script>

{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ url_for_cache('static', path='css/html5reset.css') }}" />

<% for (const css of htmlWebpackPlugin.files.css) { %>
<link rel="stylesheet" href="{{ url_for_cache('static', path='<%= css.split('/static/')[1] %>') }}">
<% } %>

{% endblock %}
</head>

<body hx-ext="response-targets">
<body hx-ext="response-targets" class="rvo-theme rvo-layout-gap--3xl">
{% block header %}
{% include 'header.html.j2' %}
{% endblock %}
Expand Down
4 changes: 2 additions & 2 deletions amt/site/templates/projects/_list.html.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% for project in projects %}
{% if loop.last and projects|length == limit %}
<li data-marker="last-element" hx-get="/projects/?skip={{ next }}&search={{ search }}" hx-swap="afterend" hx-trigger="revealed"><a href="/project/{{ project.id }}">{{ project.name }}</a></li>
{% if loop.last and projects|length == limit %}
<li class="rvo-item-list" data-marker="last-element" hx-get="/projects/?skip={{ next }}&search={{ search }}" hx-swap="afterend" hx-trigger="revealed"><a href="/project/{{ project.id }}">{{ project.name }}</a></li>
{% else %}
<li><a href="/project/{{ project.id }}">{{ project.name }}</a></li>
{% endif %}
Expand Down
69 changes: 38 additions & 31 deletions amt/site/templates/projects/index.html.j2
Original file line number Diff line number Diff line change
@@ -1,38 +1,45 @@
{% extends 'layouts/base.html.j2' %}

{% block content %}
<h1 class="margin-bottom-large">{% trans %}Projects{% endtrans %}</h1>

<form>
<label>
<input
size="100"
type="search"
placeholder="{% trans %}Find project...{% endtrans %}"
name="search"
hx-get="/projects/?skip=0"
hx-trigger="input changed delay:500ms, search"
hx-target="#project-search-results"
hx-indicator=".htmx-indicator"
hx-swap="innerHTML"
autocomplete="false"
id="project-search-input"
/>
</label>
<input type="reset"
value="X"
style="position: relative; margin-left: -30px"
hx-trigger="click"
hx-get="/projects/?skip=0"
hx-target="#project-search-results"
hx-indicator=".htmx-indicator"
hx-swap="innerHTML"
/>
</form>
<main class="rvo-max-width-layout rvo-max-width-layout--sm">
<div class="rvo-content">

<ul class="project-list" id="project-search-results">
{% include 'projects/_list.html.j2' %}
</ul>
<h1 class="utrecht-heading-1">{% trans %}Projects{% endtrans %}</h1>

<div id="errorContainer"></div>
<form>
<label>
<input
size="100"
type="search"
placeholder="{% trans %}Find project...{% endtrans %}"
name="search"
hx-get="/projects/?skip=0"
hx-trigger="input changed delay:500ms, search"
hx-target="#project-search-results"
hx-indicator=".htmx-indicator"
hx-swap="innerHTML"
autocomplete="false"
id="project-search-input"
/>
</label>
<input type="reset"
value="X"
style="position: relative; margin-left: -30px"
hx-trigger="click"
hx-get="/projects/?skip=0"
hx-target="#project-search-results"
hx-indicator=".htmx-indicator"
hx-swap="innerHTML"
/>
</form>

<ul class="rvo-item-list" id="project-search-results">
{% include 'projects/_list.html.j2' %}
</ul>

</div>
</main>

<div id="errorContainer"></div>
{% endblock %}
Loading

0 comments on commit 4fc108b

Please sign in to comment.