leilukin-site/blog/css/style-blog.css

274 lines
4.5 KiB
CSS

@import url('https://fonts.googleapis.com/css?family=Noto+Sans&display=swap');
/* CSS RESET */
/* Box sizing rules */
*,
*::before,
*::after {
box-sizing: border-box;
}
/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
margin: 0;
}
/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
list-style: none;
}
/* Set core root defaults */
html:focus-within {
scroll-behavior: smooth;
}
/* Set core body defaults */
body {
min-height: 100vh;
text-rendering: optimizeSpeed;
line-height: 1.5;
}
/* A elements that don't have a class get default styles */
a:not([class]) {
text-decoration-skip-ink: auto;
}
/* Make images easier to work with */
img,
picture {
max-width: 100%;
display: block;
}
/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
font: inherit;
}
/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
html:focus-within {
scroll-behavior: auto;
}
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
/* STYLING BEGINS */
/* General styles */
body {
background-color: black;
background: url('../img/bg_space.png') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
font-size: 1.3rem;
font-family: 'Noto Sans', Arial, sans-serif;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
h1 {
margin-bottom: 1.2rem;
}
h1, h2, h3, h4, h5 {
color: #5fc7cd;
}
p {
line-height: 1.6em;
padding: 0.5rem 0;
}
strong {
color: #5fc7cd;
}
img {
max-width: 100%;
height: auto;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
blockquote {
margin: 1.5rem 0;
padding: 0.5rem 1rem;
border-inline-start: 0.1rem solid #5fc7cd;
background-color: #34220b;
}
.right {
float: right;
margin-left: 1em;
}
.left {
float: left;
margin-right: 1em;
}
.center {
display: block;
margin-right: auto;
margin-left: auto;
text-align: center;
}
@media only screen and (min-width: 37.5rem) {
.small {
max-width: 60%;
height: auto;
}
}
.caption {
margin-top: 0;
font-size: 0.9em;
font-style: italic;
}
a {
color: #ffc000;
}
a:hover {
background-color: #34220b;
}
hr {
border-width: 0.1rem 0 0 0;
border-style: dotted;
border-color: #a3bdc4;
}
/* The rectangle that has contains everything but the background */
.blog-container {
width: 95%;
max-width: 68.75rem;
background-color: #101010;
color: #dddddd;
border-radius: 2rem;
overflow: hidden;
box-shadow: 0 -2px 10px 0 #c7d8f4 inset;
margin: 1em 0;
padding: 1em 2em;
}
/* HEADER STYLE */
.blog-header {
margin-bottom: 0.5em;
}
.blog-header ul {
display: inline-block;
list-style-type: none;
padding: 0;
margin-bottom: 1em;
margin-top: 1em;
}
.blog-header li {
font-size: 1.1em;
display: inline-block;
margin-right: 0.5em;
margin-bottom: 0.5em;
margin-top: 0.5em;
}
.blog-header li a {
color: white;
background-color: #1b548e;
border-radius: 25px;
border: 3px solid #7cd8ff;
padding: 6px 30px;
box-shadow: 0 -2px 12px 0 #23a4f8 inset;
text-transform: uppercase;
text-decoration: none;
}
.blog-header li a:hover {
background-color: #1f64aa;
text-decoration: none;
}
/* POST TITLE STYLE */
.blog__title,
.blog-post__title {
font-size: 1.75em;
}
/* POST STYLE */
.blog-post__figure--img {
padding: 1rem 0;
}
/* POST DATE STYLE */
.blog-post__date {
font-size: 1.1em;
margin-bottom: 1.1em;
}
/* POST LIST STYLE */
.blog-recent-post-list {
margin-top: 1em;
}
.blog-post-list ul,
.blog-recent-post-list ul {
font-size: 1.1em;
padding: 0;
list-style-type: none;
}
.blog-post-list ul li,
.blog-recent-post-list ul li {
margin-bottom: 0.5em;
}
.moreposts {
font-size: 0.8em;
margin-top: 0.2em;
}
/*NEXT AND PREVIOUS LINKS STYLE*/
.blog-nextprev {
text-align: center;
margin: 1.4em 0;
}
/* DISQUS STYLE */
#disqus_thread {
margin-top: 1.6em;
}
/* FOOTER STYLE */
.blog-footer {
font-size: 0.8em;
}