Initial commit: simpleblog
This commit is contained in:
@@ -0,0 +1,877 @@
|
||||
/* ==========================================================================
|
||||
Simple Blog — GeneratePress-inspired styling (shared / front-end)
|
||||
Clean, minimal, card-based layout with a sidebar.
|
||||
========================================================================== */
|
||||
|
||||
:root {
|
||||
--border-radius: 6px;
|
||||
--color-text: #1e1e1e;
|
||||
--color-muted: #666;
|
||||
--color-border: #e5e5e5;
|
||||
--color-bg: #ffffff;
|
||||
--color-link: #00a0d1;
|
||||
--color-link-hover: #007a99;
|
||||
--color-sidebar-bg: #f7f7f7;
|
||||
--color-accent: #00a0d1;
|
||||
--font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
|
||||
Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
|
||||
--max-width: 1140px;
|
||||
--gutter: 16px;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
-webkit-text-size-adjust: 100%;
|
||||
text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: var(--font-stack);
|
||||
color: var(--color-text);
|
||||
background-color: var(--color-bg);
|
||||
line-height: 1.7;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--color-link);
|
||||
text-decoration: none;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--color-link-hover);
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
Header
|
||||
------------------------------------------------------------------------- */
|
||||
.site-header {
|
||||
border-bottom: 3px solid var(--color-accent);
|
||||
background-color: var(--color-bg);
|
||||
}
|
||||
|
||||
.header-inner {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: 18px var(--gutter);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.site-logo a {
|
||||
color: var(--color-text);
|
||||
font-weight: 700;
|
||||
font-size: 1.35rem;
|
||||
letter-spacing: -0.02em;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.site-logo img {
|
||||
max-height: 44px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
Hero header (shown only when an uploaded banner image is present)
|
||||
The banner spans the whole header width, sitting behind the logo + nav.
|
||||
------------------------------------------------------------------------- */
|
||||
.header-inner.has-banner {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
min-height: 260px;
|
||||
}
|
||||
|
||||
.header-inner.has-banner .site-banner-img {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
border-radius: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.header-inner.has-banner .site-logo {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-left: 26px;
|
||||
color: #fff;
|
||||
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.header-inner.has-banner .hero-tagline {
|
||||
display: block;
|
||||
font-size: 1rem;
|
||||
font-style: italic;
|
||||
opacity: 0.92;
|
||||
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.header-inner.has-banner .site-logo a {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.header-inner.has-banner .main-nav {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.header-inner.has-banner .main-nav button {
|
||||
color: #fff;
|
||||
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.header-inner.has-banner .nav-menu {
|
||||
background: rgba(0, 0, 0, 0.35);
|
||||
border-color: rgba(255, 255, 255, 0.35);
|
||||
}
|
||||
|
||||
@media (max-width: 620px) {
|
||||
/* The nav is pinned to the bottom of the banner, so the banner must stay tall
|
||||
enough for the logo (title + tagline) and the nav to coexist without the nav
|
||||
sliding up over the title/tagline. */
|
||||
.header-inner.has-banner { min-height: 260px; }
|
||||
.header-inner.has-banner .site-logo { margin-left: 16px; }
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
Top navigation (inline links — the old dropdown menu has been removed)
|
||||
------------------------------------------------------------------------- */
|
||||
.main-nav {
|
||||
/* Width is set by the parent flex container (space-between) on non-banner
|
||||
pages; overridden to absolute-center at the bottom only when a banner is shown. */
|
||||
}
|
||||
|
||||
.nav-links {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
gap: 6px 20px;
|
||||
}
|
||||
|
||||
.nav-item a {
|
||||
color: var(--color-text);
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
font-size: 0.98rem;
|
||||
padding: 6px 4px;
|
||||
border-radius: 4px;
|
||||
transition: color 0.15s ease, background-color 0.15s ease;
|
||||
}
|
||||
|
||||
.nav-item a:hover {
|
||||
color: var(--color-link);
|
||||
background-color: var(--color-sidebar-bg);
|
||||
}
|
||||
|
||||
/* With a hero banner the nav sits centered at the bottom of the banner. */
|
||||
.header-inner.has-banner .main-nav {
|
||||
/* On mobile the logo (title + tagline) and the nav are both flex children of
|
||||
.header-inner, which wraps. Together they exceed the screen width, so the nav
|
||||
wraps onto a second line that slides up over the title/tagline. Pull the nav
|
||||
out of the flex row and pin it to the bottom of the banner instead — the
|
||||
banner is tall enough (260px) for both to coexist without overlap.
|
||||
NOTE: transform must be reset — an older rule for this selector still set
|
||||
translateX(-50%) and, at equal specificity, would otherwise persist. */
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 2;
|
||||
transform: none;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 14px 16px 18px; /* gap above the links so they never touch the tagline */
|
||||
}
|
||||
|
||||
.header-inner.has-banner .nav-links {
|
||||
width: min(92%, 260px);
|
||||
}
|
||||
|
||||
/* Keep the links in a single centered row on banner pages. The mobile rule below
|
||||
turns nav links into stacked blocks; here we restore them to inline-block so the
|
||||
menu reads as one horizontal row instead of a vertical list. */
|
||||
.header-inner.has-banner .nav-item a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.header-inner.has-banner .nav-item a {
|
||||
color: #fff;
|
||||
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
|
||||
.header-inner.has-banner .nav-item a:hover {
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
@media (max-width: 620px) {
|
||||
.nav-links {
|
||||
gap: 0;
|
||||
}
|
||||
.nav-item a {
|
||||
display: block;
|
||||
padding: 10px 14px;
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
Layout
|
||||
------------------------------------------------------------------------- */
|
||||
.site-main {
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: 34px var(--gutter) 50px;
|
||||
}
|
||||
|
||||
.content-area {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
gap: 38px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
@media (max-width: 860px) {
|
||||
.content-area {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
Page heading
|
||||
------------------------------------------------------------------------- */
|
||||
.page-heading {
|
||||
font-size: 1.9rem;
|
||||
font-weight: 700;
|
||||
margin: 0 0 26px;
|
||||
line-height: 1.3;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
.page-heading a {
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
Post grid
|
||||
------------------------------------------------------------------------- */
|
||||
.posts-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 26px;
|
||||
}
|
||||
|
||||
@media (max-width: 620px) {
|
||||
.posts-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.post-card {
|
||||
background: var(--color-card-bg);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--border-radius);
|
||||
padding: 30px 28px 26px;
|
||||
transition: box-shadow 0.2s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
.post-card:hover {
|
||||
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.post-card h2,
|
||||
.post-card h3 {
|
||||
margin: 0 0 6px;
|
||||
font-size: 1.6rem;
|
||||
line-height: 1.25;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
.post-card h2 a,
|
||||
.post-card h3 a {
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.post-card h2 a:hover,
|
||||
.post-card h3 a:hover {
|
||||
color: var(--color-link);
|
||||
}
|
||||
|
||||
.post-meta {
|
||||
font-size: 0.85rem;
|
||||
color: var(--color-muted);
|
||||
margin-bottom: 14px;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
.post-meta strong {
|
||||
font-weight: 600;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.post-excerpt {
|
||||
margin: 0 0 16px;
|
||||
font-size: 0.98rem;
|
||||
line-height: 1.6;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.post-excerpt p {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
|
||||
.post-excerpt p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.post-tags {
|
||||
font-size: 0.82rem;
|
||||
color: var(--color-muted);
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.post-tags .tag-icon {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.post-tags .tag {
|
||||
color: var(--color-link);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.post-tags .tag:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.post-footer {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.read-more {
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
color: var(--color-link);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.read-more:hover {
|
||||
color: var(--color-link-hover);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.comment-link {
|
||||
font-size: 0.9rem;
|
||||
color: var(--color-muted);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.comment-link:hover {
|
||||
color: var(--color-link);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
Sidebar / widgets
|
||||
------------------------------------------------------------------------- */
|
||||
.sidebar .widget {
|
||||
background: var(--color-sidebar-bg);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 6px;
|
||||
padding: 20px 22px;
|
||||
margin-bottom: 26px;
|
||||
}
|
||||
|
||||
.widget-title {
|
||||
font-size: 1.05rem;
|
||||
font-weight: 700;
|
||||
margin: 0 0 14px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 2px solid var(--color-accent);
|
||||
}
|
||||
|
||||
.search-form input[type="search"] {
|
||||
width: 100%;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 4px;
|
||||
font-family: var(--font-stack);
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.search-form input[type="search"]:focus {
|
||||
outline: none;
|
||||
border-color: var(--color-accent);
|
||||
}
|
||||
|
||||
.search-form button {
|
||||
margin-top: 8px;
|
||||
width: 100%;
|
||||
background-color: var(--color-accent);
|
||||
color: #fff;
|
||||
border: 0;
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.search-form button:hover {
|
||||
background-color: var(--color-link-hover);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.widget ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.widget li {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.widget li a,
|
||||
.widget li span {
|
||||
color: var(--color-text);
|
||||
font-size: 0.92rem;
|
||||
}
|
||||
|
||||
.widget li a:hover {
|
||||
color: var(--color-link);
|
||||
}
|
||||
|
||||
.widget ul.submenu li {
|
||||
padding-left: 14px;
|
||||
border-left: 2px solid var(--color-border);
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
Breadcrumb
|
||||
------------------------------------------------------------------------- */
|
||||
.breadcrumb {
|
||||
font-size: 0.85rem;
|
||||
color: var(--color-muted);
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.breadcrumb a {
|
||||
color: var(--color-link);
|
||||
}
|
||||
|
||||
.breadcrumb span {
|
||||
margin: 0 8px;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
Single post
|
||||
------------------------------------------------------------------------- */
|
||||
.single-post {
|
||||
background: var(--color-bg);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 6px;
|
||||
padding: 34px 32px;
|
||||
}
|
||||
|
||||
.single-post .post-title {
|
||||
font-size: 2.1rem;
|
||||
font-weight: 700;
|
||||
line-height: 1.25;
|
||||
margin: 0 0 20px;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
.single-post .entry-content {
|
||||
font-size: 1.02rem;
|
||||
}
|
||||
|
||||
.single-post .entry-content h1,
|
||||
.single-post .entry-content h2,
|
||||
.single-post .entry-content h3 {
|
||||
margin-top: 1.4em;
|
||||
margin-bottom: 0.6em;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.single-post .entry-content pre {
|
||||
background: #1e1e1e;
|
||||
color: #e0e0e0;
|
||||
padding: 16px;
|
||||
border-radius: 6px;
|
||||
overflow-x: auto;
|
||||
font-size: 0.88rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.single-post .entry-content pre code {
|
||||
background: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.single-post .entry-content code {
|
||||
background: var(--color-sidebar-bg);
|
||||
padding: 2px 6px;
|
||||
border-radius: 3px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.single-post .entry-content blockquote {
|
||||
border-left: 4px solid var(--color-accent);
|
||||
margin: 1.2em 0;
|
||||
padding: 8px 20px;
|
||||
font-style: italic;
|
||||
color: #444;
|
||||
background: var(--color-sidebar-bg);
|
||||
border-radius: 0 6px 6px 0;
|
||||
}
|
||||
|
||||
.single-post .entry-content img {
|
||||
border-radius: 6px;
|
||||
margin: 1.2em 0;
|
||||
}
|
||||
|
||||
.single-post .entry-content table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin: 1.2em 0;
|
||||
}
|
||||
|
||||
.single-post .entry-content th,
|
||||
.single-post .entry-content td {
|
||||
border: 1px solid var(--color-border);
|
||||
padding: 8px 12px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.single-post .entry-content th {
|
||||
background: var(--color-sidebar-bg);
|
||||
}
|
||||
|
||||
.post-share {
|
||||
margin-top: 34px;
|
||||
padding-top: 24px;
|
||||
border-top: 1px solid var(--color-border);
|
||||
font-size: 0.9rem;
|
||||
color: var(--color-muted);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
Comments
|
||||
------------------------------------------------------------------------- */
|
||||
.comments-section {
|
||||
margin-top: 40px;
|
||||
border-top: 1px solid var(--color-border);
|
||||
padding-top: 30px;
|
||||
}
|
||||
|
||||
.comment-list { margin-bottom: 28px; }
|
||||
.field-hint { display:block; margin: 6px 0 16px; font-size: 0.85rem; color: var(--color-muted); }
|
||||
.empty-state { text-align:center; color: var(--color-muted); padding: 30px 20px; }
|
||||
|
||||
.comment-block {
|
||||
background: var(--color-sidebar-bg);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 6px;
|
||||
padding: 18px 20px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.comment-block .comment-meta {
|
||||
font-size: 0.85rem;
|
||||
color: var(--color-muted);
|
||||
margin-bottom: 8px;
|
||||
display:flex;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.comment-block .comment-author { color: var(--color-text); font-weight: 600; }
|
||||
.comment-block .comment-email { opacity: 0.75; }
|
||||
.comment-block .comment-body { font-size: 0.98rem; line-height: 1.6; }
|
||||
.comment-block .comment-actions { margin-top: 12px; }
|
||||
.comment-pending { border-left: 4px solid var(--color-accent); }
|
||||
|
||||
/* Buttons used by the public comment form / moderation actions. Defined here so
|
||||
they style on public pages (which load only style.css, not admin.css). */
|
||||
.btn {
|
||||
display:inline-block; padding: 8px 16px; border-radius: 5px; font-weight: 600;
|
||||
font-size: 0.9rem; cursor:pointer; border: 1px solid var(--color-border);
|
||||
background: var(--color-bg); color: var(--color-text); text-decoration:none;
|
||||
}
|
||||
.btn:hover { border-color: var(--color-accent); color: var(--color-link); }
|
||||
.btn-primary {
|
||||
background: var(--color-accent); border-color: var(--color-accent); color: #fff;
|
||||
}
|
||||
.btn-primary:hover { background: var(--color-link-hover); border-color: var(--color-link-hover); color: #fff; }
|
||||
.btn-danger { color: #b71c1c; border-color: #f5c6cb; background: #fdecea; }
|
||||
.btn-danger:hover { background: #b71c1c; border-color: #b71c1c; color: #fff; }
|
||||
.btn-sm { padding: 5px 12px; font-size: 0.82rem; line-height: 1; }
|
||||
|
||||
.comment-form {
|
||||
border-top: 1px solid var(--color-border); padding-top: 24px;
|
||||
}
|
||||
.comment-form .form-row { grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 16px; }
|
||||
.comment-form label { display:block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
|
||||
.comment-form input, .comment-form textarea {
|
||||
width: 100%; padding: 11px 12px; border: 1px solid var(--color-border);
|
||||
border-radius: 5px; font-family: var(--font-stack); font-size: 0.98rem; background: #fff;
|
||||
}
|
||||
.comment-form input:focus, .comment-form textarea:focus {
|
||||
outline: none; border-color: var(--color-accent);
|
||||
}
|
||||
.comment-form textarea { min-height: 90px; resize: vertical; }
|
||||
.comment-form .btn-primary { padding: 11px 22px; }
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
Notices
|
||||
------------------------------------------------------------------------- */
|
||||
.notice {
|
||||
padding: 10px 14px;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 16px;
|
||||
font-size: 0.92rem;
|
||||
}
|
||||
|
||||
.notice-error {
|
||||
background: #fdecea;
|
||||
color: #b71c1c;
|
||||
border: 1px solid #f5c6cb;
|
||||
}
|
||||
|
||||
.notice-success {
|
||||
background: #e7f7ee;
|
||||
color: #1b5e20;
|
||||
border: 1px solid #c3e6cb;
|
||||
}
|
||||
|
||||
.notice-info {
|
||||
background: #e7f2fd;
|
||||
color: #0c5468;
|
||||
border: 1px solid #bee5eb;
|
||||
}
|
||||
|
||||
/* ------------------------------- Lightbox ------------------------------- */
|
||||
/* Full-page image viewer opened by clicking any <img> on rendered pages. */
|
||||
.lightbox {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 9000;
|
||||
display: none;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
.lightbox.is-open {
|
||||
display: flex;
|
||||
}
|
||||
.lightbox-backdrop {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.85);
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
transition: opacity 0.25s ease;
|
||||
}
|
||||
.lightbox.is-open .lightbox-backdrop {
|
||||
opacity: 1;
|
||||
}
|
||||
.lightbox-wrapper {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
max-width: 94vw;
|
||||
max-height: 90vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 24px;
|
||||
}
|
||||
.lightbox-img {
|
||||
max-width: 94vw;
|
||||
max-height: 90vh;
|
||||
width: auto;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
.lightbox-img[aria-hidden="true"] {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/* ------------------------------- Gallery hero ------------------------------- */
|
||||
.gallery-hero {
|
||||
margin: 24px 0 8px;
|
||||
text-align: center;
|
||||
}
|
||||
.gallery-hero-img {
|
||||
max-width: 100%;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
|
||||
cursor: pointer;
|
||||
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
||||
}
|
||||
.gallery-hero-img:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
|
||||
}
|
||||
.hero-caption {
|
||||
margin-top: 8px;
|
||||
font-weight: 600;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
/* ------------------------------- Gallery lightbox -------------------------- */
|
||||
.gallery-lightbox {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 9500;
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
.gallery-lightbox.is-open {
|
||||
display: flex;
|
||||
}
|
||||
.gallery-lightbox-backdrop {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.85);
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
transition: opacity 0.25s ease;
|
||||
}
|
||||
.gallery-lightbox.is-open .gallery-lightbox-backdrop {
|
||||
opacity: 1;
|
||||
}
|
||||
.gallery-lightbox-header {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
color: #fff;
|
||||
font-size: 1.4rem;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
padding: 18px 12px 4px;
|
||||
text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.gallery-lightbox-body {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
max-width: 94vw;
|
||||
width: auto;
|
||||
padding: 8px 20px;
|
||||
}
|
||||
.lightbox-prev,
|
||||
.lightbox-next {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
z-index: 3;
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
color: #fff;
|
||||
font-size: 1.6rem;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s ease;
|
||||
}
|
||||
.lightbox-prev { left: 16px; }
|
||||
.lightbox-next { right: 16px; }
|
||||
.lightbox-prev:hover,
|
||||
.lightbox-next:hover { background: rgba(255, 255, 255, 0.3); }
|
||||
.lightbox-img-main {
|
||||
max-width: 90vw;
|
||||
max-height: 78vh;
|
||||
width: auto;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.lightbox-close {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
right: 18px;
|
||||
z-index: 4;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
color: #fff;
|
||||
font-size: 1.6rem;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s ease;
|
||||
}
|
||||
.lightbox-close:hover { background: rgba(255, 255, 255, 0.3); }
|
||||
|
||||
/* ------------------------------- Album card thumb -------------------------- */
|
||||
.album-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
text-align: left;
|
||||
}
|
||||
.album-thumb {
|
||||
width: 100%;
|
||||
max-height: 200px;
|
||||
object-fit: cover;
|
||||
border-radius: 6px;
|
||||
margin-bottom: 10px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* --- Tag browsing, pagination, draft previews ------------------------------ */
|
||||
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
|
||||
.tag-cloud-page { margin: 24px 0; }
|
||||
.tag-cloud .term { display: inline-flex; gap: 6px; align-items: baseline; }
|
||||
.tag-cloud .term small { opacity: .65; font-size: .8em; }
|
||||
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 28px 0 8px; }
|
||||
.pagination-info { opacity: .7; font-size: .9em; }
|
||||
.preview-banner { border-left: 4px solid #d97706; background: #fff7ed; color: #7c2d12; padding: 12px 16px; border-radius: 6px; margin: 16px 0; }
|
||||
.preview-banner a { font-weight: 600; }
|
||||
|
||||
/* Related posts under an article */
|
||||
.related-posts { margin: 36px 0 12px; }
|
||||
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
|
||||
.related-card { border: 1px solid rgba(0, 0, 0, .12); border-radius: 6px; padding: 14px 16px; }
|
||||
.related-card h3 { margin: 0 0 6px; font-size: 1rem; line-height: 1.3; }
|
||||
.related-card .post-meta { display: flex; gap: 10px; font-size: .85em; opacity: .75; }
|
||||
Reference in New Issue
Block a user