hugo-PaperMod/static/css/style.css

527 lines
8.7 KiB
CSS
Raw Normal View History

2018-01-08 17:28:39 +01:00
/*
2018-08-15 19:24:51 +02:00
* Paper v2.0
2018-01-08 17:28:39 +01:00
* A simple & clean hugo theme
* Designed by 21beats (http://21beats.com)
2018-08-15 19:24:51 +02:00
* Updated in 2018.8.16
2018-01-08 17:28:39 +01:00
*/
/* Reset
============================================================= */
*,
*::before,
*::after {
box-sizing: border-box;
}
2018-07-05 20:45:58 +02:00
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, .2);
border-radius: 3px;
}
2018-01-08 17:28:39 +01:00
html {
-webkit-tap-highlight-color: transparent;
}
article, aside, figcaption, figure, footer, header, main, nav, section {
display: block;
}
body {
margin: 0;
2018-08-15 19:22:33 +02:00
font-family: 'Source Sans Pro', sans-serif;
2018-01-08 17:28:39 +01:00
color: rgba(0, 0, 0, .8);
2018-08-15 19:22:33 +02:00
font-size: 20px;
line-height: 1.6;
2018-01-08 17:28:39 +01:00
}
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
margin-bottom: 0;
line-height: 1.2;
}
p {
margin-top: 0;
margin-bottom: 0;
}
ul {
margin: 0;
padding: 0;
}
a {
color: inherit;
text-decoration: none;
}
figure {
margin: 0;
}
img {
max-width: 100%;
vertical-align: middle;
}
button, input, textarea {
-webkit-appearance: none;
padding: 0;
font: inherit;
background: transparent;
border: 0;
outline: 0;
}
button, input[type=button], input[type=submit] {
cursor: pointer;
}
pre, code {
font-family: Menlo, Consolas, monospace;
font-size: inherit;
}
2018-07-05 20:45:58 +02:00
/* Body
============================================================= */
.list {
2018-08-15 19:22:33 +02:00
background: #f9f9f9;
2018-07-05 20:45:58 +02:00
}
2018-01-08 17:28:39 +01:00
/* Header
============================================================= */
.header {
2018-03-12 16:47:01 +01:00
display: flex;
justify-content: space-between;
2018-01-08 17:28:39 +01:00
height: 65px;
padding-left: 30px;
padding-right: 30px;
line-height: 65px;
2018-07-05 20:45:58 +02:00
}
.home .header {
2018-01-08 17:28:39 +01:00
background: #fff;
}
.title a {
display: block;
2018-05-04 20:07:41 +02:00
margin-top: 18px;
2018-07-05 20:45:58 +02:00
font-size: 24px;
2018-01-08 17:28:39 +01:00
font-weight: 700;
line-height: 35px;
}
2018-07-05 20:45:58 +02:00
.noscroll {
overflow: hidden;
2018-01-08 17:28:39 +01:00
}
.menu-toggle {
2018-07-05 20:45:58 +02:00
display: block;
position: absolute;
top: 0;
right: 0;
z-index: 20;
width: 80px;
height: 65px;
2018-01-08 17:28:39 +01:00
}
2018-07-05 20:45:58 +02:00
.menu-toggle::before,
.menu-toggle::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
2018-08-16 04:59:04 +02:00
width: 20px;
2018-07-05 20:45:58 +02:00
height: 2px;
background: #000;
2018-01-08 17:28:39 +01:00
}
2018-07-05 20:45:58 +02:00
.menu-toggle::before {
transform: translate3d(-50%, -5px, 0);
2018-01-08 17:28:39 +01:00
}
2018-07-05 20:45:58 +02:00
.menu-toggle::after {
2018-08-15 19:22:33 +02:00
transform: translate3d(-50%, 5px, 0);
2018-07-05 20:45:58 +02:00
}
.noscroll .menu-toggle::before {
transform: translate3d(-50%, -1px, 0) rotateZ(45deg);
}
.noscroll .menu-toggle::after {
transform: translate3d(-50%, -1px, 0) rotateZ(-45deg);
}
.menu {
display: none;
}
.noscroll .menu {
2018-01-08 17:28:39 +01:00
display: block;
}
2018-07-05 20:45:58 +02:00
.menu ul {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 10;
background: #fff;
display: flex;
justify-content: center;
flex-direction: column;
text-align: center;
2018-01-08 17:28:39 +01:00
}
2018-07-05 20:45:58 +02:00
.menu li {
width: 100%;
margin-left: 0;
}
.menu a {
font-size: 20px;
2018-01-08 17:28:39 +01:00
}
/* Main
2018-07-05 20:45:58 +02:00
======================================================================= */
2018-01-08 17:28:39 +01:00
.main {
min-height: calc(100vh - 130px);
overflow: hidden;
}
.list-header,
.first-entry > *,
.post-entry,
.list-footer {
max-width: 700px;
margin-left: auto;
margin-right: auto;
}
.list .main {
2018-03-12 16:47:01 +01:00
padding-bottom: 30px;
2018-01-08 17:28:39 +01:00
}
.list-header,
.list-footer {
padding-left: 30px;
padding-right: 30px;
}
.list-header {
margin-top: 30px;
margin-bottom: 30px;
}
.list-footer {
margin-top: 30px;
}
.single .main {
padding-top: 60px;
2018-03-12 16:47:01 +01:00
padding-bottom: 30px;
2018-01-08 17:28:39 +01:00
}
.post-view {
2018-05-04 20:07:41 +02:00
width: 700px;
2018-01-08 17:28:39 +01:00
margin-left: auto;
margin-right: auto;
}
@media (max-width: 767px) {
.main {
min-height: calc(100vh - 155px);
}
.list-header,
.first-entry > *,
.post-entry,
.list-footer,
.post-view {
width: 100%;
padding-left: 30px;
padding-right: 30px;
}
}
/* List header
------------------------------ */
.list-header span {
color: rgba(0, 0, 0, .4);
font-size: 12px;
letter-spacing: 2px;
text-transform: uppercase;
}
.list-title {
font-size: 50px;
}
/* Post
------------------------------ */
.post-meta {
2018-08-15 19:22:33 +02:00
margin-top: 8px;
2018-01-08 17:28:39 +01:00
color: rgba(0, 0, 0, .4);
2018-08-15 19:22:33 +02:00
font-size: 16px;
2018-01-08 17:28:39 +01:00
letter-spacing: .5px;
}
/* First entry */
.first-entry {
2018-08-16 04:59:04 +02:00
position: relative;
2018-08-15 19:22:33 +02:00
min-height: calc(100vh - 65px - 80px);
margin-bottom: 80px;
padding-top: 12vh;
padding-bottom: 12vh;
2018-01-08 17:28:39 +01:00
background: #fff;
}
.welcome-emoji {
2018-07-05 20:45:58 +02:00
font-size: 60px;
2018-01-08 17:28:39 +01:00
line-height: 1;
}
.first-entry .post-title {
font-size: 50px;
2018-08-15 19:22:33 +02:00
transform: translateX(-3px);
}
.first-entry .post-summary {
margin-top: 15px;
margin-bottom: 15px;
font-size: 19px;
}
.post-title {
transform: translateX(-2px);
2018-01-08 17:28:39 +01:00
}
.post-summary {
margin-top: 10px;
color: rgba(0, 0, 0, .4);
2018-08-15 19:22:33 +02:00
font-size: 18px;
2018-01-08 17:28:39 +01:00
}
/* Post entry */
.post-entry {
position: relative;
padding: 30px;
background: #fff;
border-radius: 6px;
}
2018-07-05 20:45:58 +02:00
.post-entry:active {
transform: scale(.98);
transition: transform .1s;
}
2018-01-08 17:28:39 +01:00
.post-entry + .post-entry {
margin-top: 25px;
}
.post-entry:first-child {
margin-top: 40px;
}
.post-entry:hover {
box-shadow: 0 5px 40px -5px rgba(0, 0, 0, .1);
}
.post-entry .post-title {
font-size: 30px;
}
.post-link {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
/* Post view */
.post-view .post-title {
2018-05-04 20:07:41 +02:00
font-size: 45px;
2018-01-08 17:28:39 +01:00
}
.post-content {
padding-top: 30px;
word-wrap: break-word;
}
.post-content h1,
.post-content h2 {
margin-bottom: 15px;
}
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
margin-bottom: 10px;
}
2018-08-15 19:22:33 +02:00
.post-content h5,
.post-content h6 {
font-weight: 400;
}
2018-01-08 17:28:39 +01:00
.post-content h1 {
2018-08-15 19:22:33 +02:00
font-size: 45px;
2018-01-08 17:28:39 +01:00
margin-top: 50px;
}
.post-content h2 {
2018-08-15 19:22:33 +02:00
font-size: 32px;
2018-01-08 17:28:39 +01:00
margin-top: 40px;
}
.post-content h3 {
font-size: 28px;
margin-top: 30px;
}
.post-content h4 {
font-size: 24px;
}
.post-content h5 {
font-size: 20px;
}
.post-content h6 {
2018-05-04 20:07:41 +02:00
font-size: 18px;
2018-01-08 17:28:39 +01:00
}
.post-content a {
2018-08-15 19:22:33 +02:00
padding-bottom: 2px;
border-bottom: 1.5px solid rgba(0, 0, 0, .8);
2018-01-08 17:28:39 +01:00
}
.post-content p,
.post-content ul,
.post-content ol,
.post-content dl {
margin-bottom: 20px;
}
.post-content ul,
.post-content ol {
padding-left: 20px;
}
.post-content li {
margin-bottom: 10px;
}
.post-content li > ul,
.post-content li > ol {
margin-top: 10px;
margin-bottom: 0;
}
.post-content dl {
display: flex;
flex-wrap: wrap;
margin: 0;
}
.post-content dt {
width: 25%;
font-weight: 700;
}
.post-content dd {
width: 75%;
margin-left: 0;
padding-left: 10px;
}
.post-content dt ~ dt,
.post-content dd ~ dd {
margin-top: 10px;
}
.post-content pre,
.post-content table {
margin-top: 30px;
margin-bottom: 30px;
}
.post-content table {
width: 100%;
border-collapse: collapse;
border-spacing: 0;
}
.post-content th,
.post-content td {
padding: 12px;
border: 1px solid #eee;
}
.post-content th {
text-align: left;
}
2018-08-15 19:22:33 +02:00
.post-content pre code {
2018-01-08 17:28:39 +01:00
padding: 20px;
2018-07-05 20:45:58 +02:00
border-radius: 6px;
2018-05-04 20:07:41 +02:00
}
2018-01-08 17:28:39 +01:00
.post-content code {
padding: 3px 6px;
2018-08-15 19:22:33 +02:00
font-size: 0.75em;
white-space: pre-wrap;
2018-01-08 17:28:39 +01:00
border-radius: 3px;
}
.post-content blockquote {
margin: 0 0 0 -23px;
padding: 0 0 0 20px;
color: rgba(0, 0, 0, .6);
font-style: italic;
border-left: 3px solid rgba(0, 0, 0, .8);
}
.post-content hr {
margin-top: 70px;
margin-bottom: 70px;
border: solid rgba(0, 0, 0, .1);
border-width: 1px 0 0;
}
.post-content iframe {
max-width: 100%;
}
.post-view .post-tags {
margin-bottom: 30px;
}
.post-tags li {
display: inline-block;
}
.post-tags a {
display: block;
2018-07-05 20:45:58 +02:00
padding: 6px 16px;
2018-01-08 17:28:39 +01:00
color: rgba(0, 0, 0, .6);
2018-07-05 20:45:58 +02:00
font-size: 16px;
background: #f5f5f5;
2018-01-08 17:28:39 +01:00
border-radius: 3px;
}
.post-tags li + li {
margin-left: 3px;
}
.post-tags a:hover {
2018-07-05 20:45:58 +02:00
background: #eee;
2018-01-08 17:28:39 +01:00
}
@media (max-width: 767px) {
.post-content blockquote {
margin: 0 0 0 -30px;
padding: 0 0 0 27px;
}
}
/* List footer
------------------------------ */
.pagination {
2018-03-12 16:47:01 +01:00
display: flex;
2018-01-08 17:28:39 +01:00
overflow: hidden;
}
.pagination a {
display: block;
line-height: 30px;
}
.pagination-next {
2018-03-12 16:47:01 +01:00
margin-left: auto;
2018-01-08 17:28:39 +01:00
}
/* 404
------------------------------ */
.not-found {
text-align: center;
font-size: 180px;
font-weight: 700;
line-height: calc(100vh - 300px);
}
/* Footer
======================================================================= */
.footer {
padding: 20px;
2018-08-15 19:22:33 +02:00
font-size: 15px;
2018-01-08 17:28:39 +01:00
line-height: 25px;
text-align: center;
}
.footer span {
margin-left: 2px;
margin-right: 2px;
}
.footer a:hover {
text-decoration: underline;
}
@media (max-width: 767px) {
.footer span:last-child {
display: block;
}
2018-08-16 04:59:04 +02:00
.footer span:nth-child(4) {
2018-01-08 17:28:39 +01:00
display: none;
}
}
/* Highlight
------------------------------ */
.post-content pre code {
display: block;
}
.post-content table code {
padding-top: 0;
padding-bottom: 0;
}
.post-content pre {
margin: 30px 0px;
border-radius: 6px;
}
.post-content table pre {
margin: 20px 0px;
}
.highlight table {
margin: 30px 0 !important;
}
.highlight div {
border-radius: 6px;
}
2018-09-27 13:27:18 +02:00
.post-content table code {
white-space: pre;
}
2018-09-28 10:26:15 +02:00
/* Unflavored code fences
------------------------------ */
code {
padding: 20px;
}
pre {
border-radius: 6px;
background-color: #272822;
color: white;
}