Files
eos-modern/public/assets/css/style.css
T
2026-04-28 02:11:53 +02:00

277 lines
5.3 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; }
}