Transformed site to Bootstrap 4

See #11

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
Jim Martens 2017-12-24 20:08:36 +01:00
parent f6e0419292
commit 537b3a3a93
10 changed files with 150 additions and 139 deletions

View File

@ -8,6 +8,10 @@
@import "bootstrap/functions";
@import "bootstrap/variables";
@import "bootstrap/mixins";
// overwrite variables
$body-bg: #fdfdfd;
@import "bootstrap/root";
@import "bootstrap/print";
@import "bootstrap/reboot";

View File

@ -1,45 +1,5 @@
@charset "UTF-8";
// Our variables
$base-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
$base-font-size: 16px;
$base-font-weight: 400;
$small-font-size: $base-font-size * 0.875;
$base-line-height: 1.5;
$spacing-unit: 30px;
$text-color: #111;
$background-color: #fdfdfd;
$brand-color: #2a7ae2;
$grey-color: #828282;
$grey-color-light: lighten($grey-color, 40%);
$grey-color-dark: darken($grey-color, 25%);
// Width of the content area
$content-width: 800px;
$on-palm: 600px;
$on-laptop: 800px;
// Use media queries like this:
// @include media-query($on-palm) {
// .wrapper {
// padding-right: $spacing-unit / 2;
// padding-left: $spacing-unit / 2;
// }
// }
@mixin media-query($device) {
@media screen and (max-width: $device) {
@content;
}
}
// Import partials from `sass_dir` (defaults to `_sass`)
@import
"bootstrap-custom",
@ -49,6 +9,32 @@ $on-laptop: 800px;
"video-embedding"
;
.site-header > .navbar {
//border-top: 5px solid $dark;
border-bottom: 2px solid $light;
}
body {
padding-top: 60px;
}
main {
padding-bottom: 70px;
}
.site-header > .navbar {
background-color: $body-bg;
}
.site-footer {
border-top: 2px solid $light;
background-color: $body-bg;
}
.post-content {
text-align: justify;
}
.post-title {
font-weight: $font-weight-normal;
}

View File

@ -1,36 +1,44 @@
<footer class="site-footer">
<div class="wrapper">
<div class="footer-col-wrapper">
<div class="footer-col footer-col-1">
<ul class="unstyled-list">
<li><a href="/legal-notice">Impressum</a></li>
<li><a href="/datenschutz">Datenschutz</a></li>
</ul>
<footer class="site-footer small text-muted py-3 fixed-bottom">
<div class="container">
<div class="row">
<div class="col-4">
<nav class="nav">
<ul class="nav">
<li class="nav-item"><a class="nav-link" href="/legal-notice">Impressum</a></li>
<li class="nav-item"><a class="nav-link" href="/datenschutz">Datenschutz</a></li>
</ul>
</nav>
</div>
<div class="footer-col footer-col-2">
<div class="col-8">
{% comment %}
<ul class="social-media-list">
{% if site.github_username %}
<li>
{% include icon-github.html username=site.github_username %}
</li>
{% endif %}
{% if site.github_username %}
<li>
{% include icon-github.html username=site.github_username %}
</li>
{% endif %}
{% if site.twitter_username %}
<li>
{% include icon-twitter.html username=site.twitter_username %}
</li>
{% endif %}
{% if site.twitter_username %}
<li>
{% include icon-twitter.html username=site.twitter_username %}
</li>
{% endif %}
</ul>
</div>
<div class="footer-col footer-col-3">
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This <span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/Text" rel="dct:type">work</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://jim.2martens.de" property="cc:attributionName" rel="cc:attributionURL">Jim Martens</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.
{% endcomment %}
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">
<img alt="Creative Commons License" style="border-width:0"
src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png"/>
</a><br/>
<span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">2martens dot de</span> by
<a xmlns:cc="http://creativecommons.org/ns" href="https://2martens.de"
property="cc:attributionName"
rel="cc:attributionURL">
Jim Martens
</a> is licensed under a
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">
Creative Commons Attribution-ShareAlike 4.0 International License
</a>.
</div>
</div>
</div>
</footer>

View File

@ -1,12 +1,14 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<base href="{{ site.url }}{{ site.baseurl }}" />
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
<meta name="description"
content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
{% stylesheet main.scss %}
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ '/feed.xml' | prepend: site.baseurl | prepend: site.url }}">
{% stylesheet main.scss %}
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}"
href="{{ '/feed.xml' | prepend: site.baseurl | prepend: site.url }}">
</head>

View File

@ -1,24 +1,44 @@
<header class="site-header">
<nav class="navbar navbar-expand-lg navbar-light fixed-top">
<div class="container">
<a class="navbar-brand" href="{{ site.baseurl }}/">{{ site.title }}</a>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="wrapper">
<a class="site-title" href="{{ site.baseurl }}/">{{ site.title }}</a>
<nav class="site-nav">
<a href="#" class="menu-icon">
<svg viewBox="0 0 18 15">
<path fill="#424242" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
<path fill="#424242" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484 h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
<path fill="#424242" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
</svg>
</a>
<div class="trigger">
<a class="page-link" href="{{ "/about" | prepend: site.baseurl }}">About</a>
<a class="page-link" href="{{ "/media" | prepend: site.baseurl }}">Media</a>
</div>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="{{ '/about' | prepend: site.baseurl }}">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ '/media' | prepend: site.baseurl }}">Media</a>
</li>
{% comment %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</li>
{% endcomment %}
</ul>
</div>
</div>
</nav>
</div>
</header>
<div class="container my-3">
{% comment %}notification area {% endcomment %}
<div class="alert alert-primary" role="alert">
This is a primary alert—check it out!
</div>
</div>

0
_includes/sidebar.html Normal file
View File

View File

@ -1,20 +1,14 @@
<!DOCTYPE html>
<html lang="en">
{% include head.html %}
<body>
{% include header.html %}
<div class="page-content">
<div class="wrapper">
{{ content }}
</div>
</div>
{% include footer.html %}
</body>
{% include head.html %}
<body>
{% include header.html %}
<main class="container">
{{ content }}
</main>
{% include sidebar.html %}
{% include footer.html %}
</body>
</html>

View File

@ -7,7 +7,7 @@ layout: default
<h1 class="post-title">{{ page.title }}</h1>
</header>
<div class="post-content">
<div class="text-justify">
{{ content }}
</div>

View File

@ -3,13 +3,19 @@ layout: default
---
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
<p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</p>
</header>
<header class="post-header">
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
<p class="small text-muted">
<time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
{{ page.date | date: "%b %-d, %Y" }}
</time>
{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">{{ page.author }}</span></span>{% endif %}
</p>
</header>
<div class="post-content" itemprop="articleBody">
{{ content }}
</div>
<div class="text-justify" itemprop="articleBody">
{{ content }}
</div>
</article>

View File

@ -2,22 +2,13 @@
layout: default
---
<div class="home">
<!--<h1 class="page-heading">Posts</h1>-->
<ul class="post-list">
{% for post in site.posts %}
<li>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
<h2>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h2>
</li>
{% endfor %}
</ul>
<!--<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a></p>-->
</div>
<ul class="post-list list-unstyled">
{% for post in site.posts %}
<li class="mb-4">
<span class="small text-muted">{{ post.date | date: "%b %-d, %Y" }}</span>
<p class="h4 post-title">
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</p>
</li>
{% endfor %}
</ul>