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

View File

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

View File

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

View File

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

View File

@ -3,6 +3,8 @@
background-color: rgb(243, 243, 243);
display: block;
line-height: 2;
font-family: DroidSans_Mono;
font-size: 0.9em;
}
/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }
/* 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%
}
html {
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-family: OpenSans
}
*,
:after,
:before {
-webkit-box-sizing: inherit;
box-sizing: inherit
}
.table {
@ -44,10 +46,6 @@ html {
.clear {
clear: both
}
.chroma code {
font-family: DroidSans_Mono;
font-size: .9em
}
.site-header {
background: #4186c9;
padding: 2em 0;
@ -89,7 +87,8 @@ html {
padding: .2em .5em;
border: 1px solid;
border-radius: 6px;
display: inline-block
display: inline-block;
margin: .8em 0
}
.site-nav__button.is-active,
.site-nav__button:hover {
@ -97,18 +96,26 @@ html {
cursor: pointer
}
.site-nav__list {
margin: 0;
padding: .8em 0
margin: 0
}
.site-nav__list li {
display: inline-block;
margin: 0 .3em
}
.site-wrapper {
position: relative;
min-height: 100%;
height: auto!important;
height: 100%
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-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-footer__block {
@ -182,13 +189,7 @@ html {
display: inline-block;
white-space: nowrap
}
.sticky {
font-weight: 700;
padding-right: 10px
}
.site-footer {
position: absolute;
bottom: -7.6em;
width: 100%;
background: #2f333e;
color: #fff;
@ -209,37 +210,45 @@ html {
.site-footer__button {
margin: 0 10px 0 0
}
#pagenav {
margin-top: 1em;
margin-bottom: 1em
.paging {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
padding: 1.5em 0
}
#pagenav .left {
position: relative;
float: left
.paging__button {
width: 110px
}
#pagenav .right {
position: relative;
float: right
.paging__button.is-prev {
margin-left: auto
}
#pagenav a,
#serendipity_comment input[type=submit] {
position: relative;
.paging__button.is-next {
margin-right: auto
}
.paging__state {
padding: .8em 0;
text-align: center
}
.paging__link {
display: inline-block;
text-align: center;
border: 1px solid #bfbfbf;
text-decoration: none;
color: #505050;
padding: 10px 15px;
font-size: 15px;
text-transform: uppercase;
text-align: center;
font-weight: 700;
background: #fff
background: #fff;
width: 110px;
padding: .8em 0
}
#pagenav .fa-arrow-left {
padding-right: 5px
}
#pagenav .fa-arrow-right {
padding-left: 5px
.paging__link:hover {
background: #4ca0f4;
border-color: #3e82c7;
color: #fff;
text-decoration: none;
cursor: pointer
}
@media all and (max-device-width:900px),
all and (max-width:900px) {
@ -247,35 +256,19 @@ all and (max-width:900px) {
margin: 0;
width: 100%
}
#banner-first-line,
#banner-last-line,
#footer {
padding-left: 1em;
padding-right: 1em
.site-content,
.site-footer__block {
margin: 0 1em;
width: auto;
max-width: auto
}
#entry-comment,
#pagenav,
.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
.post {
margin: auto
}
}
@media all and (max-device-width:710px),
all and (max-width:710px) {
.site-nav {
display: none
}
.site-footer__button,
.site-nav__mobile {
display: block
}
@ -283,63 +276,28 @@ all and (max-width:710px) {
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 {
float: none;
margin: 0 auto 1em auto
}
header.main nav {
.site-nav {
background: #3e4352
}
header.main nav ul {
.site-nav__list {
padding: 0
}
header.main nav ul li {
.site-nav__list li {
display: block;
margin: 0
}
header.main a {
.site-nav .site-nav__button {
color: #d9d9d9;
text-decoration: none;
padding: .6em 0;
width: 100%;
border: 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
}
}
@ -350,7 +308,9 @@ all and (max-width:710px) {
.chroma code {
background-color: #f3f3f3;
display: block;
line-height: 2
line-height: 2;
font-family: DroidSans_Mono;
font-size: .9em
}
.chroma .err {
color: #a61717;
@ -615,4 +575,13 @@ all and (max-width:710px) {
}
.chroma .w {
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