bobatheme/assets/css/bobastyle.css

625 lines
9.0 KiB
CSS

/* bobatheme is available under the MIT license at
* https://github.com/BBaoVanC/bobatheme.
*/
:root {
--background: #111;
--background-2: #222;
--background-3: #282828;
--background-4: #333;
--background-5: #444;
--text-normal: #d3d3d3;
--link-color: #4da6ff;
--figure-border: #1b5b9b;
--pagination-active-hover-text: black;
--pagination-active-background: #163b64;
--pagination-active-hover-background: #286ab2;
}
@media (prefers-color-scheme: light) {
:root {
--background: #eee;
--background-2: #ddd;
--background-3: #d8d8d8;
--background-4: #bbb;
--background-5: #aaa;
--text-normal: #000;
--link-color: #0057bf;
--figure-border: #2e7bc9;
--pagination-active-hover-text: white;
--pagination-active-background: #3977bd;
--pagination-active-hover-background: #154172;
}
}
@media print {
:root {
--background: #fff;
--background-2: #ddd;
--background-3: #d8d8d8;
--background-4: #bbb;
--background-5: #aaa;
--text-normal: #000;
--link-color: #0057bf;
--figure-border: #2e7bc9;
--pagination-active-hover-text: white;
--pagination-active-background: #3977bd;
--pagination-active-hover-background: #154172;
}
}
/* Post layout (in list pages) */
.list-page-content {
display: flex;
flex-direction: column;
gap: 40px;
}
.page-list ul,
.series-taxonomy ul {
display: flex;
flex-direction: column;
list-style: none;
padding: 0;
gap: 40px;
}
.page-list li,
.series-taxonomy li {
padding-top: 8px;
padding-left: 24px;
padding-right: 24px;
padding-bottom: 24px;
border-radius: 12px;
background-color: var(--background-2);
}
.post-series-position {
position: relative;
float: right;
opacity: .75;
}
.post-title {
margin-bottom: 10px;
}
.post-title a {
color: inherit;
text-decoration: inherit;
}
.post-meta-item {
margin-right: 10px;
display: inline-block;
}
.post-metadata {
margin-bottom: 15px;
}
.tags,
.series {
margin-top: 10px;
}
.post-media {
margin-top: 15px;
}
.post-description {
margin-top: 10px;
}
.readmore {
margin-top: 5px;
}
/* Tags list format */
.tag-list ul {
display: flex;
list-style: none;
gap: 10px;
flex-flow: row wrap;
padding: 0;
}
.tag-list a {
background-color: var(--background-2);
padding: 8px 12px;
border-radius: 12px;
}
.tag-list a:hover {
text-decoration: none;
background-color: var(--background-4);
}
/* Series list format */
.series-pages ul {
display: flex;
gap: 10px;
flex-flow: row wrap;
list-style: none;
padding: 0;
background-color: var(--background);
padding: 8px;
border-radius: 16px;
}
.series-pages li {
flex: 1;
min-width: 49%;
}
/* Subsection formatting */
.sections {
display: flex;
flex-direction: column;
gap: 40px;
}
.section {
background-color: var(--background-2);
border-radius: 12px;
padding: 1px 25px;
}
.section:hover {
background-color: var(--background-4);
}
.section-title {
margin: 10px 0;
}
.section-anchor {
color: inherit;
}
.section-anchor:hover {
text-decoration: none;
}
.section-description {
margin-bottom: 5px;
}
.view-section {
margin-top: 5px;
}
/* Header formatting (website title and article section headers) */
.top {
margin: 20px;
}
.header a,
.section-header a {
color: inherit;
}
.section-header-link svg {
width: 15px;
height: 15px;
}
/* Content formatting */
.series-box {
background-color: var(--background-2);
padding: 8px 16px;
border-radius: 8px;
margin: 15px 0;
}
.table-of-contents {
background-color: var(--background-2);
padding: 8px 20px;
border-radius: 8px;
margin: 10px 0;
}
.table-of-contents summary {
cursor: pointer;
}
.table-of-contents.print {
display: none;
padding: 8px 15px;
}
.content,
footer {
margin: 20px;
}
footer {
text-align: center;
}
#back-to-top {
position: fixed;
float: right;
bottom: 25px;
right: 25px;
background-color: var(--background-3);
border-radius: 100%;
padding: 12px;
display: none;
}
/* Navbar formatting */
.topbar {
display: flex;
flex-wrap: nowrap;
flex-direction: row;
background-color: var(--background-2);
border-radius: 8px;
margin-top: 5px;
padding: 4px;
align-items: flex-start;
}
.navbar {
display: flex;
}
.navbar {
flex-grow: 1;
overflow: auto;
}
.navbar a {
padding: 8px 12px;
border-radius: 12px;
}
.navbar-item:hover,
.langpicker summary:hover,
.langpicker[open] summary {
background-color: var(--background-5);
text-decoration: none;
}
.topbar .active {
font-weight: bold;
}
.langpicker {
position: relative;
white-space: nowrap;
}
.langpicker summary {
cursor: pointer;
margin-left: 24px;
padding: 8px 12px;
border-radius: 12px;
}
.langpicker .languages {
position: absolute;
margin-top: 8px;
right: 0;
background-color: var(--background-2);
border: 2px solid var(--background-4);
padding: 8px 12px;
border-radius: 8px;
list-style: none;
}
.langpicker .unavailable {
color: inherit;
}
.langpicker .unavailable:hover {
cursor: not-allowed;
text-decoration: none;
}
/* Basic elements */
html {
scroll-behavior: smooth;
}
@media screen and (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
}
body {
background-color: var(--background);
color: var(--text-normal);
font-family: "Open Sans", "Noto Sans", sans-serif;
margin: auto;
max-width: 720px;
overflow-wrap: break-word;
}
img,
video {
max-width: 100%;
}
.post-media > figure.border img,
.post-media > figure.border video {
padding: 5px;
border: 7px solid var(--figure-border);
}
figure.border img,
figure.border video {
padding: 5px;
border: 2px solid var(--figure-border);
}
figure {
margin: auto;
display: inline-block;
}
figcaption {
font-style: italic;
font-size: small;
text-align: center;
}
aside {
background-color: var(--background-2);
padding: 12px 16px;
margin: 16px 0;
border-radius: 8px;
}
a {
color: var(--link-color);
text-decoration: inherit;
}
a:hover {
text-decoration: underline;
}
blockquote {
border-left: 5px solid var(--background-4);
padding-left: 15px;
}
hr {
border-color: var(--background-5);
}
* {
box-sizing: border-box;
}
/* Code blocks */
.highlight {
margin: 16px 0;
}
.highlight > pre {
padding: 12px 8px;
overflow: auto;
}
:not(pre) > code {
background-color: var(--background-3);
padding: 2px 4px;
overflow-wrap: break-word;
}
code {
border-radius: 5px;
}
.chroma .lnt {
display: block;
} /* fixes line numbers on firefox when there's only one line */
/* Icons */
.icon {
width: 20px;
height: 20px;
color: var(--text-normal);
text-align: center;
display: inline;
vertical-align: middle;
}
h1 svg.icon {
width: 30px;
height: 30px;
}
/* Pagination */
.pagination {
list-style: none;
text-align: center;
padding: 0;
}
.page-item {
display: inline;
}
.page-link {
padding: 8px 16px;
border-radius: 5px;
color: var(--text-normal);
}
.page-item.active .page-link {
background-color: var(--pagination-active-background);
color: inherit;
}
.page-item.active .page-link:hover {
background-color: var(--pagination-active-hover-background);
color: var(--pagination-active-hover-text);
}
.page-link:hover {
text-decoration: none;
}
:not(li.disabled) > .page-link:hover {
background-color: var(--background-5);
}
li.disabled {
opacity: .5;
}
li.disabled > .page-link:hover {
cursor: not-allowed;
}
/* Breadcrumb navigation */
.breadcrumb {
margin-top: 40px;
margin-bottom: 20px;
margin-left: 20px;
}
.breadcrumb ul {
padding: 0;
list-style: none;
}
.breadcrumb li {
display: inline;
}
.breadcrumb li+li:before {
content: "»"
}
/* Previous and next page */
.prevnext {
display: flex;
margin: 20px 0;
}
.prevnext > * {
flex: 1;
white-space: nowrap;
overflow: hidden;
display: flex;
flex-direction: column;
color: inherit;
background-color: var(--background-2);
padding: 8px 16px;
}
.prevnext > a:hover {
background-color: var(--background-4);
text-decoration: none;
}
.prevnext > .prev {
text-align: left;
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
}
.prevnext > .next {
text-align: right;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
}
.prevnext .prev-caption,
.prevnext .next-caption {
opacity: 65%;
}
.prevnext .prev-post,
.prevnext .next-post {
overflow: hidden;
text-overflow: ellipsis;
}
/* Light mode */
@media print, (prefers-color-scheme: light) {
/* Basic elements */
.section:hover {
color: inherit;
}
li.disabled {
opacity: .25;
}
}
/* Print compatibility */
@media print {
.top,
.breadcrumb,
.section-header-link,
.prevnext,
.comments {
display: none;
}
* {
-webkit-print-color-adjust: exact !important;
color-adjust: exact !important;
}
body {
max-width: 100%;
}
pre {
white-space: pre-wrap;
overflow-wrap: anywhere;
break-inside: avoid;
}
.table-of-contents {
display: none;
}
.table-of-contents.print {
display: block;
}
#back-to-top {
display: none !important;
}
}