paprika/theme/default/static/style.css

588 lines
10 KiB
CSS

@import url("https://fonts.googleapis.com/css2?family=Fira+Sans:wght@300&display=swap");
/* Get rid of default padding */
html,
body {
margin: 0;
padding: 0;
font-family: "Fira Sans", sans-serif;
font-size: 18px;
text-shadow: 0 0 3px #dddddd;
color: rgb(100, 100, 100);
scrollbar-color: #e91e63 #00000000;
scrollbar-width: thin;
}
html {
background-image: url("/static/whitenoise-100x100.png");
background-repeat: repeat;
}
/* Animate page appearing */
.page-wrapper {
animation-name: appear;
animation-duration: 0.5s;
animation-fill-mode: forwards;
}
@keyframes appear {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.loading-progress {
display: none !important;
}
.loading-progress.force-visible {
display: block !important;
}
.hidden {
display: none;
}
a,
a:link,
a:visited,
a:hover,
a:active {
text-decoration: none;
color: inherit;
outline: none;
}
body {
text-align: center;
}
.page-wrapper {
display: inline-block;
padding-top: 10px;
width: 60vw;
max-width: 1000px;
padding-bottom: 15px;
text-align: left;
}
.with-divider::after {
content: "";
display: block;
margin-top: 20px;
width: 40px;
height: 3px;
background-color: #e91e63;
}
.with-divider.with-divider-wide-center::after {
margin-left: calc(50% - 90px);
width: 180px;
}
.with-divider.with-divider-thin::after {
margin-top: 18px;
height: 2px;
}
.with-divider.with-divider-right::after {
margin-left: calc(100% - 40px);
}
/* Headings and misc tags generated by markdown */
h1,
h2,
h3,
h4,
h5 {
margin: 0 0 0.5em 0;
padding: 0;
}
h1 {
font-size: 1.4em;
}
h2 {
font-size: 1.3em;
}
h3 {
font-size: 1.2em;
}
h4 {
font-size: 1.1em;
}
h5 {
font-size: 1em;
}
code:not(.hljs) {
color: #e91e63;
font-size: 0.7em;
padding: 2px 6px;
background-color: #f7f7f9;
border: 1px solid #e1e1e8;
border-radius: 3px;
text-shadow: none;
}
blockquote {
border-left: 3px solid #cdcdcd;
color: #989898;
box-sizing: border-box;
padding-left: 2em;
margin-left: 0;
}
/* Footer -- Not needed on desktop */
.footer {
display: none;
}
/* Sidebar */
.sidebar {
float: left;
position: sticky;
top: 20px;
text-align: right;
width: 22%;
}
.sidebar section {
margin-top: 20px;
}
.sidebar .avatar {
display: inline-block;
overflow: hidden;
width: 100px;
height: 100px;
line-height: 100px;
text-align: center;
background-color: #ffffff;
border-radius: 50%;
box-shadow: 0px 0px 6px 0px #cccccc;
}
.sidebar .avatar img {
display: inline-block;
margin-top: 5%;
width: 90%;
height: 90%;
border-radius: 50%;
object-fit: cover;
}
.sidebar .avatar img.animate {
animation: spin 1s ease-in-out;
}
/*
.sidebar .avatar img:hover {
animation: spin 0.5s ease-in-out;
}*/
@keyframes spin {
20% {
transform: rotate(30deg);
}
40% {
transform: rotate(-30deg);
}
60% {
transform: rotate(30deg);
}
80% {
transform: rotate(-30deg);
}
100% {
transform: rotate(0);
}
}
.sidebar .introduction {
font-style: italic;
}
.sidebar .links ul {
list-style-type: none;
padding-bottom: 10px;
}
.sidebar .links li {
padding-top: 10px;
}
.sidebar .links a {
transition: color 0.2s ease-in-out;
}
.sidebar .links a:hover {
color: #f06292;
}
.copyright {
font-size: 0.6em;
color: rgb(200, 200, 200);
}
.copyright a,
.copyright a:link,
.copyright a:visited,
.copyright a:hover,
.copyright a:active {
text-decoration: underline;
}
/* Home page post list */
.post-list,
.content {
margin-top: 15px;
margin-left: 25%;
width: 75%;
}
.post-list .post {
padding: 10px 5px 5px 5px;
margin-bottom: 12px;
}
.post-list .post h1 a {
color: inherit;
transition: color 0.2s ease-in-out;
}
.post-list .post section {
margin-top: 0.5em;
}
.post-list .post h1 a:hover {
color: #e91e63;
text-decoration: none;
}
.post-list .post .read-more::after {
content: "......";
color: #f06292;
}
.post-list .pagination {
font-size: 0.8em;
}
.post-list .pagination .page-older:after {
content: "Older >";
color: #e91e63;
float: right;
}
.post-list .pagination .page-newer:after {
content: "< Newer";
color: #e91e63;
float: left;
}
.post a,
.post a:link,
.post a:visited,
.post a:hover,
.post a:active,
.content a,
.content a:link,
.content a:visited,
.content a:hover,
.content a:active {
color: #e91e63;
}
.post a:hover,
.content a:hover {
text-decoration: underline;
}
/* Single-post pages */
.date {
font-style: italic;
}
.content {
/* To match the look of posts on home page */
padding-top: 10px;
padding-left: 5px;
}
.content > * {
/* For margin fixing */
/* This is fine because it only covers DIRECT childs of .content */
/* which should only contain things like images, code blocks and paragraphs */
margin-right: 10px;
}
.post img,
.content img {
max-width: 100%;
object-fit: contain;
cursor: pointer;
transition: opacity 0.3s;
}
.post img:hover,
.content img:hover {
opacity: 0.7;
}
.toc-wrapper {
display: flex;
align-items: center;
float: right;
position: fixed;
right: 0;
top: 0;
width: 10%;
height: 100%;
}
.toc {
max-width: 200px;
font-size: 0.6em;
text-align: left;
background-color: #ffffff;
border-radius: 5px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
padding-left: 15px;
animation-name: appear;
animation-duration: 0.5s;
animation-fill-mode: forwards;
}
.toc li {
margin-bottom: 2px;
transition: color 0.2s ease-in-out;
}
.toc li::before {
content: "-";
position: absolute;
left: 5px; /* Relative to parent */
}
.toc ul {
margin-top: 5px;
margin-bottom: 5px;
padding-left: 0px;
margin-right: 10px;
margin-left: 0;
list-style-type: none;
}
.toc ul li.current {
color: #000000;
}
.toc ul li.current::before {
content: "+";
}
.toc ul ul {
margin-left: 5px;
}
.toc ul ul ul {
margin-left: 10px;
}
.toc ul ul ul ul {
margin-left: 15px;
}
.toc ul ul ul ul ul {
margin-left: 20px;
}
/* For mobile / small-screen devices */
@media screen and (max-width: 1000px) {
/* From this width, make content fill the entire screen */
.page-wrapper {
left: 5vw;
width: 90vw;
}
}
@media screen and (max-width: 600px) {
/* From this width, use mobile layout */
body,
html {
/* Performance of text-shadow on some mobile browsers is terrible */
text-shadow: none;
}
.sidebar {
position: relative;
float: none;
width: 80%;
margin-left: 10%;
text-align: center;
}
.sidebar .copyright {
display: none;
}
.sidebar .links {
margin-bottom: 30px;
}
/* Show nav links horizontally */
.sidebar .links ul {
display: flex;
justify-content: center;
padding-left: 10px;
}
.sidebar .links ul li {
display: list-item;
margin-right: 10px;
}
.post-list,
.content {
margin-left: 0;
width: 100%;
}
.with-divider.with-divider-center-mobile::after {
margin-left: calc(50% - 20px) !important;
}
/* We need footer on mobile */
.footer {
display: block;
text-align: center;
width: 100%;
}
}
/* Modal <https://www.w3schools.com/howto/howto_css_modal_images.asp> */
/* The Modal (background) */
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
padding-top: 100px; /* Location of the box */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: scroll; /* Enable scroll if needed */
scrollbar-width: thin;
scrollbar-color: #888888 #00000000;
background-color: rgb(0, 0, 0); /* Fallback color */
background-color: rgba(0, 0, 0, 0.9); /* Black w/ opacity */
}
/* Modal Content (Image) */
.modal-content {
margin: auto;
display: block;
width: 80%;
max-width: 700px;
}
/* Caption of Modal Image (Image Text) - Same Width as the Image */
#caption {
margin: auto;
display: block;
width: 80%;
max-width: 700px;
text-align: center;
color: #ccc;
padding: 10px 0;
height: 150px;
}
/* Add Animation - Zoom in the Modal */
.modal-content,
#caption {
animation-name: zoom;
animation-duration: 0.6s;
}
@keyframes zoom {
from {
transform: scale(0);
}
to {
transform: scale(1);
}
}
/* The Close Button */
.close {
position: absolute;
top: 15px;
right: 35px;
color: #f1f1f1;
font-size: 40px;
font-weight: bold;
transition: 0.3s;
}
.close:hover,
.close:focus {
color: #bbb;
text-decoration: none;
cursor: pointer;
}
/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px) {
.modal-content {
width: 100%;
}
}
/* Extra customization for hljs */
.hljs {
text-shadow: 0 0 2px #777777;
font-size: 0.8em;
border-radius: 4px;
scrollbar-color: #e91e63 #00000000;
scrollbar-width: thin;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.hljs:hover {
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
}
/* Extra customization for Itte, the comment system */
#itte-thread::before {
content: "";
display: block;
margin-top: 20px;
margin-bottom: 20px;
margin-left: calc(50% - 90px);
width: 180px;
height: 2px;
background-color: #e91e63;
}
#itte-thread {
/* The Itte CSS overrides the margin. We override it back :) */
margin-right: 10px !important;
/* Give itte-thread its own block context */
/* it contains float elements and clear, which interferes with sidebar */
overflow: hidden;
}