- Add Jinja2 templates with data-testid attributes for testing - Create light/dark themes based on Gitea color scheme - Add theme switching with localStorage persistence - Create base CSS, components, and layout styles - Add mock web routes for UI demonstration - Register web router and static files in main.py - Add data-testid requirements to AGENTS.md - Install jinja2 dependency
151 lines
2.5 KiB
CSS
151 lines
2.5 KiB
CSS
/* Base styles for blog application
|
|
*
|
|
* This file provides reset, typography, and base styles
|
|
* using CSS variables from theme files.
|
|
*/
|
|
|
|
/* Reset */
|
|
*,
|
|
*::before,
|
|
*::after {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
html {
|
|
font-size: 16px;
|
|
line-height: 1.5;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
background-color: var(--color-body);
|
|
color: var(--color-text);
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* Typography */
|
|
h1, h2, h3, h4, h5, h6 {
|
|
color: var(--color-text-dark);
|
|
font-weight: 600;
|
|
line-height: 1.25;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
h1 { font-size: 2rem; }
|
|
h2 { font-size: 1.75rem; }
|
|
h3 { font-size: 1.5rem; }
|
|
h4 { font-size: 1.25rem; }
|
|
h5 { font-size: 1.125rem; }
|
|
h6 { font-size: 1rem; }
|
|
|
|
p {
|
|
margin-bottom: 1rem;
|
|
color: var(--color-text);
|
|
}
|
|
|
|
a {
|
|
color: var(--color-primary);
|
|
text-decoration: none;
|
|
transition: color 0.2s ease;
|
|
}
|
|
|
|
a:hover {
|
|
color: var(--color-primary-hover);
|
|
text-decoration: underline;
|
|
}
|
|
|
|
/* Lists */
|
|
ul, ol {
|
|
margin-bottom: 1rem;
|
|
padding-left: 1.5rem;
|
|
}
|
|
|
|
li {
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
/* Code */
|
|
code {
|
|
font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace;
|
|
font-size: 0.875em;
|
|
background-color: var(--color-code-bg);
|
|
color: var(--color-text);
|
|
padding: 0.125rem 0.375rem;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
pre {
|
|
background-color: var(--color-code-bg);
|
|
padding: 1rem;
|
|
border-radius: 6px;
|
|
overflow-x: auto;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
pre code {
|
|
background: none;
|
|
padding: 0;
|
|
}
|
|
|
|
/* Selection */
|
|
::selection {
|
|
background-color: var(--color-primary-alpha-30);
|
|
color: var(--color-text-dark);
|
|
}
|
|
|
|
/* Focus styles */
|
|
:focus-visible {
|
|
outline: 2px solid var(--color-primary);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* Scrollbar */
|
|
::-webkit-scrollbar {
|
|
width: 10px;
|
|
height: 10px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background: var(--color-secondary-light-4);
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: var(--color-secondary-dark-4);
|
|
border-radius: 5px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: var(--color-secondary-dark-5);
|
|
}
|
|
|
|
/* Utility classes */
|
|
.text-light {
|
|
color: var(--color-text-light);
|
|
}
|
|
|
|
.text-muted {
|
|
color: var(--color-text-light-3);
|
|
}
|
|
|
|
.text-center {
|
|
text-align: center;
|
|
}
|
|
|
|
.sr-only {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
padding: 0;
|
|
margin: -1px;
|
|
overflow: hidden;
|
|
clip: rect(0, 0, 0, 0);
|
|
white-space: nowrap;
|
|
border: 0;
|
|
}
|