Shortcodes: add home blocks and global custom CSS setting

This commit is contained in:
AudioCore Bot
2026-03-05 17:09:01 +00:00
parent 93e829bd19
commit af6bb638ac
7 changed files with 273 additions and 227 deletions

View File

@@ -13,6 +13,7 @@ $seoDefaultDescription = trim(Settings::get('seo_meta_description', ''));
$seoRobotsIndex = Settings::get('seo_robots_index', '1') === '1' ? 'index' : 'noindex';
$seoRobotsFollow = Settings::get('seo_robots_follow', '1') === '1' ? 'follow' : 'nofollow';
$seoOgImage = trim(Settings::get('seo_og_image', ''));
$siteCustomCss = (string)Settings::get('site_custom_css', '');
$pageTitleValue = trim((string)($pageTitle ?? $siteTitleSetting));
$metaTitle = $pageTitleValue;
if ($seoTitleSuffix !== '' && stripos($pageTitleValue, $seoTitleSuffix) === false) {
@@ -330,148 +331,134 @@ if (session_status() === PHP_SESSION_ACTIVE && isset($_SESSION['ac_site_notice']
color: var(--muted);
font-size: 12px;
}
.ac-shortcode-sale-chart {
.ac-shortcode-artists-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 12px;
}
.ac-shortcode-sale-head h3 {
margin: 0;
.ac-shortcode-artist-card {
text-decoration: none;
color: inherit;
border: 1px solid rgba(255,255,255,0.1);
background: rgba(15,18,24,0.6);
border-radius: 14px;
overflow: hidden;
display: grid;
min-height: 100%;
}
.ac-shortcode-artist-avatar {
aspect-ratio: 1 / 1;
background: rgba(255,255,255,0.03);
display: grid;
place-items: center;
overflow: hidden;
}
.ac-shortcode-artist-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.ac-shortcode-artist-meta {
padding: 10px;
display: grid;
gap: 4px;
}
.ac-shortcode-artist-name {
font-size: 18px;
line-height: 1.2;
font-weight: 600;
}
.ac-shortcode-artist-country {
color: var(--muted);
font-size: 12px;
letter-spacing: 0.2em;
}
.ac-shortcode-hero {
border: 1px solid rgba(255,255,255,0.14);
border-radius: 18px;
padding: 18px;
background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
display: grid;
gap: 10px;
}
.ac-shortcode-hero-eyebrow {
font-size: 10px;
letter-spacing: 0.24em;
text-transform: uppercase;
color: var(--muted);
font-family: 'IBM Plex Mono', monospace;
font-weight: 600;
}
.ac-shortcode-hero-title {
font-size: clamp(30px, 5vw, 54px);
line-height: 1.05;
font-weight: 700;
margin: 0;
}
.ac-shortcode-hero-subtitle {
font-size: 15px;
color: #d1d7e7;
max-width: 72ch;
margin: 0;
}
.ac-shortcode-hero-actions {
display: flex;
gap: 8px;
flex-wrap: wrap;
margin-top: 4px;
}
.ac-shortcode-hero-btn {
display: inline-flex;
align-items: center;
justify-content: center;
height: 38px;
padding: 0 14px;
border-radius: 999px;
border: 1px solid rgba(255,255,255,0.16);
background: rgba(255,255,255,0.05);
color: #f5f7ff;
text-decoration: none;
font-size: 11px;
letter-spacing: 0.16em;
text-transform: uppercase;
font-family: 'IBM Plex Mono', monospace;
}
.ac-shortcode-hero-btn.primary {
border-color: rgba(57,244,179,0.6);
background: rgba(57,244,179,0.16);
color: #9ff8d8;
}
.ac-shortcode-sale-list {
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: 10px;
gap: 8px;
}
.ac-shortcode-sale-item {
border: 1px solid rgba(255,255,255,0.1);
background: linear-gradient(180deg, rgba(15,18,24,0.78), rgba(12,14,20,0.72));
border-radius: 12px;
padding: 8px;
transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.ac-shortcode-sale-item:hover {
border-color: rgba(255,255,255,0.18);
box-shadow: 0 10px 24px rgba(0,0,0,0.24);
transform: translateY(-1px);
}
.ac-shortcode-sale-link {
display: grid;
grid-template-columns: auto 56px minmax(0, 1fr);
gap: 12px;
align-items: center;
color: inherit;
text-decoration: none;
}
.ac-shortcode-sale-link:hover .ac-shortcode-sale-title {
color: #ffffff;
}
.ac-shortcode-sale-link > .ac-shortcode-sale-rank {
order: 0;
justify-self: start;
min-width: 26px;
text-align: left;
margin-left: 2px;
position: relative;
padding-right: 18px;
margin-right: 6px;
}
.ac-shortcode-sale-link > .ac-shortcode-sale-rank::before {
content: '';
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
width: 1px;
height: 34px;
background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.45) 50%, rgba(255,255,255,0.18) 100%);
box-shadow: 0 0 12px rgba(255,255,255,0.08);
border-radius: 1px;
}
.ac-shortcode-sale-link > .ac-shortcode-sale-rank::after {
right: 10px;
}
.ac-shortcode-sale-link > .ac-shortcode-sale-thumb {
order: 1;
}
.ac-shortcode-sale-link > .ac-shortcode-sale-copy {
order: 2;
}
.ac-shortcode-sale-thumb {
width: 56px;
height: 56px;
background: rgba(15,18,24,0.6);
border-radius: 10px;
overflow: hidden;
background: rgba(255,255,255,0.04);
padding: 10px 12px;
display: grid;
place-items: center;
}
.ac-shortcode-sale-thumb img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.ac-shortcode-sale-copy {
display: grid;
gap: 2px;
min-width: 0;
grid-template-columns: auto 1fr auto;
gap: 10px;
align-items: center;
}
.ac-shortcode-sale-rank {
font-family: 'IBM Plex Mono', monospace;
font-size: 28px;
line-height: 1;
font-weight: 700;
letter-spacing: -0.02em;
min-width: 34px;
text-align: right;
position: relative;
display: inline-block;
background: linear-gradient(180deg, rgba(245,247,255,0.95) 0%, rgba(169,178,196,0.72) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 0 10px 22px rgba(0,0,0,0.40);
transition: transform .2s ease, filter .2s ease;
}
.ac-shortcode-sale-rank::after {
content: '.';
color: var(--accent);
position: absolute;
right: -7px;
bottom: -1px;
font-size: 16px;
font-weight: 700;
line-height: 1;
text-shadow: none;
-webkit-text-fill-color: initial;
background: none;
}
.ac-shortcode-sale-link:hover .ac-shortcode-sale-rank {
transform: translateY(-1px) scale(1.03);
filter: brightness(1.08);
font-size: 11px;
color: var(--muted);
letter-spacing: 0.15em;
}
.ac-shortcode-sale-title {
font-size: 16px;
line-height: 1.25;
font-weight: 700;
font-size: 14px;
line-height: 1.3;
}
.ac-shortcode-sale-artist {
.ac-shortcode-sale-meta {
font-size: 12px;
color: var(--muted);
line-height: 1.25;
letter-spacing: 0.02em;
white-space: nowrap;
}
@media (max-width: 900px) {
.shell {
padding: 12px 14px 18px;
@@ -540,6 +527,9 @@ if (session_status() === PHP_SESSION_ACTIVE && isset($_SESSION['ac_site_notice']
padding-top: 2px;
}
}
<?php if (trim($siteCustomCss) !== ''): ?>
<?= str_replace('</style', '</ style', $siteCustomCss) . "\n" ?>
<?php endif; ?>
</style>
</head>
<body>
@@ -558,20 +548,5 @@ if (session_status() === PHP_SESSION_ACTIVE && isset($_SESSION['ac_site_notice']
<?= $content ?? '' ?>
</main>
<?php require __DIR__ . '/../partials/footer.php'; ?>
<script data-ac-csrf>
(function() {
const token = '<?= htmlspecialchars(Core\Services\Csrf::token(), ENT_QUOTES, 'UTF-8') ?>';
document.querySelectorAll('form[method="post"], form[method="POST"]').forEach((form) => {
if (form.querySelector('input[name="csrf_token"]')) return;
const input = document.createElement('input');
input.type = 'hidden';
input.name = 'csrf_token';
input.value = token;
form.appendChild(input);
});
})();
</script>
</body>
</html>