430 lines
No EOL
7.2 KiB
CSS
430 lines
No EOL
7.2 KiB
CSS
/*
|
|
Colours:
|
|
#444 - light black, default text
|
|
#e7e7e7 - light border
|
|
#666 - link highlight
|
|
#999 - light bold text.
|
|
#F0F0F0 - well background.
|
|
*/
|
|
|
|
html{
|
|
font-family: "Droid Serif", "DejaVu Serif", serif;
|
|
font-size: 16px;
|
|
color: #444444;
|
|
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* If an element declares it's using a different sizing,
|
|
then child elements will now inherit that sizing.
|
|
*/
|
|
*, *:before, *:after {
|
|
box-sizing: inherit;
|
|
}
|
|
|
|
.menu-link{
|
|
box-sizing: content-box;
|
|
}
|
|
|
|
/* Make content section extend to bottom to place footer at bottom of window. */
|
|
|
|
html, body {
|
|
height: 100%;
|
|
}
|
|
|
|
body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
#layout{
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
}
|
|
|
|
#main{
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
}
|
|
|
|
.yp-content{
|
|
flex: 2;
|
|
}
|
|
|
|
/* Anchors */
|
|
|
|
a{
|
|
color: inherit;
|
|
|
|
}
|
|
|
|
a:hover{
|
|
/* TODO: this hover colour is not applied. */
|
|
color: #666;
|
|
cursor: pointer;
|
|
}
|
|
|
|
a:visited{
|
|
color: inherit;
|
|
}
|
|
|
|
a:active{
|
|
color: inherit;
|
|
}
|
|
|
|
/* Post listing */
|
|
|
|
.yp-header__title,
|
|
.yp-header__title--overlay,
|
|
.yp-header__subtitle,
|
|
.yp-header__subtitle--overlay,
|
|
.yp-index-post__title,
|
|
.yp-index-post__subtitle{
|
|
font-family: FreeSans, Arimo, "Droid Sans", Helvetica, Arial, sans-serif;
|
|
}
|
|
|
|
.yp-content {
|
|
margin: 0 auto 50px;
|
|
line-height: 1.6em;
|
|
}
|
|
|
|
/* Header */
|
|
|
|
.yp-header-container{
|
|
position:relative;
|
|
margin-bottom: 3rem;
|
|
}
|
|
|
|
.yp-header-background,
|
|
.yp-header-background--blur{
|
|
background-size: cover;
|
|
-webkit-filter: brightness(75%);
|
|
filter: brightness(75%);
|
|
|
|
display: block;
|
|
position: absolute;
|
|
top: -3px;
|
|
left: 0;
|
|
z-index: 1;
|
|
width: 100%;
|
|
}
|
|
|
|
.yp-header-background--blur{
|
|
-webkit-filter: blur(3px) brightness(75%);
|
|
filter: blur(3px) brightness(75%);
|
|
z-index: 2;
|
|
}
|
|
|
|
.yp-header-background > .yp-header,
|
|
.yp-header-background--blur > .yp-header{
|
|
visibility: hidden;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.yp-header {
|
|
color: #333;
|
|
text-align: center;
|
|
|
|
margin: 0;
|
|
|
|
position: relative;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: 2;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Title headings */
|
|
.yp-header__title,
|
|
.yp-header__title--overlay{
|
|
font-size: 3rem;
|
|
line-height: 1.5em;
|
|
font-weight: bold;
|
|
|
|
padding: 1em 1em 1em 1em;
|
|
margin: 0.2rem 0;
|
|
}
|
|
|
|
.yp-header__title--overlay{
|
|
color: #F0F0F0;
|
|
text-shadow: 1px 1px rgba(0,0,0,0.5);
|
|
}
|
|
|
|
.yp-header__subtitle,
|
|
.yp-header__subtitle--overlay{
|
|
font-size: 1.5rem;
|
|
font-weight: 300;
|
|
color: #ccc;
|
|
|
|
margin-top: 0;
|
|
padding: 0 1em;
|
|
}
|
|
|
|
.yp-header__subtitle--overlay{
|
|
color: #F0F0F0;
|
|
text-shadow: 1px 1px rgba(0,0,0,0.5);
|
|
}
|
|
|
|
@media screen and (min-width: 64em) {
|
|
.yp-header__title,
|
|
.yp-header__title--overlay {
|
|
font-size: 5rem;
|
|
}
|
|
|
|
.yp-header__subtitle,
|
|
.yp-header__subtitle--overlay {
|
|
font-size: 2.5rem;
|
|
}
|
|
}
|
|
|
|
.yp-section-header {
|
|
margin: 50px 0 20px 0;
|
|
font-weight: 300;
|
|
color: #999;
|
|
}
|
|
|
|
|
|
/* Post within index */
|
|
|
|
.yp-index-post,
|
|
.yp-index-meta {
|
|
margin-bottom: 3rem;
|
|
}
|
|
|
|
.yp-index-meta {
|
|
padding-right: 0.5rem;
|
|
text-align: right;
|
|
font-size: 0.75rem;
|
|
color: #666;
|
|
}
|
|
|
|
.yp-index-meta__date{
|
|
|
|
}
|
|
|
|
.yp-index-meta__category{
|
|
|
|
}
|
|
|
|
.yp-index-meta__tags{
|
|
|
|
}
|
|
|
|
.yp-index-meta__tag{
|
|
|
|
}
|
|
|
|
.yp-index-meta__reading-time{
|
|
|
|
}
|
|
|
|
.yp-index-post{
|
|
padding-left: 0.5rem;
|
|
border-left: 0.25rem solid #e7e7e7;
|
|
min-height: 3rem;
|
|
}
|
|
|
|
.yp-index-post__title{
|
|
font-size: 3rem;
|
|
margin-bottom: 0;
|
|
margin-top: 0;
|
|
line-height: 1em;
|
|
}
|
|
|
|
.yp-index-post__subtitle{
|
|
font-size: 1rem;
|
|
color: #999;
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
.yp-index-post__link{
|
|
text-decoration: none;
|
|
}
|
|
|
|
.yp-index-post__body{
|
|
max-width: 800px;
|
|
margin-right: 1rem;
|
|
}
|
|
|
|
|
|
/* Single post page */
|
|
|
|
/* Add margin on left and right of content. Margin shrinks on smaller screens.
|
|
Maximum width of post copy will be 800px. This maximum does not apply to images.
|
|
|
|
Everything under .yp-post__body is generated by rendering posts ReST. Requiring the use
|
|
of these descendant selectors.
|
|
*/
|
|
.yp-post__body > div > ul,
|
|
.yp-post__body > div > p,
|
|
.yp-post-group__body {
|
|
margin-left: 2rem;
|
|
margin-right: 2rem;
|
|
}
|
|
|
|
@media screen and (min-width: 48em){
|
|
.yp-post__body > div > p,
|
|
.yp-post__body > div > ul,
|
|
.yp-post-group__body {
|
|
margin-left: 4rem;
|
|
margin-right: 4rem;
|
|
}
|
|
}
|
|
|
|
@media screen and (min-width: 64em){
|
|
.yp-post__body > div > p,
|
|
.yp-post__body > div > ul,
|
|
.yp-post-group__body {
|
|
max-width: 800px;
|
|
margin: auto;
|
|
}
|
|
}
|
|
|
|
/* Images */
|
|
|
|
/* figure container is only present when using figure directive */
|
|
.yp-post__body > div > .figure,
|
|
.yp-post__body > div > a.image-reference{
|
|
text-align: center;
|
|
/* Remove margin for full-width images. */
|
|
margin-left: 0;
|
|
margin-right: 0;
|
|
}
|
|
|
|
.caption{
|
|
color: #999;
|
|
}
|
|
|
|
/*
|
|
image-reference is a class nikola adds to images within posts.
|
|
*/
|
|
|
|
.image-reference{
|
|
display: block;
|
|
text-align: center;
|
|
margin: 3rem 0;
|
|
}
|
|
|
|
/* figure is only used for the figure ReST directive. */
|
|
.figure{
|
|
margin-bottom: 3rem;
|
|
}
|
|
|
|
.figure > .image-reference{
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/* Ensure the caption is not wider than the image or the width of the body copy (whichever is widest) */
|
|
.figure > .caption {
|
|
max-width: 800px;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
|
|
/* Targets the img in both the figure and the thumbnail directives. */
|
|
.image-reference img{
|
|
max-width: 100%;
|
|
height: auto;
|
|
}
|
|
|
|
/* Code block */
|
|
|
|
/* Line-up code text with post copy. */
|
|
.yp-code-container {
|
|
background-color: #F0F0F0;
|
|
padding-left: 2rem;
|
|
padding-right: 2rem;
|
|
}
|
|
|
|
@media screen and (min-width: 48em){
|
|
.yp-code-container {
|
|
padding-left: 4rem;
|
|
padding-right: 4rem;
|
|
}
|
|
}
|
|
|
|
@media screen and (min-width: 64em){
|
|
.yp-code-container pre.code {
|
|
max-width: 800px;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
}
|
|
|
|
/* Category and tag lists */
|
|
|
|
.yp-post-list{
|
|
list-style-type: none;
|
|
}
|
|
|
|
.yp-post-list__title{
|
|
font-weight: normal;
|
|
}
|
|
|
|
/* Gallery */
|
|
.yp-gallery__container{
|
|
display: flex;
|
|
flex-flow: row wrap;
|
|
align-items: center;
|
|
font-size: 0;
|
|
}
|
|
|
|
.yp-gallery__figure{
|
|
flex: 1;
|
|
margin: 2rem;
|
|
min-width: 300px;
|
|
position: relative;
|
|
}
|
|
|
|
.yp-gallery__link{
|
|
margin: 0;
|
|
}
|
|
|
|
.yp-gallery__figure--narrow{
|
|
flex: 0.5;
|
|
min-width: 150px;
|
|
}
|
|
|
|
.yp-gallery__image{
|
|
width: 100%;
|
|
height: auto;
|
|
}
|
|
|
|
/* Well in page */
|
|
.yp-well{
|
|
|
|
padding-top: 1rem;
|
|
padding-bottom: 1rem;
|
|
|
|
/* Remove margin for full-width. */
|
|
margin: 3rem 0;
|
|
|
|
background-color: #F0F0F0;
|
|
|
|
/* Interior shadow on top and bottom. */
|
|
-webkit-box-shadow: inset 0 8px 8px -8px #696868,
|
|
inset 0 -8px 8px -8px #696868;
|
|
box-shadow: inset 0 8px 8px -8px #696868,
|
|
inset 0 -8px 8px -8px #696868;
|
|
}
|
|
|
|
.yp-index-post__body .yp-well{
|
|
/* Full border, because index bodies are not full-width */
|
|
-webkit-box-shadow: inset 0 0 8px #696868;
|
|
box-shadow: inset 0 0 8px #696868;
|
|
}
|
|
|
|
/* Footer */
|
|
.yp-footer{
|
|
background-color: #F0F0F0;
|
|
text-align: center;
|
|
font-size: 0.75rem;
|
|
padding-top: 1em;
|
|
padding-bottom: 1em;
|
|
|
|
/* Interior shadow on top and bottom. */
|
|
-webkit-box-shadow: inset 0 8px 8px -8px #696868;
|
|
box-shadow: inset 0 8px 8px -8px #696868;
|
|
} |