Initial static site implementation
- Node.js build script with gray-matter and marked - Self-hosted fonts (DM Serif Display, Karla) - Swedish badge system for origin transparency - Filtering by category, region, tags, and search - URL-based filter state for shareable links - Individual entry pages - About and badge info pages - Privacy-focused: no cookies, no tracking, no external requests - Hosted in Lerum, Sweden
This commit is contained in:
194
public/filter.js
Normal file
194
public/filter.js
Normal file
@@ -0,0 +1,194 @@
|
||||
// Ursprung Sverige - Filtering functionality
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
const categoryFilter = document.getElementById('category-filter');
|
||||
const regionFilter = document.getElementById('region-filter');
|
||||
const tagFilter = document.getElementById('tag-filter');
|
||||
const searchInput = document.getElementById('search-input');
|
||||
const clearFiltersBtn = document.getElementById('clear-filters');
|
||||
const entriesGrid = document.getElementById('entries-grid');
|
||||
const visibleCount = document.getElementById('visible-count');
|
||||
const noResults = document.getElementById('no-results');
|
||||
|
||||
if (!entriesGrid) return;
|
||||
|
||||
const entries = Array.from(entriesGrid.querySelectorAll('.entry-card'));
|
||||
|
||||
// Update URL with current filter state
|
||||
function updateURL() {
|
||||
const params = new URLSearchParams();
|
||||
|
||||
if (categoryFilter?.value) {
|
||||
params.set('category', categoryFilter.value);
|
||||
}
|
||||
if (regionFilter?.value) {
|
||||
params.set('region', regionFilter.value);
|
||||
}
|
||||
if (tagFilter?.value) {
|
||||
params.set('tag', tagFilter.value);
|
||||
}
|
||||
if (searchInput?.value.trim()) {
|
||||
params.set('search', searchInput.value.trim());
|
||||
}
|
||||
|
||||
const queryString = params.toString();
|
||||
const newURL = queryString
|
||||
? `${window.location.pathname}?${queryString}`
|
||||
: window.location.pathname;
|
||||
|
||||
window.history.replaceState({}, '', newURL);
|
||||
}
|
||||
|
||||
// Apply filters from URL on page load
|
||||
function applyFiltersFromURL() {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
|
||||
if (params.has('category') && categoryFilter) {
|
||||
categoryFilter.value = params.get('category');
|
||||
}
|
||||
if (params.has('region') && regionFilter) {
|
||||
regionFilter.value = params.get('region');
|
||||
}
|
||||
if (params.has('tag') && tagFilter) {
|
||||
tagFilter.value = params.get('tag');
|
||||
}
|
||||
if (params.has('search') && searchInput) {
|
||||
searchInput.value = params.get('search');
|
||||
}
|
||||
|
||||
filterEntries(false); // Don't update URL on initial load
|
||||
}
|
||||
|
||||
function filterEntries(shouldUpdateURL = true) {
|
||||
const categoryValue = categoryFilter?.value.toLowerCase() || '';
|
||||
const regionValue = regionFilter?.value.toLowerCase() || '';
|
||||
const tagValue = tagFilter?.value.toLowerCase() || '';
|
||||
const searchValue = searchInput?.value.toLowerCase().trim() || '';
|
||||
|
||||
let visibleEntries = 0;
|
||||
|
||||
entries.forEach(entry => {
|
||||
const entryCategory = (entry.dataset.category || '').toLowerCase();
|
||||
const entryRegion = (entry.dataset.region || '').toLowerCase();
|
||||
const entryTags = (entry.dataset.tags || '').toLowerCase().split(',');
|
||||
const entryText = entry.textContent.toLowerCase();
|
||||
|
||||
const matchesCategory = !categoryValue || entryCategory === categoryValue;
|
||||
const matchesRegion = !regionValue || entryRegion === regionValue;
|
||||
const matchesTag = !tagValue || entryTags.includes(tagValue);
|
||||
const matchesSearch = !searchValue || entryText.includes(searchValue);
|
||||
|
||||
const isVisible = matchesCategory && matchesRegion && matchesTag && matchesSearch;
|
||||
|
||||
entry.hidden = !isVisible;
|
||||
if (isVisible) visibleEntries++;
|
||||
});
|
||||
|
||||
if (visibleCount) {
|
||||
visibleCount.textContent = visibleEntries;
|
||||
}
|
||||
|
||||
if (noResults) {
|
||||
noResults.hidden = visibleEntries > 0;
|
||||
}
|
||||
|
||||
if (entriesGrid) {
|
||||
entriesGrid.hidden = visibleEntries === 0;
|
||||
}
|
||||
|
||||
updateClearButtonVisibility();
|
||||
|
||||
if (shouldUpdateURL) {
|
||||
updateURL();
|
||||
}
|
||||
}
|
||||
|
||||
function updateClearButtonVisibility() {
|
||||
if (!clearFiltersBtn) return;
|
||||
|
||||
const hasFilters =
|
||||
(categoryFilter?.value || '') !== '' ||
|
||||
(regionFilter?.value || '') !== '' ||
|
||||
(tagFilter?.value || '') !== '' ||
|
||||
(searchInput?.value || '') !== '';
|
||||
|
||||
clearFiltersBtn.hidden = !hasFilters;
|
||||
}
|
||||
|
||||
function clearFilters() {
|
||||
if (categoryFilter) categoryFilter.value = '';
|
||||
if (regionFilter) regionFilter.value = '';
|
||||
if (tagFilter) tagFilter.value = '';
|
||||
if (searchInput) searchInput.value = '';
|
||||
|
||||
filterEntries(); // This will also clear the URL
|
||||
}
|
||||
|
||||
// Handle clicking on filter buttons in cards
|
||||
function handleFilterClick(e) {
|
||||
const btn = e.target.closest('.filter-btn');
|
||||
if (!btn) return;
|
||||
|
||||
const filterType = btn.dataset.filterType;
|
||||
const filterValue = btn.dataset.filterValue;
|
||||
|
||||
if (filterType === 'category' && categoryFilter) {
|
||||
categoryFilter.value = filterValue;
|
||||
} else if (filterType === 'region' && regionFilter) {
|
||||
regionFilter.value = filterValue;
|
||||
} else if (filterType === 'tag' && tagFilter) {
|
||||
tagFilter.value = filterValue;
|
||||
}
|
||||
|
||||
filterEntries();
|
||||
|
||||
// Scroll to top to see filtered results
|
||||
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||
}
|
||||
|
||||
// Handle browser back/forward
|
||||
window.addEventListener('popstate', () => {
|
||||
applyFiltersFromURL();
|
||||
});
|
||||
|
||||
// Debounce for search input
|
||||
function debounce(func, wait) {
|
||||
let timeout;
|
||||
return function(...args) {
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(() => func.apply(this, args), wait);
|
||||
};
|
||||
}
|
||||
|
||||
// Event listeners
|
||||
if (categoryFilter) {
|
||||
categoryFilter.addEventListener('change', () => filterEntries());
|
||||
}
|
||||
|
||||
if (regionFilter) {
|
||||
regionFilter.addEventListener('change', () => filterEntries());
|
||||
}
|
||||
|
||||
if (tagFilter) {
|
||||
tagFilter.addEventListener('change', () => filterEntries());
|
||||
}
|
||||
|
||||
if (searchInput) {
|
||||
searchInput.addEventListener('input', debounce(() => filterEntries(), 300));
|
||||
}
|
||||
|
||||
if (clearFiltersBtn) {
|
||||
clearFiltersBtn.addEventListener('click', clearFilters);
|
||||
}
|
||||
|
||||
// Delegate click events for filter buttons in cards
|
||||
if (entriesGrid) {
|
||||
entriesGrid.addEventListener('click', handleFilterClick);
|
||||
}
|
||||
|
||||
// Apply URL filters on load
|
||||
applyFiltersFromURL();
|
||||
updateClearButtonVisibility();
|
||||
})();
|
||||
BIN
public/fonts/DMSerifDisplay-Regular.ttf
Normal file
BIN
public/fonts/DMSerifDisplay-Regular.ttf
Normal file
Binary file not shown.
BIN
public/fonts/Karla-Variable.ttf
Normal file
BIN
public/fonts/Karla-Variable.ttf
Normal file
Binary file not shown.
840
public/styles.css
Normal file
840
public/styles.css
Normal file
@@ -0,0 +1,840 @@
|
||||
/* Ursprung Sverige - Scandinavian Minimal Design */
|
||||
|
||||
/* Self-hosted fonts - DM Serif Display */
|
||||
@font-face {
|
||||
font-family: 'DM Serif Display';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url('fonts/DMSerifDisplay-Regular.ttf') format('truetype');
|
||||
}
|
||||
|
||||
/* Self-hosted fonts - Karla (variable font) */
|
||||
@font-face {
|
||||
font-family: 'Karla';
|
||||
font-style: normal;
|
||||
font-weight: 200 800;
|
||||
font-display: swap;
|
||||
src: url('fonts/Karla-Variable.ttf') format('truetype');
|
||||
}
|
||||
|
||||
:root {
|
||||
/* Swedish-inspired palette */
|
||||
--color-bg: #faf9f7;
|
||||
--color-bg-alt: #f0eeea;
|
||||
--color-text: #1a1a1a;
|
||||
--color-text-muted: #5a5a5a;
|
||||
--color-accent: #005baa;
|
||||
--color-accent-gold: #fecc00;
|
||||
--color-border: #d8d4cc;
|
||||
--color-card-bg: #ffffff;
|
||||
|
||||
/* Badge tier colors */
|
||||
--badge-tier-1-bg: linear-gradient(135deg, #c9a227 0%, #f4d03f 50%, #c9a227 100%);
|
||||
--badge-tier-1-text: #1a1a1a;
|
||||
--badge-tier-2-bg: linear-gradient(135deg, #7b8a8b 0%, #bdc3c7 50%, #7b8a8b 100%);
|
||||
--badge-tier-2-text: #1a1a1a;
|
||||
--badge-tier-3-bg: linear-gradient(135deg, #a0522d 0%, #cd853f 50%, #a0522d 100%);
|
||||
--badge-tier-3-text: #ffffff;
|
||||
--badge-tier-4-bg: var(--color-accent);
|
||||
--badge-tier-4-text: #ffffff;
|
||||
|
||||
/* Typography */
|
||||
--font-display: 'DM Serif Display', Georgia, serif;
|
||||
--font-body: 'Karla', -apple-system, BlinkMacSystemFont, sans-serif;
|
||||
|
||||
/* Spacing */
|
||||
--space-xs: 0.25rem;
|
||||
--space-sm: 0.5rem;
|
||||
--space-md: 1rem;
|
||||
--space-lg: 2rem;
|
||||
--space-xl: 4rem;
|
||||
|
||||
/* Sizes */
|
||||
--max-width: 1200px;
|
||||
--border-radius: 4px;
|
||||
}
|
||||
|
||||
/* Reset */
|
||||
*, *::before, *::after {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Base */
|
||||
html {
|
||||
font-size: 16px;
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: var(--font-body);
|
||||
background-color: var(--color-bg);
|
||||
color: var(--color-text);
|
||||
line-height: 1.6;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
padding: 0 var(--space-lg);
|
||||
}
|
||||
|
||||
.container--narrow {
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
.site-header {
|
||||
background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
|
||||
padding: var(--space-xl) 0;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.site-header--single {
|
||||
padding: var(--space-lg) 0;
|
||||
}
|
||||
|
||||
.site-header .container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: var(--space-lg);
|
||||
}
|
||||
|
||||
.header-content {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.site-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: clamp(2rem, 5vw, 3.5rem);
|
||||
font-weight: 400;
|
||||
color: var(--color-text);
|
||||
letter-spacing: -0.02em;
|
||||
margin-bottom: var(--space-sm);
|
||||
}
|
||||
|
||||
.site-title--small {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.site-title-link {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.site-title-link:hover .site-title {
|
||||
color: var(--color-accent);
|
||||
}
|
||||
|
||||
.site-subtitle {
|
||||
font-size: 1.125rem;
|
||||
color: var(--color-text-muted);
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
.header-decoration {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sweden-motif {
|
||||
width: 80px;
|
||||
height: 48px;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
/* Filters */
|
||||
.filter-section {
|
||||
padding: var(--space-lg) 0;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
margin-bottom: var(--space-lg);
|
||||
}
|
||||
|
||||
.filters {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-md);
|
||||
margin-bottom: var(--space-md);
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.filter-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-xs);
|
||||
}
|
||||
|
||||
.filter-group label {
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.filter-group select,
|
||||
.filter-group input {
|
||||
font-family: var(--font-body);
|
||||
font-size: 0.9375rem;
|
||||
padding: var(--space-sm) var(--space-md);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--border-radius);
|
||||
background-color: var(--color-card-bg);
|
||||
color: var(--color-text);
|
||||
min-width: 160px;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.filter-group select:hover,
|
||||
.filter-group input:hover {
|
||||
border-color: var(--color-accent);
|
||||
}
|
||||
|
||||
.filter-group select:focus,
|
||||
.filter-group input:focus {
|
||||
outline: none;
|
||||
border-color: var(--color-accent);
|
||||
box-shadow: 0 0 0 3px rgba(0, 91, 170, 0.1);
|
||||
}
|
||||
|
||||
.clear-filters-btn {
|
||||
font-family: var(--font-body);
|
||||
font-size: 0.875rem;
|
||||
padding: var(--space-sm) var(--space-md);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--border-radius);
|
||||
background-color: var(--color-bg-alt);
|
||||
color: var(--color-text-muted);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.clear-filters-btn:hover {
|
||||
background-color: var(--color-text);
|
||||
color: var(--color-bg);
|
||||
border-color: var(--color-text);
|
||||
}
|
||||
|
||||
.filter-footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-sm);
|
||||
}
|
||||
|
||||
.entry-count {
|
||||
font-size: 0.875rem;
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.badges-info-link {
|
||||
font-size: 0.875rem;
|
||||
color: var(--color-accent);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.badges-info-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Main content */
|
||||
.site-main {
|
||||
flex: 1;
|
||||
padding-bottom: var(--space-xl);
|
||||
}
|
||||
|
||||
.site-main--single {
|
||||
padding-top: var(--space-lg);
|
||||
}
|
||||
|
||||
/* Entry cards grid */
|
||||
.entries-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
||||
gap: var(--space-lg);
|
||||
}
|
||||
|
||||
.entry-card {
|
||||
background: var(--color-card-bg);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--border-radius);
|
||||
overflow: hidden;
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.entry-card:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.entry-image {
|
||||
aspect-ratio: 16/9;
|
||||
overflow: hidden;
|
||||
background: var(--color-bg-alt);
|
||||
}
|
||||
|
||||
.entry-image img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.entry-card-content {
|
||||
padding: var(--space-lg);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.entry-header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: var(--space-md);
|
||||
margin-bottom: var(--space-sm);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.entry-logo {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
object-fit: contain;
|
||||
border-radius: var(--border-radius);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.entry-card h2 {
|
||||
font-family: var(--font-display);
|
||||
font-size: 1.5rem;
|
||||
font-weight: 400;
|
||||
color: var(--color-text);
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.entry-card h2 a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.entry-card h2 a:hover {
|
||||
color: var(--color-accent);
|
||||
}
|
||||
|
||||
/* Badges */
|
||||
.badge {
|
||||
display: inline-block;
|
||||
font-family: var(--font-body);
|
||||
font-size: 0.6875rem;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
padding: 0.25rem 0.5rem;
|
||||
border-radius: 3px;
|
||||
white-space: nowrap;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.badge-tier-1 {
|
||||
background: var(--badge-tier-1-bg);
|
||||
color: var(--badge-tier-1-text);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.badge-tier-2 {
|
||||
background: var(--badge-tier-2-bg);
|
||||
color: var(--badge-tier-2-text);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.badge-tier-3 {
|
||||
background: var(--badge-tier-3-bg);
|
||||
color: var(--badge-tier-3-text);
|
||||
}
|
||||
|
||||
.badge-tier-4 {
|
||||
background: var(--badge-tier-4-bg);
|
||||
color: var(--badge-tier-4-text);
|
||||
}
|
||||
|
||||
.entry-meta {
|
||||
display: flex;
|
||||
gap: var(--space-sm);
|
||||
margin-bottom: var(--space-md);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.entry-meta .filter-btn,
|
||||
.filter-link {
|
||||
font-family: var(--font-body);
|
||||
font-size: 0.75rem;
|
||||
font-weight: 500;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
padding: var(--space-xs) var(--space-sm);
|
||||
border-radius: var(--border-radius);
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: opacity 0.2s ease, transform 0.1s ease;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.entry-meta .filter-btn:hover,
|
||||
.filter-link:hover {
|
||||
opacity: 0.8;
|
||||
transform: scale(1.02);
|
||||
}
|
||||
|
||||
.entry-meta .category,
|
||||
.filter-link.category {
|
||||
background: var(--color-accent);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.entry-meta .region,
|
||||
.filter-link.region {
|
||||
background: var(--color-accent-gold);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.entry-body {
|
||||
color: var(--color-text-muted);
|
||||
margin-bottom: var(--space-md);
|
||||
font-size: 0.9375rem;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.entry-body p {
|
||||
margin-bottom: var(--space-sm);
|
||||
}
|
||||
|
||||
.entry-body p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.website-link {
|
||||
display: inline-block;
|
||||
color: var(--color-accent);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
font-size: 0.875rem;
|
||||
margin-bottom: var(--space-md);
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
|
||||
.website-link:hover {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-xs);
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.tag {
|
||||
font-family: var(--font-body);
|
||||
font-size: 0.75rem;
|
||||
color: var(--color-text-muted);
|
||||
background: var(--color-bg-alt);
|
||||
padding: var(--space-xs) var(--space-sm);
|
||||
border-radius: var(--border-radius);
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s ease, color 0.2s ease;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.tag:hover {
|
||||
background: var(--color-accent);
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* No results */
|
||||
.no-results {
|
||||
text-align: center;
|
||||
padding: var(--space-xl);
|
||||
color: var(--color-text-muted);
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
|
||||
/* Hidden utility */
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Single entry page */
|
||||
.single-entry {
|
||||
background: var(--color-card-bg);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--border-radius);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.single-image {
|
||||
aspect-ratio: 21/9;
|
||||
overflow: hidden;
|
||||
background: var(--color-bg-alt);
|
||||
}
|
||||
|
||||
.single-image img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.single-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-lg);
|
||||
padding: var(--space-lg);
|
||||
padding-bottom: var(--space-sm);
|
||||
}
|
||||
|
||||
.single-logo {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
object-fit: contain;
|
||||
border-radius: var(--border-radius);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.single-title-wrapper {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.single-header h1 {
|
||||
font-family: var(--font-display);
|
||||
font-size: clamp(1.75rem, 4vw, 2.5rem);
|
||||
font-weight: 400;
|
||||
color: var(--color-text);
|
||||
margin-bottom: var(--space-xs);
|
||||
}
|
||||
|
||||
.single-header .badge {
|
||||
font-size: 0.75rem;
|
||||
padding: 0.375rem 0.75rem;
|
||||
}
|
||||
|
||||
.single-meta {
|
||||
display: flex;
|
||||
gap: var(--space-sm);
|
||||
padding: 0 var(--space-lg);
|
||||
margin-bottom: var(--space-lg);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.single-body {
|
||||
padding: 0 var(--space-lg);
|
||||
margin-bottom: var(--space-lg);
|
||||
font-size: 1.0625rem;
|
||||
line-height: 1.7;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.single-body p {
|
||||
margin-bottom: var(--space-md);
|
||||
}
|
||||
|
||||
.single-entry .website-link {
|
||||
display: block;
|
||||
padding: 0 var(--space-lg);
|
||||
margin-bottom: var(--space-lg);
|
||||
}
|
||||
|
||||
.single-entry .tags {
|
||||
padding: 0 var(--space-lg);
|
||||
margin-bottom: var(--space-lg);
|
||||
}
|
||||
|
||||
.back-link {
|
||||
display: block;
|
||||
padding: var(--space-md) var(--space-lg);
|
||||
background: var(--color-bg-alt);
|
||||
color: var(--color-text-muted);
|
||||
text-decoration: none;
|
||||
font-size: 0.875rem;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.back-link:hover {
|
||||
color: var(--color-accent);
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
.site-footer {
|
||||
background: var(--color-bg-alt);
|
||||
border-top: 1px solid var(--color-border);
|
||||
padding: var(--space-lg) 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.site-footer p {
|
||||
font-size: 0.875rem;
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.footer-tagline {
|
||||
margin-top: var(--space-xs);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.footer-nav {
|
||||
margin-top: var(--space-md);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: var(--space-lg);
|
||||
}
|
||||
|
||||
.footer-nav a {
|
||||
color: var(--color-text-muted);
|
||||
text-decoration: none;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.footer-nav a:hover {
|
||||
color: var(--color-accent);
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 768px) {
|
||||
.site-header .container {
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.header-decoration {
|
||||
order: -1;
|
||||
}
|
||||
|
||||
.site-subtitle {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.filters {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.filter-group select,
|
||||
.filter-group input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.clear-filters-btn {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.entries-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.single-header {
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
/* About page */
|
||||
.about-page {
|
||||
background: var(--color-card-bg);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--border-radius);
|
||||
padding: var(--space-lg);
|
||||
}
|
||||
|
||||
.about-page h1 {
|
||||
font-family: var(--font-display);
|
||||
font-size: clamp(1.75rem, 4vw, 2.5rem);
|
||||
font-weight: 400;
|
||||
margin-bottom: var(--space-lg);
|
||||
}
|
||||
|
||||
.about-section {
|
||||
margin-bottom: var(--space-lg);
|
||||
padding-bottom: var(--space-lg);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.about-section:last-of-type {
|
||||
border-bottom: none;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.about-section h2 {
|
||||
font-family: var(--font-display);
|
||||
font-size: 1.25rem;
|
||||
font-weight: 400;
|
||||
margin-bottom: var(--space-md);
|
||||
}
|
||||
|
||||
.about-section p {
|
||||
margin-bottom: var(--space-sm);
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.about-section ul {
|
||||
list-style: none;
|
||||
margin: var(--space-md) 0;
|
||||
}
|
||||
|
||||
.about-section li {
|
||||
padding: var(--space-sm) 0;
|
||||
padding-left: var(--space-lg);
|
||||
position: relative;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.about-section li::before {
|
||||
content: '✓';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
color: var(--color-accent);
|
||||
}
|
||||
|
||||
.about-page .back-link {
|
||||
display: inline-block;
|
||||
margin-top: var(--space-lg);
|
||||
color: var(--color-text-muted);
|
||||
text-decoration: none;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.about-page .back-link:hover {
|
||||
color: var(--color-accent);
|
||||
}
|
||||
|
||||
/* Badges info page */
|
||||
.badges-page {
|
||||
background: var(--color-card-bg);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--border-radius);
|
||||
padding: var(--space-lg);
|
||||
}
|
||||
|
||||
.badges-page h1 {
|
||||
font-family: var(--font-display);
|
||||
font-size: clamp(1.75rem, 4vw, 2.5rem);
|
||||
font-weight: 400;
|
||||
margin-bottom: var(--space-md);
|
||||
}
|
||||
|
||||
.badges-page .intro {
|
||||
font-size: 1.125rem;
|
||||
color: var(--color-text-muted);
|
||||
margin-bottom: var(--space-xl);
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.badge-tier-section {
|
||||
margin-bottom: var(--space-lg);
|
||||
padding-bottom: var(--space-lg);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.badge-tier-section:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.badge-tier-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-sm);
|
||||
margin-bottom: var(--space-md);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.tier-label {
|
||||
font-size: 0.75rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--color-text-muted);
|
||||
background: var(--color-bg-alt);
|
||||
padding: var(--space-xs) var(--space-sm);
|
||||
border-radius: var(--border-radius);
|
||||
}
|
||||
|
||||
.badge-tier-section p {
|
||||
margin-bottom: var(--space-sm);
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.badge-tier-section .criteria {
|
||||
font-size: 0.875rem;
|
||||
color: var(--color-text-muted);
|
||||
background: var(--color-bg-alt);
|
||||
padding: var(--space-sm) var(--space-md);
|
||||
border-radius: var(--border-radius);
|
||||
margin-top: var(--space-md);
|
||||
}
|
||||
|
||||
.why-section {
|
||||
margin-top: var(--space-xl);
|
||||
padding-top: var(--space-lg);
|
||||
border-top: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.why-section h2 {
|
||||
font-family: var(--font-display);
|
||||
font-size: 1.5rem;
|
||||
font-weight: 400;
|
||||
margin-bottom: var(--space-md);
|
||||
}
|
||||
|
||||
.why-section ul {
|
||||
list-style: none;
|
||||
margin: var(--space-md) 0;
|
||||
}
|
||||
|
||||
.why-section li {
|
||||
padding: var(--space-sm) 0;
|
||||
padding-left: var(--space-lg);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.why-section li::before {
|
||||
content: '→';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
color: var(--color-accent);
|
||||
}
|
||||
|
||||
.badges-page .back-link {
|
||||
display: inline-block;
|
||||
margin-top: var(--space-lg);
|
||||
color: var(--color-text-muted);
|
||||
text-decoration: none;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.badges-page .back-link:hover {
|
||||
color: var(--color-accent);
|
||||
}
|
||||
|
||||
/* Print styles */
|
||||
@media print {
|
||||
.filter-section,
|
||||
.header-decoration,
|
||||
.back-link {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.entry-card {
|
||||
break-inside: avoid;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user