Initial baseline: LaraBlog core with plugin commerce surface.
Captures the current working tree after theme slots, ArticleAccess, and the payment / paid-content plugins so subsequent work has a reviewable git history.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="960" height="600" viewBox="0 0 960 600" role="img" aria-label="default theme preview">
|
||||
<defs>
|
||||
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0%" stop-color="#eef7f5"/>
|
||||
<stop offset="55%" stop-color="#f3f7f9"/>
|
||||
<stop offset="100%" stop-color="#e7eef2"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect width="960" height="600" fill="url(#bg)"/>
|
||||
<rect x="48" y="40" width="864" height="520" rx="28" fill="#ffffff" fill-opacity="0.78" stroke="#0e1a241f"/>
|
||||
<text x="80" y="110" font-family="Georgia, serif" font-size="48" font-weight="700" fill="#0e1a24">Lara<tspan fill="#0f8a7a">Blog</tspan></text>
|
||||
<text x="80" y="148" font-family="Helvetica, Arial, sans-serif" font-size="18" fill="#5a6b78">R���� � ؤ;���</text>
|
||||
<rect x="80" y="176" width="560" height="2" fill="#0e1a241f"/>
|
||||
<rect x="80" y="210" width="180" height="14" rx="7" fill="#0f8a7a"/>
|
||||
<rect x="280" y="210" width="90" height="14" rx="7" fill="#0e1a2426"/>
|
||||
<rect x="390" y="210" width="90" height="14" rx="7" fill="#0e1a2426"/>
|
||||
<rect x="80" y="260" width="520" height="28" rx="8" fill="#0e1a24"/>
|
||||
<rect x="80" y="304" width="420" height="12" rx="6" fill="#5a6b7888"/>
|
||||
<rect x="80" y="328" width="480" height="12" rx="6" fill="#5a6b7855"/>
|
||||
<rect x="80" y="370" width="460" height="24" rx="8" fill="#0e1a24e6"/>
|
||||
<rect x="80" y="410" width="380" height="12" rx="6" fill="#5a6b7888"/>
|
||||
<rect x="680" y="210" width="200" height="220" rx="18" fill="#ffffff" stroke="#0e1a241f"/>
|
||||
<rect x="704" y="236" width="120" height="14" rx="7" fill="#0e1a24"/>
|
||||
<rect x="704" y="270" width="150" height="10" rx="5" fill="#0f8a7a66"/>
|
||||
<rect x="704" y="294" width="130" height="10" rx="5" fill="#0e1a2426"/>
|
||||
<rect x="704" y="318" width="140" height="10" rx="5" fill="#0e1a2426"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,463 @@
|
||||
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,600;0,9..40,700;1,9..40,400&family=Fraunces:opsz,wght@9..144,500;9..144,700&display=swap");
|
||||
|
||||
:root {
|
||||
--ink: #0e1a24;
|
||||
--muted: #5a6b78;
|
||||
--paper: #eef3f6;
|
||||
--panel: rgba(255, 255, 255, 0.78);
|
||||
--line: rgba(14, 26, 36, 0.12);
|
||||
--teal: #0f8a7a;
|
||||
--teal-deep: #0a5f54;
|
||||
--glow: #7fd9c7;
|
||||
--serif: "Fraunces", "Iowan Old Style", Georgia, serif;
|
||||
--sans: "DM Sans", "Avenir Next", sans-serif;
|
||||
--radius: 1.25rem;
|
||||
--shadow: 0 18px 50px rgba(14, 26, 36, 0.08);
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
html { scroll-behavior: smooth; }
|
||||
body {
|
||||
margin: 0;
|
||||
color: var(--ink);
|
||||
font-family: var(--sans);
|
||||
background:
|
||||
radial-gradient(900px 420px at 8% -8%, rgba(127, 217, 199, 0.45), transparent 60%),
|
||||
radial-gradient(700px 360px at 96% 4%, rgba(15, 138, 122, 0.18), transparent 55%),
|
||||
linear-gradient(180deg, #f7fafb 0%, var(--paper) 40%, #e7eef2 100%);
|
||||
line-height: 1.7;
|
||||
min-height: 100vh;
|
||||
}
|
||||
body::before {
|
||||
content: "";
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
pointer-events: none;
|
||||
opacity: 0.35;
|
||||
background-image:
|
||||
linear-gradient(rgba(14, 26, 36, 0.03) 1px, transparent 1px),
|
||||
linear-gradient(90deg, rgba(14, 26, 36, 0.03) 1px, transparent 1px);
|
||||
background-size: 48px 48px;
|
||||
mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
|
||||
z-index: 0;
|
||||
}
|
||||
a { color: var(--teal-deep); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
|
||||
a:hover { color: var(--teal); }
|
||||
|
||||
.wrap { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; position: relative; z-index: 1; }
|
||||
|
||||
.site-header {
|
||||
padding: 2.75rem 0 1.75rem;
|
||||
animation: rise 0.7s ease both;
|
||||
}
|
||||
.brand-block { display: grid; gap: 0.35rem; margin-bottom: 1.25rem; }
|
||||
.brand {
|
||||
font-family: var(--serif);
|
||||
font-size: clamp(2.4rem, 5vw, 3.6rem);
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.04em;
|
||||
line-height: 1.05;
|
||||
color: var(--ink);
|
||||
text-decoration: none;
|
||||
text-underline-offset: 0;
|
||||
}
|
||||
.brand span { color: var(--teal); }
|
||||
.tagline {
|
||||
margin: 0;
|
||||
max-width: 36rem;
|
||||
color: var(--muted);
|
||||
font-size: 1.05rem;
|
||||
}
|
||||
.nav-bar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.35rem 1.1rem;
|
||||
align-items: center;
|
||||
padding: 0.85rem 0;
|
||||
border-top: 1px solid var(--line);
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
.nav-bar a {
|
||||
position: relative;
|
||||
color: var(--ink);
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
.nav-bar a::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: -0.25rem;
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background: var(--teal);
|
||||
transform: scaleX(0);
|
||||
transform-origin: left;
|
||||
transition: transform 0.25s ease;
|
||||
}
|
||||
.nav-bar a:hover::after,
|
||||
.nav-bar a.is-active::after { transform: scaleX(1); }
|
||||
.flash {
|
||||
margin: 0.85rem 0 0;
|
||||
color: var(--teal-deep);
|
||||
font-weight: 600;
|
||||
animation: rise 0.45s ease both;
|
||||
}
|
||||
|
||||
.layout {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) 280px;
|
||||
gap: 2.5rem;
|
||||
padding: 2.25rem 0 3.5rem;
|
||||
}
|
||||
@media (max-width: 860px) {
|
||||
.layout { grid-template-columns: 1fr; }
|
||||
}
|
||||
|
||||
.content { animation: rise 0.8s 0.08s ease both; }
|
||||
.sidebar { animation: rise 0.8s 0.16s ease both; }
|
||||
|
||||
.panel {
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--radius);
|
||||
box-shadow: var(--shadow);
|
||||
backdrop-filter: blur(10px);
|
||||
padding: 1.35rem 1.5rem;
|
||||
margin-bottom: 1.1rem;
|
||||
}
|
||||
|
||||
.post-list { display: grid; gap: 0; }
|
||||
.post-item {
|
||||
padding: 1.35rem 0;
|
||||
border-bottom: 1px solid var(--line);
|
||||
transition: transform 0.25s ease, opacity 0.25s ease;
|
||||
}
|
||||
.post-item:first-child { padding-top: 0.25rem; }
|
||||
.post-item:hover { transform: translateX(4px); }
|
||||
.post-item h2 {
|
||||
margin: 0 0 0.4rem;
|
||||
font-family: var(--serif);
|
||||
font-size: clamp(1.45rem, 2.4vw, 1.85rem);
|
||||
letter-spacing: -0.02em;
|
||||
line-height: 1.25;
|
||||
}
|
||||
.post-item h2 a { color: inherit; text-decoration: none; }
|
||||
.post-item h2 a:hover { color: var(--teal-deep); }
|
||||
.meta { color: var(--muted); font-size: 0.92rem; margin: 0 0 0.55rem; }
|
||||
.excerpt { margin: 0; color: #243442; }
|
||||
|
||||
.page-title {
|
||||
font-family: var(--serif);
|
||||
font-size: clamp(1.8rem, 3vw, 2.4rem);
|
||||
margin: 0 0 1rem;
|
||||
letter-spacing: -0.03em;
|
||||
}
|
||||
|
||||
/* Semantic article */
|
||||
.post.panel,
|
||||
.post {
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--radius);
|
||||
box-shadow: var(--shadow);
|
||||
backdrop-filter: blur(10px);
|
||||
padding: 1.5rem 1.65rem 1.85rem;
|
||||
margin-bottom: 1.1rem;
|
||||
}
|
||||
.post__header { margin-bottom: 1.25rem; }
|
||||
.post__title {
|
||||
font-family: var(--serif);
|
||||
font-size: clamp(1.9rem, 3.2vw, 2.55rem);
|
||||
margin: 0 0 0.65rem;
|
||||
letter-spacing: -0.03em;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.post__meta {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: 0.92rem;
|
||||
}
|
||||
.post__meta time { font-variant-numeric: tabular-nums; }
|
||||
.post__category { font-weight: 600; text-decoration: none; }
|
||||
.post__category:hover { color: var(--teal); }
|
||||
|
||||
.post__toc {
|
||||
margin: 0 0 1.5rem;
|
||||
padding: 1rem 1.15rem;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 0.9rem;
|
||||
background: rgba(15, 138, 122, 0.06);
|
||||
}
|
||||
.post__toc-title {
|
||||
margin: 0 0 0.65rem;
|
||||
font-family: var(--serif);
|
||||
font-size: 1.05rem;
|
||||
}
|
||||
.post__toc-list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
display: grid;
|
||||
gap: 0.35rem;
|
||||
}
|
||||
.post__toc-item a {
|
||||
text-decoration: none;
|
||||
color: var(--ink);
|
||||
font-weight: 600;
|
||||
font-size: 0.92rem;
|
||||
}
|
||||
.post__toc-item a:hover { color: var(--teal-deep); }
|
||||
.post__toc-item--h3 { padding-left: 0.85rem; }
|
||||
.post__toc-item--h4 { padding-left: 1.7rem; }
|
||||
|
||||
.post__paywall {
|
||||
margin-top: 1.5rem;
|
||||
padding: 1.1rem 1.25rem;
|
||||
border: 1px solid rgba(15, 138, 122, 0.28);
|
||||
background: rgba(15, 138, 122, 0.06);
|
||||
}
|
||||
.post__paywall-title {
|
||||
margin: 0 0 0.4rem;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
.post__paywall .button {
|
||||
display: inline-block;
|
||||
margin-top: 0.35rem;
|
||||
padding: 0.55rem 1rem;
|
||||
border-radius: 0.4rem;
|
||||
background: var(--teal-deep, #0f8a7a);
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.post__content {
|
||||
font-size: 1.08rem;
|
||||
line-height: 1.8;
|
||||
}
|
||||
.post__content > *:first-child { margin-top: 0; }
|
||||
.post__content h2,
|
||||
.post__content h3,
|
||||
.post__content h4 {
|
||||
font-family: var(--serif);
|
||||
letter-spacing: -0.02em;
|
||||
line-height: 1.3;
|
||||
scroll-margin-top: 1.25rem;
|
||||
}
|
||||
.post__content h2 { font-size: 1.55rem; margin: 1.75rem 0 0.75rem; }
|
||||
.post__content h3 { font-size: 1.28rem; margin: 1.45rem 0 0.6rem; }
|
||||
.post__content h4 { font-size: 1.1rem; margin: 1.25rem 0 0.5rem; }
|
||||
.post__content p { margin: 0 0 1rem; }
|
||||
.post__content img { max-width: 100%; height: auto; border-radius: 0.75rem; }
|
||||
.post__content pre {
|
||||
overflow-x: auto;
|
||||
padding: 1rem 1.1rem;
|
||||
border-radius: 0.85rem;
|
||||
background: #0e1a24;
|
||||
color: #e8f2f0;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.post__content code {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.post__content :not(pre) > code {
|
||||
padding: 0.1em 0.35em;
|
||||
border-radius: 0.35rem;
|
||||
background: rgba(14, 26, 36, 0.06);
|
||||
}
|
||||
.post__content blockquote {
|
||||
margin: 1rem 0;
|
||||
padding: 0.15rem 0 0.15rem 1rem;
|
||||
border-left: 3px solid var(--teal);
|
||||
color: var(--muted);
|
||||
}
|
||||
.post__footer { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
|
||||
.post__tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem; }
|
||||
|
||||
.comments { margin-top: 0.25rem; }
|
||||
.comments__title {
|
||||
font-family: var(--serif);
|
||||
font-size: 1.5rem;
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
.comment__meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.35rem 0.75rem;
|
||||
align-items: baseline;
|
||||
color: var(--muted);
|
||||
font-size: 0.9rem;
|
||||
margin-bottom: 0.35rem;
|
||||
}
|
||||
.comment__author { color: var(--ink); }
|
||||
.comment__body { color: #243442; }
|
||||
|
||||
.article-body .body { font-size: 1.05rem; }
|
||||
.article-body .body > *:first-child { margin-top: 0; }
|
||||
.article-body img { max-width: 100%; height: auto; border-radius: 0.75rem; }
|
||||
.tag-cloud a,
|
||||
.chip {
|
||||
display: inline-block;
|
||||
margin: 0 0.35rem 0.35rem 0;
|
||||
padding: 0.2rem 0.65rem;
|
||||
border-radius: 999px;
|
||||
border: 1px solid var(--line);
|
||||
background: rgba(15, 138, 122, 0.08);
|
||||
color: var(--teal-deep);
|
||||
text-decoration: none;
|
||||
font-size: 0.88rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.sidebar .panel h3 {
|
||||
margin: 0 0 0.75rem;
|
||||
font-family: var(--serif);
|
||||
font-size: 1.15rem;
|
||||
}
|
||||
.sidebar ul { margin: 0; padding: 0; list-style: none; }
|
||||
.sidebar li { margin: 0.45rem 0; }
|
||||
.sidebar li a { text-decoration: none; color: var(--ink); font-weight: 600; }
|
||||
.sidebar li a:hover { color: var(--teal); }
|
||||
.sidebar .note { color: var(--muted); font-size: 0.92rem; margin: 0; }
|
||||
|
||||
.comment {
|
||||
padding: 0.9rem 0;
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
.comment:last-of-type { border-bottom: 0; }
|
||||
|
||||
form.stack label { display: block; margin: 0.85rem 0 0.3rem; font-weight: 600; }
|
||||
form.stack input,
|
||||
form.stack textarea {
|
||||
width: 100%;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 0.85rem;
|
||||
padding: 0.75rem 0.9rem;
|
||||
font: inherit;
|
||||
background: #fff;
|
||||
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
form.stack input:focus,
|
||||
form.stack textarea:focus {
|
||||
outline: none;
|
||||
border-color: var(--teal);
|
||||
box-shadow: 0 0 0 3px rgba(15, 138, 122, 0.15);
|
||||
}
|
||||
form.stack button,
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 1rem;
|
||||
background: linear-gradient(135deg, var(--teal), var(--teal-deep));
|
||||
color: #fff;
|
||||
border: 0;
|
||||
border-radius: 999px;
|
||||
padding: 0.75rem 1.35rem;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
box-shadow: 0 10px 24px rgba(15, 138, 122, 0.25);
|
||||
}
|
||||
form.stack button:hover,
|
||||
.btn:hover { transform: translateY(-1px); }
|
||||
|
||||
.pagination { margin-top: 1.5rem; }
|
||||
.pagination nav { display: flex; gap: 0.5rem; flex-wrap: wrap; }
|
||||
|
||||
.site-footer {
|
||||
padding: 1.5rem 0 3rem;
|
||||
color: var(--muted);
|
||||
border-top: 1px solid var(--line);
|
||||
font-size: 0.92rem;
|
||||
}
|
||||
.site-footer a { color: inherit; }
|
||||
|
||||
@keyframes rise {
|
||||
from { opacity: 0; transform: translateY(12px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
@media (max-width: 860px) {
|
||||
.wrap { width: calc(100% - 1.25rem); }
|
||||
.site-header { padding: 1.15rem 0 0.65rem; }
|
||||
.brand-block { margin-bottom: 0.75rem; gap: 0.2rem; }
|
||||
.brand { font-size: clamp(1.7rem, 8vw, 2.15rem); }
|
||||
.tagline { font-size: 0.92rem; max-width: none; }
|
||||
.nav-bar {
|
||||
gap: 0.45rem;
|
||||
flex-wrap: nowrap;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
padding: 0.55rem 0;
|
||||
scrollbar-width: none;
|
||||
border-block-width: 1px;
|
||||
}
|
||||
.nav-bar::-webkit-scrollbar { display: none; }
|
||||
.nav-bar a {
|
||||
flex: 0 0 auto;
|
||||
padding: 0.4rem 0.8rem;
|
||||
border-radius: 999px;
|
||||
background: rgba(15, 138, 122, 0.1);
|
||||
font-size: 0.86rem;
|
||||
}
|
||||
.nav-bar a::after { display: none; }
|
||||
.layout {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 1rem;
|
||||
padding: 1.1rem 0 2rem;
|
||||
}
|
||||
.content, .sidebar { animation: none; }
|
||||
.panel {
|
||||
padding: 0.95rem 1rem;
|
||||
border-radius: 1rem;
|
||||
box-shadow: none;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
.post-item {
|
||||
padding: 0.95rem 0;
|
||||
}
|
||||
.post-item:hover { transform: none; }
|
||||
.post-item h2 { font-size: 1.28rem; }
|
||||
.page-title { font-size: 1.5rem; margin-bottom: 0.75rem; }
|
||||
.excerpt { font-size: 0.95rem; }
|
||||
.sidebar .panel h3 { font-size: 1rem; margin-bottom: 0.55rem; }
|
||||
.sidebar ul {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.4rem;
|
||||
}
|
||||
.sidebar li { margin: 0; }
|
||||
.sidebar li a {
|
||||
display: inline-block;
|
||||
padding: 0.35rem 0.7rem;
|
||||
border-radius: 999px;
|
||||
background: rgba(14, 26, 36, 0.05);
|
||||
font-size: 0.86rem;
|
||||
}
|
||||
.sidebar .note { font-size: 0.86rem; }
|
||||
form.stack input,
|
||||
form.stack textarea,
|
||||
form.stack button { font-size: 1rem; }
|
||||
form.stack button { width: 100%; margin-top: 0.85rem; }
|
||||
.site-footer { padding: 1rem 0 2rem; font-size: 0.85rem; }
|
||||
body::before { opacity: 0.12; background-size: 28px 28px; }
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.wrap { width: calc(100% - 1rem); }
|
||||
.brand { font-size: 1.55rem; }
|
||||
.meta { font-size: 0.82rem; }
|
||||
.article-body .body { font-size: 0.98rem; line-height: 1.7; }
|
||||
.chip { font-size: 0.8rem; padding: 0.15rem 0.55rem; }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*, *::before, *::after {
|
||||
animation: none !important;
|
||||
transition: none !important;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "default",
|
||||
"title": "Default Theme",
|
||||
"version": "1.0.0",
|
||||
"description": "LaraBlog default theme.",
|
||||
"slots": "*"
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
@extends('theme::layout')
|
||||
|
||||
@php
|
||||
$rendered = $article->rendered();
|
||||
$bodyHtml = $rendered['html'];
|
||||
$toc = $rendered['toc'];
|
||||
@endphp
|
||||
|
||||
@section('content')
|
||||
@themeslot('article_top')
|
||||
<article class="post" itemscope itemtype="https://schema.org/BlogPosting">
|
||||
<header class="post__header">
|
||||
<h1 class="post__title" itemprop="headline">{{ $article->title }}</h1>
|
||||
<p class="post__meta">
|
||||
@if($article->published_at)
|
||||
<time datetime="{{ $article->published_at->toIso8601String() }}" itemprop="datePublished">
|
||||
{{ $article->published_at->format('Y-m-d H:i') }}
|
||||
</time>
|
||||
@endif
|
||||
@if($article->category)
|
||||
<span aria-hidden="true"> · </span>
|
||||
<a class="post__category" href="{{ url('/category-'.$article->category->id.'.shtml') }}" rel="category tag">
|
||||
{{ $article->category->name }}
|
||||
</a>
|
||||
@endif
|
||||
@if($article->user)
|
||||
<span aria-hidden="true"> · </span>
|
||||
<span itemprop="author" itemscope itemtype="https://schema.org/Person">
|
||||
<span itemprop="name">{{ $article->user->name ?: $article->user->username }}</span>
|
||||
</span>
|
||||
@endif
|
||||
<span aria-hidden="true"> · </span>
|
||||
<span>{{ $article->views }} {{ __('frontend.common.reads') }}</span>
|
||||
</p>
|
||||
</header>
|
||||
|
||||
@if(count($toc) >= 2)
|
||||
<nav class="post__toc" aria-labelledby="post-toc-heading">
|
||||
<h2 id="post-toc-heading" class="post__toc-title">{{ __('frontend.article.toc') }}</h2>
|
||||
<ol class="post__toc-list">
|
||||
@foreach($toc as $item)
|
||||
<li class="post__toc-item post__toc-item--h{{ $item['level'] }}">
|
||||
<a href="#{{ $item['id'] }}">{{ $item['text'] }}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ol>
|
||||
</nav>
|
||||
@endif
|
||||
|
||||
<div class="post__content entry-content" itemprop="articleBody">
|
||||
{!! $bodyHtml !!}
|
||||
</div>
|
||||
|
||||
@if($article->tags->isNotEmpty())
|
||||
<footer class="post__footer">
|
||||
<ul class="post__tags">
|
||||
@foreach($article->tags as $tag)
|
||||
<li>
|
||||
<a class="chip" rel="tag" href="{{ url('/tag/'.rawurlencode($tag->name)) }}">{{ $tag->name }}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</footer>
|
||||
@endif
|
||||
</article>
|
||||
@themeslot('article_bottom')
|
||||
|
||||
<section class="comments panel" aria-labelledby="comments-heading">
|
||||
<h2 id="comments-heading" class="comments__title">{{ __('frontend.common.comments') }}</h2>
|
||||
@forelse($article->comments as $comment)
|
||||
<article class="comment">
|
||||
<header class="comment__meta">
|
||||
<strong class="comment__author">{{ $comment->author }}</strong>
|
||||
@if($comment->published_at)
|
||||
<time datetime="{{ $comment->published_at->toIso8601String() }}">
|
||||
{{ $comment->published_at->format('Y-m-d H:i') }}
|
||||
</time>
|
||||
@endif
|
||||
</header>
|
||||
<div class="comment__body">{!! $comment->content !!}</div>
|
||||
</article>
|
||||
@empty
|
||||
<p class="meta">{{ __('frontend.common.no_comments') }}</p>
|
||||
@endforelse
|
||||
|
||||
@if(!$article->close_comment)
|
||||
<form class="stack comments__form" method="post" action="{{ url('/post.php') }}">
|
||||
@csrf
|
||||
<input type="hidden" name="action" value="addcomment">
|
||||
<input type="hidden" name="article_id" value="{{ $article->id }}">
|
||||
<label for="comment-author">{{ __('frontend.common.nickname') }}</label>
|
||||
<input id="comment-author" name="author" required maxlength="50" value="{{ old('author', auth()->user()?->username) }}">
|
||||
<label for="comment-url">{{ __('frontend.common.website') }}</label>
|
||||
<input id="comment-url" name="url" type="url" value="{{ old('url', auth()->user()?->url) }}">
|
||||
<label for="comment-content">{{ __('frontend.common.content') }}</label>
|
||||
<textarea id="comment-content" name="content" rows="5" required>{{ old('content') }}</textarea>
|
||||
<button type="submit">{{ __('frontend.common.submit_comment') }}</button>
|
||||
</form>
|
||||
@endif
|
||||
</section>
|
||||
@endsection
|
||||
@@ -0,0 +1,17 @@
|
||||
@extends('theme::layout')
|
||||
|
||||
@section('content')
|
||||
<div class="panel"><h1 class="page-title">最新评论</h1></div>
|
||||
<div class="panel">
|
||||
@forelse($comments as $comment)
|
||||
<div class="comment">
|
||||
<strong>{{ $comment->author }}</strong>
|
||||
<span class="meta"> · <a href="{{ url('/show-'.$comment->article_id.'.shtml') }}">{{ $comment->article?->title }}</a></span>
|
||||
<div>{!! $comment->content !!}</div>
|
||||
</div>
|
||||
@empty
|
||||
<p class="meta">暂无评论</p>
|
||||
@endforelse
|
||||
</div>
|
||||
<div class="pagination">{{ $comments->links() }}</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,24 @@
|
||||
@extends('theme::layout')
|
||||
|
||||
@section('content')
|
||||
<div class="post-list">
|
||||
@forelse($articles as $article)
|
||||
<article class="post-item">
|
||||
<h2><a href="{{ url('/show-'.$article->id.'.shtml') }}">{{ $article->title }}</a></h2>
|
||||
<p class="meta">
|
||||
{{ optional($article->published_at)->format('Y-m-d') }}
|
||||
@if($article->category) · {{ $article->category->name }} @endif
|
||||
· {{ strtoupper($article->content_format) }}
|
||||
@if($article->stick) · 置顶 @endif
|
||||
</p>
|
||||
<p class="excerpt">{{ app(\App\Domain\Blog\ArticleExcerpt::class)->forList($article) }}</p>
|
||||
</article>
|
||||
@empty
|
||||
<div class="panel">
|
||||
<h1 class="page-title">还没有文章</h1>
|
||||
<p class="meta">去后台发布第一篇,或运行 <code>php artisan db:seed</code> 载入演示内容。</p>
|
||||
</div>
|
||||
@endforelse
|
||||
</div>
|
||||
<div class="pagination">{{ $articles->links() }}</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,113 @@
|
||||
@php
|
||||
$themeManager = app(\App\Domain\Theme\ThemeManager::class);
|
||||
$activeTheme = $themeManager->active();
|
||||
$stylevars = \App\Models\Stylevar::query()->visible()->orderBy('id')->get();
|
||||
@endphp
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<title>{{ $seo['title'] ?? ($settings->site_name ?? config('app.name')) }}</title>
|
||||
@if(!empty($seo['canonical']))
|
||||
<link rel="canonical" href="{{ $seo['canonical'] }}">
|
||||
@endif
|
||||
@if(!empty($seo['description']))
|
||||
<meta name="description" content="{{ $seo['description'] }}">
|
||||
@endif
|
||||
@if(!empty($seo['keywords']))
|
||||
<meta name="keywords" content="{{ $seo['keywords'] }}">
|
||||
@endif
|
||||
@foreach(($seo['og'] ?? []) as $property => $content)
|
||||
<meta property="{{ $property }}" content="{{ $content }}">
|
||||
@endforeach
|
||||
@foreach(($seo['twitter'] ?? []) as $name => $content)
|
||||
<meta name="{{ $name }}" content="{{ $content }}">
|
||||
@endforeach
|
||||
@if(!empty($seo['jsonld']))
|
||||
<script type="application/ld+json">{!! json_encode($seo['jsonld'], JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES) !!}</script>
|
||||
@endif
|
||||
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ url('/rss.xml') }}">
|
||||
<link rel="stylesheet" href="{{ $themeManager->assetUrl('style.css') }}?v={{ @filemtime(base_path('themes/'.$activeTheme.'/assets/style.css')) }}">
|
||||
@stack('head')
|
||||
@themeslot('head')
|
||||
</head>
|
||||
<body data-theme="{{ $activeTheme }}">
|
||||
@themeslot('body_start')
|
||||
<header class="site-header">
|
||||
<div class="wrap">
|
||||
<div class="brand-block">
|
||||
<a class="brand" href="{{ url('/') }}">{{ $settings->site_name ?? 'Lara' }}<span>Blog</span></a>
|
||||
<p class="tagline">{{ $settings->site_description ?: '写作、归档与发现——现代博客引擎' }}</p>
|
||||
</div>
|
||||
<nav class="nav-bar" aria-label="{{ __('frontend.nav.home') }}">
|
||||
<a href="{{ url('/') }}">{{ __('frontend.nav.home') }}</a>
|
||||
<a href="{{ url('/archives.shtml') }}">{{ __('frontend.nav.archives') }}</a>
|
||||
<a href="{{ url('/tagslist.shtml') }}">{{ __('frontend.nav.tags') }}</a>
|
||||
<a href="{{ url('/comments.shtml') }}">{{ __('frontend.nav.comments') }}</a>
|
||||
<a href="{{ url('/links.shtml') }}">{{ __('frontend.nav.links') }}</a>
|
||||
<a href="{{ url('/search.shtml') }}">{{ __('frontend.nav.search') }}</a>
|
||||
@auth
|
||||
<a href="{{ url('/index.php?action=profile') }}">{{ __('frontend.nav.profile') }}</a>
|
||||
@else
|
||||
<a href="{{ url('/login.shtml') }}">{{ __('frontend.nav.login') }}</a>
|
||||
<a href="{{ url('/reg.shtml') }}">{{ __('frontend.nav.register') }}</a>
|
||||
@endauth
|
||||
</nav>
|
||||
@themeslot('nav_after')
|
||||
@if(session('status'))
|
||||
<p class="flash">{{ session('status') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</header>
|
||||
@themeslot('header_after')
|
||||
<main class="wrap layout">
|
||||
<section class="content">
|
||||
@themeslot('content_before')
|
||||
@yield('content')
|
||||
@themeslot('content_after')
|
||||
</section>
|
||||
<aside class="sidebar">
|
||||
@themeslot('sidebar_before')
|
||||
<div class="panel">
|
||||
<h3>{{ __('frontend.sidebar.categories') }}</h3>
|
||||
<ul>
|
||||
@forelse(($categories ?? []) as $category)
|
||||
<li><a href="{{ url('/category-'.$category->id.'.shtml') }}">{{ $category->name }}</a></li>
|
||||
@empty
|
||||
<li class="note">{{ __('frontend.sidebar.empty_category') }}</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
</div>
|
||||
@foreach($stylevars as $stylevar)
|
||||
<div class="panel">
|
||||
<h3>{{ $stylevar->title }}</h3>
|
||||
<p class="note">{!! nl2br(e($stylevar->value)) !!}</p>
|
||||
</div>
|
||||
@endforeach
|
||||
@php($sidebarInject = trim(\App\Domain\Theme\ThemeSlot::render('sidebar')))
|
||||
@if($sidebarInject !== '')
|
||||
<div class="panel theme-slot-sidebar">
|
||||
{!! $sidebarInject !!}
|
||||
</div>
|
||||
@endif
|
||||
@php($sidebarAfter = trim(\App\Domain\Theme\ThemeSlot::render('sidebar_after')))
|
||||
@if($sidebarAfter !== '')
|
||||
<div class="panel theme-slot-sidebar-after">
|
||||
{!! $sidebarAfter !!}
|
||||
</div>
|
||||
@endif
|
||||
<div class="panel">
|
||||
<h3>{{ __('frontend.sidebar.subscribe') }}</h3>
|
||||
<p class="note"><a href="{{ url('/rss.xml') }}">RSS</a> · <a href="{{ url('/sitemap.xml') }}">Sitemap</a> · <a href="{{ url('/llms.txt') }}">llms.txt</a></p>
|
||||
</div>
|
||||
</aside>
|
||||
</main>
|
||||
@themeslot('footer_before')
|
||||
<footer class="site-footer wrap">
|
||||
<p>© {{ date('Y') }} {{ $settings->site_name ?? 'LaraBlog' }} · {{ __('frontend.common.theme') }} {{ $activeTheme }}</p>
|
||||
</footer>
|
||||
@themeslot('footer_after')
|
||||
@themeslot('body_end')
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,14 @@
|
||||
@extends('theme::layout')
|
||||
|
||||
@section('content')
|
||||
<div class="panel">
|
||||
<h1 class="page-title">友情链接</h1>
|
||||
<ul>
|
||||
@forelse($links as $link)
|
||||
<li><a href="{{ $link->url }}" rel="noopener" target="_blank">{{ $link->name }}</a>@if($link->note) — {{ $link->note }}@endif</li>
|
||||
@empty
|
||||
<li class="meta">暂无链接</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,21 @@
|
||||
@extends('theme::layout')
|
||||
|
||||
@section('content')
|
||||
<div class="panel article-body">
|
||||
<h1 class="page-title">登录</h1>
|
||||
@if ($errors->any())
|
||||
<p class="flash">{{ $errors->first() }}</p>
|
||||
@endif
|
||||
<form class="stack" method="post" action="{{ url('/post.php') }}">
|
||||
@csrf
|
||||
<input type="hidden" name="action" value="dologin">
|
||||
<label>用户名或邮箱</label>
|
||||
<input name="login" value="{{ old('login') }}" required autocomplete="username">
|
||||
<label>密码</label>
|
||||
<input type="password" name="password" required autocomplete="current-password">
|
||||
<label><input type="checkbox" name="remember" value="1"> 记住我</label>
|
||||
<button type="submit">登录</button>
|
||||
</form>
|
||||
<p class="meta">没有账号?<a href="{{ url('/reg.shtml') }}">注册</a></p>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,17 @@
|
||||
@extends('theme::layout')
|
||||
|
||||
@section('content')
|
||||
<div class="panel article-body">
|
||||
<h1 class="page-title">{{ $article->title }}</h1>
|
||||
<p class="meta">{{ __('frontend.common.password_protected') }}</p>
|
||||
@if(!empty($error))
|
||||
<p class="flash">{{ $error }}</p>
|
||||
@endif
|
||||
<form class="stack" method="post" action="{{ url('/show-'.$article->id.'.shtml') }}">
|
||||
@csrf
|
||||
<label for="article-password">{{ __('frontend.common.password') }}</label>
|
||||
<input id="article-password" type="password" name="password" required>
|
||||
<button type="submit">{{ __('frontend.common.unlock') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,32 @@
|
||||
@extends('theme::layout')
|
||||
|
||||
@section('content')
|
||||
@themeslot('article_top')
|
||||
<article class="post post--paywall">
|
||||
<header class="post__header">
|
||||
<h1 class="post__title">{{ $article->title }}</h1>
|
||||
<p class="post__meta">
|
||||
@if($article->published_at)
|
||||
<time datetime="{{ $article->published_at->toIso8601String() }}">
|
||||
{{ $article->published_at->format('Y-m-d H:i') }}
|
||||
</time>
|
||||
@endif
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<div class="post__content entry-content">
|
||||
{!! $bodyHtml !!}
|
||||
</div>
|
||||
|
||||
<aside class="post__paywall panel" role="region" aria-label="{{ __('frontend.article.paywall_title') }}">
|
||||
<h2 class="post__paywall-title">{{ __('frontend.article.paywall_title') }}</h2>
|
||||
<p class="note">{{ $access->message ?: __('frontend.article.paywall_hint') }}</p>
|
||||
@if($access->checkoutUrl)
|
||||
<p>
|
||||
<a class="button" href="{{ $access->checkoutUrl }}">{{ __('frontend.article.buy') }}</a>
|
||||
</p>
|
||||
@endif
|
||||
</aside>
|
||||
</article>
|
||||
@themeslot('article_bottom')
|
||||
@endsection
|
||||
@@ -0,0 +1,33 @@
|
||||
@extends('theme::layout')
|
||||
|
||||
@section('content')
|
||||
<div class="panel article-body">
|
||||
<h1 class="page-title">个人资料</h1>
|
||||
@if ($errors->any())
|
||||
<ul class="flash">
|
||||
@foreach($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
<p class="meta">用户名:{{ $user->username ?: $user->name }}</p>
|
||||
<form class="stack" method="post" action="{{ url('/post.php') }}">
|
||||
@csrf
|
||||
<input type="hidden" name="action" value="modpro">
|
||||
<label>邮箱</label>
|
||||
<input type="email" name="email" value="{{ old('email', $user->email) }}">
|
||||
<label>网站</label>
|
||||
<input type="url" name="url" value="{{ old('url', $user->url) }}">
|
||||
<label>新密码(留空不改)</label>
|
||||
<input type="password" name="password">
|
||||
<label>确认新密码</label>
|
||||
<input type="password" name="password_confirmation">
|
||||
<button type="submit">保存</button>
|
||||
</form>
|
||||
<form class="stack" method="post" action="{{ url('/post.php') }}">
|
||||
@csrf
|
||||
<input type="hidden" name="action" value="logout">
|
||||
<button type="submit">退出登录</button>
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,30 @@
|
||||
@extends('theme::layout')
|
||||
|
||||
@section('content')
|
||||
<div class="panel article-body">
|
||||
<h1 class="page-title">注册</h1>
|
||||
@if ($errors->any())
|
||||
<ul class="flash">
|
||||
@foreach($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
<form class="stack" method="post" action="{{ url('/post.php') }}">
|
||||
@csrf
|
||||
<input type="hidden" name="action" value="register">
|
||||
<label>用户名</label>
|
||||
<input name="username" value="{{ old('username') }}" required>
|
||||
<label>邮箱(可选)</label>
|
||||
<input type="email" name="email" value="{{ old('email') }}">
|
||||
<label>网站(可选)</label>
|
||||
<input type="url" name="url" value="{{ old('url') }}">
|
||||
<label>密码</label>
|
||||
<input type="password" name="password" required>
|
||||
<label>确认密码</label>
|
||||
<input type="password" name="password_confirmation" required>
|
||||
<button type="submit">注册</button>
|
||||
</form>
|
||||
<p class="meta">已有账号?<a href="{{ url('/login.shtml') }}">登录</a></p>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,21 @@
|
||||
@extends('theme::layout')
|
||||
|
||||
@section('content')
|
||||
<div class="panel">
|
||||
<h1 class="page-title">搜索</h1>
|
||||
<form class="stack" method="get" action="{{ url('/search.shtml') }}">
|
||||
<label>关键词</label>
|
||||
<input name="keywords" value="{{ $keywords }}" placeholder="标题或正文">
|
||||
<button type="submit">搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="post-list">
|
||||
@foreach($articles as $article)
|
||||
<article class="post-item">
|
||||
<h2><a href="{{ url('/show-'.$article->id.'.shtml') }}">{{ $article->title }}</a></h2>
|
||||
<p class="meta">{{ optional($article->published_at)->format('Y-m-d') }}</p>
|
||||
</article>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="pagination">{{ $articles->links() }}</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,13 @@
|
||||
@extends('theme::layout')
|
||||
|
||||
@section('content')
|
||||
<div class="panel"><h1 class="page-title">标签:{{ $tag->name }}</h1></div>
|
||||
<div class="post-list">
|
||||
@foreach($articles as $article)
|
||||
<article class="post-item">
|
||||
<h2><a href="{{ url('/show-'.$article->id.'.shtml') }}">{{ $article->title }}</a></h2>
|
||||
</article>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="pagination">{{ $articles->links() }}</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,13 @@
|
||||
@extends('theme::layout')
|
||||
|
||||
@section('content')
|
||||
<div class="panel">
|
||||
<h1 class="page-title">标签</h1>
|
||||
<p class="tag-cloud">
|
||||
@foreach($tags as $tag)
|
||||
<a class="chip" href="{{ url('/tag/'.rawurlencode($tag->name)) }}">{{ $tag->name }} ({{ $tag->use_count }})</a>
|
||||
@endforeach
|
||||
</p>
|
||||
</div>
|
||||
<div class="pagination">{{ $tags->links() }}</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,27 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="960" height="600" viewBox="0 0 960 600" role="img" aria-label="example theme preview">
|
||||
<defs>
|
||||
<linearGradient id="bg" x1="1" y1="0" x2="0" y2="1">
|
||||
<stop offset="0%" stop-color="#fff7f1"/>
|
||||
<stop offset="50%" stop-color="#f3f6fb"/>
|
||||
<stop offset="100%" stop-color="#eef2f8"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect width="960" height="600" fill="url(#bg)"/>
|
||||
<rect x="48" y="40" width="864" height="520" rx="8" fill="#ffffff" fill-opacity="0.9" stroke="#14203324"/>
|
||||
<text x="80" y="118" font-family="Georgia, serif" font-size="46" font-weight="700" fill="#142033">LaraBlog</text>
|
||||
<rect x="80" y="132" width="160" height="6" fill="#c45c26"/>
|
||||
<text x="80" y="172" font-family="Helvetica, Arial, sans-serif" font-size="18" fill="#5c6b80">�%��H � :�����</text>
|
||||
<rect x="80" y="210" width="70" height="12" rx="2" fill="#c45c26"/>
|
||||
<rect x="170" y="210" width="70" height="12" rx="2" fill="#14203333"/>
|
||||
<rect x="260" y="210" width="70" height="12" rx="2" fill="#14203333"/>
|
||||
<rect x="80" y="260" width="500" height="90" rx="6" fill="#fff" stroke="#c45c2640"/>
|
||||
<rect x="104" y="284" width="360" height="18" rx="4" fill="#142033"/>
|
||||
<rect x="104" y="316" width="280" height="10" rx="4" fill="#5c6b8088"/>
|
||||
<rect x="80" y="372" width="500" height="90" rx="6" fill="#fff" stroke="#14203318"/>
|
||||
<rect x="104" y="396" width="300" height="18" rx="4" fill="#142033"/>
|
||||
<rect x="104" y="428" width="250" height="10" rx="4" fill="#5c6b8088"/>
|
||||
<rect x="640" y="260" width="220" height="200" rx="6" fill="#fff" stroke="#14203318"/>
|
||||
<rect x="664" y="288" width="100" height="14" rx="3" fill="#142033"/>
|
||||
<rect x="664" y="324" width="160" height="10" rx="3" fill="#c45c2666"/>
|
||||
<rect x="664" y="348" width="140" height="10" rx="3" fill="#14203326"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,128 @@
|
||||
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;600;700&family=Newsreader:opsz,wght@6..72,500;6..72,700&display=swap");
|
||||
|
||||
:root {
|
||||
--ink: #142033;
|
||||
--muted: #5c6b80;
|
||||
--paper: #f3f6fb;
|
||||
--panel: rgba(255, 255, 255, 0.86);
|
||||
--line: rgba(20, 32, 51, 0.14);
|
||||
--accent: #c45c26;
|
||||
--accent-deep: #9a3f12;
|
||||
--serif: "Newsreader", Georgia, serif;
|
||||
--sans: "IBM Plex Sans", "Helvetica Neue", sans-serif;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
html { scroll-behavior: smooth; }
|
||||
body {
|
||||
margin: 0;
|
||||
color: var(--ink);
|
||||
font-family: var(--sans);
|
||||
background:
|
||||
radial-gradient(800px 380px at 90% -10%, rgba(196, 92, 38, 0.18), transparent 55%),
|
||||
radial-gradient(900px 420px at 0% 0%, rgba(40, 90, 160, 0.12), transparent 50%),
|
||||
linear-gradient(180deg, #fbfcfe, var(--paper));
|
||||
line-height: 1.7;
|
||||
}
|
||||
.wrap { width: min(1080px, calc(100% - 2rem)); margin: 0 auto; }
|
||||
.site-header { padding: 2.5rem 0 1.25rem; }
|
||||
.brand {
|
||||
display: inline-block;
|
||||
font-family: var(--serif);
|
||||
font-size: clamp(2.2rem, 4.5vw, 3.2rem);
|
||||
color: var(--ink);
|
||||
text-decoration: none;
|
||||
letter-spacing: -0.03em;
|
||||
border-bottom: 4px solid var(--accent);
|
||||
animation: slide 0.55s ease both;
|
||||
}
|
||||
.tagline { color: var(--muted); margin: 0.6rem 0 1rem; max-width: 34rem; }
|
||||
.nav-bar {
|
||||
display: flex; flex-wrap: wrap; gap: 0.85rem;
|
||||
padding: 0.75rem 0; border-block: 1px solid var(--line);
|
||||
}
|
||||
.nav-bar a { color: var(--ink); text-decoration: none; font-weight: 700; }
|
||||
.nav-bar a:hover { color: var(--accent-deep); }
|
||||
.flash { color: var(--accent-deep); font-weight: 700; }
|
||||
.layout { display: grid; grid-template-columns: 1fr 260px; gap: 2rem; padding: 2rem 0 3rem; }
|
||||
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }
|
||||
.panel, .post-item {
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 0.35rem;
|
||||
padding: 1.2rem 1.35rem;
|
||||
margin-bottom: 0.9rem;
|
||||
}
|
||||
.post-item { transition: border-color 0.2s ease; }
|
||||
.post-item:hover { border-color: var(--accent); }
|
||||
.post-item h2, .page-title {
|
||||
font-family: var(--serif);
|
||||
margin: 0 0 0.45rem;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
.post-item h2 a { color: inherit; text-decoration: none; }
|
||||
.meta { color: var(--muted); font-size: 0.9rem; }
|
||||
.sidebar h3 { margin: 0 0 0.6rem; font-family: var(--serif); }
|
||||
.sidebar ul { list-style: none; margin: 0; padding: 0; }
|
||||
.sidebar li { margin: 0.4rem 0; }
|
||||
.sidebar a { color: var(--ink); font-weight: 600; text-decoration: none; }
|
||||
.chip {
|
||||
display: inline-block; margin-right: 0.35rem; padding: 0.15rem 0.55rem;
|
||||
border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.post {
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 0.35rem;
|
||||
padding: 1.35rem 1.45rem 1.6rem;
|
||||
margin-bottom: 0.9rem;
|
||||
}
|
||||
.post__title {
|
||||
font-family: var(--serif);
|
||||
font-size: clamp(1.85rem, 3vw, 2.4rem);
|
||||
margin: 0 0 0.55rem;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
.post__meta { margin: 0; color: var(--muted); font-size: 0.9rem; }
|
||||
.post__category { font-weight: 700; text-decoration: none; color: var(--accent-deep); }
|
||||
.post__toc {
|
||||
margin: 1rem 0 1.35rem;
|
||||
padding: 0.9rem 1rem;
|
||||
border: 1px solid var(--line);
|
||||
border-left: 4px solid var(--accent);
|
||||
background: rgba(196, 92, 38, 0.06);
|
||||
}
|
||||
.post__toc-title { margin: 0 0 0.55rem; font-family: var(--serif); font-size: 1.05rem; }
|
||||
.post__toc-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.3rem; }
|
||||
.post__toc-item a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.92rem; }
|
||||
.post__toc-item a:hover { color: var(--accent-deep); }
|
||||
.post__toc-item--h3 { padding-left: 0.85rem; }
|
||||
.post__toc-item--h4 { padding-left: 1.7rem; }
|
||||
.post__content { font-size: 1.06rem; line-height: 1.8; }
|
||||
.post__content h2, .post__content h3, .post__content h4 {
|
||||
font-family: var(--serif);
|
||||
scroll-margin-top: 1.25rem;
|
||||
}
|
||||
.post__content h2 { font-size: 1.45rem; margin: 1.6rem 0 0.7rem; }
|
||||
.post__content h3 { font-size: 1.22rem; margin: 1.35rem 0 0.55rem; }
|
||||
.post__content img { max-width: 100%; height: auto; }
|
||||
.post__footer { margin-top: 1.35rem; padding-top: 0.9rem; border-top: 1px solid var(--line); }
|
||||
.post__tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem; }
|
||||
.comments__title { font-family: var(--serif); font-size: 1.4rem; margin: 0 0 0.85rem; }
|
||||
.comment { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
|
||||
.comment__meta { color: var(--muted); font-size: 0.88rem; margin-bottom: 0.3rem; }
|
||||
|
||||
form.stack label { display: block; margin: 0.75rem 0 0.25rem; font-weight: 600; }
|
||||
form.stack input, form.stack textarea {
|
||||
width: 100%; border: 1px solid var(--line); border-radius: 0.35rem; padding: 0.7rem 0.8rem; font: inherit;
|
||||
}
|
||||
form.stack button {
|
||||
margin-top: 1rem; background: var(--accent); color: #fff; border: 0;
|
||||
border-radius: 0.35rem; padding: 0.7rem 1.15rem; font-weight: 700; cursor: pointer;
|
||||
}
|
||||
.site-footer { padding: 1.25rem 0 2.5rem; color: var(--muted); border-top: 1px solid var(--line); }
|
||||
@keyframes slide {
|
||||
from { opacity: 0; transform: translateY(8px); }
|
||||
to { opacity: 1; transform: none; }
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "example",
|
||||
"title": "Example(暖色排版)",
|
||||
"version": "1.0.0",
|
||||
"description": "第二套可切换皮肤:Newsreader + 琥珀强调色,演示主题引擎。",
|
||||
"slots": "*"
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
@php
|
||||
$themeManager = app(\App\Domain\Theme\ThemeManager::class);
|
||||
$activeTheme = $themeManager->active();
|
||||
$stylevars = \App\Models\Stylevar::query()->visible()->orderBy('id')->get();
|
||||
@endphp
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<title>{{ $seo['title'] ?? ($settings->site_name ?? config('app.name')) }}</title>
|
||||
@if(!empty($seo['canonical']))
|
||||
<link rel="canonical" href="{{ $seo['canonical'] }}">
|
||||
@endif
|
||||
@if(!empty($seo['description']))
|
||||
<meta name="description" content="{{ $seo['description'] }}">
|
||||
@endif
|
||||
@foreach(($seo['og'] ?? []) as $property => $content)
|
||||
<meta property="{{ $property }}" content="{{ $content }}">
|
||||
@endforeach
|
||||
@foreach(($seo['twitter'] ?? []) as $name => $content)
|
||||
<meta name="{{ $name }}" content="{{ $content }}">
|
||||
@endforeach
|
||||
@if(!empty($seo['jsonld']))
|
||||
<script type="application/ld+json">{!! json_encode($seo['jsonld'], JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES) !!}</script>
|
||||
@endif
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ url('/rss.xml') }}">
|
||||
<link rel="stylesheet" href="{{ $themeManager->assetUrl('style.css') }}?v={{ @filemtime(base_path('themes/'.$activeTheme.'/assets/style.css')) }}">
|
||||
@stack('head')
|
||||
@themeslot('head')
|
||||
</head>
|
||||
<body data-theme="{{ $activeTheme }}">
|
||||
@themeslot('body_start')
|
||||
<header class="site-header">
|
||||
<div class="wrap">
|
||||
<a class="brand" href="{{ url('/') }}">{{ $settings->site_name ?? 'LaraBlog' }}</a>
|
||||
<p class="tagline">{{ $settings->site_description ?: 'Example 皮肤:另一套排版与配色' }}</p>
|
||||
<nav class="nav-bar">
|
||||
<a href="{{ url('/') }}">{{ __('frontend.nav.home') }}</a>
|
||||
<a href="{{ url('/archives.shtml') }}">{{ __('frontend.nav.archives') }}</a>
|
||||
<a href="{{ url('/tagslist.shtml') }}">{{ __('frontend.nav.tags') }}</a>
|
||||
<a href="{{ url('/comments.shtml') }}">{{ __('frontend.nav.comments') }}</a>
|
||||
<a href="{{ url('/links.shtml') }}">{{ __('frontend.nav.links') }}</a>
|
||||
<a href="{{ url('/search.shtml') }}">{{ __('frontend.nav.search') }}</a>
|
||||
@auth
|
||||
<a href="{{ url('/index.php?action=profile') }}">{{ __('frontend.nav.profile') }}</a>
|
||||
@else
|
||||
<a href="{{ url('/login.shtml') }}">{{ __('frontend.nav.login') }}</a>
|
||||
<a href="{{ url('/reg.shtml') }}">{{ __('frontend.nav.register') }}</a>
|
||||
@endauth
|
||||
</nav>
|
||||
@themeslot('nav_after')
|
||||
@if(session('status'))
|
||||
<p class="flash">{{ session('status') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</header>
|
||||
@themeslot('header_after')
|
||||
<main class="wrap layout">
|
||||
<section class="content">
|
||||
@themeslot('content_before')
|
||||
@yield('content')
|
||||
@themeslot('content_after')
|
||||
</section>
|
||||
<aside class="sidebar">
|
||||
@themeslot('sidebar_before')
|
||||
<div class="panel">
|
||||
<h3>{{ __('frontend.sidebar.categories') }}</h3>
|
||||
<ul>
|
||||
@foreach(($categories ?? []) as $category)
|
||||
<li><a href="{{ url('/category-'.$category->id.'.shtml') }}">{{ $category->name }}</a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@foreach($stylevars as $stylevar)
|
||||
<div class="panel">
|
||||
<h3>{{ $stylevar->title }}</h3>
|
||||
<p class="meta">{!! nl2br(e($stylevar->value)) !!}</p>
|
||||
</div>
|
||||
@endforeach
|
||||
@php($sidebarInject = trim(\App\Domain\Theme\ThemeSlot::render('sidebar')))
|
||||
@if($sidebarInject !== '')
|
||||
<div class="panel">{!! $sidebarInject !!}</div>
|
||||
@endif
|
||||
@php($sidebarAfter = trim(\App\Domain\Theme\ThemeSlot::render('sidebar_after')))
|
||||
@if($sidebarAfter !== '')
|
||||
<div class="panel">{!! $sidebarAfter !!}</div>
|
||||
@endif
|
||||
</aside>
|
||||
</main>
|
||||
@themeslot('footer_before')
|
||||
<footer class="site-footer wrap">
|
||||
<p>{{ __('frontend.common.theme') }} example · {{ $settings->site_name ?? 'LaraBlog' }}</p>
|
||||
</footer>
|
||||
@themeslot('footer_after')
|
||||
@themeslot('body_end')
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user