Restyle WordPress themes for editorial YouTube ops look
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -65,20 +65,30 @@ add_action('init', static function (): void {
|
||||
});
|
||||
|
||||
add_action('wp_enqueue_scripts', static function (): void {
|
||||
$css = <<<'CSS'
|
||||
:root { --nomadro-accent:#7c3aed; }
|
||||
body { -webkit-font-smoothing: antialiased; }
|
||||
.entry-content, .wp-block-post-content { font-size: 1.0625rem; line-height: 1.75; }
|
||||
.entry-content h2, .wp-block-post-content h2 { margin-top: 2rem; line-height: 1.3; }
|
||||
.nomadro-trust-footer {
|
||||
display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem;
|
||||
justify-content: center; padding: 1.5rem 1rem 2rem; font-size: 0.95rem;
|
||||
}
|
||||
.nomadro-trust-footer a { color: #344054; text-decoration: underline; }
|
||||
CSS;
|
||||
wp_register_style('nomadro-live-adsense-opt', false, [], '1.0.0');
|
||||
wp_enqueue_style('nomadro-live-adsense-opt');
|
||||
wp_add_inline_style('nomadro-live-adsense-opt', $css);
|
||||
wp_enqueue_style(
|
||||
'nomadro-live-theme',
|
||||
content_url('mu-plugins/nomadro-live-theme.css'),
|
||||
[],
|
||||
'2.1.0'
|
||||
);
|
||||
}, 30);
|
||||
|
||||
add_action('wp_body_open', static function (): void {
|
||||
if (!is_front_page() && !is_home()) {
|
||||
return;
|
||||
}
|
||||
echo '<section class="nomadro-hero" id="nomadro-hero"><div class="nomadro-hero-inner">';
|
||||
echo '<div class="nomadro-kicker">YouTube ops desk</div>';
|
||||
echo '<h1>Analytics, live workflows, and creator runbooks.</h1>';
|
||||
echo '<p>English operating guides for YouTube teams: dashboards, comments, live checklists, and production reliability.</p>';
|
||||
echo '</div></section>';
|
||||
});
|
||||
|
||||
add_action('wp_footer', static function (): void {
|
||||
if (!is_front_page() && !is_home()) {
|
||||
return;
|
||||
}
|
||||
echo '<script>document.addEventListener("DOMContentLoaded",function(){var h=document.getElementById("nomadro-hero");var b=document.querySelector(".wp-site-blocks");if(h&&b&&b.firstElementChild){b.insertBefore(h,b.firstElementChild.nextSibling);}});</script>';
|
||||
}, 20);
|
||||
|
||||
add_action('wp_footer', static function (): void {
|
||||
|
||||
149
deploy/nomadro-live/wordpress/mu-plugins/nomadro-live-theme.css
Normal file
149
deploy/nomadro-live/wordpress/mu-plugins/nomadro-live-theme.css
Normal file
@@ -0,0 +1,149 @@
|
||||
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,650;9..144,700&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap");
|
||||
|
||||
:root {
|
||||
--nm-bg: #10141c;
|
||||
--nm-paper: #171d28;
|
||||
--nm-ink: #eef2f8;
|
||||
--nm-muted: #9aa6b8;
|
||||
--nm-line: #2a3344;
|
||||
--nm-accent: #ff4d4d;
|
||||
--nm-accent-2: #7dd3fc;
|
||||
--nm-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
|
||||
--nm-serif: "Fraunces", Georgia, serif;
|
||||
--nm-sans: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
|
||||
}
|
||||
|
||||
html { scroll-behavior: smooth; }
|
||||
|
||||
body.wp-theme-twentytwentyfive,
|
||||
body {
|
||||
background: var(--nm-bg) !important;
|
||||
color: var(--nm-ink) !important;
|
||||
font-family: var(--nm-sans) !important;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
a { color: var(--nm-accent-2); }
|
||||
a:hover { color: var(--nm-accent); }
|
||||
|
||||
.wp-block-template-part:first-of-type,
|
||||
header.wp-block-template-part,
|
||||
.wp-site-blocks > header,
|
||||
.wp-site-blocks > .wp-block-template-part:first-child {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 40;
|
||||
background: rgba(16, 20, 28, 0.9) !important;
|
||||
backdrop-filter: blur(16px);
|
||||
border-bottom: 1px solid var(--nm-line);
|
||||
}
|
||||
|
||||
.wp-block-site-title {
|
||||
font-family: var(--nm-serif) !important;
|
||||
font-weight: 650 !important;
|
||||
letter-spacing: -0.03em;
|
||||
font-size: clamp(1.3rem, 2.2vw, 1.65rem) !important;
|
||||
}
|
||||
.wp-block-site-title a {
|
||||
color: #fff !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.wp-block-site-tagline { color: var(--nm-muted) !important; font-size: 0.88rem !important; }
|
||||
.wp-block-navigation a,
|
||||
.wp-block-navigation-item__content {
|
||||
color: var(--nm-ink) !important;
|
||||
text-decoration: none !important;
|
||||
font-weight: 550 !important;
|
||||
}
|
||||
|
||||
.nomadro-hero { margin: 0 auto 2.5rem; max-width: 1120px; padding: 0 1.25rem; }
|
||||
.nomadro-hero-inner {
|
||||
background:
|
||||
radial-gradient(900px 380px at 90% 0%, rgba(255, 77, 77, 0.22), transparent 50%),
|
||||
linear-gradient(160deg, #0b0f19 0%, #151b28 60%, #1c1420 100%);
|
||||
color: #f4f7fb;
|
||||
border-radius: 28px;
|
||||
padding: clamp(2rem, 5vw, 4.2rem);
|
||||
border: 1px solid #2c3548;
|
||||
box-shadow: var(--nm-shadow);
|
||||
}
|
||||
.nomadro-kicker {
|
||||
display: inline-block;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.14em;
|
||||
text-transform: uppercase;
|
||||
color: #ff8a8a;
|
||||
margin-bottom: 0.85rem;
|
||||
}
|
||||
.nomadro-hero h1 {
|
||||
font-family: var(--nm-serif);
|
||||
font-size: clamp(2.1rem, 5vw, 3.4rem);
|
||||
line-height: 1.12;
|
||||
letter-spacing: -0.035em;
|
||||
margin: 0 0 0.85rem;
|
||||
max-width: 16ch;
|
||||
}
|
||||
.nomadro-hero p { margin: 0; max-width: 38rem; color: #c5d0e0; font-size: 1.08rem; line-height: 1.65; }
|
||||
|
||||
.wp-block-query .wp-block-post-template {
|
||||
display: grid !important;
|
||||
grid-template-columns: 1fr;
|
||||
gap: 1.1rem !important;
|
||||
}
|
||||
@media (min-width: 800px) {
|
||||
.home .wp-block-query .wp-block-post-template,
|
||||
.blog .wp-block-query .wp-block-post-template,
|
||||
.archive .wp-block-query .wp-block-post-template {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
}
|
||||
.wp-block-query .wp-block-post {
|
||||
background: var(--nm-paper);
|
||||
border: 1px solid var(--nm-line);
|
||||
border-radius: 18px;
|
||||
padding: 1.25rem 1.35rem !important;
|
||||
}
|
||||
.wp-block-query .wp-block-post:hover { border-color: #3d4b66; }
|
||||
.wp-block-query .wp-block-post-title { font-family: var(--nm-serif) !important; letter-spacing: -0.03em; }
|
||||
.wp-block-query .wp-block-post-title a { color: var(--nm-ink) !important; text-decoration: none !important; }
|
||||
.wp-block-query .wp-block-post-title a:hover { color: var(--nm-accent) !important; }
|
||||
.wp-block-post-date { color: var(--nm-muted) !important; }
|
||||
|
||||
.wp-block-post-title { font-family: var(--nm-serif) !important; letter-spacing: -0.035em; }
|
||||
.single .wp-block-post-title { font-size: clamp(2rem, 4.5vw, 3.15rem) !important; max-width: 18ch; }
|
||||
.entry-content, .wp-block-post-content {
|
||||
font-size: 1.125rem !important;
|
||||
line-height: 1.8 !important;
|
||||
color: #dbe3ef !important;
|
||||
}
|
||||
.entry-content h2, .wp-block-post-content h2 {
|
||||
font-family: var(--nm-serif) !important;
|
||||
font-size: 1.55rem !important;
|
||||
margin-top: 2.4rem !important;
|
||||
border-top: 1px solid var(--nm-line);
|
||||
padding-top: 0.4rem;
|
||||
}
|
||||
|
||||
footer.wp-block-template-part,
|
||||
.wp-block-template-part:last-of-type {
|
||||
border-top: 1px solid var(--nm-line);
|
||||
background: #0c1018 !important;
|
||||
margin-top: 3rem;
|
||||
}
|
||||
.nomadro-trust-footer {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.75rem 1.4rem;
|
||||
justify-content: center;
|
||||
padding: 1.75rem 1rem 2.4rem;
|
||||
font-size: 0.92rem;
|
||||
background: #0c1018;
|
||||
}
|
||||
.nomadro-trust-footer a { color: #d5deea; text-decoration: none; font-weight: 550; }
|
||||
.nomadro-trust-footer a:hover { color: var(--nm-accent); }
|
||||
.wp-block-comments, .comment-respond { display: none !important; }
|
||||
.has-base-background-color,
|
||||
.has-base-2-background-color {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
Reference in New Issue
Block a user