Use new-new theme, still needs a lot of clean-up removing old-stuff

This commit is contained in:
Benjamin Bach 2022-11-09 02:03:14 +01:00
parent 86d2242541
commit 16fab68e61
Signed by untrusted user: benjaoming
GPG key ID: 7D49441634585664
4 changed files with 191 additions and 290 deletions

View file

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

View file

@ -5,47 +5,30 @@
<body>
<div class="container-fluid everything-container">
<div class="row">
<div class="col-md-3 datacoop-sidebar d-print-none navbar navbar navbar-light navbar-expand-md">
<aside>
<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" . }}
</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">
</aside>
<main>
<article>
{{ block "main" . }}{{ end }}
</article>
</div>
</div>
</main>
<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>

View file

@ -1,18 +1,8 @@
{{ define "main" }}
<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}}
</div>
</main>
{{ .Site.Params.mainSections }}
{{ $pages := where site.RegularPages "Type" "in" ("") }}

View file

@ -1,26 +1,16 @@
<nav class="datacoop-navbar">
<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>
<nav>
<ol>
{{ range .Site.Menus.nav }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
<ul class="datacoop-langchooser">
</ol>
<footer>
<ol>
{{ range $.Site.Home.AllTranslations }}
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
{{ end }}
</ul>
</div>
</ol>
</footer>
</nav>