fix responsive design; add paging

This commit is contained in:
Robert Kaussow 2018-10-13 02:08:36 +02:00
parent cea76edf63
commit e590b8f489
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">
<div class="paging__button is-next">
{{ if $pag.HasPrev }} {{ if $pag.HasPrev }}
<a class="newer-posts" href="{{ $pag.Prev.URL }}">&larr; Newer Posts</a> <a class="paging__link" href="{{ $pag.Prev.URL }}">&larr; Neuere</a>
{{ end }} {{ end }}
<span class="page-number">Page {{ $pag.PageNumber }} of {{ $pag.TotalPages }}</span> </div>
<div class="paging__state">Seite {{ $pag.PageNumber }} von {{ $pag.TotalPages }}</div>
<div class="paging__button is-prev">
{{ if $pag.HasNext }} {{ if $pag.HasNext }}
<a class="older-posts" href="{{ $pag.Next.URL }}">Older Posts &rarr;</a> <a class="paging__link" href="{{ $pag.Next.URL }}">Ältere &rarr;</a>
{{ end }} {{ 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

@ -50,14 +50,9 @@ html{
clear:both; clear:both;
} }
.chroma code{ /*************************
font-family: DroidSans_Mono;
font-size: 0.9em;
}
/*
Global Blog Header Global Blog Header
*/ **************************/
.site-header { .site-header {
background: #4186C9; background: #4186C9;
padding: 2em 0; padding: 2em 0;
@ -100,6 +95,7 @@ html{
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 {
@ -108,23 +104,24 @@ html{
} }
.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;
@ -203,18 +200,10 @@ html{
white-space:nowrap; white-space:nowrap;
} }
.sticky{ /************************
font-weight:bold;
padding-right:10px;
}
/*
Global Blog Footer Global Blog Footer
*/ *************************/
.site-footer { .site-footer {
position: absolute;
bottom: -7.6em;
width: 100%; width: 100%;
background: #2F333E; background: #2F333E;
color: #FFFFFF; color: #FFFFFF;
@ -238,37 +227,45 @@ html{
/* 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; }
.paging__state {
padding: 0.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:bold; font-weight:bold;
background:#FFF; background:#FFF;
width: 110px;
padding: 0.8em 0;
} }
#pagenav .fa-arrow-left{
padding-right:5px; .paging__link:hover {
} background: #4CA0F4;
#pagenav .fa-arrow-right{ border-color: #3E82C7;
padding-left:5px; color: #FFF;
text-decoration: none;
cursor: pointer;
} }
@ -278,92 +275,41 @@ 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;
} }
.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,
.site-footer__button {
display: block; display: block;
} }
.site-header__banner{ .site-header__banner{
padding-left: 1em; padding-left: 1em;
padding-right: 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;
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: 0.6em 0; padding: 0.6em 0;
@ -371,8 +317,10 @@ all and (max-width: 900px){
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;
} }
} }

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; }

10
src/css/nested.css Normal file
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;
@ -616,3 +576,12 @@ 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