Update main.css

This commit is contained in:
Руслан 2023-07-30 15:11:08 +06:00 committed by GitHub
parent c3aa129ac6
commit 7ad5541b04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,420 +1,335 @@
root { /* Markdown */
--maincolor : blue; :root{
--maincolor: blue;
} }
html { html {
color : #232333; color: #232333;
font-family : 'Roboto Mono', monospace; font-family: 'Roboto Mono', monospace;
font-size : 15px; font-size: 15px;
line-height : 1.6em; line-height: 1.6em;
} }
body {
display : block; body{
margin : 8px; display: block;
margin: 8px;
} }
* {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
::selection { ::selection {
background : var(--maincolor); background: var(--maincolor);
color : #fff; color: #fff;
} }
p { p {
font-family : 'Fira Sans', sans-serif; font-family: 'Fira Sans', sans-serif;
line-height : 1.5; line-height: 1.5;
} }
hr { hr {
margin : 1em 0; margin: 1em 0;
} }
blockquote { blockquote {
color : #737373; color: #737373;
margin : 0; margin: 0;
padding-left : 1em; padding-left: 1em;
} }
a { a {
border-bottom : 3px solid var(--maincolor); border-bottom: 3px solid var(--maincolor);
color : inherit; color: inherit;
text-decoration : none; text-decoration: none;
} }
a:hover { a:hover {
background-color : var(--maincolor); background-color: var(--maincolor);
color : #fff; color: #fff;
} }
ul { ul {
list-style : none; list-style: none;
padding-left : 2ch; padding-left: 2ch;
} }
ul li { ul li {
text-indent : -2ch; text-indent: -2ch;
} }
ul > li::before { ul > li::before {
content : '* '; content: '* ';
font-weight : bold; font-weight: bold;
} }
/* Images */
img { img {
border : #ececec solid 3px; border: 3px solid #ececec;
max-width : 100%; max-width: 100%;
} }
figure { figure {
box-sizing : border-box; box-sizing: border-box;
display : inline-block; display: inline-block;
margin : 0; margin: 0;
max-width : 100%; max-width: 100%;
} }
figure img { figure img {
max-height : 500px; max-height: 500px;
} }
@media screen and (min-width: 600px) { @media screen and (min-width: 600px) {
figure { figure {
padding : 0 40px; padding: 0 40px;
} }
} }
figure h4 { figure h4 {
font-size : 1rem; font-size: 1rem;
margin : 0; margin: 0;
margin-bottom : 1em; margin-bottom: 1em;
} }
figure h4::before { figure h4::before {
content : '↳ '; content: '↳ ';
} }
/* Code blocks */
code { code {
background-color : #f1f1f1; background-color: #f1f1f1;
padding : 0.1em 0.2em; padding: .1em .2em;
} }
pre { pre {
background-color : #ececec; background-color: #ececec;
line-height : 1.4; line-height: 1.4;
overflow-x : auto; overflow-x: auto;
padding : 1em; padding: 1em;
} }
.highlight pre ::selection { .highlight pre ::selection {
background : rgb(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.2);
color : inherit; color: inherit;
} }
pre code { pre code {
background-color : transparent; background-color: transparent;
color : inherit; color: inherit;
font-size : 100%; font-size: 100%;
padding : 0; padding: 0;
} }
/* Containers */
.content { .content {
margin-bottom : 4em; margin-bottom: 4em;
margin-left : auto; margin-left: auto;
margin-right : auto; margin-right: auto;
max-width : 800px; max-width: 800px;
padding : 0 1ch; padding: 0 1ch;
overflow-wrap : break-word; word-wrap: break-word;
} }
/* Header */
header { header {
display : flex; display: flex;
flex-wrap : wrap; flex-wrap: wrap;
justify-content : space-between; justify-content: space-between;
margin : 1em 0; margin: 1em 0;
line-height : 2.5em; line-height: 2.5em;
} }
header .main { header .main {
font-size : 1.5rem; font-size: 1.5rem;
} }
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
font-size : 1.2rem; font-size: 1.2rem;
margin-top : 2em; margin-top: 2em;
}
h1::before {
color : var(--maincolor);
content : '# ';
}
h2::before {
color : var(--maincolor);
content : '## ';
}
h3::before {
color : var(--maincolor);
content : '### ';
}
h4::before {
color : var(--maincolor);
content : '#### ';
}
h5::before {
color : var(--maincolor);
content : '##### ';
}
h6::before {
color : var(--maincolor);
content : '###### ';
} }
h1::before { color: var(--maincolor); content: '# '; }
h2::before { color: var(--maincolor); content: '## '; }
h3::before { color: var(--maincolor); content: '### '; }
h4::before { color: var(--maincolor); content: '#### '; }
h5::before { color: var(--maincolor); content: '##### '; }
h6::before { color: var(--maincolor); content: '###### '; }
.meta { .meta {
color : #999; color: #999;
letter-spacing : -0.5px; letter-spacing: -0.5px;
} }
/* Footer */
footer { footer {
display : flex; display: flex;
align-items : center; align-items: center;
padding : 2rem 0; padding: 2rem 0rem;
margin-top : 2rem; margin-top: 2rem;
} }
.soc { .soc {
display : flex; display: flex;
align-items : center; align-items: center;
border-bottom : none; border-bottom: none;
} }
.border { .border {
margin-left : 0.5rem; margin-left: 0.5rem;
margin-right : 0.5rem; margin-right: 0.5rem;
border : solid 1px; border: 1px solid;
} }
.footer-info {
padding: var(--footer-padding);
}
/* Common */
.title h1 { .title h1 {
margin-bottom : 0; margin-bottom: 0;
} }
time { time {
color : grey; color: grey;
} }
/* Posts */
article .title { article .title {
margin-bottom : 1em; margin-bottom: 1em;
} }
/* Callout */
.callout { .callout {
background-color : var(--maincolor); background-color: var(--maincolor);
color : #fff; color: #fff;
padding : 1em; padding: 1em;
} }
.callout p { .callout p {
font-family : 'IBM Plex Mono', monospace; font-family: 'IBM Plex Mono', monospace;
margin : 0; margin: 0;
} }
.callout a { .callout a {
border-bottom : 3px solid #fff; border-bottom: 3px solid #fff;
} }
.callout a:hover { .callout a:hover {
background-color : #fff; background-color: #fff;
color : var(--maincolor); color: var(--maincolor);
} }
.site-description { .site-description {
display : flex; display: flex;
justify-content : space-between; justify-content: space-between;
} }
.tags li::before {
content : "<"; .tags li::before{
content: "<";
} }
.tags li::after {
content : ">"; .tags li::after{
content: ">";
} }
.tags a {
border-bottom : 3px solid var(--maincolor); .tags a{
border-bottom: 3px solid var(--maincolor);
} }
.tags a:hover {
color : white; .tags a:hover{
background-color : var(--maincolor); color:white;
background-color: var(--maincolor);
} }
svg {
max-height : 15px; svg{
max-height: 15px;
} }
.soc:hover {
color : white; .soc:hover{
color: white;
} }
.draft-label {
text-decoration : none; .draft-label{
padding : 2px 4px; text-decoration: none;
margin-left : 6px; padding: 2px 4px;
background-color : #f9f2f4; margin-left: 6px;
background-color: #f9f2f4;
} }
.highlight { .highlight {
position : relative; position: relative;
-webkit-overflow-scrolling: touch;
} }
.highlight pre code[class*="language-"] {
-webkit-overflow-scrolling: touch;
}
.highlight pre code[class*="language-"]::before { .highlight pre code[class*="language-"]::before {
background : black; background: black;
border-radius : 0 0 0.25rem 0.25rem; border-radius: 0 0 0.25rem 0.25rem;
color : white; color: white;
font-size : 12px; font-size: 12px;
letter-spacing : 0.025rem; letter-spacing: 0.025rem;
padding : 0.1rem 0.5rem; padding: 0.1rem 0.5rem;
position : absolute; position: absolute;
right : 1rem; right: 1rem;
text-align : right; text-align: right;
text-transform : uppercase; text-transform: uppercase;
top : 0; top: 0;
} }
.highlight pre code[class="language-javaScript"]::before, .highlight pre code[class="language-js"]::before {
content : "js"; .highlight pre code[class=language-javaScript]::before,
background : #f7df1e; .highlight pre code[class="language-js"]::before {
color : black; content: "js";
background: #f7df1e;
color: black;
} }
.highlight pre code[class*="language-yml"]::before, .highlight pre code[class*="language-yaml"]::before {
content : 'yaml'; .highlight pre code[class*='language-yml']::before,
background : #f71e6a; .highlight pre code[class*='language-yaml']::before {
color : white; content: 'yaml';
background: #f71e6a;
color: white;
} }
.highlight pre code[class*="language-shell"]::before, .highlight pre code[class*="language-bash"]::before, .highlight pre code[class*="language-sh"]::before {
content : 'shell'; .highlight pre code[class*='language-shell']::before,
background : green; .highlight pre code[class*='language-bash']::before,
color : white; .highlight pre code[class*='language-sh']::before {
content: 'shell';
background: green;
color:white
} }
.highlight pre code[class*="language-json"]::before {
content : 'json'; .highlight pre code[class*='language-json']::before{
background : dodgervar(--maincolor); content: 'json';
color : #000000; background: dodgerblue;
color: #000000
} }
.highlight pre code[class*="language-python"]::before, .highlight pre code[class*="language-py"]::before {
content : 'py'; .highlight pre code[class*='language-python']::before,
background : var(--maincolor); .highlight pre code[class*='language-py']::before {
color : yellow; content: 'py';
background: blue;
color: yellow ;
} }
.highlight pre code[class*="language-css"]::before {
content : 'css'; .highlight pre code[class*='language-css']::before{
background : cyan; content: 'css';
color : black; background: cyan;
color: black ;
} }
.highlight pre code[class*="language-go"]::before {
content : 'Go'; .highlight pre code[class*='language-go']::before{
background : cyan; content: 'Go';
color : royalvar(--maincolor); background: cyan;
color: royalblue ;
} }
.highlight pre code[class*="language-md"]::before, .highlight pre code[class*="language-md"]::before {
content : 'Markdown'; .highlight pre code[class*='language-md']::before,
background : royalvar(--maincolor); .highlight pre code[class*='language-md']::before{
color : whitesmoke; content: 'Markdown';
} background: royalblue;
table { color: whitesmoke ;
border-spacing : 0;
border-collapse : collapse;
}
table th {
padding : 6px 13px;
border : #dfe2e5 solid 1px;
font-size : large;
}
table td {
padding : 6px 13px;
border : #dfe2e5 solid 1px;
}
body {
color : white;
background-color : black;
}
::-moz-selection {
background : var(--maincolor);
color : #fff;
text-shadow : none;
}
::selection {
background : var(--maincolor);
color : #fff;
text-shadow : none;
}
hr {
border-top : 3px dotted var(--maincolor);
}
code {
background-color : lightvar(--maincolor);
color : black;
padding : 0.1em 0.2em;
}
pre {
background-color : #272822;
line-height : 1.4;
overflow-x : auto;
padding : 1em;
}
blockquote {
border-color : var(--maincolor);
}
h1, h2, h3, h4, h5, h6 {
color : #ddd;
}
h1::before {
color : var(--maincolor);
content : "# ";
}
h2::before {
color : var(--maincolor);
content : "## ";
}
h3::before {
color : var(--maincolor);
content : "### ";
}
h4::before {
color : var(--maincolor);
content : "#### ";
}
h5::before {
color : var(--maincolor);
content : "##### ";
}
h6::before {
color : var(--maincolor);
content : "###### ";
}
a {
border-bottom : 3px solid var(--maincolor);
color : inherit;
}
a:hover {
background-color : var(--maincolor);
color : black;
}
.site-description a {
color : #ddd;
}
.site-description a:hover {
color : black;
}
.tags a {
border-bottom : 3px solid var(--maincolor);
}
.tags a:hover {
background-color : var(--maincolor);
color : black;
}
.site-title a {
color : white;
text-decoration : none !important ;
}
.header nav, .footer {
border-color : #333;
}
.highlight {
background-color : #333;
}
.soc:hover {
color : black;
}
.draft-label {
color : var(--maincolor);
background-color : var(--maincolor);
}
.highlight pre code[class="language-javaScript"]::before, .highlight pre code[class="language-js"]::before {
content : "js";
background : #f7df1e;
color : black;
}
.highlight pre code[class*="language-yml"]::before, .highlight pre code[class*="language-yaml"]::before {
content : 'yaml';
background : #f71e6a;
color : white;
}
.highlight pre code[class*="language-shell"]::before, .highlight pre code[class*="language-bash"]::before, .highlight pre code[class*="language-sh"]::before {
content : 'shell';
background : green;
color : white;
}
.highlight pre code[class*="language-json"]::before {
content : 'json';
background : dodgervar(--maincolor);
color : #000000;
}
.highlight pre code[class*="language-python"]::before, .highlight pre code[class*="language-py"]::before {
content : 'py';
background : var(--maincolor);
color : yellow;
}
.highlight pre code[class*="language-css"]::before {
content : 'css';
background : cyan;
color : black;
}
.highlight pre code[class*="language-go"]::before {
content : 'Go';
background : cyan;
color : royalvar(--maincolor);
}
.highlight pre code[class*="language-md"]::before, .highlight pre code[class*="language-md"]::before {
content : 'Markdown';
background : royalvar(--maincolor);
color : whitesmoke;
} }