Files
eos-modern/public/assets/css/style.css
T
2026-05-01 00:06:49 +02:00

621 lines
13 KiB
CSS

/* /srv/http/eos-modern/public/assets/css/style.css */
:root {
--bg-body: #f8f9fa;
--bg-card: #ffffff;
--text-main: #2d3436;
--text-muted: #636e72;
--primary: #734f96;
--primary-hover: #5a3d75;
--accent: #c5a3e8;
--border: #e9ecef;
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
--radius: 12px;
--font-main: "Inter", sans-serif;
--font-mono: "Fira Code", monospace;
}
[data-theme="dark"] {
--bg-body: #121212;
--bg-card: #1e1e1e;
--text-main: #e0e0e0;
--text-muted: #a0a0a0;
--primary: #9f7aea;
--primary-hover: #805ad5;
--border: #333333;
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: var(--font-main);
background-color: var(--bg-body);
color: var(--text-main);
line-height: 1.7;
transition:
background-color 0.3s ease,
color 0.3s ease;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
/* Header */
.site-header {
background-color: var(--bg-card);
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
z-index: 100;
padding: 1rem 0;
box-shadow: var(--shadow);
}
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
display: flex;
align-items: center;
text-decoration: none;
color: var(--text-main);
font-weight: 700;
font-size: 1.5rem;
}
.logo-img {
height: 40px;
margin-right: 10px;
}
.badge {
background: var(--primary);
color: white;
font-size: 0.8rem;
padding: 2px 8px;
border-radius: 20px;
margin-left: 5px;
}
.main-nav ul {
display: flex;
list-style: none;
gap: 20px;
}
.main-nav a {
text-decoration: none;
color: var(--text-main);
font-weight: 500;
transition: color 0.2s;
}
.main-nav a:hover {
color: var(--primary);
}
.header-actions {
display: flex;
align-items: center;
gap: 15px;
}
/* Search */
.search-box {
position: relative;
}
#searchInput {
padding: 8px 12px;
border-radius: 8px;
border: 1px solid var(--border);
background: var(--bg-body);
color: var(--text-main);
width: 200px;
transition: all 0.2s;
}
#searchInput:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(115, 79, 150, 0.2);
}
.search-dropdown {
position: absolute;
top: 100%;
right: 0;
width: 300px;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 8px;
margin-top: 5px;
max-height: 300px;
overflow-y: auto;
display: none;
box-shadow: var(--shadow);
z-index: 101;
}
.search-item {
padding: 10px;
border-bottom: 1px solid var(--border);
cursor: pointer;
text-decoration: none;
color: var(--text-main);
display: block;
}
.search-item:hover {
background: var(--bg-body);
}
.search-item:last-child {
border-bottom: none;
}
/* Theme Toggle */
.icon-btn {
background: none;
border: none;
color: var(--text-main);
font-size: 1.2rem;
cursor: pointer;
padding: 8px;
border-radius: 50%;
transition: background 0.2s;
}
.icon-btn:hover {
background: var(--bg-body);
}
/* Content */
.main-content {
padding: 40px 0;
}
.article-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 30px;
margin-top: 30px;
}
.article-card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 25px;
transition:
transform 0.2s,
box-shadow 0.2s;
text-decoration: none;
color: inherit;
display: flex;
flex-direction: column;
}
.article-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow);
border-color: var(--primary);
}
.article-card h3 {
color: var(--primary);
margin-bottom: 10px;
font-size: 1.25rem;
}
.article-card p {
color: var(--text-muted);
font-size: 0.95rem;
flex-grow: 1;
}
.article-meta {
font-size: 0.8rem;
color: var(--text-muted);
margin-top: 15px;
display: block;
}
/* Article Page Styles */
.article-title {
font-size: 2.5rem;
margin-bottom: 1rem;
color: var(--primary);
}
.article-date {
color: var(--text-muted);
margin-bottom: 2rem;
display: block;
}
.content-body {
font-size: 1.1rem;
}
.content-body h2,
.content-body h3 {
margin-top: 2rem;
margin-bottom: 1rem;
color: var(--text-main);
}
.content-body p {
margin-bottom: 1.5rem;
}
.content-body ul,
.content-body ol {
margin-bottom: 1.5rem;
padding-left: 20px;
}
.content-body li {
margin-bottom: 0.5rem;
}
/* Code Blocks */
pre[class*="language-"] {
border-radius: var(--radius);
margin: 1.5rem 0;
box-shadow: var(--shadow);
}
code[class*="language-"],
pre[class*="language-"] {
font-family: var(--font-mono);
font-size: 0.9rem;
}
/* Footer */
.site-footer {
background: var(--bg-card);
border-top: 1px solid var(--border);
padding: 40px 0;
margin-top: 60px;
text-align: center;
color: var(--text-muted);
}
/* Responsive */
@media (max-width: 768px) {
.header-content {
flex-direction: column;
gap: 15px;
}
.main-nav ul {
flex-wrap: wrap;
justify-content: center;
}
.article-grid {
grid-template-columns: 1fr;
}
.search-dropdown {
width: 100%;
right: 0;
left: 0;
}
}
/* --- Styly pro tabulky (OPRAVENÉ PRO VIDITELNOST RÁMEČKŮ) --- */
.table-wrapper {
overflow-x: auto;
margin: 1.5rem 0;
width: 100%;
}
.markdown-table {
width: 100%;
border-collapse: collapse;
font-size: 0.95rem;
margin-bottom: 1rem;
background-color: var(--bg-card);
box-shadow: var(--shadow);
border-radius: 8px;
overflow: hidden;
/* Přidáme jemný okraj kolem celé tabulky */
border: 1px solid var(--border);
}
.markdown-table th,
.markdown-table td {
padding: 12px 15px;
/* ZDE JE KLÍČOVÁ ZMĚNA: Použijeme explicitní barvu nebo silnější kontrast */
border: 1px solid #555555; /* Tmavě šedá, viditelná i na světlém i tmavém pozadí */
text-align: left;
vertical-align: middle;
}
/* Pro tmavý režim můžeme použít ještě světlejší barvu pro lepší kontrast */
[data-theme="dark"] .markdown-table th,
[data-theme="dark"] .markdown-table td {
border: 1px solid #666666; /* Světlejší šedá pro tmavé pozadí */
}
.markdown-table th {
background-color: var(--primary);
color: white;
font-weight: 600;
text-transform: uppercase;
font-size: 0.85rem;
letter-spacing: 0.05em;
border-bottom: 2px solid rgba(255, 255, 255, 0.5); /* Silnější čára pod hlavičkou */
}
.markdown-table tr:nth-child(even) {
background-color: rgba(0, 0, 0, 0.03);
}
[data-theme="dark"] .markdown-table tr:nth-child(even) {
background-color: rgba(255, 255, 255, 0.05);
}
.markdown-table tr:hover {
background-color: rgba(115, 79, 150, 0.1);
transition: background-color 0.2s ease;
}
@media (max-width: 600px) {
.markdown-table th,
.markdown-table td {
padding: 8px 10px;
font-size: 0.85rem;
}
}
/* --- Vylepšené styly pro odkazy --- */
a {
color: var(--primary); /* Použijeme primární barvu (fialová) */
text-decoration: none; /* Odstraníme výchozí podtržení */
font-weight: 500; /* Trochu tučnější text */
transition: all 0.2s ease; /* Plynulý přechod efektů */
border-bottom: 2px solid transparent; /* Rezervujeme místo pro podtržení */
padding-bottom: 2px; /* Aby podtržení nebylo příliš blízko textu */
}
/* Efekt při najetí myší (Hover) */
a:hover {
color: var(--primary-hover); /* Změna barvy na tmavší odstín */
border-bottom-color: var(--primary); /* Zobrazí se podtržení */
background-color: rgba(115, 79, 150, 0.1); /* Jemný podklad při najetí */
border-radius: 4px; /* Zaoblení podkladu */
padding-left: 4px; /* Jemný posun doprava pro dynamiku */
padding-right: 4px;
}
/* Styly pro odkazy v textu článku (content-body) */
.content-body a {
color: var(--primary);
text-decoration: underline; /* V textu článku můžeš chtít podtržení vidět hned */
text-decoration-thickness: 1px;
text-underline-offset: 3px; /* Posun podtržení od textu */
}
.content-body a:hover {
color: var(--primary-hover);
text-decoration-thickness: 2px;
text-decoration-color: var(--primary-hover);
}
/* Styly pro odkazy v navigaci (hlavička) */
.main-nav a {
color: var(--text-main); /* V menu zůstane barva textu */
border-bottom: none; /* V menu žádné podtržení */
padding: 8px 12px;
border-radius: 6px;
transition:
background-color 0.2s ease,
color 0.2s ease;
}
.main-nav a:hover {
color: var(--primary);
background-color: rgba(115, 79, 150, 0.1);
}
/* Styly pro odkazy v patičce a meta datech */
.article-meta a,
.site-footer a {
color: var(--text-muted);
text-decoration: none;
font-size: 0.9em;
}
.article-meta a:hover,
.site-footer a:hover {
color: var(--primary);
text-decoration: underline;
}
/* --- Vylepšení pro tlačítko Sdílet --- */
#shareButton {
position: relative;
z-index: 102; /* Nad search dropdown */
}
#shareButton:hover {
background: var(--primary);
color: white;
transform: scale(1.1);
transition: all 0.2s ease;
}
/* Tooltip pro sdílení */
#shareButton::after {
content: 'Sdílet';
position: absolute;
bottom: -30px;
left: 50%;
transform: translateX(-50%);
background: var(--text-main);
color: var(--bg-card);
padding: 4px 8px;
border-radius: 4px;
font-size: 0.75rem;
opacity: 0;
pointer-events: none;
transition: opacity 0.2s;
white-space: nowrap;
}
#shareButton:hover::after {
opacity: 1;
}
/* --- Zlepšení viditelnosti tlačítek --- */
.icon-btn {
background: none;
border: 1px solid var(--border); /* Přidáme jemný okraj pro viditelnost */
color: var(--text-main);
font-size: 1.1rem;
cursor: pointer;
padding: 8px 10px;
border-radius: 8px;
transition: all 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
}
/* Tlačítko Sdílet - zvýraznění */
#shareButton {
margin-right: 5px;
}
#shareButton:hover {
background: var(--primary);
color: white;
border-color: var(--primary);
transform: scale(1.05);
}
/* Tlačítko Téma */
#themeToggle:hover {
background: var(--bg-body);
color: var(--primary);
}
/* Ujistě se, že ikony jsou vidět */
.icon-btn i {
font-size: 1rem;
}
/* --- Vylepšení pro světlý režim (Light Mode) --- */
[data-theme="light"] .icon-btn {
border: 1px solid #d1d5db; /* Jemný šedý okraj pro viditelnost */
background: transparent; /* Průhledné pozadí */
}
[data-theme="light"] .icon-btn:hover {
background: #f3f4f6; /* Jemně šedé pozadí při najetí (ne bílé) */
border-color: var(--primary); /* Okraj se změní na fialovou */
color: var(--primary); /* Ikona se změní na fialovou */
}
/* Pro tmavý režim necháme původní chování */
[data-theme="dark"] .icon-btn {
border: 1px solid #333333;
background: transparent;
}
[data-theme="dark"] .icon-btn:hover {
background: #2d2d2d; /* Tmavě šedé pozadí */
border-color: var(--primary);
color: var(--primary);
}
/* --- Styly pro Cheatsheets (Krátké návody) --- */
.cheatsheet-container {
display: flex;
flex-direction: column;
gap: 40px;
margin-top: 20px;
}
.cheatsheet-section {
background: var(--bg-card);
padding: 25px;
border-radius: var(--radius);
border: 1px solid var(--border);
box-shadow: var(--shadow);
transition: transform 0.2s ease;
}
.cheatsheet-section:hover {
transform: translateY(-2px);
box-shadow: 0 6px 12px -1px rgba(0, 0, 0, 0.15);
}
.cheatsheet-section h2 {
color: var(--primary);
margin-bottom: 20px;
border-bottom: 2px solid var(--accent);
padding-bottom: 10px;
font-size: 1.5rem;
}
.cheatsheet-section table {
width: 100%;
border-collapse: collapse;
font-size: 0.95rem;
}
.cheatsheet-section th,
.cheatsheet-section td {
padding: 12px 15px;
text-align: left;
border-bottom: 1px solid var(--border);
}
.cheatsheet-section th {
background-color: rgba(115, 79, 150, 0.05);
color: var(--text-main);
font-weight: 600;
}
.cheatsheet-section tr:last-child td {
border-bottom: none;
}
.cheatsheet-section tr:hover {
background-color: rgba(115, 79, 150, 0.05);
}
.cheatsheet-section code {
background-color: rgba(115, 79, 150, 0.1);
color: var(--primary);
padding: 2px 6px;
border-radius: 4px;
font-family: var(--font-mono);
font-size: 0.9em;
font-weight: 500;
}
/* Responsivita pro Cheatsheets */
@media (max-width: 768px) {
.cheatsheet-section {
padding: 15px;
}
.cheatsheet-section table {
font-size: 0.85rem;
}
.cheatsheet-section th,
.cheatsheet-section td {
padding: 8px 10px;
}
}