751 lines
14 KiB
CSS
751 lines
14 KiB
CSS
/* 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;
|
|
--container-gap: clamp(24px, 1.7032rem + 1.9355vw, 48px);
|
|
--grid-gap: 40px;
|
|
}
|
|
|
|
/* 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;
|
|
}
|
|
|
|
a:hover {
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.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;
|
|
}
|
|
|
|
.gh-icon-button:hover svg {
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.gh-icon-button svg {
|
|
width: 20px;
|
|
height: 20px;
|
|
}
|
|
|
|
/* 4. Layout */
|
|
|
|
.gh-viewport {
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.gh-content {
|
|
flex-grow: 1;
|
|
}
|
|
|
|
.gh-outer {
|
|
position: relative;
|
|
padding: 0 max(4vmin, 20px);
|
|
}
|
|
|
|
.gh-inner {
|
|
margin: 0 auto;
|
|
max-width: 1280px;
|
|
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 {
|
|
margin-right: 2px;
|
|
}
|
|
|
|
@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 {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
position: relative;
|
|
display: none;
|
|
margin-right: -7px;
|
|
}
|
|
|
|
.gh-burger svg {
|
|
width: 24px;
|
|
height: 24px;
|
|
}
|
|
|
|
.gh-burger svg:last-child {
|
|
display: none;
|
|
}
|
|
|
|
.is-navigation-open .gh-burger svg:first-child {
|
|
display: none;
|
|
}
|
|
|
|
.is-navigation-open .gh-burger svg:last-child {
|
|
display: block;
|
|
}
|
|
|
|
@media (max-width: 767px) {
|
|
.gh-burger {
|
|
display: flex;
|
|
}
|
|
}
|
|
|
|
/* 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;
|
|
padding: var(--container-gap) 0 calc(var(--container-gap) + 8px);
|
|
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;
|
|
}
|
|
}
|
|
|
|
/* Card */
|
|
|
|
.gh-card-link:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
.gh-card-image {
|
|
position: relative;
|
|
flex-shrink: 0;
|
|
aspect-ratio: 16 / 9;
|
|
}
|
|
|
|
.gh-card-image img {
|
|
position: absolute;
|
|
inset: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.gh-card-wrapper {
|
|
flex-grow: 1;
|
|
}
|
|
|
|
.gh-card-meta {
|
|
display: flex;
|
|
gap: 4px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.gh-card-author + .gh-card-date::before {
|
|
content: "—";
|
|
margin-right: 4px;
|
|
}
|
|
|
|
/* 6. Header */
|
|
|
|
/* 6.1. Magazine layout */
|
|
|
|
.gh-header.is-magazine .gh-header-inner {
|
|
display: grid;
|
|
grid-template-columns: repeat(16, 1fr);
|
|
gap: var(--grid-gap);
|
|
}
|
|
|
|
.gh-header.is-magazine .gh-header-inner > div {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--grid-gap);
|
|
grid-row: 1;
|
|
}
|
|
|
|
.gh-header.is-magazine .gh-header-left {
|
|
grid-column: 1 / span 4;
|
|
}
|
|
|
|
.gh-header.is-magazine .gh-header-inner > .gh-card {
|
|
grid-column: 5 / span 8;
|
|
}
|
|
|
|
.gh-header.is-magazine .gh-header-right {
|
|
grid-column: 13 / -1;
|
|
}
|
|
|
|
.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;
|
|
gap: var(--grid-gap);
|
|
}
|
|
|
|
.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;
|
|
}
|
|
|
|
/* 7. Featured posts */
|
|
|
|
.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;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.gh-featured-feed .gh-card-image {
|
|
width: 80px;
|
|
aspect-ratio: 1;
|
|
}
|
|
|
|
.gh-featured-feed .gh-card-excerpt {
|
|
display: none;
|
|
}
|
|
|
|
/* 8. Container */
|
|
|
|
.gh-container-inner {
|
|
display: grid;
|
|
grid-template-columns: repeat(16, 1fr);
|
|
gap: var(--grid-gap);
|
|
}
|
|
|
|
/* 8.1. With sidebar */
|
|
|
|
.gh-container.has-sidebar .gh-main {
|
|
grid-column: 1 / span 12;
|
|
}
|
|
|
|
.gh-container.has-sidebar .gh-sidebar {
|
|
grid-column: 13 / -1;
|
|
}
|
|
|
|
/* 8.2. Without sidebar */
|
|
|
|
.gh-container:not(.has-sidebar) .gh-main {
|
|
grid-column: 3 / span 12;
|
|
}
|
|
|
|
/* 9. Post list */
|
|
|
|
.gh-container .gh-feed {
|
|
gap: var(--grid-gap);
|
|
}
|
|
|
|
/* 9.1. List style */
|
|
|
|
.gh-container.is-list .gh-feed {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.gh-container.is-list .gh-card-link {
|
|
display: flex;
|
|
gap: 24px;
|
|
}
|
|
|
|
.gh-container.is-list .gh-card-image {
|
|
flex-shrink: 0;
|
|
width: 240px;
|
|
}
|
|
|
|
/* 9.2. Grid style */
|
|
|
|
.gh-container.is-grid .gh-feed {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
}
|
|
|
|
/* 9.3. No image */
|
|
|
|
.gh-container.is-list.no-image .gh-card-image {
|
|
display: none;
|
|
} |