Initial commit: simpleblog
@@ -0,0 +1,512 @@
|
||||
/* ==========================================================================
|
||||
Simple Blog — Admin panel styling
|
||||
========================================================================== */
|
||||
|
||||
/* Log out is a POST form (so it needs a CSRF token), styled like a nav link. */
|
||||
.logout-form {
|
||||
display: inline;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.link-button {
|
||||
background: none;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
font: inherit;
|
||||
color: inherit;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.link-button:hover,
|
||||
.link-button:focus {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.admin-shell {
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Condensed top bar: logo left, menu toggle right. No wasted vertical space. */
|
||||
.admin-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 56px;
|
||||
padding: 0 var(--gutter);
|
||||
background: var(--color-bg);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.admin-header .header-inner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.admin-header .site-logo a {
|
||||
font-weight: 700;
|
||||
font-size: 1.15rem;
|
||||
color: var(--color-text);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.admin-header .site-logo a:hover {
|
||||
color: var(--color-accent);
|
||||
}
|
||||
|
||||
.admin-menu-button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
height: 34px;
|
||||
padding: 0 14px;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 6px;
|
||||
background: var(--color-bg);
|
||||
color: var(--color-text);
|
||||
font-weight: 600;
|
||||
font-size: 0.9rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.admin-menu-button:hover {
|
||||
border-color: var(--color-accent);
|
||||
color: var(--color-accent);
|
||||
}
|
||||
|
||||
/* Lightweight section tabs (pill style, no box). Replaces the old bordered tab row. */
|
||||
.admin-subnav {
|
||||
padding: 18px var(--gutter) 0;
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
|
||||
.admin-subnav a {
|
||||
display: inline-block;
|
||||
padding: 7px 15px;
|
||||
border-radius: 999px;
|
||||
font-weight: 600;
|
||||
font-size: 0.9rem;
|
||||
color: var(--color-text);
|
||||
background: transparent;
|
||||
border: 1px solid transparent;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.admin-subnav a:hover {
|
||||
background: #eef4fa;
|
||||
border-color: var(--color-border);
|
||||
color: var(--color-accent);
|
||||
}
|
||||
|
||||
.admin-subnav a.active {
|
||||
background: var(--color-accent);
|
||||
border-color: var(--color-accent);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.admin-wrap {
|
||||
padding: 28px var(--gutter) 60px;
|
||||
}
|
||||
|
||||
.admin-panel {
|
||||
background: var(--color-bg);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 8px;
|
||||
padding: 28px 30px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.admin-panel h1,
|
||||
.admin-panel h2 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.admin-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 14px;
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
|
||||
.admin-actions a {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 12px 20px;
|
||||
border-radius: 6px;
|
||||
font-weight: 600;
|
||||
border: 1px solid var(--color-border);
|
||||
background: var(--color-bg);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.admin-actions a.primary {
|
||||
background: var(--color-accent);
|
||||
border-color: var(--color-accent);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.admin-actions a.primary:hover {
|
||||
background: var(--color-link-hover);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.admin-actions a:hover {
|
||||
border-color: var(--color-accent);
|
||||
color: var(--color-link);
|
||||
}
|
||||
|
||||
table.admin-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 0.92rem;
|
||||
}
|
||||
|
||||
table.admin-table th,
|
||||
table.admin-table td {
|
||||
text-align: left;
|
||||
padding: 12px 14px;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table.admin-table th {
|
||||
font-size: 0.82rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
color: var(--color-muted);
|
||||
border-bottom: 2px solid var(--color-border);
|
||||
}
|
||||
|
||||
table.admin-table tr:hover td {
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.table-actions {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.form-group label {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
margin-bottom: 6px;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.form-group input,
|
||||
.form-group textarea,
|
||||
.form-group select {
|
||||
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;
|
||||
}
|
||||
|
||||
.form-group input:focus,
|
||||
.form-group textarea:focus,
|
||||
.form-group select:focus {
|
||||
outline: none;
|
||||
border-color: var(--color-accent);
|
||||
}
|
||||
|
||||
.form-group textarea {
|
||||
min-height: 320px;
|
||||
resize: vertical;
|
||||
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.form-row {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 620px) {
|
||||
.form-row {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.field-hint {
|
||||
display: block;
|
||||
margin-top: 6px;
|
||||
font-size: 0.82rem;
|
||||
color: var(--color-muted);
|
||||
}
|
||||
|
||||
.admin-stat {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.admin-stat .num {
|
||||
display: block;
|
||||
font-size: 2.4rem;
|
||||
font-weight: 700;
|
||||
color: var(--color-accent);
|
||||
}
|
||||
|
||||
.admin-stat .label {
|
||||
font-size: 0.85rem;
|
||||
color: var(--color-muted);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.category-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 12px 0;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.category-row:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
/* --- Analytics: locations, map + trend chart ---------------------------- */
|
||||
.admin-stat-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
||||
gap: 20px;
|
||||
margin: 24px 0 4px;
|
||||
}
|
||||
|
||||
.visitor-map {
|
||||
height: 440px;
|
||||
width: 100%;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 6px;
|
||||
background: #eef1f5;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.chart-wrap {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.chart-wrap canvas {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 280px;
|
||||
}
|
||||
|
||||
.chart-tooltip {
|
||||
position: absolute;
|
||||
padding: 6px 10px;
|
||||
border-radius: 5px;
|
||||
background: rgba(17, 24, 39, 0.92);
|
||||
color: #fff;
|
||||
font-size: 0.78rem;
|
||||
line-height: 1.4;
|
||||
pointer-events: none;
|
||||
white-space: nowrap;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.chart-legend {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px 18px;
|
||||
margin-top: 12px;
|
||||
font-size: 0.85rem;
|
||||
color: var(--color-muted);
|
||||
}
|
||||
|
||||
.chart-legend .swatch {
|
||||
display: inline-block;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
margin-right: 6px;
|
||||
border-radius: 2px;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
.location-flag {
|
||||
font-size: 1.1em;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.admin-split {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 30px;
|
||||
}
|
||||
|
||||
.admin-split h2 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 860px) {
|
||||
.admin-split {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.visitor-map {
|
||||
height: 320px;
|
||||
}
|
||||
}
|
||||
|
||||
.filter-form {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-end;
|
||||
gap: 14px 18px;
|
||||
margin: 0 0 22px;
|
||||
}
|
||||
|
||||
.filter-form label {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
color: var(--color-muted);
|
||||
}
|
||||
|
||||
.filter-form select {
|
||||
min-width: 190px;
|
||||
padding: 8px 10px;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 5px;
|
||||
background: #fff;
|
||||
color: var(--color-text);
|
||||
font-family: var(--font-stack);
|
||||
font-size: 0.92rem;
|
||||
}
|
||||
|
||||
.location-chip {
|
||||
display: inline-block;
|
||||
margin: 2px 6px 2px 0;
|
||||
padding: 3px 9px;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 999px;
|
||||
background: #f6f8fa;
|
||||
font-size: 0.82rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.location-chip strong {
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.add-category {
|
||||
margin-top: 16px;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.add-category input {
|
||||
flex: 1;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
text-align: center;
|
||||
color: var(--color-muted);
|
||||
padding: 40px 20px;
|
||||
}
|
||||
|
||||
/* Flash messages (rendered by admin/base.html) */
|
||||
.notice { padding: 10px 14px; border: 1px solid var(--color-border); border-radius: 6px; margin: 10px 0; background: var(--color-bg); color: var(--color-text); }
|
||||
.notice-success { background: #e7f7ee; border-color: #b7e0c3; color: #1f5c34; }
|
||||
.notice-error { background: #fdecea; border-color: #f5c2c2; color: #7d2117; }
|
||||
.notice-info { background: #e7f0fb; border-color: #b9d4f4; color: #12396b; }
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
Comments moderation
|
||||
------------------------------------------------------------------------- */
|
||||
.comment-stats {
|
||||
display:flex; flex-wrap: wrap; gap: 10px 22px; margin: 16px 0 24px;
|
||||
}
|
||||
.comment-stats .term {
|
||||
font-size: 0.95rem;
|
||||
padding: 4px 12px;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 999px;
|
||||
background: var(--color-bg);
|
||||
color: var(--color-text);
|
||||
}
|
||||
.comment-stats .term.warn {
|
||||
background: #fff4e5; border-color: #f2d399; color: #7a5210;
|
||||
}
|
||||
.comment-mod-list .comment-block {
|
||||
border-left-width: 0;
|
||||
}
|
||||
.comment-mod-list .comment-block .comment-meta {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
.comment-mod-list .comment-block .comment-actions {
|
||||
margin-top: 14px;
|
||||
display:flex; flex-wrap: wrap; gap: 8px;
|
||||
}
|
||||
.comment-mod-list .comment-block .comment-actions form { margin: 0; }
|
||||
|
||||
/* Mobile: collapse the section tab row behind the menu toggle */
|
||||
@media (max-width: 640px) {
|
||||
.admin-subnav {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Moderation badge in the admin navigation */
|
||||
.nav-badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: #d63638; color: #fff; font-size: 11px; line-height: 18px; text-align: center; vertical-align: middle; }
|
||||
@@ -0,0 +1,14 @@
|
||||
:root {
|
||||
--color-accent:#91b1ba;
|
||||
--color-link:#91b1ba;
|
||||
--color-link-hover:#7f9fa8;
|
||||
--color-text:#b79f9f;
|
||||
--color-muted:rgba(183,159,159,0.55);
|
||||
--color-border:rgba(183,159,159,0.92);
|
||||
--color-bg:#ffffff;
|
||||
--color-sidebar-bg:rgba(183,159,159,0.97);
|
||||
--font-stack:Inter, Roboto, sans-serif;
|
||||
--border-radius:16px;
|
||||
}
|
||||
|
||||
.posts-grid { grid-template-columns: repeat(1, 1fr); }
|
||||
@@ -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; }
|
||||
@@ -0,0 +1,268 @@
|
||||
/* Analytics dashboard: visitor location map + location trend chart.
|
||||
*
|
||||
* Both charts read their data from JSON <script> blocks embedded by
|
||||
* templates/admin/analytics.html, so there is no extra API request and no
|
||||
* chart library to load. Leaflet (vendored under /static/vendor/leaflet) is
|
||||
* used for the map only when it is present.
|
||||
*/
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
var PALETTE = [
|
||||
"#1f6feb", "#e36209", "#2ea043", "#8250df", "#cf222e", "#8b949e",
|
||||
];
|
||||
|
||||
function readJSON(id) {
|
||||
var el = document.getElementById(id);
|
||||
if (!el) return null;
|
||||
try {
|
||||
return JSON.parse(el.textContent);
|
||||
} catch (err) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function dayLabel(iso) {
|
||||
var parts = String(iso).split("-");
|
||||
var date = new Date(Date.UTC(+parts[0], +parts[1] - 1, +parts[2]));
|
||||
return date.toLocaleDateString(undefined, {
|
||||
month: "short", day: "numeric", timeZone: "UTC",
|
||||
});
|
||||
}
|
||||
|
||||
function niceMax(value) {
|
||||
if (value <= 4) return 4;
|
||||
var power = Math.pow(10, Math.floor(Math.log10(value)));
|
||||
var steps = [1, 2, 2.5, 5, 10];
|
||||
for (var i = 0; i < steps.length; i++) {
|
||||
if (steps[i] * power >= value) return steps[i] * power;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function drawTrend() {
|
||||
var data = readJSON("location-trend-data");
|
||||
var canvas = document.getElementById("location-trend-chart");
|
||||
if (!data || !canvas || !data.series || !data.series.length) return;
|
||||
|
||||
var wrap = canvas.parentNode;
|
||||
var tooltip = document.createElement("div");
|
||||
tooltip.className = "chart-tooltip";
|
||||
tooltip.hidden = true;
|
||||
wrap.appendChild(tooltip);
|
||||
|
||||
var legend = document.getElementById("location-trend-legend");
|
||||
data.series.forEach(function (series, index) {
|
||||
var item = document.createElement("span");
|
||||
var swatch = document.createElement("span");
|
||||
swatch.className = "swatch";
|
||||
swatch.style.backgroundColor = PALETTE[index % PALETTE.length];
|
||||
item.appendChild(swatch);
|
||||
item.appendChild(document.createTextNode(series.name));
|
||||
legend.appendChild(item);
|
||||
});
|
||||
|
||||
var PAD = { top: 14, right: 14, bottom: 30, left: 44 };
|
||||
var HEIGHT = 280;
|
||||
var hoverIndex = -1;
|
||||
|
||||
function render() {
|
||||
var width = Math.max(320, wrap.clientWidth);
|
||||
var dpr = window.devicePixelRatio || 1;
|
||||
canvas.width = Math.round(width * dpr);
|
||||
canvas.height = Math.round(HEIGHT * dpr);
|
||||
canvas.style.width = width + "px";
|
||||
canvas.style.height = HEIGHT + "px";
|
||||
|
||||
var ctx = canvas.getContext("2d");
|
||||
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
||||
ctx.clearRect(0, 0, width, HEIGHT);
|
||||
|
||||
var plotW = width - PAD.left - PAD.right;
|
||||
var plotH = HEIGHT - PAD.top - PAD.bottom;
|
||||
var max = 0;
|
||||
data.series.forEach(function (series) {
|
||||
series.data.forEach(function (value) {
|
||||
if (value > max) max = value;
|
||||
});
|
||||
});
|
||||
max = niceMax(max);
|
||||
var count = data.labels.length;
|
||||
|
||||
function xAt(index) {
|
||||
return PAD.left + (count === 1 ? plotW / 2 : (index / (count - 1)) * plotW);
|
||||
}
|
||||
function yAt(value) {
|
||||
return PAD.top + plotH - (value / max) * plotH;
|
||||
}
|
||||
|
||||
ctx.strokeStyle = "#e5e7eb";
|
||||
ctx.fillStyle = "#6b7280";
|
||||
ctx.font = "12px system-ui, -apple-system, sans-serif";
|
||||
ctx.lineWidth = 1;
|
||||
ctx.textAlign = "right";
|
||||
ctx.textBaseline = "middle";
|
||||
for (var tick = 0; tick <= 4; tick++) {
|
||||
var tickValue = (max / 4) * tick;
|
||||
var tickY = yAt(tickValue);
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(PAD.left, tickY);
|
||||
ctx.lineTo(width - PAD.right, tickY);
|
||||
ctx.stroke();
|
||||
ctx.fillText(String(Math.round(tickValue)), PAD.left - 8, tickY);
|
||||
}
|
||||
|
||||
ctx.textAlign = "center";
|
||||
ctx.textBaseline = "top";
|
||||
var stride = Math.max(1, Math.ceil(count / 7));
|
||||
for (var i = 0; i < count; i += stride) {
|
||||
ctx.fillText(dayLabel(data.labels[i]), xAt(i), HEIGHT - PAD.bottom + 8);
|
||||
}
|
||||
|
||||
data.series.forEach(function (series, index) {
|
||||
ctx.strokeStyle = PALETTE[index % PALETTE.length];
|
||||
ctx.lineWidth = 2;
|
||||
ctx.lineJoin = "round";
|
||||
ctx.beginPath();
|
||||
series.data.forEach(function (value, i) {
|
||||
var x = xAt(i);
|
||||
var y = yAt(value);
|
||||
if (i === 0) ctx.moveTo(x, y);
|
||||
else ctx.lineTo(x, y);
|
||||
});
|
||||
ctx.stroke();
|
||||
});
|
||||
|
||||
if (hoverIndex >= 0) {
|
||||
var hoverX = xAt(hoverIndex);
|
||||
ctx.strokeStyle = "rgba(31, 111, 235, 0.35)";
|
||||
ctx.lineWidth = 1;
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(hoverX, PAD.top);
|
||||
ctx.lineTo(hoverX, HEIGHT - PAD.bottom);
|
||||
ctx.stroke();
|
||||
|
||||
var lines = [dayLabel(data.labels[hoverIndex])];
|
||||
data.series.forEach(function (series, index) {
|
||||
var value = series.data[hoverIndex] || 0;
|
||||
if (!value) return;
|
||||
ctx.fillStyle = PALETTE[index % PALETTE.length];
|
||||
ctx.beginPath();
|
||||
ctx.arc(hoverX, yAt(value), 3, 0, Math.PI * 2);
|
||||
ctx.fill();
|
||||
lines.push(series.name + ": " + value);
|
||||
});
|
||||
tooltip.textContent = lines.join(" \u00b7 ");
|
||||
tooltip.hidden = false;
|
||||
var left = Math.min(Math.max(hoverX + 10, 8), width - tooltip.offsetWidth - 8);
|
||||
tooltip.style.left = left + "px";
|
||||
tooltip.style.top = PAD.top + "px";
|
||||
} else {
|
||||
tooltip.hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
canvas.addEventListener("mousemove", function (event) {
|
||||
var rect = canvas.getBoundingClientRect();
|
||||
var plotW = Math.max(1, rect.width - PAD.left - PAD.right);
|
||||
var count = data.labels.length;
|
||||
var ratio = (event.clientX - rect.left - PAD.left) / plotW;
|
||||
var index = Math.round(ratio * (count - 1));
|
||||
index = Math.max(0, Math.min(count - 1, index));
|
||||
if (index !== hoverIndex) {
|
||||
hoverIndex = index;
|
||||
render();
|
||||
}
|
||||
});
|
||||
canvas.addEventListener("mouseleave", function () {
|
||||
hoverIndex = -1;
|
||||
render();
|
||||
});
|
||||
|
||||
var resizeTimer = null;
|
||||
window.addEventListener("resize", function () {
|
||||
clearTimeout(resizeTimer);
|
||||
resizeTimer = setTimeout(render, 150);
|
||||
});
|
||||
|
||||
render();
|
||||
}
|
||||
|
||||
function escapeHtml(value) {
|
||||
return String(value == null ? "" : value)
|
||||
.replace(/&/g, "&")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">")
|
||||
.replace(/"/g, """)
|
||||
.replace(/'/g, "'");
|
||||
}
|
||||
|
||||
function initMap() {
|
||||
var points = readJSON("visitor-map-data") || [];
|
||||
var container = document.getElementById("visitor-map");
|
||||
if (!container || typeof L === "undefined") return;
|
||||
|
||||
var map = L.map(container, { minZoom: 2, worldCopyJump: true }).setView([20, 0], 2);
|
||||
L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
|
||||
maxZoom: 19,
|
||||
attribution:
|
||||
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
}).addTo(map);
|
||||
|
||||
// Keep the world map visible even before the first located visit.
|
||||
if (!points.length) {
|
||||
setTimeout(function () { map.invalidateSize(); }, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
var maxVisits = 1;
|
||||
points.forEach(function (point) {
|
||||
if (point.visits > maxVisits) maxVisits = point.visits;
|
||||
});
|
||||
|
||||
var bounds = [];
|
||||
points.forEach(function (point) {
|
||||
var radius = 5 + 16 * Math.sqrt(point.visits / maxVisits);
|
||||
var label = [point.city, point.region, point.country]
|
||||
.filter(Boolean)
|
||||
.join(", ");
|
||||
L.circleMarker([point.lat, point.lon], {
|
||||
radius: radius,
|
||||
color: "#1f6feb",
|
||||
weight: 1.5,
|
||||
fillColor: "#1f6feb",
|
||||
fillOpacity: 0.3,
|
||||
})
|
||||
.addTo(map)
|
||||
.bindPopup(
|
||||
"<strong>" + escapeHtml(label || "Unknown location") + "</strong><br>" +
|
||||
escapeHtml(point.visits) + " visit(s) from " +
|
||||
escapeHtml(point.visitors) + " visitor(s)"
|
||||
);
|
||||
bounds.push([point.lat, point.lon]);
|
||||
});
|
||||
|
||||
if (bounds.length === 1) {
|
||||
map.setView(bounds[0], 5);
|
||||
} else {
|
||||
map.fitBounds(L.latLngBounds(bounds).pad(0.25), { maxZoom: 6 });
|
||||
}
|
||||
setTimeout(function () {
|
||||
map.invalidateSize();
|
||||
}, 0);
|
||||
window.addEventListener("resize", function () {
|
||||
map.invalidateSize();
|
||||
});
|
||||
}
|
||||
|
||||
function start() {
|
||||
drawTrend();
|
||||
initMap();
|
||||
}
|
||||
|
||||
if (document.readyState === "loading") {
|
||||
document.addEventListener("DOMContentLoaded", start);
|
||||
} else {
|
||||
start();
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1,114 @@
|
||||
// gallery_lightbox.js — full-album gallery viewer for /photos/<slug>.
|
||||
// A random image from the album is shown as a hero at the top of the page.
|
||||
// Clicking the hero (or any thumbnail) opens a modal showing every photo of the
|
||||
// album, with the album title, prev/next navigation and a thumbnail strip.
|
||||
// Esc, backdrop click, or the close button close it. Dependency-free / offline.
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
var imgs = [];
|
||||
var lightbox = null;
|
||||
var mainImg = null;
|
||||
var idx = -1;
|
||||
|
||||
function collectGallery() {
|
||||
var out = [];
|
||||
if (document.querySelectorAll) {
|
||||
var nodes = document.querySelectorAll(".gallery-img");
|
||||
for (var i = 0; i < nodes.length; i++) out.push(nodes[i]);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
function buildLightbox() {
|
||||
// Reuse the existing viewer ONLY while it is still attached to the DOM.
|
||||
// Once close() has removed it, `lightbox` must be rebuilt so the next
|
||||
// thumbnail click doesn't set its src on a detached (invisible) node.
|
||||
if (lightbox && lightbox.isConnected) return lightbox;
|
||||
lightbox = document.getElementById("gallery-lightbox");
|
||||
if (!lightbox) return null;
|
||||
var closeBtn = document.querySelector(".lightbox-close");
|
||||
var prevBtn = document.querySelector(".lightbox-prev");
|
||||
var nextBtn = document.querySelector(".lightbox-next");
|
||||
mainImg = lightbox.querySelector(".lightbox-img-main");
|
||||
|
||||
if (closeBtn) closeBtn.addEventListener("click", close);
|
||||
if (prevBtn) prevBtn.addEventListener("click", function () { show(idx - 1); });
|
||||
if (nextBtn) nextBtn.addEventListener("click", function () { show(idx + 1); });
|
||||
|
||||
lightbox.addEventListener("click", function (e) {
|
||||
// Don't close when clicking a control button or the main image; only the
|
||||
// dark backdrop should dismiss the viewer.
|
||||
var t = e.target;
|
||||
if (t.closest(".lightbox-close, .lightbox-prev, .lightbox-next")) return;
|
||||
if (mainImg && mainImg.contains(t)) return;
|
||||
close();
|
||||
});
|
||||
|
||||
document.addEventListener("keydown", function (e) {
|
||||
if (!lightbox || !lightbox.classList.contains("is-open")) return;
|
||||
if (e.key === "Escape") { close(); }
|
||||
else if (e.key === "ArrowRight" || e.key === "ArrowDown") { e.preventDefault(); show(idx + 1); }
|
||||
else if (e.key === "ArrowLeft" || e.key === "ArrowUp") { e.preventDefault(); show(idx - 1); }
|
||||
});
|
||||
|
||||
return lightbox;
|
||||
}
|
||||
|
||||
// Pick a random thumbnail to feature as the hero.
|
||||
function pickRandomHero() {
|
||||
var g = collectGallery();
|
||||
if (!g.length) return null;
|
||||
return g[Math.floor(Math.random() * g.length)];
|
||||
}
|
||||
|
||||
function show(i) {
|
||||
var g = collectGallery();
|
||||
if (!g.length) return;
|
||||
idx = (i + g.length) % g.length;
|
||||
var el = g[idx];
|
||||
var src = el.getAttribute("data-src") || el.getAttribute("src") || "";
|
||||
buildLightbox(); // ensure the viewer (mainImg) exists before we use it
|
||||
if (mainImg && mainImg.getAttribute("src")) mainImg.removeAttribute("src"); // avoid flash
|
||||
mainImg.setAttribute("src", src);
|
||||
lightbox.classList.add("is-open");
|
||||
document.body.style.overflow = "hidden";
|
||||
}
|
||||
|
||||
function open() {
|
||||
var heroImg = document.querySelector(".gallery-hero-img");
|
||||
if (heroImg && !heroImg.getAttribute("src")) {
|
||||
var heroEl = pickRandomHero();
|
||||
if (heroEl) heroImg.setAttribute("src", heroEl.getAttribute("data-src") || heroEl.getAttribute("src"));
|
||||
}
|
||||
buildLightbox();
|
||||
show(0);
|
||||
}
|
||||
|
||||
function close() {
|
||||
if (!lightbox) return;
|
||||
lightbox.classList.remove("is-open");
|
||||
document.body.style.overflow = "";
|
||||
lightbox = null; // drop the cached node so buildLightbox() rebuilds next open
|
||||
setTimeout(function () { if (!lightbox.classList.contains("is-open")) lightbox.remove(); }, 300);
|
||||
}
|
||||
|
||||
// Wire up clicks: the hero opens the gallery (showing image 0), while any
|
||||
// individual thumbnail opens the gallery showing THAT photo.
|
||||
var heroFigure = document.getElementById("gallery-hero");
|
||||
if (heroFigure) heroFigure.addEventListener("click", open);
|
||||
var g = collectGallery();
|
||||
for (let k = 0; k < g.length; k++) {
|
||||
// NOTE: `let` gives each thumbnail its OWN copy of `k`, so clicking one
|
||||
// shows THAT photo. With the original `var k`, every handler shared the
|
||||
// final loop value (g.length) and always called show(0) instead — the bug.
|
||||
g[k].addEventListener("click", function () { buildLightbox(); show(k); });
|
||||
}
|
||||
|
||||
// Feature a random image on load.
|
||||
if (document.readyState === "loading") {
|
||||
document.addEventListener("DOMContentLoaded", pickRandomHero);
|
||||
} else {
|
||||
pickRandomHero();
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1,134 @@
|
||||
// lightbox.js — tiny dependency-free image viewer for rendered pages.
|
||||
// Click any <img> (from an uploaded TinyMCE image, or inline markdown) to open
|
||||
// it full-size in an overlay within the page. Esc, backdrop click, or arrow keys
|
||||
// close / navigate. Images with class "no-lightbox" (or data-no-lightbox) and
|
||||
// the site banner stay non-clickable. No external CDN → works offline.
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
var EXCLUDE_CLASSES = ["no-lightbox", "site-banner-img"];
|
||||
|
||||
function isExcluded(img) {
|
||||
if (img.hasAttribute("data-no-lightbox")) return true;
|
||||
var cls = (img.getAttribute("class") || "").toLowerCase();
|
||||
for (var i = 0; i < EXCLUDE_CLASSES.length; i++) {
|
||||
if (cls.indexOf(EXCLUDE_CLASSES[i]) !== -1) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Collect clickable images in document order (once).
|
||||
var images = [];
|
||||
var doc = document;
|
||||
if (doc.querySelectorAll) {
|
||||
var nodes = doc.querySelectorAll("img");
|
||||
for (var n = 0; n < nodes.length; n++) {
|
||||
if (!isExcluded(nodes[n])) images.push(nodes[n]);
|
||||
}
|
||||
}
|
||||
|
||||
var lightbox = null;
|
||||
var imgEl = null;
|
||||
var idx = -1;
|
||||
|
||||
function buildLightbox() {
|
||||
if (lightbox) return lightbox;
|
||||
lightbox = document.createElement("div");
|
||||
lightbox.className = "lightbox";
|
||||
lightbox.setAttribute("role", "dialog");
|
||||
lightbox.setAttribute("aria-modal", "true");
|
||||
lightbox.setAttribute("aria-label", "Image viewer");
|
||||
|
||||
var backdrop = document.createElement("div");
|
||||
backdrop.className = "lightbox-backdrop";
|
||||
|
||||
var wrapper = document.createElement("div");
|
||||
wrapper.className = "lightbox-wrapper";
|
||||
|
||||
imgEl = document.createElement("img");
|
||||
imgEl.className = "lightbox-img";
|
||||
imgEl.alt = "";
|
||||
wrapper.appendChild(imgEl);
|
||||
|
||||
lightbox.appendChild(backdrop);
|
||||
lightbox.appendChild(wrapper);
|
||||
lightbox.addEventListener("click", onLightboxClick);
|
||||
return lightbox;
|
||||
}
|
||||
|
||||
function ensureLightbox() {
|
||||
buildLightbox();
|
||||
// Re-attach if the viewer was removed from the DOM (e.g. after a close),
|
||||
// so clicking another image still reopens it.
|
||||
if (lightbox && lightbox.parentNode !== document.body) {
|
||||
document.body.appendChild(lightbox);
|
||||
}
|
||||
return lightbox;
|
||||
}
|
||||
|
||||
function openAt(i) {
|
||||
ensureLightbox(); // ensure the viewer (imgEl + lightbox) exists before we use them
|
||||
idx = (i + images.length) % images.length;
|
||||
var src = images[idx].getAttribute("src");
|
||||
if (!src) src = images[idx].getAttribute("data-src") || "";
|
||||
if (imgEl.getAttribute("src")) imgEl.removeAttribute("src"); // avoid flash
|
||||
imgEl.setAttribute("src", src);
|
||||
lightbox.classList.add("is-open");
|
||||
document.body.style.overflow = "hidden";
|
||||
}
|
||||
|
||||
function close() {
|
||||
lightbox.classList.remove("is-open");
|
||||
document.body.style.overflow = "";
|
||||
setTimeout(function () { if (!lightbox.classList.contains("is-open")) lightbox.remove(); }, 300);
|
||||
}
|
||||
|
||||
function next() { openAt(idx + 1); }
|
||||
function prev() { openAt(idx - 1); }
|
||||
|
||||
function isClickable(img) {
|
||||
if (img.hasAttribute("data-no-lightbox")) return false;
|
||||
var cls = (img.getAttribute("class") || "").toLowerCase();
|
||||
for (var i = 0; i < EXCLUDE_CLASSES.length; i++) {
|
||||
if (cls.indexOf(EXCLUDE_CLASSES[i]) !== -1) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function onImgClick(e) {
|
||||
var t = e.target;
|
||||
if (t.tagName !== "IMG" || !isClickable(t)) return; // delegated: currentTarget is always the listener element, never the img
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
openAt(idx + 1);
|
||||
}
|
||||
|
||||
function onLightboxClick(e) {
|
||||
// Clicking anywhere in the viewer except the image itself closes it.
|
||||
if (imgEl && imgEl.contains(e.target)) return;
|
||||
close();
|
||||
}
|
||||
|
||||
function onKeyDown(e) {
|
||||
if (lightbox && lightbox.classList.contains("is-open")) {
|
||||
if (e.key === "Escape") { close(); }
|
||||
else if (e.key === "ArrowRight" || e.key === "ArrowDown") { e.preventDefault(); next(); }
|
||||
else if (e.key === "ArrowLeft" || e.key === "ArrowUp") { e.preventDefault(); prev(); }
|
||||
}
|
||||
}
|
||||
|
||||
if (images.length > 0) {
|
||||
// Delegate off the document so it survives images added later.
|
||||
doc.addEventListener("click", onImgClick);
|
||||
doc.addEventListener("keydown", onKeyDown);
|
||||
// Re-scan on DOMContentLoaded in case images appear after load.
|
||||
if (doc.readyState === "loading") {
|
||||
doc.addEventListener("DOMContentLoaded", function () {
|
||||
var again = doc.querySelectorAll("img");
|
||||
for (var j = 0; j < again.length; j++) {
|
||||
if (!images.indexOf(again[j])) images.push(again[j]);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),o=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=e=>e.options.get("allow_html_in_named_anchor");const a="a:not([href])",r=e=>!e,i=e=>e.getAttribute("id")||e.getAttribute("name")||"",l=e=>(e=>"a"===e.nodeName.toLowerCase())(e)&&!e.getAttribute("href")&&""!==i(e),s=e=>e.dom.getParent(e.selection.getStart(),a),d=(e,a)=>{const r=s(e);r?((e,t,o)=>{o.removeAttribute("name"),o.id=t,e.addVisual(),e.undoManager.add()})(e,a,r):((e,a)=>{e.undoManager.transact(()=>{n(e)||e.selection.collapse(!0),e.selection.isCollapsed()?e.insertContent(e.dom.createHTML("a",{id:a})):((e=>{const n=e.dom;t(n).walk(e.selection.getRng(),e=>{o.each(e,e=>{var t;l(t=e)&&!t.firstChild&&n.remove(e,!1)})})})(e),e.formatter.remove("namedAnchor",void 0,void 0,!0),e.formatter.apply("namedAnchor",{value:a}),e.addVisual())})})(e,a),e.focus()},c=e=>(e=>r(e.attr("href"))&&!r(e.attr("id")||e.attr("name")))(e)&&!e.firstChild,m=e=>t=>{for(let o=0;o<t.length;o++){const n=t[o];c(n)&&n.attr("contenteditable",e)}},u=e=>t=>{const o=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",o),o(),()=>{e.off("NodeChange",o)}},h="anchor";e.add(h,e=>((e=>{(0,e.options.register)("allow_html_in_named_anchor",{processor:"boolean",default:!1})})(e),(e=>{e.on("PreInit",()=>{e.parser.addNodeFilter("a",m("false")),e.serializer.addNodeFilter("a",m(null))})})(e),(e=>{e.addCommand("mceAnchor",()=>{(e=>{const t=(e=>{const t=s(e);return t?i(t):""})(e);e.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:t=>{((e,t)=>/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)?(d(e,t),!0):(e.windowManager.alert("ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!1))(e,t.getData().id)&&t.close()}})})(e)})})(e),(e=>{const t=()=>e.execCommand("mceAnchor");e.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:t,onSetup:t=>{const o=e.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind,n=u(e)(t);return()=>{o(),n()}}}),e.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:t,onSetup:u(e)})})(e),e.on("PreInit",()=>{(e=>{e.formatter.register("namedAnchor",{inline:"a",selector:a,remove:"all",split:!0,deep:!0,attributes:{id:"%value"},onmatch:(e,t,o)=>l(e)})})(e)}),{getMetadata:()=>({name:"Anchor",type:"opensource",slug:h})}))}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=o=e,(r=String).prototype.isPrototypeOf(n)||o.constructor?.name===r.name)?"string":t;var n,o,r})(e);const n=e=>void 0===e;const o=e=>!(e=>null==e)(e),r=Object.hasOwnProperty,a=e=>"\ufeff"===e,s=e=>t=>t.options.get(e),l=s("autolink_pattern"),c=s("link_default_target"),i=s("link_default_protocol"),d=s("allow_unsafe_link_target");var u=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker");const f=e=>3===e.nodeType,g=e=>1===e.nodeType,m=e=>/^[(\[{ \u00a0]$/.test(e),k=(e,t,n)=>{for(let o=t-1;o>=0;o--){const t=e.charAt(o);if(!a(t)&&n(t))return o}return-1},p=(e,t)=>{const o=e.schema.getVoidElements(),a=l(e),{dom:s,selection:c}=e;if(null!==s.getParent(c.getNode(),"a[href]")||e.mode.isReadOnly())return null;const d=c.getRng(),p=u(s,e=>{return s.isBlock(e)||(t=o,n=e.nodeName.toLowerCase(),r.call(t,n))||"false"===s.getContentEditable(e)||null!==s.getParent(e,"a[href]");var t,n}),{container:y,offset:w}=((e,t)=>{let n=e,o=t;for(;g(n)&&n.childNodes[o];)n=n.childNodes[o],o=f(n)?n.data.length:n.childNodes.length;return{container:n,offset:o}})(d.endContainer,d.endOffset),h=s.getParent(y,s.isBlock)??s.getRoot(),_=p.backwards(y,w+t,(e,t)=>{const n=e.data,o=k(n,t,(r=m,e=>!r(e)));var r,a;return-1===o||(a=n[o],/[?!,.;:]/.test(a))?o:o+1},h);if(!_)return null;let v=_.container;const A=p.backwards(_.container,_.offset,(e,t)=>{v=e;const n=k(e.data,t,m);return-1===n?n:n+1},h),C=s.createRng();A?C.setStart(A.container,A.offset):C.setStart(v,0),C.setEnd(_.container,_.offset);const b=C.toString().replace(/\uFEFF/g,"").match(a);if(b){let t=b[0];return $="www.",(P=t).length>=4&&P.substr(0,4)===$?t=i(e)+"://"+t:((e,t,o=0,r)=>{const a=e.indexOf(t,o);return-1!==a&&(!!n(r)||a+t.length<=r)})(t,"@")&&!(e=>/^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(e))(t)&&(t="mailto:"+t),{rng:C,url:t}}var P,$;return null},y=(e,n)=>{const{dom:o,selection:r}=e,{rng:a,url:s}=n,l=r.getBookmark();r.setRng(a);const i="createlink",u={command:i,ui:!1,value:s};if(!e.dispatch("BeforeExecCommand",u).isDefaultPrevented()){e.getDoc().execCommand(i,!1,s),e.dispatch("ExecCommand",u);const n=c(e);if(t(n)){const t=r.getNode();o.setAttrib(t,"target",n),"_blank"!==n||d(e)||o.setAttrib(t,"rel","noopener")}}r.moveToBookmark(l),e.nodeChanged()},w=e=>{const t=p(e,-1);o(t)&&y(e,t)},h=w,_="autolink";e.add(_,e=>((e=>{const t=e.options.register;t("autolink_pattern",{processor:"regexp",default:new RegExp("^"+/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g.source+"$","i")}),t("link_default_target",{processor:"string"}),t("link_default_protocol",{processor:"string",default:"https"})})(e),(e=>{e.on("keydown",t=>{13!==t.keyCode||t.isDefaultPrevented()||(e=>{const t=p(e,0);o(t)&&y(e,t)})(e)}),e.on("keyup",t=>{32===t.keyCode?w(e):(48===t.keyCode&&t.shiftKey||221===t.keyCode)&&h(e)})})(e),{getMetadata:()=>({name:"Autolink",type:"opensource",slug:_})}))}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(t,e,o)=>{t.dom.toggleClass(t.getBody(),"mce-visualblocks"),o.set(!o.get()),((t,e)=>{t.dispatch("VisualBlocks",{state:e})})(t,o.get())},o=t=>t.options.get("visualblocks_default_state");const s=(t,e)=>o=>{o.setActive(e.get());const s=t=>o.setActive(t.state);return t.on("VisualBlocks",s),()=>t.off("VisualBlocks",s)},l="visualblocks";t.add(l,(t,a)=>{(t=>{(0,t.options.register)("visualblocks_default_state",{processor:"boolean",default:!1})})(t);const c=(()=>{let t=!1;return{get:()=>t,set:e=>{t=e}}})();return((t,o,s)=>{t.addCommand("mceVisualBlocks",()=>{e(t,0,s)})})(t,0,c),((t,e)=>{const o=()=>t.execCommand("mceVisualBlocks");t.ui.registry.addToggleButton("visualblocks",{icon:"visualblocks",tooltip:"Show blocks",onAction:o,onSetup:s(t,e),context:"any"}),t.ui.registry.addToggleMenuItem("visualblocks",{text:"Show blocks",icon:"visualblocks",onAction:o,onSetup:s(t,e),context:"any"})})(t,c),((t,s,l)=>{t.on("PreviewFormats AfterPreviewFormats",e=>{l.get()&&t.dom.toggleClass(t.getBody(),"mce-visualblocks","afterpreviewformats"===e.type)}),t.on("init",()=>{o(t)&&e(t,0,l)})})(t,0,c),{getMetadata:()=>({name:"Visual Blocks",type:"opensource",slug:l})}})}();
|
||||
@@ -0,0 +1,3 @@
|
||||
‰PNG
|
||||
|
||||
....fakepngdata
|
||||
|
After Width: | Height: | Size: 23 B |
@@ -0,0 +1,3 @@
|
||||
‰PNG
|
||||
|
||||
....fakepngdata
|
||||
|
After Width: | Height: | Size: 23 B |
@@ -0,0 +1,3 @@
|
||||
‰PNG
|
||||
|
||||
....fakepngdata
|
||||
|
After Width: | Height: | Size: 23 B |
@@ -0,0 +1,3 @@
|
||||
臼NG
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
After Width: | Height: | Size: 72 B |
@@ -0,0 +1,3 @@
|
||||
臼NG
|
||||
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
After Width: | Height: | Size: 72 B |
@@ -0,0 +1,3 @@
|
||||
‰PNG
|
||||
|
||||
....fakepngdata
|
||||
|
After Width: | Height: | Size: 23 B |
@@ -0,0 +1,3 @@
|
||||
‰PNG
|
||||
|
||||
....fakepngdata
|
||||
|
After Width: | Height: | Size: 23 B |
@@ -0,0 +1,3 @@
|
||||
‰PNG
|
||||
|
||||
....fakepngdata
|
||||
|
After Width: | Height: | Size: 23 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 696 B |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 618 B |
@@ -0,0 +1,661 @@
|
||||
/* required styles */
|
||||
|
||||
.leaflet-pane,
|
||||
.leaflet-tile,
|
||||
.leaflet-marker-icon,
|
||||
.leaflet-marker-shadow,
|
||||
.leaflet-tile-container,
|
||||
.leaflet-pane > svg,
|
||||
.leaflet-pane > canvas,
|
||||
.leaflet-zoom-box,
|
||||
.leaflet-image-layer,
|
||||
.leaflet-layer {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.leaflet-container {
|
||||
overflow: hidden;
|
||||
}
|
||||
.leaflet-tile,
|
||||
.leaflet-marker-icon,
|
||||
.leaflet-marker-shadow {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-user-drag: none;
|
||||
}
|
||||
/* Prevents IE11 from highlighting tiles in blue */
|
||||
.leaflet-tile::selection {
|
||||
background: transparent;
|
||||
}
|
||||
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
|
||||
.leaflet-safari .leaflet-tile {
|
||||
image-rendering: -webkit-optimize-contrast;
|
||||
}
|
||||
/* hack that prevents hw layers "stretching" when loading new tiles */
|
||||
.leaflet-safari .leaflet-tile-container {
|
||||
width: 1600px;
|
||||
height: 1600px;
|
||||
-webkit-transform-origin: 0 0;
|
||||
}
|
||||
.leaflet-marker-icon,
|
||||
.leaflet-marker-shadow {
|
||||
display: block;
|
||||
}
|
||||
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
|
||||
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
|
||||
.leaflet-container .leaflet-overlay-pane svg {
|
||||
max-width: none !important;
|
||||
max-height: none !important;
|
||||
}
|
||||
.leaflet-container .leaflet-marker-pane img,
|
||||
.leaflet-container .leaflet-shadow-pane img,
|
||||
.leaflet-container .leaflet-tile-pane img,
|
||||
.leaflet-container img.leaflet-image-layer,
|
||||
.leaflet-container .leaflet-tile {
|
||||
max-width: none !important;
|
||||
max-height: none !important;
|
||||
width: auto;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.leaflet-container img.leaflet-tile {
|
||||
/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
|
||||
mix-blend-mode: plus-lighter;
|
||||
}
|
||||
|
||||
.leaflet-container.leaflet-touch-zoom {
|
||||
-ms-touch-action: pan-x pan-y;
|
||||
touch-action: pan-x pan-y;
|
||||
}
|
||||
.leaflet-container.leaflet-touch-drag {
|
||||
-ms-touch-action: pinch-zoom;
|
||||
/* Fallback for FF which doesn't support pinch-zoom */
|
||||
touch-action: none;
|
||||
touch-action: pinch-zoom;
|
||||
}
|
||||
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
}
|
||||
.leaflet-container {
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
.leaflet-container a {
|
||||
-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
|
||||
}
|
||||
.leaflet-tile {
|
||||
filter: inherit;
|
||||
visibility: hidden;
|
||||
}
|
||||
.leaflet-tile-loaded {
|
||||
visibility: inherit;
|
||||
}
|
||||
.leaflet-zoom-box {
|
||||
width: 0;
|
||||
height: 0;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
z-index: 800;
|
||||
}
|
||||
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
|
||||
.leaflet-overlay-pane svg {
|
||||
-moz-user-select: none;
|
||||
}
|
||||
|
||||
.leaflet-pane { z-index: 400; }
|
||||
|
||||
.leaflet-tile-pane { z-index: 200; }
|
||||
.leaflet-overlay-pane { z-index: 400; }
|
||||
.leaflet-shadow-pane { z-index: 500; }
|
||||
.leaflet-marker-pane { z-index: 600; }
|
||||
.leaflet-tooltip-pane { z-index: 650; }
|
||||
.leaflet-popup-pane { z-index: 700; }
|
||||
|
||||
.leaflet-map-pane canvas { z-index: 100; }
|
||||
.leaflet-map-pane svg { z-index: 200; }
|
||||
|
||||
.leaflet-vml-shape {
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
}
|
||||
.lvml {
|
||||
behavior: url(#default#VML);
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
|
||||
/* control positioning */
|
||||
|
||||
.leaflet-control {
|
||||
position: relative;
|
||||
z-index: 800;
|
||||
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
|
||||
pointer-events: auto;
|
||||
}
|
||||
.leaflet-top,
|
||||
.leaflet-bottom {
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
pointer-events: none;
|
||||
}
|
||||
.leaflet-top {
|
||||
top: 0;
|
||||
}
|
||||
.leaflet-right {
|
||||
right: 0;
|
||||
}
|
||||
.leaflet-bottom {
|
||||
bottom: 0;
|
||||
}
|
||||
.leaflet-left {
|
||||
left: 0;
|
||||
}
|
||||
.leaflet-control {
|
||||
float: left;
|
||||
clear: both;
|
||||
}
|
||||
.leaflet-right .leaflet-control {
|
||||
float: right;
|
||||
}
|
||||
.leaflet-top .leaflet-control {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.leaflet-bottom .leaflet-control {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.leaflet-left .leaflet-control {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.leaflet-right .leaflet-control {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
|
||||
/* zoom and fade animations */
|
||||
|
||||
.leaflet-fade-anim .leaflet-popup {
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.2s linear;
|
||||
-moz-transition: opacity 0.2s linear;
|
||||
transition: opacity 0.2s linear;
|
||||
}
|
||||
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
|
||||
opacity: 1;
|
||||
}
|
||||
.leaflet-zoom-animated {
|
||||
-webkit-transform-origin: 0 0;
|
||||
-ms-transform-origin: 0 0;
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
svg.leaflet-zoom-animated {
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
||||
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
}
|
||||
.leaflet-zoom-anim .leaflet-tile,
|
||||
.leaflet-pan-anim .leaflet-tile {
|
||||
-webkit-transition: none;
|
||||
-moz-transition: none;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.leaflet-zoom-anim .leaflet-zoom-hide {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
|
||||
/* cursors */
|
||||
|
||||
.leaflet-interactive {
|
||||
cursor: pointer;
|
||||
}
|
||||
.leaflet-grab {
|
||||
cursor: -webkit-grab;
|
||||
cursor: -moz-grab;
|
||||
cursor: grab;
|
||||
}
|
||||
.leaflet-crosshair,
|
||||
.leaflet-crosshair .leaflet-interactive {
|
||||
cursor: crosshair;
|
||||
}
|
||||
.leaflet-popup-pane,
|
||||
.leaflet-control {
|
||||
cursor: auto;
|
||||
}
|
||||
.leaflet-dragging .leaflet-grab,
|
||||
.leaflet-dragging .leaflet-grab .leaflet-interactive,
|
||||
.leaflet-dragging .leaflet-marker-draggable {
|
||||
cursor: move;
|
||||
cursor: -webkit-grabbing;
|
||||
cursor: -moz-grabbing;
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
/* marker & overlays interactivity */
|
||||
.leaflet-marker-icon,
|
||||
.leaflet-marker-shadow,
|
||||
.leaflet-image-layer,
|
||||
.leaflet-pane > svg path,
|
||||
.leaflet-tile-container {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.leaflet-marker-icon.leaflet-interactive,
|
||||
.leaflet-image-layer.leaflet-interactive,
|
||||
.leaflet-pane > svg path.leaflet-interactive,
|
||||
svg.leaflet-image-layer.leaflet-interactive path {
|
||||
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
/* visual tweaks */
|
||||
|
||||
.leaflet-container {
|
||||
background: #ddd;
|
||||
outline-offset: 1px;
|
||||
}
|
||||
.leaflet-container a {
|
||||
color: #0078A8;
|
||||
}
|
||||
.leaflet-zoom-box {
|
||||
border: 2px dotted #38f;
|
||||
background: rgba(255,255,255,0.5);
|
||||
}
|
||||
|
||||
|
||||
/* general typography */
|
||||
.leaflet-container {
|
||||
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
font-size: 0.75rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
|
||||
/* general toolbar styles */
|
||||
|
||||
.leaflet-bar {
|
||||
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
|
||||
border-radius: 4px;
|
||||
}
|
||||
.leaflet-bar a {
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid #ccc;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
display: block;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
color: black;
|
||||
}
|
||||
.leaflet-bar a,
|
||||
.leaflet-control-layers-toggle {
|
||||
background-position: 50% 50%;
|
||||
background-repeat: no-repeat;
|
||||
display: block;
|
||||
}
|
||||
.leaflet-bar a:hover,
|
||||
.leaflet-bar a:focus {
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
.leaflet-bar a:first-child {
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
}
|
||||
.leaflet-bar a:last-child {
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
border-bottom: none;
|
||||
}
|
||||
.leaflet-bar a.leaflet-disabled {
|
||||
cursor: default;
|
||||
background-color: #f4f4f4;
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
.leaflet-touch .leaflet-bar a {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
.leaflet-touch .leaflet-bar a:first-child {
|
||||
border-top-left-radius: 2px;
|
||||
border-top-right-radius: 2px;
|
||||
}
|
||||
.leaflet-touch .leaflet-bar a:last-child {
|
||||
border-bottom-left-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
}
|
||||
|
||||
/* zoom control */
|
||||
|
||||
.leaflet-control-zoom-in,
|
||||
.leaflet-control-zoom-out {
|
||||
font: bold 18px 'Lucida Console', Monaco, monospace;
|
||||
text-indent: 1px;
|
||||
}
|
||||
|
||||
.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
|
||||
/* layers control */
|
||||
|
||||
.leaflet-control-layers {
|
||||
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
|
||||
background: #fff;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.leaflet-control-layers-toggle {
|
||||
background-image: url(images/layers.png);
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
}
|
||||
.leaflet-retina .leaflet-control-layers-toggle {
|
||||
background-image: url(images/layers-2x.png);
|
||||
background-size: 26px 26px;
|
||||
}
|
||||
.leaflet-touch .leaflet-control-layers-toggle {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
}
|
||||
.leaflet-control-layers .leaflet-control-layers-list,
|
||||
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
|
||||
display: none;
|
||||
}
|
||||
.leaflet-control-layers-expanded .leaflet-control-layers-list {
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
.leaflet-control-layers-expanded {
|
||||
padding: 6px 10px 6px 6px;
|
||||
color: #333;
|
||||
background: #fff;
|
||||
}
|
||||
.leaflet-control-layers-scrollbar {
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
padding-right: 5px;
|
||||
}
|
||||
.leaflet-control-layers-selector {
|
||||
margin-top: 2px;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
}
|
||||
.leaflet-control-layers label {
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
font-size: 1.08333em;
|
||||
}
|
||||
.leaflet-control-layers-separator {
|
||||
height: 0;
|
||||
border-top: 1px solid #ddd;
|
||||
margin: 5px -10px 5px -6px;
|
||||
}
|
||||
|
||||
/* Default icon URLs */
|
||||
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
|
||||
background-image: url(images/marker-icon.png);
|
||||
}
|
||||
|
||||
|
||||
/* attribution and scale controls */
|
||||
|
||||
.leaflet-container .leaflet-control-attribution {
|
||||
background: #fff;
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
margin: 0;
|
||||
}
|
||||
.leaflet-control-attribution,
|
||||
.leaflet-control-scale-line {
|
||||
padding: 0 5px;
|
||||
color: #333;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.leaflet-control-attribution a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.leaflet-control-attribution a:hover,
|
||||
.leaflet-control-attribution a:focus {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.leaflet-attribution-flag {
|
||||
display: inline !important;
|
||||
vertical-align: baseline !important;
|
||||
width: 1em;
|
||||
height: 0.6669em;
|
||||
}
|
||||
.leaflet-left .leaflet-control-scale {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.leaflet-bottom .leaflet-control-scale {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.leaflet-control-scale-line {
|
||||
border: 2px solid #777;
|
||||
border-top: none;
|
||||
line-height: 1.1;
|
||||
padding: 2px 5px 1px;
|
||||
white-space: nowrap;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
text-shadow: 1px 1px #fff;
|
||||
}
|
||||
.leaflet-control-scale-line:not(:first-child) {
|
||||
border-top: 2px solid #777;
|
||||
border-bottom: none;
|
||||
margin-top: -2px;
|
||||
}
|
||||
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
|
||||
border-bottom: 2px solid #777;
|
||||
}
|
||||
|
||||
.leaflet-touch .leaflet-control-attribution,
|
||||
.leaflet-touch .leaflet-control-layers,
|
||||
.leaflet-touch .leaflet-bar {
|
||||
box-shadow: none;
|
||||
}
|
||||
.leaflet-touch .leaflet-control-layers,
|
||||
.leaflet-touch .leaflet-bar {
|
||||
border: 2px solid rgba(0,0,0,0.2);
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
|
||||
/* popup */
|
||||
|
||||
.leaflet-popup {
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.leaflet-popup-content-wrapper {
|
||||
padding: 1px;
|
||||
text-align: left;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.leaflet-popup-content {
|
||||
margin: 13px 24px 13px 20px;
|
||||
line-height: 1.3;
|
||||
font-size: 13px;
|
||||
font-size: 1.08333em;
|
||||
min-height: 1px;
|
||||
}
|
||||
.leaflet-popup-content p {
|
||||
margin: 17px 0;
|
||||
margin: 1.3em 0;
|
||||
}
|
||||
.leaflet-popup-tip-container {
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-top: -1px;
|
||||
margin-left: -20px;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
.leaflet-popup-tip {
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
padding: 1px;
|
||||
|
||||
margin: -10px auto 0;
|
||||
pointer-events: auto;
|
||||
|
||||
-webkit-transform: rotate(45deg);
|
||||
-moz-transform: rotate(45deg);
|
||||
-ms-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
.leaflet-popup-content-wrapper,
|
||||
.leaflet-popup-tip {
|
||||
background: white;
|
||||
color: #333;
|
||||
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
|
||||
}
|
||||
.leaflet-container a.leaflet-popup-close-button {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
border: none;
|
||||
text-align: center;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
font: 16px/24px Tahoma, Verdana, sans-serif;
|
||||
color: #757575;
|
||||
text-decoration: none;
|
||||
background: transparent;
|
||||
}
|
||||
.leaflet-container a.leaflet-popup-close-button:hover,
|
||||
.leaflet-container a.leaflet-popup-close-button:focus {
|
||||
color: #585858;
|
||||
}
|
||||
.leaflet-popup-scrolled {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.leaflet-oldie .leaflet-popup-content-wrapper {
|
||||
-ms-zoom: 1;
|
||||
}
|
||||
.leaflet-oldie .leaflet-popup-tip {
|
||||
width: 24px;
|
||||
margin: 0 auto;
|
||||
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
|
||||
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
|
||||
}
|
||||
|
||||
.leaflet-oldie .leaflet-control-zoom,
|
||||
.leaflet-oldie .leaflet-control-layers,
|
||||
.leaflet-oldie .leaflet-popup-content-wrapper,
|
||||
.leaflet-oldie .leaflet-popup-tip {
|
||||
border: 1px solid #999;
|
||||
}
|
||||
|
||||
|
||||
/* div icon */
|
||||
|
||||
.leaflet-div-icon {
|
||||
background: #fff;
|
||||
border: 1px solid #666;
|
||||
}
|
||||
|
||||
|
||||
/* Tooltip */
|
||||
/* Base styles for the element that has a tooltip */
|
||||
.leaflet-tooltip {
|
||||
position: absolute;
|
||||
padding: 6px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #fff;
|
||||
border-radius: 3px;
|
||||
color: #222;
|
||||
white-space: nowrap;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
pointer-events: none;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
|
||||
}
|
||||
.leaflet-tooltip.leaflet-interactive {
|
||||
cursor: pointer;
|
||||
pointer-events: auto;
|
||||
}
|
||||
.leaflet-tooltip-top:before,
|
||||
.leaflet-tooltip-bottom:before,
|
||||
.leaflet-tooltip-left:before,
|
||||
.leaflet-tooltip-right:before {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
border: 6px solid transparent;
|
||||
background: transparent;
|
||||
content: "";
|
||||
}
|
||||
|
||||
/* Directions */
|
||||
|
||||
.leaflet-tooltip-bottom {
|
||||
margin-top: 6px;
|
||||
}
|
||||
.leaflet-tooltip-top {
|
||||
margin-top: -6px;
|
||||
}
|
||||
.leaflet-tooltip-bottom:before,
|
||||
.leaflet-tooltip-top:before {
|
||||
left: 50%;
|
||||
margin-left: -6px;
|
||||
}
|
||||
.leaflet-tooltip-top:before {
|
||||
bottom: 0;
|
||||
margin-bottom: -12px;
|
||||
border-top-color: #fff;
|
||||
}
|
||||
.leaflet-tooltip-bottom:before {
|
||||
top: 0;
|
||||
margin-top: -12px;
|
||||
margin-left: -6px;
|
||||
border-bottom-color: #fff;
|
||||
}
|
||||
.leaflet-tooltip-left {
|
||||
margin-left: -6px;
|
||||
}
|
||||
.leaflet-tooltip-right {
|
||||
margin-left: 6px;
|
||||
}
|
||||
.leaflet-tooltip-left:before,
|
||||
.leaflet-tooltip-right:before {
|
||||
top: 50%;
|
||||
margin-top: -6px;
|
||||
}
|
||||
.leaflet-tooltip-left:before {
|
||||
right: 0;
|
||||
margin-right: -12px;
|
||||
border-left-color: #fff;
|
||||
}
|
||||
.leaflet-tooltip-right:before {
|
||||
left: 0;
|
||||
margin-left: -12px;
|
||||
border-right-color: #fff;
|
||||
}
|
||||
|
||||
/* Printing */
|
||||
|
||||
@media print {
|
||||
/* Prevent printers from removing background-images of controls. */
|
||||
.leaflet-control {
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
}
|
||||