[TASK] update layout
This commit is contained in:
parent
7681fcecb3
commit
b3d8315410
@ -3,7 +3,7 @@
|
||||
:root {
|
||||
--fore-color: black;
|
||||
--secondary-fore-color: slategray;
|
||||
--back-color: lightgray;
|
||||
--back-color: rgb(241, 241, 241);
|
||||
--secondary-back-color: #222;
|
||||
--blockquote-color: #f57c00;
|
||||
--pre-color: #1565c0;
|
||||
@ -32,15 +32,22 @@ html {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
font-family: 'Allura', sans-serif;
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
body {
|
||||
@media (min-width: 768px) {
|
||||
.container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(250px, 1fr));
|
||||
grid-template-rows: max-content;
|
||||
grid-gap: 2rem;
|
||||
grid-template-columns: 200px 1fr 200px;
|
||||
grid-template-rows: auto 1fr auto;
|
||||
}
|
||||
}
|
||||
|
||||
header {
|
||||
grid-column: 2 / span 2;
|
||||
}
|
||||
|
||||
a {
|
||||
@ -63,7 +70,6 @@ a:focus {
|
||||
nav {
|
||||
background: var(--nav-back-color);
|
||||
color: var(--nav-fore-color);
|
||||
border: 0.0625rem solid var(--nav-border-color);
|
||||
border-radius: var(--universal-border-radius);
|
||||
margin: var(--universal-margin);
|
||||
}
|
||||
@ -122,7 +128,10 @@ a.nav-item:visited {
|
||||
left: calc(var(--universal-padding) - 3 * var(--universal-padding));
|
||||
}
|
||||
|
||||
header {
|
||||
grid-column: 2 / 4;
|
||||
background: lightblue;
|
||||
main {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
footer {
|
||||
grid-column: span 3;
|
||||
}
|
||||
@ -1,81 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js">
|
||||
{% extends "templates/layout/base.twig" %}
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1, user-scalable=no" />
|
||||
{% block content %}
|
||||
{{ parent() }}
|
||||
|
||||
<title>{% if meta.title %}{{ meta.title }} | {% endif %}{{ site_title }}</title>
|
||||
{% if meta.description %}
|
||||
<meta name="description"
|
||||
content="{{ meta.description|striptags }}" />
|
||||
{% endif %}
|
||||
{% if meta.robots %}
|
||||
<meta name="robots"
|
||||
content="{{ meta.robots }}" />
|
||||
{% endif %}
|
||||
<section class="articles">
|
||||
{% for page in pages(current_page.id, depth=3)|sort_by("time")|reverse if not page.hidden %}
|
||||
<article>
|
||||
|
||||
{% if current_page %}
|
||||
<link rel="canonical"
|
||||
href="{{ current_page.url }}" />
|
||||
{% endif %}
|
||||
<blockquote>
|
||||
<a href="{{ page.url }}">{{ page.title }}</a>
|
||||
<p>{{ page.description }}</p>
|
||||
<small>{{ page.meta.date_formatted }} · {{page.meta.author}}
|
||||
</small>
|
||||
</blockquote>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="{{ theme_url }}/css/normalize.css"
|
||||
type="text/css" />
|
||||
<link rel="stylesheet"
|
||||
href="https://cdn.jsdelivr.net/npm/bulma@0.8.0/css/bulma.min.css">
|
||||
<link rel="stylesheet"
|
||||
href="{{ theme_url }}/css/style.css"
|
||||
type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
{{ site_title }}
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
{% for page in pages("blog")|sort_by("time")|reverse if not page.hidden %}
|
||||
<div class="post">
|
||||
<h3><a href="{{ page.url }}">{{ page.title }}</a></h3>
|
||||
<p class="date">{{ page.date_formatted }}</p>
|
||||
<p class="excerpt">{{ page.description }}</p>
|
||||
</div>
|
||||
</article>
|
||||
{% endfor %}
|
||||
{{ content }}
|
||||
</div>
|
||||
</main>
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="social">
|
||||
{% for social in pages["_meta"].meta.social %}
|
||||
<a href="{{ social.url }}"
|
||||
title="{{ social.title }}"
|
||||
role="button">
|
||||
<span class="icon-{{ social.icon }}"
|
||||
aria-hidden="true"></span>
|
||||
<span class="sr-only">{{ social.title }}</span>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<p>
|
||||
<a href="http://picocms.org/">Pico</a> was made by <a href="http://gilbert.pellegrom.me">Gilbert
|
||||
Pellegrom</a>
|
||||
and is maintained by <a href="https://github.com/picocms/Pico/graphs/contributors">The Pico
|
||||
Community</a>.
|
||||
Released under the <a href="https://github.com/picocms/Pico/blob/master/LICENSE.md">MIT license</a>.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="{{ theme_url }}/js/site.js"
|
||||
type="text/javascript"></script>
|
||||
<script defer
|
||||
src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
{% endblock %}
|
||||
|
||||
@ -1,42 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
|
||||
{% extends "templates/layout/base.twig" %}
|
||||
|
||||
<title>{% if meta.title %}{{ meta.title }} | {% endif %}{{ site_title }}</title>
|
||||
{% if meta.description %}
|
||||
<meta name="description" content="{{ meta.description|striptags }}" />
|
||||
{% endif %}
|
||||
{% if meta.robots %}
|
||||
<meta name="robots" content="{{ meta.robots }}" />
|
||||
{% endif %}
|
||||
{% block content %}
|
||||
{{ parent() }}
|
||||
|
||||
{% if current_page %}
|
||||
<link rel="canonical" href="{{ current_page.url }}" />
|
||||
{% endif %}
|
||||
<nav class="blog-navigation">
|
||||
<a href="{{ "blog"|link }}">Zurück</a>
|
||||
|
||||
<link rel="stylesheet" href="{{ theme_url }}/css/bulma.css">
|
||||
<link rel="stylesheet" href="{{ theme_url }}/css/style.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<header class="title">
|
||||
{{ meta.title }} - {{ site_title }}
|
||||
</header>
|
||||
|
||||
<main >
|
||||
<div class="container">
|
||||
{{ content }}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="{{ theme_url }}/js/site.js" type="text/javascript"></script>
|
||||
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
</nav>
|
||||
{% endblock %}
|
||||
|
||||
@ -1,66 +1 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1, user-scalable=no" />
|
||||
|
||||
<title>{% if meta.title %}{{ meta.title }} | {% endif %}{{ site_title }}</title>
|
||||
{% if meta.description %}
|
||||
<meta name="description"
|
||||
content="{{ meta.description|striptags }}" />
|
||||
{% endif %}
|
||||
{% if meta.robots %}
|
||||
<meta name="robots"
|
||||
content="{{ meta.robots }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if current_page %}
|
||||
<link rel="canonical"
|
||||
href="{{ current_page.url }}" />
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="{{ theme_url }}/css/normalize.css">
|
||||
<link rel="stylesheet"
|
||||
href="{{ theme_url }}/css/style.css"
|
||||
type="text/css" />
|
||||
</head>
|
||||
|
||||
<body class="container">
|
||||
<header class="title is-1">
|
||||
<a href="{{ "index"|link }}">
|
||||
<img src="{{ pages["_meta"].meta.logo|url }}"
|
||||
alt="" />
|
||||
{{ site_title }}
|
||||
</a>
|
||||
</header>
|
||||
<nav class="column is-one-quarter">
|
||||
<a class="nav-item"
|
||||
href="{{ "index"|link }}">Startseite</a>
|
||||
{% for page in pages("index") if not page.hidden %}
|
||||
<a class="nav-item level-1"
|
||||
href="{{ page.url }}">{{ page.title }}</a>
|
||||
{% for subpage in pages(page.id) if not subpage.hidden and not subpage.meta.type == "news" %}
|
||||
<a class="nav-item level-2"
|
||||
href="{{ subpage.url }}">{{ subpage.title }}</a>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</nav>
|
||||
<main class="column container">
|
||||
<div class="container">
|
||||
{{ content }}
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
<footer>
|
||||
</footer>
|
||||
|
||||
<script src="{{ theme_url }}/js/site.js"
|
||||
type="text/javascript"></script>
|
||||
<script defer
|
||||
src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
{% extends "templates/layout/base.twig" %}
|
||||
|
||||
73
themes/chrosey/templates/layout/base.twig
Normal file
73
themes/chrosey/templates/layout/base.twig
Normal file
@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js">
|
||||
|
||||
<head>
|
||||
{% block head %}
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1, user-scalable=no" />
|
||||
|
||||
<title>{% if meta.title %}{{ meta.title }} | {% endif %}{{ site_title }}</title>
|
||||
{% if meta.description %}
|
||||
<meta name="description"
|
||||
content="{{ meta.description|striptags }}" />
|
||||
{% endif %}
|
||||
{% if meta.robots %}
|
||||
<meta name="robots"
|
||||
content="{{ meta.robots }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if current_page %}
|
||||
<link rel="canonical"
|
||||
href="{{ current_page.url }}" />
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="{{ theme_url }}/css/normalize.css">
|
||||
<link rel="stylesheet"
|
||||
href="{{ theme_url }}/css/style.css"
|
||||
type="text/css" />
|
||||
{% endblock %}
|
||||
</head>
|
||||
|
||||
<body class="container">
|
||||
<header>
|
||||
<a href="{{ "index"|link }}">
|
||||
<img src="{{ pages["_meta"].meta.logo|url }}"
|
||||
alt="" />
|
||||
<h1>{{ site_title }}</h1>
|
||||
</a>
|
||||
</header>
|
||||
<nav>
|
||||
{% block navigation %}
|
||||
|
||||
<a class="nav-item"
|
||||
href="{{ "index"|link }}">Startseite</a>
|
||||
{% for page in pages("index") if not page.hidden %}
|
||||
<a class="nav-item level-1"
|
||||
href="{{ page.url }}">{{ page.title }}</a>
|
||||
{% for subpage in pages(page.id) if not subpage.hidden and not subpage.meta.type == "news" %}
|
||||
<a class="nav-item level-2"
|
||||
href="{{ subpage.url }}">{{ subpage.title }}</a>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% endblock %}
|
||||
</nav>
|
||||
<main>
|
||||
{% block content %}
|
||||
<section>
|
||||
{{ content }}
|
||||
</section>
|
||||
{% endblock %}
|
||||
</main>
|
||||
<footer>
|
||||
{% block footer %} {% endblock %}
|
||||
</footer>
|
||||
<script src="{{ theme_url }}/js/site.js"
|
||||
type="text/javascript"></script>
|
||||
<script defer
|
||||
src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user