ghost-theme-sd.ai/assets/css/screen.css

846 lines
15 KiB
CSS
Raw Normal View History

2023-07-05 13:43:09 +01:00
/* 1. Variables */
:root {
--color-white: #fff;
--color-lighter-gray: #f6f6f6;
--color-light-gray: #e6e6e6;
--color-mid-gray: #ccc;
--color-dark-gray: #444;
--color-darker-gray: #15171a;
--color-black: #000;
--color-primary-text: var(--color-darker-gray);
--color-secondary-text: rgba(0, 0, 0, 0.4);
--color-border: rgba(0, 0, 0, 0.08);
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
--font-serif: Georgia, Times, serif;
--font-mono: Menlo, Courier, monospace;
2023-07-10 05:17:54 +01:00
--container-gap: clamp(24px, 1.7032rem + 1.9355vw, 48px);
--grid-gap: 40px;
2023-07-05 13:43:09 +01:00
}
/* 2. Resets */
*, *::before, *::after {
box-sizing: border-box;
}
* {
margin: 0;
}
html {
font-size: 62.5%;
}
body {
line-height: 1.6;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
img, picture, video, canvas, svg {
display: block;
height: auto;
max-width: 100%;
}
iframe {
display: block;
}
input, button, textarea, select {
font: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
h1, h2, h3, h4, h5, h6 {
line-height: 1.3;
}
/* 3. Globals */
body {
font-family: var(--font-sans);
font-size: 1.6rem;
}
a {
color: var(--color-darker-gray);
text-decoration: none;
}
2023-07-05 14:26:03 +01:00
a:hover {
opacity: 0.8;
}
2023-07-05 14:16:54 +01:00
.gh-button {
display: inline-flex;
gap: 0.4em;
align-items: center;
justify-content: center;
padding: 0.75em 1.15em;
font-size: 1.6rem;
font-weight: 700;
line-height: 1;
color: var(--color-white);
letter-spacing: inherit;
cursor: pointer;
background-color: var(--ghost-accent-color);
border: 0;
border-radius: 100px;
}
.gh-button:hover {
opacity: 0.95;
}
.gh-icon-button {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
padding: 0;
color: var(--color-darker-gray);
cursor: pointer;
background-color: transparent;
border: 0;
outline: none;
}
2023-07-05 14:26:03 +01:00
.gh-icon-button:hover svg {
opacity: 0.8;
}
2023-07-05 14:16:54 +01:00
.gh-icon-button svg {
width: 20px;
height: 20px;
}
2023-07-05 13:43:09 +01:00
/* 4. Layout */
.gh-viewport {
position: relative;
display: flex;
flex-direction: column;
min-height: 100vh;
}
.gh-content {
flex-grow: 1;
}
.gh-outer {
padding: 0 max(4vmin, 20px);
}
.gh-inner {
margin: 0 auto;
2023-07-10 04:58:34 +01:00
max-width: 1280px;
2023-07-05 13:43:09 +01:00
width: 100%;
}
/* 5. Navigation */
.gh-navigation {
height: 100px;
}
.gh-navigation-inner {
display: grid;
grid-auto-flow: row dense;
column-gap: 24px;
align-items: center;
height: 100%;
}
.gh-navigation-brand {
line-height: 1;
}
.gh-navigation-logo {
position: relative;
font-size: 2.6rem;
font-weight: 700;
letter-spacing: -0.015em;
white-space: nowrap;
}
.gh-navigation-logo img {
max-height: 40px;
}
.gh-navigation-menu,
.gh-navigation-members a[data-portal="signin"] {
font-size: 1.6rem;
font-weight: 500;
}
.gh-navigation-menu {
display: flex;
gap: 24px;
align-items: center;
}
.gh-navigation .nav {
display: inline-flex;
gap: 24px;
align-items: center;
padding: 0;
margin: 0;
white-space: nowrap;
list-style: none;
}
.gh-navigation .gh-more-toggle {
position: relative;
margin: 0 -6px;
font-size: inherit;
text-transform: inherit;
}
.gh-navigation .gh-more-toggle svg {
width: 24px;
height: 24px;
}
.gh-navigation-actions {
display: flex;
gap: 24px;
align-items: center;
justify-content: flex-end;
}
.gh-navigation-members {
display: flex;
gap: 20px;
align-items: center;
white-space: nowrap;
}
.gh-navigation-members .gh-button {
font-size: inherit;
font-weight: 600;
}
.gh-search {
margin-right: -6px;
margin-left: -6px;
}
.gh-navigation-brand .gh-search {
2023-07-05 14:16:54 +01:00
margin-right: 2px;
2023-07-05 13:43:09 +01:00
}
@media (max-width: 767px) {
.gh-navigation-members {
flex-direction: column-reverse;
gap: 16px;
width: 100%;
}
.gh-navigation-actions .gh-search {
display: none;
}
}
@media (min-width: 768px) {
.gh-navigation-brand .gh-search {
display: none;
}
.gh-navigation:not(.is-dropdown-loaded) .gh-navigation-menu .nav > li {
opacity: 0;
}
}
/* 5.1. Navigation variants */
/*
======================================================================
LOGO Home About Collection Author Portal Login Subscribe
======================================================================
*/
.is-navigation-left-logo .gh-navigation-inner {
grid-template-columns: auto 1fr auto;
}
@media (min-width: 992px) {
.is-navigation-left-logo .gh-navigation-menu {
margin-right: 64px;
margin-left: 16px;
}
}
/*
======================================================================
Home About Collection LOGO Login Subscribe
======================================================================
*/
.is-navigation-middle-logo .gh-navigation-inner {
grid-template-columns: 1fr auto 1fr;
}
.is-navigation-middle-logo .gh-navigation-brand {
grid-column-start: 2;
}
.is-navigation-middle-logo .gh-navigation-actions {
gap: 28px;
}
@media (min-width: 992px) {
.is-navigation-middle-logo .gh-navigation-menu {
margin-right: 64px;
}
}
/*
======================================================================
Search LOGO Login Subscribe
Home About Collection Author Portal
======================================================================
*/
.is-navigation-stacked.gh-navigation {
position: relative;
height: auto;
}
.is-navigation-stacked .gh-navigation-inner {
grid-template-columns: 1fr auto 1fr;
}
.is-navigation-stacked .gh-navigation-brand {
display: flex;
grid-row-start: 1;
grid-column-start: 2;
min-height: 80px;
}
@media (min-width: 992px) {
.is-navigation-stacked .gh-navigation-inner {
padding: 0;
}
.is-navigation-stacked .gh-navigation-brand {
display: flex;
align-items: center;
height: 80px;
}
.is-navigation-stacked .gh-navigation-menu {
grid-row-start: 2;
grid-column: 1 / 4;
justify-content: center;
height: 56px;
margin: 0 48px;
}
.is-navigation-stacked .gh-navigation-menu::before,
.is-navigation-stacked .gh-navigation-menu::after {
position: absolute;
top: 80px;
left: 0;
width: 100%;
height: 1px;
content: "";
background-color: var(--color-border);
}
.is-navigation-stacked .gh-navigation-menu::after {
top: 136px;
}
.is-navigation-stacked .gh-navigation-actions {
grid-row-start: 1;
grid-column: 1 / 4;
justify-content: space-between;
}
}
/* 5.2. Dropdown menu */
.gh-dropdown {
position: absolute;
top: 100%;
right: -16px;
z-index: 90;
width: 200px;
padding: 12px 0;
margin-top: 24px;
text-align: left;
visibility: hidden;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 7px 20px -5px rgba(0, 0, 0, 0.15);
opacity: 0;
transition: opacity 0.3s, transform 0.2s;
transform: translate3d(0, 6px, 0);
}
.is-navigation-middle-logo .gh-dropdown {
right: auto;
left: -24px;
}
.is-dropdown-mega .gh-dropdown {
display: grid;
grid-template-columns: 1fr 1fr;
grid-auto-flow: column;
column-gap: 40px;
width: auto;
padding: 20px 32px;
}
.is-dropdown-open .gh-dropdown {
visibility: visible;
opacity: 1;
transform: translateY(0);
}
.gh-dropdown li a {
display: block;
padding: 6px 20px;
color: #15171a !important;
}
.is-dropdown-mega .gh-dropdown li a {
padding: 8px 0;
}
/* 5.3. Burger icon */
.gh-burger {
2023-07-05 14:16:54 +01:00
display: flex;
justify-content: center;
align-items: center;
2023-07-05 13:43:09 +01:00
position: relative;
display: none;
2023-07-05 14:16:54 +01:00
margin-right: -7px;
2023-07-05 13:43:09 +01:00
}
2023-07-05 14:16:54 +01:00
.gh-burger svg {
2023-07-05 13:43:09 +01:00
width: 24px;
2023-07-05 14:16:54 +01:00
height: 24px;
2023-07-05 13:43:09 +01:00
}
2023-07-05 14:16:54 +01:00
.gh-burger svg:last-child {
display: none;
2023-07-05 13:43:09 +01:00
}
2023-07-05 14:16:54 +01:00
.is-navigation-open .gh-burger svg:first-child {
display: none;
2023-07-05 13:43:09 +01:00
}
2023-07-05 14:16:54 +01:00
.is-navigation-open .gh-burger svg:last-child {
display: block;
2023-07-05 13:43:09 +01:00
}
@media (max-width: 767px) {
.gh-burger {
2023-07-05 14:16:54 +01:00
display: flex;
2023-07-05 13:43:09 +01:00
}
}
/* 5.4. Mobile menu */
@media (max-width: 767px) {
#gh-navigation {
height: 64px;
}
#gh-navigation .gh-navigation-inner {
grid-template-rows: auto 1fr auto;
grid-template-columns: 1fr;
gap: 48px;
}
#gh-navigation .gh-navigation-brand {
display: grid;
grid-template-columns: 1fr auto auto;
grid-column-start: 1;
align-items: center;
height: 64px;
}
#gh-navigation .gh-navigation-logo {
font-size: 2.2rem;
}
#gh-navigation .gh-navigation-menu,
#gh-navigation .gh-navigation-actions {
position: fixed;
justify-content: center;
visibility: hidden;
opacity: 0;
}
#gh-navigation .gh-navigation-menu {
transition: none;
transform: translateY(0);
}
#gh-navigation .nav {
gap: 20px;
align-items: center;
line-height: 1.4;
}
#gh-navigation .nav a {
font-size: 2.6rem;
font-weight: 600;
text-transform: none;
}
#gh-navigation .nav li {
opacity: 0;
transform: translateY(-4px);
}
#gh-navigation .gh-navigation-actions {
text-align: center;
}
#gh-navigation :is(.gh-button, a[data-portal="signin"]) {
opacity: 0;
transform: translateY(8px);
}
#gh-navigation .gh-button {
width: 100%;
font-size: 1.8rem;
text-transform: none;
}
#gh-navigation a[data-portal="signin"] {
font-size: 2rem;
}
#gh-main {
transition: opacity 0.4s;
}
.is-navigation-open#gh-navigation {
position: fixed;
inset: 0;
z-index: 3999999;
height: 100%;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
.is-navigation-open#gh-navigation .gh-navigation-menu,
.is-navigation-open#gh-navigation .gh-navigation-actions {
position: static;
visibility: visible;
opacity: 1;
}
.is-navigation-open#gh-navigation .nav {
display: flex;
flex-direction: column;
}
.is-navigation-open#gh-navigation .nav li {
opacity: 1;
transition: transform 0.2s, opacity 0.2s;
transform: translateY(0);
}
.is-navigation-open#gh-navigation .gh-navigation-actions {
position: sticky;
right: 0;
bottom: 0;
left: 0;
display: inline-flex;
flex-direction: column;
gap: 12px;
align-items: center;
2023-07-10 05:17:54 +01:00
padding: var(--container-gap) 0 calc(var(--container-gap) + 8px);
2023-07-05 13:43:09 +01:00
background-color: var(--color-white);
}
.is-navigation-open#gh-navigation :is(.gh-button, a[data-portal="signin"]) {
opacity: 1;
transition: transform 0.4s, opacity 0.4s;
transition-delay: 0.2s;
transform: translateY(0);
}
.is-navigation-open#gh-navigation a[data-portal="signin"] {
transition-delay: 0.4s;
}
.is-navigation-open#gh-main {
opacity: 0;
}
2023-07-10 04:14:43 +01:00
}
/* Card */
2023-07-10 04:58:34 +01:00
.gh-card-link:hover {
opacity: 1;
}
2023-07-10 04:14:43 +01:00
.gh-card-image {
position: relative;
2023-07-10 06:31:23 +01:00
flex-shrink: 0;
2023-07-10 04:14:43 +01:00
aspect-ratio: 16 / 9;
}
.gh-card-image img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
2023-07-10 06:31:23 +01:00
.gh-card-wrapper {
flex-grow: 1;
}
2023-07-10 07:03:07 +01:00
.gh-card-meta {
display: flex;
gap: 4px;
flex-wrap: wrap;
}
.gh-card-author + .gh-card-date::before {
content: "—";
margin-right: 4px;
}
2023-07-10 04:14:43 +01:00
/* 6. Header */
2023-07-10 08:09:26 +01:00
.gh-header {
position: relative;
}
.gh-header-image {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
.gh-header-inner {
position: relative;
}
2023-07-10 04:14:43 +01:00
/* 6.1. Magazine layout */
.gh-header.is-magazine .gh-header-inner {
display: grid;
2023-07-10 06:31:23 +01:00
grid-template-columns: repeat(16, 1fr);
2023-07-10 05:17:54 +01:00
gap: var(--grid-gap);
2023-07-10 04:14:43 +01:00
}
.gh-header.is-magazine .gh-header-inner > div {
display: flex;
flex-direction: column;
2023-07-10 05:17:54 +01:00
gap: var(--grid-gap);
2023-07-10 04:14:43 +01:00
grid-row: 1;
}
.gh-header.is-magazine .gh-header-left {
2023-07-10 06:31:23 +01:00
grid-column: 1 / span 4;
2023-07-10 04:14:43 +01:00
}
.gh-header.is-magazine .gh-header-inner > .gh-card {
2023-07-10 06:31:23 +01:00
grid-column: 5 / span 8;
2023-07-10 04:14:43 +01:00
}
.gh-header.is-magazine .gh-header-right {
2023-07-10 06:31:23 +01:00
grid-column: 13 / -1;
2023-07-10 04:14:43 +01:00
}
.gh-header.is-magazine .gh-header-inner > div .gh-card-excerpt {
display: none;
}
/* 6.2. Highlight layout */
.gh-header.is-highlight .gh-header-inner {
display: grid;
grid-template-columns: 3fr 1fr;
2023-07-10 05:17:54 +01:00
gap: var(--grid-gap);
2023-07-10 04:14:43 +01:00
}
.gh-header.is-highlight .gh-card:first-child {
grid-row: span 3;
}
.gh-header.is-highlight .gh-card:not(:first-child) .gh-card-excerpt {
display: none;
2023-07-10 04:58:34 +01:00
}
2023-07-10 08:09:26 +01:00
/* 6.3. Classic layout */
.gh-header.is-classic {
display: flex;
min-height: 480px;
}
.gh-header.is-classic .gh-header-inner {
display: flex;
flex-direction: column;
align-items: center;
gap: 32px;
margin: auto;
max-width: 720px;
}
.gh-header.is-classic.has-image .gh-header-inner {
color: #fff;
}
2023-07-10 06:31:23 +01:00
/* 7. Featured posts */
2023-07-10 08:09:26 +01:00
.gh-featured {
margin-top: 64px;
}
2023-07-10 06:31:23 +01:00
.gh-featured-feed {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: var(--grid-gap);
}
.gh-featured-feed .gh-card-link {
display: flex;
flex-direction: row-reverse;
2023-07-10 07:03:07 +01:00
align-items: flex-start;
2023-07-10 06:31:23 +01:00
}
.gh-featured-feed .gh-card-image {
width: 80px;
aspect-ratio: 1;
}
.gh-featured-feed .gh-card-excerpt {
display: none;
}
/* 8. Container */
2023-07-10 04:58:34 +01:00
2023-07-10 08:09:26 +01:00
.gh-container {
margin-top: 64px;
}
2023-07-10 05:17:54 +01:00
.gh-container-inner {
2023-07-10 04:58:34 +01:00
display: grid;
grid-template-columns: repeat(16, 1fr);
2023-07-10 05:17:54 +01:00
gap: var(--grid-gap);
}
2023-07-10 06:31:23 +01:00
/* 8.1. With sidebar */
2023-07-10 05:17:54 +01:00
.gh-container.has-sidebar .gh-main {
grid-column: 1 / span 12;
}
.gh-container.has-sidebar .gh-sidebar {
grid-column: 13 / -1;
2023-07-10 04:58:34 +01:00
}
2023-07-10 06:31:23 +01:00
/* 8.2. Without sidebar */
2023-07-10 05:17:54 +01:00
.gh-container:not(.has-sidebar) .gh-main {
2023-07-10 04:58:34 +01:00
grid-column: 3 / span 12;
}
2023-07-10 06:31:23 +01:00
/* 9. Post list */
2023-07-10 04:58:34 +01:00
2023-07-10 05:17:54 +01:00
.gh-container .gh-feed {
gap: var(--grid-gap);
}
2023-07-10 06:31:23 +01:00
/* 9.1. List style */
2023-07-10 04:58:34 +01:00
2023-07-10 05:17:54 +01:00
.gh-container.is-list .gh-feed {
display: flex;
flex-direction: column;
}
2023-07-10 04:58:34 +01:00
.gh-container.is-list .gh-card-link {
display: flex;
2023-07-10 08:09:26 +01:00
align-items: flex-start;
2023-07-10 07:03:07 +01:00
gap: 24px;
2023-07-10 04:58:34 +01:00
}
.gh-container.is-list .gh-card-image {
flex-shrink: 0;
width: 240px;
}
2023-07-10 06:31:23 +01:00
/* 9.2. Grid style */
2023-07-10 04:58:34 +01:00
.gh-container.is-grid .gh-feed {
display: grid;
grid-template-columns: repeat(3, 1fr);
2023-07-10 07:03:07 +01:00
}
/* 9.3. No image */
.gh-container.is-list.no-image .gh-card-image {
display: none;
2023-07-10 07:12:45 +01:00
}
2023-07-10 08:09:26 +01:00
/* 10. Sidebar */
.gh-about {
position: sticky;
top: 40px;
display: flex;
flex-direction: column;
align-items: center;
padding: 48px 24px;
background-color: var(--color-lighter-gray);
}
.gh-about-icon {
width: 80px;
height: 80px;
}
/* 11. Footer */
2023-07-10 07:12:45 +01:00
.gh-footer {
2023-07-10 07:27:31 +01:00
margin-top: 80px;
2023-07-10 07:12:45 +01:00
}
2023-07-10 08:09:26 +01:00
/* 11.1. Footer bar */
2023-07-10 07:27:31 +01:00
.gh-footer-bar {
2023-07-10 07:12:45 +01:00
display: grid;
grid-template-columns: 1fr auto 1fr;
2023-07-10 07:27:31 +01:00
padding-block: 40px;
border-block: 1px solid var(--color-border);
2023-07-10 07:12:45 +01:00
}
.gh-footer-menu .nav {
display: flex;
gap: 24px;
list-style-type: none;
}
.gh-footer-copyright {
text-align: right;
2023-07-10 07:27:31 +01:00
}
2023-07-10 08:09:26 +01:00
/* 11.2. Footer signup */
2023-07-10 07:27:31 +01:00
.gh-footer-signup {
display: flex;
flex-direction: column;
align-items: center;
padding-block: 100px;
2023-07-05 13:43:09 +01:00
}