itsonus-blog/public/css/index.css

370 lines
6.1 KiB
CSS

/* Defaults */
:root {
--font-family: Century Gothic,Avant Garde,Avenir,TeXGyreAdventorRegular,Verdana,sans-serif;
--font-family-monospace: Consolas, Menlo, Monaco, Andale Mono WT, Andale Mono, Lucida Console, Lucida Sans Typewriter, DejaVu Sans Mono, Bitstream Vera Sans Mono, Liberation Mono, Nimbus Mono L, Courier New, Courier, monospace;
}
/* Theme colors */
:root {
--color-gray-20: #e0e0e0;
--color-gray-50: #C0C0C0;
--color-gray-90: #333;
--color-green-1: #004953;
--color-green-2: #57c183;
--background-color: #fff;
--text-color: rgba(0,0,10,.8);
--text-color-secondary: var(--color-green-1);
--text-color-tertiary: var(--color-green-2);
--text-color-link: var(--color-green-1);
--text-color-link-active: var(--color-green-1);
}
/*@media (prefers-color-scheme: dark) {*/
/* :root {*/
/* --color-gray-20: #e0e0e0;*/
/* --color-gray-50: #C0C0C0;*/
/* --color-gray-90: #dad8d8;*/
/* !* --text-color is assigned to --color-gray-_ above *!*/
/* --text-color-link: #1493fb;*/
/* --text-color-link-active: #6969f7;*/
/* --text-color-link-visited: #a6a6f8;*/
/* --background-color: #15202b;*/
/* }*/
/*}*/
/* Global stylesheet */
* {
box-sizing: border-box;
}
html,
body {
padding: 0;
margin: 0;
font-family: var(--font-family);
color: var(--text-color);
background-color: var(--background-color);
}
main {
max-width: 1200px;
margin: 0 auto;
display: flex;
}
.main-content {
margin: auto;
width: 1200px;
}
.right-side {
position: -webkit-sticky; /* for Safari */
position: sticky;
top: 1rem;
align-self: flex-start;
width: 300px;
padding-left: 60px;
}
.right-side .title {
color: var(--text-color-secondary);
font-weight: 700;
}
.right-side .tags {
display: flex;
flex-wrap: wrap;
gap: 5px;
}
.right-side .links {
padding: 0;
list-style: none;
}
.right-side .tags,
.right-side .links {
padding: 0;
margin: 12px 0 23px 0;
list-style: none;
}
h1 {
color: var(--text-color-secondary);
font-style: normal;
font-size: 3em;
font-weight: 700;
}
h2 {
color: var(--text-color-secondary);
font-size: 1.7em;
font-style: normal;
font-weight: 700;
letter-spacing: .02em;
line-height: 1.7em;
margin-top: 0;
}
p {
line-height: 1.5;
margin: 1.5em 0;
}
li {
line-height: 1.5;
}
a {
color: var(--text-color-link);
}
a:hover {
color: var(--text-color-link-active);
}
main {
padding: 8rem 1rem 4rem 1rem;
}
main :first-child {
margin-top: 0;
}
table {
margin: 1em 0;
}
table td,
table th {
padding-right: 1em;
}
pre,
code {
font-family: var(--font-family-monospace);
}
pre,
pre[class*="language-"] {
margin: .5em 0;
line-height: 1.375; /* 22px /16 */
-moz-tab-size: 2;
-o-tab-size: 2;
tab-size: 2;
-webkit-hyphens: none;
-ms-hyphens: none;
hyphens: none;
direction: ltr;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
}
code {
word-break: break-all;
}
hr {
margin: 4rem 15vw;
}
/* Header */
.main-header {
background: #fff;
box-shadow: 0 2px 8px rgba(0,0,0,.25);
width: 100%;
z-index: 1000;
height: 60px;
}
.main-header div {
align-items: center;
display: flex;
margin: auto;
max-width: 1400px;
height: 60px;
}
.main-header-logo {
margin: 0 23px;
text-decoration: none;
}
.main-menu {
display: flex;
flex-grow: 1;
}
/*!* Posts list *!*/
.post-list {
list-style: none;
padding: 5rem 0;
}
.post-list li {
display: flex;
padding: 15px 0;
margin: 2px;
border-bottom: 2px solid var(--text-color-secondary);
}
.post-list li a {
flex-grow: 1;
}
.postlist-item {
margin-bottom: 5rem;
}
.postlist-header h2 {
margin-bottom: 0;
}
.postlist-link {
flex-basis: calc(100% - 1.5rem);
padding-right: .5em;
text-decoration: none;
}
.postlist-footer {
text-align: right;
}
/* Tags */
.post-tag {
display: inline-flex;
align-items: center;
justify-content: center;
color: var(--text-color);
background: var(--text-color-tertiary);
padding: 4px;
font-size: 0.8125em; /* 13px /16 */
border-radius: 5px;
text-decoration: none;
}
/* Tags list */
.post-metadata {
display: flex;
gap: .5em;
list-style: none;
padding: 0;
margin: 0;
}
.post-list time,
.post-metadata time {
margin-right: 1em;
font-size: 0.8125em; /* 13px /16 */
color: rgba(0,0,10,.55);
}
.post-metadata li:first-child {
flex-grow: 1;
}
.post-nav ul {
display: flex;
justify-content: space-around;
list-style: none;
padding: 0;
margin: 2rem 1rem 0 0;
}
/*.post-nav ul li.previous {*/
/* list-style: '<';*/
/*}*/
/*.post-nav ul li.next {*/
/* list-style: '>';*/
/*}*/
/* Direct Links / Markdown Headers */
.direct-link {
font-family: sans-serif;
text-decoration: none;
font-style: normal;
margin-left: .1em;
}
a[href].direct-link {
color: transparent;
}
a[href].direct-link:focus,
:hover > a[href].direct-link {
color: #aaa;
}
.main-footer {
align-items: center;
background: var(--color-green-1);
display: flex;
height: 300px;
padding: 0 103px;
}
.main-footer,
.main-footer a {
color: #fff;
}
.footer-contact {
display: flex;
flex: 0 20%;
flex-direction: column;
font-size: 1em;
line-height: 1.5em;
}
.footer-contact p {
margin: 0;
padding: 0;
}
.footer-contact-title {
color: #fff;
font-size: 1.2em;
font-style: normal;
font-weight: 700;
letter-spacing: .04em;
line-height: 1.7em;
text-transform: uppercase;
}
.footer-contact div:last-child {
padding-top: 23px;
}
.footer-links {
display: flex;
padding: 0;
list-style: none;
gap: 12px;
}
.footer-center {
flex: 0 60%;
text-align: center;
}
@media only screen and (max-width: 1200px) {
main {
max-width: 100%;
flex-direction: column;
padding-top: 1rem;
}
.main-content{
max-width: 100%;
}
.right-side {
width: 100%;
padding-left: 0;
padding-top: 5rem;
}
.main-footer {
flex-direction: column-reverse;
height: auto;
padding: 23px 0;
}
.post-nav ul {
flex-direction: column;
}
.footer-contact {
flex-direction: row;
justify-content: space-between;
padding: 0 23px;
width: 100%;
}
.footer-center {
padding: 0 23px 23px;
}
}