1
0
mirror of https://github.com/meineerde/holgerjust.de.git synced 2025-10-17 17:01:01 +00:00

Casper 1.3.4

This commit is contained in:
Daniel Bayerlein 2016-10-29 18:09:08 +02:00 committed by Holger Just
parent 7e019a8e38
commit 0845c0f740
2 changed files with 50 additions and 22 deletions

View File

@ -23,10 +23,12 @@ module MiddlemanCasperHelpers
end end
def page_class def page_class
if is_blog_article? || current_page.data.layout == 'page' if is_blog_article?
'post-template' 'post-template'
elsif current_page.data.layout == 'page'
'page-template'
elsif current_resource.metadata[:locals]['page_number'].to_i > 1 elsif current_resource.metadata[:locals]['page_number'].to_i > 1
'archive-template' 'paged'
else else
'home-template' 'home-template'
end end

View File

@ -295,6 +295,10 @@ li li {
margin: 0; margin: 0;
} }
li > p:last-of-type {
margin-bottom: 0;
}
hr { hr {
display: block; display: block;
height: 1px; height: 1px;
@ -833,8 +837,8 @@ body.nav-opened .nav {
/* Hide when there's no cover image or on page2+ */ /* Hide when there's no cover image or on page2+ */
.no-cover .scroll-down, .no-cover .scroll-down,
.no-cover.main-header:after, .no-cover.main-header:after,
.archive-template .scroll-down, .paged .scroll-down,
.archive-template .main-header:after { .paged .main-header:after {
display: none display: none
} }
@ -976,13 +980,13 @@ body.nav-opened .nav {
/* Add subtle load-in animation for content on the home page */ /* Add subtle load-in animation for content on the home page */
.home-template .page-title { .home-template .page-title {
-webkit-animation: fade-in-down 0.6s; -webkit-animation: fade-in-down 0.6s;
animation: fade-in-down 0.6s; animation: fade-in-down 0.6s both;
-webkit-animation-delay: 0.2s; -webkit-animation-delay: 0.2s;
animation-delay: 0.2s; animation-delay: 0.2s;
} }
.home-template .page-description { .home-template .page-description {
-webkit-animation: fade-in-down 0.9s; -webkit-animation: fade-in-down 0.9s;
animation: fade-in-down 0.9s; animation: fade-in-down 0.9s both;
-webkit-animation-delay: 0.1s; -webkit-animation-delay: 0.1s;
animation-delay: 0.1s; animation-delay: 0.1s;
} }
@ -1019,6 +1023,10 @@ body:not(.post-template) .post-title {
font-size: 3.6rem; font-size: 3.6rem;
} }
body.page-template .post-title {
font-size: 5rem;
}
.post-title a { .post-title a {
text-decoration: none; text-decoration: none;
} }
@ -1117,19 +1125,23 @@ body:not(.post-template) .post-title {
5. Single Post - When you click on an individual post 5. Single Post - When you click on an individual post
========================================================================== */ ========================================================================== */
.post-template .post-header { .post-template .post-header,
.page-template .post-header {
margin-bottom: 3.4rem; margin-bottom: 3.4rem;
} }
.post-template .post-title { .post-template .post-title,
.page-template .post-title {
margin-bottom: 0; margin-bottom: 0;
} }
.post-template .post-meta { .post-template .post-meta,
.page-template .post-meta {
margin: 0; margin: 0;
} }
.post-template .post-date { .post-template .post-date,
.page-template .post-date {
padding: 0; padding: 0;
margin: 0; margin: 0;
border: none; border: none;
@ -1138,19 +1150,22 @@ body:not(.post-template) .post-title {
/* Stop elements, such as img wider than the post content, from /* Stop elements, such as img wider than the post content, from
creating horizontal scroll - slight hack due to imperfections creating horizontal scroll - slight hack due to imperfections
with browser width % calculations and rounding */ with browser width % calculations and rounding */
.post-template .content { .post-template .content,
.page-template .content {
overflow: hidden; overflow: hidden;
} }
/* Tweak the .post wrapper style */ /* Tweak the .post wrapper style */
.post-template .post { .post-template .post,
.page-template .post {
margin-top: 0; margin-top: 0;
border-bottom: none; border-bottom: none;
padding-bottom: 0; padding-bottom: 0;
} }
/* Kill that stylish little circle that was on the border, too */ /* Kill that stylish little circle that was on the border, too */
.post-template .post:after { .post-template .post:after,
.page-template .post:after {
display: none; display: none;
} }
@ -1400,7 +1415,7 @@ body:not(.post-template) .post-title {
/* Turn off meta for page2+ to make room for extra /* Turn off meta for page2+ to make room for extra
pagination prev/next links */ pagination prev/next links */
.archive-template .author-profile .author-meta { .paged .author-profile .author-meta {
display: none; display: none;
} }
@ -1629,12 +1644,12 @@ body:not(.post-template) .post-title {
} }
/* On page2+ make all the headers smaller */ /* On page2+ make all the headers smaller */
.archive-template .main-header { .paged .main-header {
max-height: 30vh; max-height: 30vh;
} }
/* On page2+ show extra pagination controls at the top of post list */ /* On page2+ show extra pagination controls at the top of post list */
.archive-template .extra-pagination { .paged .extra-pagination {
display: block; display: block;
} }
@ -1758,7 +1773,7 @@ body:not(.post-template) .post-title {
.scroll-down, .scroll-down,
.home-template .main-header:after { display: none; } .home-template .main-header:after { display: none; }
.archive-template .main-header { .paged .main-header {
min-height: 180px; min-height: 180px;
padding: 10% 0; padding: 10% 0;
} }
@ -1785,6 +1800,10 @@ body:not(.post-template) .post-title {
font-size: 3.2rem; font-size: 3.2rem;
} }
body.page-template .post-title {
font-size: 4.5rem;
}
hr { hr {
margin: 2.4em 0; margin: 2.4em 0;
} }
@ -1900,7 +1919,7 @@ body:not(.post-template) .post-title {
height: 30vh; height: 30vh;
} }
.archive-template .main-header { .paged .main-header {
max-height: 20vh; max-height: 20vh;
min-height: 160px; min-height: 160px;
padding: 10% 0; padding: 10% 0;
@ -1987,11 +2006,13 @@ body:not(.post-template) .post-title {
display: none; display: none;
} }
.post-template .post-header { .post-template .post-header,
.page-template .post-header {
margin-bottom: 2rem; margin-bottom: 2rem;
} }
.post-template .post-date { .post-template .post-date,
.page-template .post-date {
display: inline-block; display: inline-block;
} }
@ -2051,7 +2072,12 @@ body:not(.post-template) .post-title {
font-size: 2.5rem; font-size: 2.5rem;
} }
.post-template .site-footer { body.page-template .post-title {
font-size: 2.8rem;
}
.post-template .site-footer,
.page-template .site-footer {
margin-top: 0; margin-top: 0;
} }
@ -2136,7 +2162,7 @@ body:not(.post-template) .post-title {
font-size: 1.4rem; font-size: 1.4rem;
} }
.archive-template .main-header .page-description { .paged .main-header .page-description {
display: none; display: none;
} }