Compare commits

..

No commits in common. "74db92638fa15a39b2a8fa12202352be449218ca" and "86d22425411fbff8b0fd53f773096eef5f9c7bba" have entirely different histories.

4 changed files with 288 additions and 189 deletions

View file

@ -34,187 +34,249 @@
} }
*, *::before, *::after { $font-family-base: "Space Grotesk";
box-sizing : border-box;
}
* { $font-family-monospace: "Space Mono";
margin : 0;
}
/* Variables */ $datacoop-purple: #4B3ABA;
:root { $datacoop-light-blue: #A8F3F4;
--base-grid : 60px; $datacoop-curry: #BA8D21;
--base-font-size : 22px; $datacoop-grey: #BCB8B3;
--text-color : #4b3aba;
--bg-color : #fff; $datacoop-curry-light: lighten($datacoop-curry, 12%);
--alt-bg-color : #a8f3f4; $datacoop-curry-lighter: lighten($datacoop-curry, 38%);
--bar-color : #f0dcac;
$datacoop-grey: #BCB8B3;
$primary: $datacoop-purple;
$secondary: $datacoop-light-blue;
$success: $datacoop-purple;
$info: $datacoop-grey;
$warning: $datacoop-curry;
$danger: $datacoop-curry;
$body-color: $datacoop-purple;
@import "bootstrap/bootstrap";
@import "tables";
html
{
height: 100%;
} }
body { body {
display : flex; min-width: 300px;
flex-direction : row; padding: 0;
height: 100%;
margin : 0;
padding : 0;
background : var(--bg-color);
color : var(--text-color);
font-family : space grotesk;
font-size : var(--base-font-size);
line-height : 165%;
text-align : left;
border-right : var(--base-grid) solid var(--bar-color);
} }
a { .everything-container {
color : var(--text-color); // Desktop
@include media-breakpoint-up(md) {
height: 100%;
max-width: 1200px;
}
padding: 0; // Overwrites .container-fluid
margin: 0; // Overwrites .container-fluid
> .row
{
max-width: 1200px;
margin: 0; // Overwrites .row
height: 100%;
}
} }
h1, h2, h3, h4, h5, h6, b, strong { // Mobile
font-weight : 700; @include media-breakpoint-down(sm) {
display: block;
.datacoop-sidebar {
height: 0;
display: block;
}
} }
main h1 { .datacoop-sidebar {
font-size : 3rem; background-color: $datacoop-light-blue;
margin : 0 0 3rem 0;
} }
main h2 { .datacoop-navbar {
font-size : 2rem;
margin : 3.5rem 0 1.5rem 0;
}
main h3 { background-color: $datacoop-light-blue;
font-size : 1.5rem; color: $datacoop-purple;
margin : 2rem 0 1.5rem 0; height: 100%;
} padding: 40px;
a {
color: $datacoop-purple;
}
main p, main code { // Mobile
margin : 1.5rem 0; @include media-breakpoint-down(sm) {
} display: block;
width: 100%;
}
// Desktop
@include media-breakpoint-up(md) {
height: 100%;
width: 340px;
main ol, main ul {
margin : 1.5rem;
}
main ol li, main ul li { // Overwrite because of usage of flexbox stuff, we use display: block
margin : 0.5rem 0; .navbar-collapse,
} .datacoop-menulists
{
display: block !important;
}
aside { }
background : var(--alt-bg-color); .data-coop-sidebar-logo
width : 420px; {
display: block;
border-right : var(--base-grid) solid var(--bar-color); width: 100%;
} img {
display: block;
aside header, aside nav, aside footer { width: 100%;
margin : var(--base-grid); margin-left: 2px;
} max-width: 400px;
main {
width : 100vw;
max-width : 900px;
}
main, aside {
min-height : 100vh;
}
main header, main article {
margin : var(--base-grid);
}
main article {
padding : calc(var(--base-grid) / 2) 0 0 0;
}
aside nav {
position : sticky;
top : var(--base-grid);
}
aside nav ol {
list-style-type : none;
padding : 0;
margin : 0;
}
aside nav ol li a {
display : block;
font-size : 2rem;
padding : 0.5rem 0;
text-decoration : none;
}
aside nav ol li a:hover {
text-decoration : underline;
}
aside #menu-toggle {
display : none;
font-size : 2em;
color : var(--text-color);
background : transparent;
border : 0;
}
aside nav footer {
margin : var(--base-grid) 0 0 0;
}
aside nav footer ol li a {
font-size : 1.65rem;
}
@media(max-width:1000px) {
:root {
--base-grid : 40px;
--base-font-size : 30px;
} }
margin-bottom: 30px;
}
body { ul
flex-direction : column; {
border : 0; list-style-type: none;
} padding: 0;
margin: 0;
}
aside {
min-height : auto;
width : 100%;
border-right : 0;
border-bottom : var(--base-grid) solid var(--bar-color);
}
aside header { ul > li
display : flex; {
flex-direction : row; list-style-type: none;
justify-content : space-between; display: block;
} }
aside header a { ul > li > a
width : 35%; {
max-width : 35%; font-size: 30px;
} }
aside nav { ul.datacoop-langchooser
display : none; {
display: block !important;
margin-top: 20px;
li {
display: block;
margin-right: 20px;
a {
font-size: 18px;
text-transform: uppercase;
}
} }
}
aside #menu-toggle { margin-bottom: 1em;
display : initial; }
font-size : 3em;
font-weight : bold; .datacoop-sidebar-gutter
} {
writing-mode: vertical-lr;
aside nav ol li a { transform: rotate(180deg);
display : block; max-width: auto !important; // overwrites col-md
padding : 1.5rem 0; flex: 0 0 0; // overwrites col-md
font-size : 3rem; width: auto;
} padding: 20px 10px;
background-color: $datacoop-curry-lighter;
color: $datacoop-purple;
font-family: $font-family-monospace;
font-size: 12px;
}
.datacoop-sidebar-gutter-right
{
writing-mode: horizontal-lr;
transform: rotate(0);
padding: 0;
min-width: 33px;
.sidebar-rotated
{
transform: rotate(180deg);
writing-mode: vertical-lr;
width: 500px;
font-size: 16px;
white-space: nowrap;
img {
width: 100%;
background-color: $datacoop-light-blue;
}
}
}
.datacoop-container-content
{
padding: 30px 50px;
}
article {
padding: 1em 0;
}
img {
max-width: 100%;
}
pre {
display: block;
padding: 9.5px;
word-break: break-all;
word-wrap: break-word;
background-color: #f5f5f5;
border: 1px solid #ccc;
border-radius: 4px;
}
pre code {
padding: 0;
font-size: inherit;
color: inherit;
white-space: pre-wrap;
background-color: transparent;
border: none;
border-radius: 0;
}
code {
padding: 2px 4px;
color: inherit;
background-color: #f5f5f5;
border: 1px solid #ccc;
border-radius: 4px;
font-size: .9em;
}
blockquote,
.blockquote {
padding: 10px 20px;
margin: 0 0 20px;
font-size: 1em;
border-left: 5px solid #6c757d;
}
h1, h2, h3, h4
{
text-align: center;
font-weight: bold;
} }

View file

@ -5,31 +5,48 @@
<body> <body>
<aside> <div class="container-fluid everything-container">
<header>
<a href="index.html"><img src="{{ printf "/static/img/logo_%s.svg" .Site.Language.Lang | absURL }}" alt="data coop logo"></a>
<button id="menu-toggle"></button>
</header>
{{ partial "nav.html" . }}
</aside> <div class="row">
<main>
<article>
{{ block "main" . }}{{ end }}
</article> <div class="col-md-3 datacoop-sidebar d-print-none navbar navbar navbar-light navbar-expand-md">
</main> {{ partial "nav.html" . }}
</div>
<div class="col-md-1 datacoop-sidebar-gutter d-print-none d-none d-md-flex">
<div class="sticky-bottom">
{{ with now }}
{{ i18n "generated_date" . }}
{{ end }}
</div>
</div>
<div class="col-md-7">
<div class="container datacoop-container-content">
<article>
{{ block "main" . }}{{ end }}
</article>
</div>
</div>
<div class="col-md-1 datacoop-sidebar-gutter datacoop-sidebar-gutter-right d-print-none d-none d-md-flex">
<div class="fixed-top">
<a href="#" class="sidebar-rotated">
<img src="{{ "/static/img/icons/expand.svg" | absURL }}" alt="open">
{{ i18n "services_status" }}
</a>
</div>
</div>
</div>
</div>
{{ partial "bootstrap-js.html" . }}
<script>
document.getElementById("menu-toggle").addEventListener("click", function() {
let d = document.getElementsByTagName("nav")[0];
let is_showing = (d.style.display == 'block');
d.style.display = is_showing ? 'none' : 'block';
document.getElementById("menu-toggle").innerHTML = is_showing ? '☰' : 'X' ;
});
</script>
</body> </body>
</html> </html>

View file

@ -1,8 +1,18 @@
{{ define "main" }} {{ define "main" }}
<h1>{{.Title}}</h1>
<main aria-role="main">
<header class="homepage-header">
<h1>{{.Title}}</h1>
{{ with .Params.subtitle }}
<span class="subtitle">{{.}}</span>
{{ end }}
</header>
<div class="homepage-content">
<!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
{{.Content}} {{.Content}}
</div>
</main>
{{ .Site.Params.mainSections }} {{ .Site.Params.mainSections }}
{{ $pages := where site.RegularPages "Type" "in" ("") }} {{ $pages := where site.RegularPages "Type" "in" ("") }}

View file

@ -1,16 +1,26 @@
<nav> <nav class="datacoop-navbar">
<ol>
<a href="/" class="data-coop-sidebar-logo">
<img src="{{ printf "/static/img/logo_%s.svg" .Site.Language.Lang | absURL }}">
</a>
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbarCollapse">
<span class="navbar-toggler-icon"></span>
</button>
<div class="datacoop-menulists collapse navbar-collapse" id="navbarCollapse">
<ul>
{{ range .Site.Menus.nav }} {{ range .Site.Menus.nav }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li> <li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }} {{ end }}
</ol> </ul>
<ul class="datacoop-langchooser">
{{ range $.Site.Home.AllTranslations }}
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
{{ end }}
</ul>
</div>
<footer>
<ol>
{{ range $.Site.Home.AllTranslations }}
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
{{ end }}
</ol>
</footer>
</nav> </nav>