slowtwitch-news/style.css

447 lines
7.4 KiB
CSS
Raw Normal View History

2024-06-20 15:33:25 +00:00
/*
Theme Name: Slowtwitch News Theme
Text Domain: Slowtwitch
Version: 1.0.0
Author: Ross Trottier
2024-06-20 22:15:11 +00:00
*/
/*
============================
CSS RESETS + GLOBALS
============================
*/
* {
box-sizing: border-box;
}
body {
margin: 0;
font-size: 1.25rem;
font-family: "Rubik", sans-serif;
line-height: 1.6;
}
input, button, textarea, select {
font: inherit;
}
/*
============================
TYPOGRAPHY
============================
*/
h1 {
font-size: 3rem;
}
.st-site-title {
text-transform: uppercase;
color: #0b4fa0;
text-align: center;
margin-top: 0;
font-size: 3.3rem;
2024-06-21 20:56:00 +00:00
transform: scale(1, 1);
transition: transform 300ms;
2024-06-21 16:57:39 +00:00
transform-origin: top left;
}
.st-title-scrolled {
transform: scale(0,0);
2024-06-20 22:15:11 +00:00
}
/*
============================
LAYOUT
============================
*/
.st-main-grid {
display: grid;
grid-template-columns: minmax(1em, 1fr) minmax(260px, 500px) minmax(1em, 1fr);
}
.st-main-grid > * {
grid-column: 2;
}
/*
============================
SECTIONS
============================
*/
/* header bar */
2024-06-21 16:57:39 +00:00
.st-header {
position: sticky;
top: 0;
}
2024-06-20 22:15:11 +00:00
2024-06-21 20:56:00 +00:00
.st-header-scrolled {
pointer-events: none;
}
2024-06-20 22:15:11 +00:00
.st-header-icon-bar {
2024-06-21 16:57:39 +00:00
width: 100%;
2024-06-20 22:15:11 +00:00
display: flex;
justify-content: space-between;
color: black;
margin-top: .25em;
}
.st-header-logo {
width: 100%;
}
.st-header-icon {
text-decoration: none;
cursor: pointer;
color: black;
}
2024-06-21 16:57:39 +00:00
.st-icon-bar-sticky a {
display: none;
}
.st-icon-bar-sticky .st-open-nav {
border-radius: 20%;
padding: .1em .4em;
background: #fff;
box-shadow: 0 0 3px rgb(0 0 0 / 30%);
margin-left: auto;
2024-06-21 20:56:00 +00:00
pointer-events: auto;
2024-06-21 16:57:39 +00:00
}
2024-06-24 22:56:08 +00:00
.st-icon-bar-sticky .st-open-search {
border-radius: 20%;
padding: .1em .4em;
background: #fff;
box-shadow: 0 0 3px rgb(0 0 0 / 30%);
margin-right: auto;
pointer-events: auto;
}
2024-06-20 22:15:11 +00:00
/* nav */
2024-06-21 20:56:00 +00:00
.st-search-overlay,
2024-06-20 22:15:11 +00:00
.st-nav {
2024-06-21 16:57:39 +00:00
position: fixed;
2024-06-20 22:15:11 +00:00
background: #fff;
width: 100%;
top: 0;
right: 0;
bottom: 0;
left: -100%;
transform: translateX(0);
transition: transform ease-in-out 250ms;
grid-template-rows: minmax(2.25rem, 3rem) 1fr;
2024-06-21 20:56:00 +00:00
pointer-events: auto;
2024-06-20 22:15:11 +00:00
}
2024-06-24 20:59:45 +00:00
.st-nav-is-open,
.st-search-is-open {
2024-06-20 22:15:11 +00:00
transform: translateX(100%);
}
.st-nav-btn {
background: 0;
border: 0;
font-size: 1.25rem;
cursor: pointer;
}
.st-nav-links {
padding: 0;
margin-top: 0;
}
.st-nav-links,
.st-nav-links ul {
list-style: none;
}
.st-nav-links .menu-item a {
text-decoration: none;
cursor: pointer;
font-size: 2rem;
text-transform: uppercase;
margin-bottom: 1em;
letter-spacing: 1px;
color: #0b4fa0;
}
.st-nav-links .menu-item a:hover,
.st-nav-links .menu-item a:hover:active {
color: #d3d3d3;
}
2024-06-24 20:59:45 +00:00
.st-close-nav,
.st-close-search {
2024-06-20 22:15:11 +00:00
text-align: right;
font-size: 2rem;
height: 3rem;
}
2024-06-24 20:59:45 +00:00
.st-search-form {
margin-top: 2em;
}
.st-searchbar-container {
display: flex;
flex-direction: row;
justify-content: center;
}
.st-search-box {
outline: none;
border: none;
border-bottom: 2px solid #0b4fa0;
color: #0b4fa0;
}
.st-btn-search {
margin-left: 1em;
}
.st-btn-search i {
color: #0b4fa0;
font-size: 1.25em;
}
2024-06-21 20:56:00 +00:00
/* footer */
.st-footer {
color: white;
background: #0b4fa0;
display: grid;
grid-template-columns: minmax(1em, 1fr) minmax(130px, 250px) minmax(130px, 250px) minmax(1em, 1fr);
grid-template-areas:
"lpad socials partners rpad"
"lpad menu logo rpad"
"lpad copy copy rpad";
grid-auto-rows: max-content;
}
.st-footer-socials {
grid-area: socials;
display: flex;
flex-direction: column;
}
.st-footer-icon {
font-size: 1.5rem;
color: #fff;
margin-top: 1.5em;
color: #270BA1;
}
2024-06-24 22:56:08 +00:00
.st-footer-icon:hover,
.st-footer-icon:active {
color: #FFDB12;
}
2024-06-21 20:56:00 +00:00
.st-footer-copyright {
grid-area: copy;
font-size: .6rem;
text-align: right;
background: #270BA1;
padding: .2em .5em .2em;
margin-bottom: 0;
}
.st-footer-site-title {
grid-area: logo;
text-transform: uppercase;
writing-mode: vertical-lr;
align-self: end;
justify-self: end;
margin: 0;
line-height: 1;
color: #270BA1;
}
.st-footer-partners {
grid-area: partners;
text-align: right;
}
.st-footer-partners__title {
margin-bottom: 0;
}
.st-footer-partners__list {
list-style: none;
margin-top: .2em;
}
.st-footer-partners__list-item {
font-size: .80rem;
}
2024-06-24 22:56:08 +00:00
.st-footer-partners__list-item a,
.st-footer-nav-links a {
2024-06-21 20:56:00 +00:00
text-decoration: none;
color: #fff;
}
2024-06-24 22:56:08 +00:00
.st-footer-partners__list-item a:hover,
.st-footer-partners__list-item a:active,
.st-footer-nav-links a:hover,
.st-footer-nav-links a:active {
color: #FFDB12;
}
2024-06-21 20:56:00 +00:00
.st-footer-menu {
grid-area: menu;
}
.st-footer-nav-links {
list-style: none;
margin: 0;
padding: 0;
}
2024-06-20 22:15:11 +00:00
/*
============================
COMPONENTS
============================
*/
/* main article card */
.st-article-section-title {
display: flex;
justify-content: space-between;
margin-top: 0;
margin-bottom: .5em;
color: black;
font-weight: 800;
}
.st-article-section-title > a {
text-decoration: none;
color: black;
}
.st-article-section-main-article__image-link img {
width: 100%;
object-fit: cover;
border-radius: 10px;
}
.st-article-section-main-article__category-link {
text-decoration: none;
color: #fff;
padding: .3em .75em;
background: #0b4fa0;
font-size: .8rem;
text-transform: uppercase;
letter-spacing: 1px;
2024-06-21 20:56:00 +00:00
font-weight: 600;
2024-06-20 22:15:11 +00:00
}
.st-article-section-main-article__title {
text-decoration: none;
color: #454545;
font-size: 1.2rem;
line-height: 1.2;
}
.st-article-section-main-article__title h3 {
margin: .25em 0;
}
.st-article-section-main-article__excerpt {
font-size: .75em;
margin: 0;
}
.st-article-section-main-article__author-link {
text-decoration: none;
color: #8b8680;
font-size: .5em;
}
.st-article-section-main-article__datetime {
color: #8b8680;
font-size: .5em;
}
/* sub article card */
.st-article-section-sub-article {
display: flex;
flex-direction: row;
margin-top: 1em;
}
.st-article-section-sub-article__image-link img {
width: 160px;
height: auto;
aspect-ratio: 1.5;
object-fit: cover;
object-position: bottom right;
border-radius: 4px;
}
.st-article-section-sub-article__category-link {
text-decoration: none;
color: #fff;
padding: .3em .75em;
background: #0b4fa0;
font-size: .6rem;
text-transform: uppercase;
letter-spacing: 1px;
2024-06-21 20:56:00 +00:00
font-weight: 600;
2024-06-20 22:15:11 +00:00
}
.st-article-section-sub-article__text-container {
display: flex;
flex-direction: column;
align-items: flex-start;
margin-left: .5em;
}
.st-article-section-sub-article__title {
font-size: .75rem;
text-decoration: none;
color: #454545;
font-weight: 500;
}
.st-article-section-sub-article__title h3 {
margin-top: .2em;
}
/* chips */
.st-chip {
padding: .25em .75em;
font-size: 1rem;
text-decoration: none;
cursor: pointer;
border-radius: 100px;
color: white;
2024-06-21 20:56:00 +00:00
font-weight: 500;
letter-spacing: 1px;
2024-06-20 22:15:11 +00:00
}
.st-chip-primary {
background: #0b4fa0;
}
.st-chip-secondary {
2024-06-21 20:56:00 +00:00
background: #FFDB12;
color: #454545;
}
.st-chip-secondary:hover,
.st-chip-secondary:active {
background: #270BA1;
color: #fff;
}
.st-chip-primary:hover,
.st-chip-primary:active {
background: #FFF;
color: #454545;
2024-06-20 22:15:11 +00:00
}