Squashed: responsive design fixes; gulp setup

This commit is contained in:
Robert Kaussow 2018-10-13 02:31:06 +02:00
parent 86d7843dee
commit 05887c02c2
8 changed files with 318 additions and 379 deletions

View File

@ -1,8 +1,9 @@
var gulp = require('gulp'); const gulp = require('gulp');
var minifyCSS = require('gulp-csso'); const minifyCSS = require('gulp-csso');
var concat = require('gulp-concat'); const concat = require('gulp-concat');
var rename = require('gulp-rename'); const rename = require('gulp-rename');
var cleanCSS = require('gulp-clean-css'); const cleanCSS = require('gulp-clean-css');
const autoprefixer = require('gulp-autoprefixer');
var CSSDEST = 'static/' var CSSDEST = 'static/'
@ -12,6 +13,10 @@ function defaultTask(done) {
return gulp.src('src/css/*.css') return gulp.src('src/css/*.css')
.pipe(concat('default.css')) .pipe(concat('default.css'))
.pipe(cleanCSS({format: 'beautify'})) .pipe(cleanCSS({format: 'beautify'}))
.pipe(autoprefixer({
browsers: ['last 4 versions'],
cascade: false
}))
.pipe(gulp.dest(CSSDEST)) .pipe(gulp.dest(CSSDEST))
.pipe(cleanCSS()) .pipe(cleanCSS())
.pipe(rename({ extname: '.min.css' })) .pipe(rename({ extname: '.min.css' }))

View File

@ -1,11 +1,15 @@
{{ $pag := $.Paginator }} {{ $pag := $.Paginator }}
<nav class="pagination" role="navigation"> <nav class="paging" role="navigation">
{{ if $pag.HasPrev }} <div class="paging__button is-next">
<a class="newer-posts" href="{{ $pag.Prev.URL }}">&larr; Newer Posts</a> {{ if $pag.HasPrev }}
{{ end }} <a class="paging__link" href="{{ $pag.Prev.URL }}">&larr; Neuere</a>
<span class="page-number">Page {{ $pag.PageNumber }} of {{ $pag.TotalPages }}</span> {{ end }}
{{ if $pag.HasNext }} </div>
<a class="older-posts" href="{{ $pag.Next.URL }}">Older Posts &rarr;</a> <div class="paging__state">Seite {{ $pag.PageNumber }} von {{ $pag.TotalPages }}</div>
{{ end }} <div class="paging__button is-prev">
{{ if $pag.HasNext }}
<a class="paging__link" href="{{ $pag.Next.URL }}">Ältere &rarr;</a>
{{ end }}
</div>
</nav> </nav>

View File

@ -15,6 +15,7 @@
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"gulp": "^4.0.0", "gulp": "^4.0.0",
"gulp-autoprefixer": "^6.0.0",
"gulp-clean-css": "^3.10.0", "gulp-clean-css": "^3.10.0",
"gulp-concat": "^2.6.1", "gulp-concat": "^2.6.1",
"gulp-csso": "^3.0.1", "gulp-csso": "^3.0.1",

View File

@ -1,378 +1,326 @@
@font-face { @font-face {
font-family: 'OpenSans'; font-family: 'OpenSans';
src: url('/_font/OpenSans/OpenSans-Regular.eot'); src: url('/_font/OpenSans/OpenSans-Regular.eot');
src: url('/_font/OpenSans/OpenSans-Regular.eot?#iefix') format('embedded-opentype'), src: url('/_font/OpenSans/OpenSans-Regular.eot?#iefix') format('embedded-opentype'),
url('/_font/OpenSans/OpenSans-Regular.ttf') format('truetype'); url('/_font/OpenSans/OpenSans-Regular.ttf') format('truetype');
} }
@font-face { @font-face {
font-family: 'OpenSansLight'; font-family: 'OpenSansLight';
src: url('/_font/OpenSans/OpenSans-Light.eot'); src: url('/_font/OpenSans/OpenSans-Light.eot');
src: url('/_font/OpenSans/OpenSans-Light.eot?#iefix') format('embedded-opentype'), src: url('/_font/OpenSans/OpenSans-Light.eot?#iefix') format('embedded-opentype'),
url('/_font/OpenSans/OpenSans-Light.ttf') format('truetype'); url('/_font/OpenSans/OpenSans-Light.ttf') format('truetype');
} }
@font-face { @font-face {
font-family: 'CreteRound'; font-family: 'CreteRound';
src: url('/_font/CreteRound/CreteRound-Regular.otf') format('truetype'); src: url('/_font/CreteRound/CreteRound-Regular.otf') format('truetype');
} }
@font-face { @font-face {
font-family: 'DroidSans_Mono'; font-family: 'DroidSans_Mono';
src: url('/_font/DroidSansMono/DroidSansMono-webfont.eot'); src: url('/_font/DroidSansMono/DroidSansMono-webfont.eot');
src: url('/_font/DroidSansMono/DroidSansMono-webfont.eot?#iefix') format('embedded-opentype'), src: url('/_font/DroidSansMono/DroidSansMono-webfont.eot?#iefix') format('embedded-opentype'),
url('/_font/DroidSansMono/DroidSansMono-webfont.ttf') format('truetype'); url('/_font/DroidSansMono/DroidSansMono-webfont.ttf') format('truetype');
} }
html,body { html,body {
margin:0; margin:0;
padding:0; padding:0;
height: 100%; height: 100%;
} }
html{ html{
box-sizing: border-box; box-sizing: border-box;
font-family:OpenSans; font-family:OpenSans;
} }
*, *:before, *:after { *, *:before, *:after {
box-sizing: inherit; box-sizing: inherit;
} }
/* /*
Global Helper Classes Global Helper Classes
*/ */
.table{ .table{
display:table; display:table;
} }
.table-cell{ .table-cell{
display:table-cell; display:table-cell;
} }
.floated{ .floated{
float:left; float:left;
} }
.clear{ .clear{
clear:both; clear:both;
} }
.chroma code{ /*************************
font-family: DroidSans_Mono; Global Blog Header
font-size: 0.9em; **************************/
}
/*
Global Blog Header
*/
.site-header { .site-header {
background: #4186C9; background: #4186C9;
padding: 2em 0; padding: 2em 0;
text-align: center; text-align: center;
color: #FFF; color: #FFF;
} }
.site-header__icon { .site-header__icon {
font-size: 2.5em; font-size: 2.5em;
background: #FFF; background: #FFF;
padding: 0 0.25em; padding: 0 0.25em;
border-radius: 50%; border-radius: 50%;
color: #4186C9; color: #4186C9;
} }
.site-header__title { .site-header__title {
font-size: 2.5em; font-size: 2.5em;
font-family:CreteRound; font-family:CreteRound;
font-weight: normal; font-weight: normal;
padding-left: 0.3em; padding-left: 0.3em;
} }
.site-header__description { .site-header__description {
display: block; display: block;
margin: 0.8em 0 0.5em; margin: 0.8em 0 0.5em;
} }
.site-nav, .site-nav,
.site-nav__mobile { .site-nav__mobile {
background: #2F333E; background: #2F333E;
text-align: center; text-align: center;
color: #D9D9D9; color: #D9D9D9;
} }
.site-nav { .site-nav {
display: block; display: block;
} }
.site-nav__mobile { .site-nav__mobile {
display: none; display: none;
} }
.site-nav__button{ .site-nav__button{
color: #D9D9D9; color: #D9D9D9;
text-decoration: none; text-decoration: none;
padding: 0.2em 0.5em; padding: 0.2em 0.5em;
border: 1px solid; border: 1px solid;
border-radius: 6px; border-radius: 6px;
display: inline-block; display: inline-block;
margin: 0.8em 0;
} }
.site-nav__button:hover, .site-nav__button:hover,
.site-nav__button.is-active { .site-nav__button.is-active {
background: #3D4352; background: #3D4352;
cursor: pointer; cursor: pointer;
} }
.site-nav__list{ .site-nav__list{
margin:0; margin:0;
padding: 0.8em 0;
} }
.site-nav__list li { .site-nav__list li {
display:inline-block; display:inline-block;
margin: 0 0.3em; margin: 0 0.3em;
} }
/************************
/* Content Section
Content Section *************************/
*/
.site-wrapper { .site-wrapper {
position: relative; display: flex;
min-height: 100%; flex-direction: column;
height: auto !important; min-height: 100vh;
height: 100%;
} }
.site-content {
flex: 1;
}
.site-content, .site-content,
.site-footer__block { .site-footer__block {
margin:0 auto; margin:0 auto;
width:80%; width:80%;
max-width:980px; max-width:980px;
} }
.post { .post {
word-wrap: break-word; word-wrap: break-word;
border-top:1px dashed #959595; border-top:1px dashed #959595;
margin: 0 2em; margin: 0 2em;
padding: 1.5em 0; padding: 1.5em 0;
} }
.post:first-child{ .post:first-child{
border:0; border:0;
} }
.post-header__link { .post-header__link {
color:#000000; color:#000000;
text-decoration: none; text-decoration: none;
} }
.post-header__link:hover{ .post-header__link:hover{
text-decoration: underline; text-decoration: underline;
} }
.post-header__title { .post-header__title {
font-weight: normal; font-weight: normal;
} }
.post-content__link { .post-content__link {
color:#0A539A; color:#0A539A;
text-decoration: underline; text-decoration: underline;
} }
.post-content__link:hover { .post-content__link:hover {
background:#0A539A; background:#0A539A;
color:#FFFFFF; color:#FFFFFF;
text-decoration:none; text-decoration:none;
} }
.post-content__link.is-readmore:after { .post-content__link.is-readmore:after {
content:' \f30b'; content:' \f30b';
font-family: 'Font Awesome 5 Free'; font-family: 'Font Awesome 5 Free';
font-weight: 900; font-weight: 900;
} }
.post-content__link.is-readmore { .post-content__link.is-readmore {
margin-bottom: 1.5em; margin-bottom: 1.5em;
display: inline-block; display: inline-block;
} }
.post-footer__link { .post-footer__link {
border:1px solid #BFBFBF; border:1px solid #BFBFBF;
padding:1px 4px; padding:1px 4px;
margin:2px 0; margin:2px 0;
border-radius: 4px; border-radius: 4px;
text-decoration: none; text-decoration: none;
color:#505050; color:#505050;
text-transform: uppercase; text-transform: uppercase;
position:relative; position:relative;
display:inline-block; display:inline-block;
} }
.post-footer__icon { .post-footer__icon {
font-size: 20px; font-size: 20px;
padding: 0 2px; padding: 0 2px;
} }
.post-footer__link:hover { .post-footer__link:hover {
background:#4CA0F4; background:#4CA0F4;
border-color: #3E82C7; border-color: #3E82C7;
color:#FFFFFF; color:#FFFFFF;
text-decoration:none; text-decoration:none;
cursor:pointer; cursor:pointer;
} }
.post-footer__button { .post-footer__button {
color: #4A4A4A; color: #4A4A4A;
margin-right:10px; margin-right:10px;
position:relative; position:relative;
display:inline-block; display:inline-block;
white-space:nowrap; white-space:nowrap;
} }
.sticky{ /************************
font-weight:bold; Global Blog Footer
padding-right:10px; *************************/
}
/*
Global Blog Footer
*/
.site-footer { .site-footer {
position: absolute; width: 100%;
bottom: -7.6em; background: #2F333E;
width: 100%; color: #FFFFFF;
background: #2F333E; padding: 1em 0;
color: #FFFFFF;
padding: 1em 0;
} }
.site-footer__block { .site-footer__block {
line-height:30px; line-height:30px;
} }
.site-footer__link { .site-footer__link {
color:#FFA31E; color:#FFA31E;
text-decoration:underline; text-decoration:underline;
} }
.site-footer__link:hover{ .site-footer__link:hover{
background:#FFA31E; background:#FFA31E;
color:#000000; color:#000000;
text-decoration:none; text-decoration:none;
} }
.site-footer__button { .site-footer__button {
margin:0 10px 0 0; margin:0 10px 0 0;
} }
/* page navigation */ /* page navigation */
#pagenav{ .paging {
margin-top:1em; display: flex;
margin-bottom:1em; padding: 1.5em 0;
} }
#pagenav .left{ .paging__button {
position:relative; width: 110px;
float:left;
} }
#pagenav .right{ .paging__button.is-prev {
position:relative; margin-left: auto;
float:right;
} }
#pagenav a, .paging__button.is-next {
#serendipity_comment input[type="submit"]{ margin-right: auto;
position:relative;
display:inline-block;
text-align:center;
border:1px solid #BFBFBF;
text-decoration: none;
color:#505050;
padding:10px 15px;
font-size:15px;
text-transform: uppercase;
font-weight:bold;
background:#FFF;
} }
#pagenav .fa-arrow-left{ .paging__state {
padding-right:5px; padding: 0.8em 0;
text-align: center;
} }
#pagenav .fa-arrow-right{
padding-left:5px; .paging__link {
display:inline-block;
text-align:center;
border:1px solid #BFBFBF;
text-decoration: none;
color:#505050;
font-size:15px;
text-transform: uppercase;
text-align: center;
font-weight:bold;
background:#FFF;
width: 110px;
padding: 0.8em 0;
}
.paging__link:hover {
background: #4CA0F4;
border-color: #3E82C7;
color: #FFF;
text-decoration: none;
cursor: pointer;
} }
@media all and (max-device-width: 900px), @media all and (max-device-width: 900px),
all and (max-width: 900px){ all and (max-width: 900px){
.container-centered{ .container-centered{
margin:0; margin:0;
width:100%; width:100%;
} }
#banner-first-line, .site-content,
#banner-last-line, .site-footer__block {
#footer{ margin:0 1em;
padding-left: 1em; width: auto;
padding-right: 1em; max-width:auto;
} }
.blog-entry, .post {
#entry-comment, margin: auto;
#pagenav{ }
margin-left: 1em;
margin-right: 1em;
}
.notice-info,
.notice-important,
.notice-success,
.notice-warning,
.input-group,
#serendipity_comment textarea{
width:100%;
}
.notice-noarticle{
margin:40px 1em;
}
} }
@media all and (max-device-width: 710px), all and (max-width: 710px){ @media all and (max-device-width: 710px), all and (max-width: 710px){
.site-nav { .site-nav {
display: none; /* display: none; */
} }
.site-nav__mobile { .site-nav__mobile,
display: block; .site-footer__button {
} display: block;
.site-header__banner{ }
padding-left: 1em; .site-header__banner{
padding-right: 1em; padding-left: 1em;
} padding-right: 1em;
#banner .quickmenu-icon.non-mobile{ }
display:none;
}
#footer .quickmenu-icon{
display:block;
}
#banner-last-line .table-cell{
display:inline-block;
width:100%;
}
#banner .right{
text-align: right;
margin-bottom:20px;
}
#serendipityQuickSearchTermField{
width:100%;
}
#banner-last-line nav ul{
text-align: center;
}
#banner nav{
width:100%;
}
#footer div{
height:auto;
min-height:30px;
}
#serendipity_comment input[type="submit"] {
padding:10px 10px;
}
#content{
padding-bottom:230px;
}
.serendipity_image_left{ .site-nav {
float: none; background: #3E4352;
margin: 0 auto 1em auto; }
} .site-nav__list {
padding: 0;
header.main nav { }
background: #3E4352; .site-nav__list li {
} display: block;
header.main nav ul { margin: 0;
padding: 0; }
} .site-nav .site-nav__button {
header.main nav ul li { color: #D9D9D9;
display: block; text-decoration: none;
margin: 0; padding: 0.6em 0;
} width: 100%;
header.main a { border: 0;
color: #D9D9D9; border-radius: 0;
text-decoration: none; display: inline-block;
padding: 0.6em 0; margin: auto;
width: 100%; }
border: 0; .site-nav .site-nav__button:hover,
border-radius: 0; .site-nav__button.is-active {
display: inline-block; background: #383C4A;
} }
header.main a:hover {
background: #383C4A;
}
} }

View File

@ -3,6 +3,8 @@
background-color: rgb(243, 243, 243); background-color: rgb(243, 243, 243);
display: block; display: block;
line-height: 2; line-height: 2;
font-family: DroidSans_Mono;
font-size: 0.9em;
} }
/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } /* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }

View File

@ -0,0 +1,10 @@
.post-content a {
color:#0A539A;
text-decoration: underline;
}
.post-content a:hover {
background:#0A539A;
color:#FFFFFF;
text-decoration:none;
}

View File

@ -24,12 +24,14 @@ html {
height: 100% height: 100%
} }
html { html {
-webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
font-family: OpenSans font-family: OpenSans
} }
*, *,
:after, :after,
:before { :before {
-webkit-box-sizing: inherit;
box-sizing: inherit box-sizing: inherit
} }
.table { .table {
@ -44,10 +46,6 @@ html {
.clear { .clear {
clear: both clear: both
} }
.chroma code {
font-family: DroidSans_Mono;
font-size: .9em
}
.site-header { .site-header {
background: #4186c9; background: #4186c9;
padding: 2em 0; padding: 2em 0;
@ -89,7 +87,8 @@ html {
padding: .2em .5em; padding: .2em .5em;
border: 1px solid; border: 1px solid;
border-radius: 6px; border-radius: 6px;
display: inline-block display: inline-block;
margin: .8em 0
} }
.site-nav__button.is-active, .site-nav__button.is-active,
.site-nav__button:hover { .site-nav__button:hover {
@ -97,18 +96,26 @@ html {
cursor: pointer cursor: pointer
} }
.site-nav__list { .site-nav__list {
margin: 0; margin: 0
padding: .8em 0
} }
.site-nav__list li { .site-nav__list li {
display: inline-block; display: inline-block;
margin: 0 .3em margin: 0 .3em
} }
.site-wrapper { .site-wrapper {
position: relative; display: -webkit-box;
min-height: 100%; display: -ms-flexbox;
height: auto!important; display: flex;
height: 100% -webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
min-height: 100vh
}
.site-content {
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1
} }
.site-content, .site-content,
.site-footer__block { .site-footer__block {
@ -182,13 +189,7 @@ html {
display: inline-block; display: inline-block;
white-space: nowrap white-space: nowrap
} }
.sticky {
font-weight: 700;
padding-right: 10px
}
.site-footer { .site-footer {
position: absolute;
bottom: -7.6em;
width: 100%; width: 100%;
background: #2f333e; background: #2f333e;
color: #fff; color: #fff;
@ -209,37 +210,45 @@ html {
.site-footer__button { .site-footer__button {
margin: 0 10px 0 0 margin: 0 10px 0 0
} }
#pagenav { .paging {
margin-top: 1em; display: -webkit-box;
margin-bottom: 1em display: -ms-flexbox;
display: flex;
padding: 1.5em 0
} }
#pagenav .left { .paging__button {
position: relative; width: 110px
float: left
} }
#pagenav .right { .paging__button.is-prev {
position: relative; margin-left: auto
float: right
} }
#pagenav a, .paging__button.is-next {
#serendipity_comment input[type=submit] { margin-right: auto
position: relative; }
.paging__state {
padding: .8em 0;
text-align: center
}
.paging__link {
display: inline-block; display: inline-block;
text-align: center; text-align: center;
border: 1px solid #bfbfbf; border: 1px solid #bfbfbf;
text-decoration: none; text-decoration: none;
color: #505050; color: #505050;
padding: 10px 15px;
font-size: 15px; font-size: 15px;
text-transform: uppercase; text-transform: uppercase;
text-align: center;
font-weight: 700; font-weight: 700;
background: #fff background: #fff;
width: 110px;
padding: .8em 0
} }
#pagenav .fa-arrow-left { .paging__link:hover {
padding-right: 5px background: #4ca0f4;
} border-color: #3e82c7;
#pagenav .fa-arrow-right { color: #fff;
padding-left: 5px text-decoration: none;
cursor: pointer
} }
@media all and (max-device-width:900px), @media all and (max-device-width:900px),
all and (max-width:900px) { all and (max-width:900px) {
@ -247,35 +256,19 @@ all and (max-width:900px) {
margin: 0; margin: 0;
width: 100% width: 100%
} }
#banner-first-line, .site-content,
#banner-last-line, .site-footer__block {
#footer { margin: 0 1em;
padding-left: 1em; width: auto;
padding-right: 1em max-width: auto
} }
#entry-comment, .post {
#pagenav, margin: auto
.blog-entry {
margin-left: 1em;
margin-right: 1em
}
#serendipity_comment textarea,
.input-group,
.notice-important,
.notice-info,
.notice-success,
.notice-warning {
width: 100%
}
.notice-noarticle {
margin: 40px 1em
} }
} }
@media all and (max-device-width:710px), @media all and (max-device-width:710px),
all and (max-width:710px) { all and (max-width:710px) {
.site-nav { .site-footer__button,
display: none
}
.site-nav__mobile { .site-nav__mobile {
display: block display: block
} }
@ -283,63 +276,28 @@ all and (max-width:710px) {
padding-left: 1em; padding-left: 1em;
padding-right: 1em padding-right: 1em
} }
#banner .quickmenu-icon.non-mobile { .site-nav {
display: none
}
#footer .quickmenu-icon {
display: block
}
#banner-last-line .table-cell {
display: inline-block;
width: 100%
}
#banner .right {
text-align: right;
margin-bottom: 20px
}
#serendipityQuickSearchTermField {
width: 100%
}
#banner-last-line nav ul {
text-align: center
}
#banner nav {
width: 100%
}
#footer div {
height: auto;
min-height: 30px
}
#serendipity_comment input[type=submit] {
padding: 10px 10px
}
#content {
padding-bottom: 230px
}
.serendipity_image_left {
float: none;
margin: 0 auto 1em auto
}
header.main nav {
background: #3e4352 background: #3e4352
} }
header.main nav ul { .site-nav__list {
padding: 0 padding: 0
} }
header.main nav ul li { .site-nav__list li {
display: block; display: block;
margin: 0 margin: 0
} }
header.main a { .site-nav .site-nav__button {
color: #d9d9d9; color: #d9d9d9;
text-decoration: none; text-decoration: none;
padding: .6em 0; padding: .6em 0;
width: 100%; width: 100%;
border: 0; border: 0;
border-radius: 0; border-radius: 0;
display: inline-block display: inline-block;
margin: auto
} }
header.main a:hover { .site-nav .site-nav__button:hover,
.site-nav__button.is-active {
background: #383c4a background: #383c4a
} }
} }
@ -350,7 +308,9 @@ all and (max-width:710px) {
.chroma code { .chroma code {
background-color: #f3f3f3; background-color: #f3f3f3;
display: block; display: block;
line-height: 2 line-height: 2;
font-family: DroidSans_Mono;
font-size: .9em
} }
.chroma .err { .chroma .err {
color: #a61717; color: #a61717;
@ -615,4 +575,13 @@ all and (max-width:710px) {
} }
.chroma .w { .chroma .w {
color: #bbb color: #bbb
}
.post-content a {
color: #0a539a;
text-decoration: underline
}
.post-content a:hover {
background: #0a539a;
color: #fff;
text-decoration: none
} }

File diff suppressed because one or more lines are too long