css makeover
This commit is contained in:
278
static/style.css
278
static/style.css
@@ -1,191 +1,217 @@
|
|||||||
/* --- 1. CORE THEME & VARIABLES --- */
|
/* --- 1. CORE THEME & VARIABLES --- */
|
||||||
:root {
|
:root {
|
||||||
--primary: #2563eb;
|
--bg-deep: #0a0f14;
|
||||||
--text: #1e1e1e;
|
--arduino-teal: #00979d;
|
||||||
--light-bg: #f9fafb;
|
--terminal-yellow: #ffcc00; /* Brighter, more dominant Yellow */
|
||||||
--border: #e5e7eb;
|
--panel-blue: #161e26;
|
||||||
--success: #059669; /* For AI labels */
|
--glass-border: rgba(255, 255, 255, 0.08);
|
||||||
|
--text-main: #f8fafc;
|
||||||
|
--text-dim: #94a3b8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* --- Global Reset --- */
|
||||||
|
* { box-sizing: border-box; }
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background-color: #f0ecec;
|
background-color: var(--bg-deep);
|
||||||
|
background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
|
||||||
|
background-size: 25px 25px;
|
||||||
|
color: var(--text-main);
|
||||||
|
font-family: 'Space Grotesk', sans-serif;
|
||||||
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
max-width: 1200px;
|
max-width: 1000px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --- 2. NAVIGATION & HEADER --- */
|
/* --- Navigation --- */
|
||||||
header {
|
header {
|
||||||
border-bottom: 1px solid var(--border);
|
background: rgba(10, 15, 20, 0.9);
|
||||||
padding: 1.5rem 0;
|
backdrop-filter: blur(10px);
|
||||||
background: white;
|
border-bottom: 2px solid var(--terminal-yellow);
|
||||||
|
padding: 1rem 0;
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
nav.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
font-size: 1.5rem;
|
font-size: 1.4rem;
|
||||||
font-weight: bold;
|
font-weight: 700;
|
||||||
color: var(--primary);
|
color: var(--terminal-yellow);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-links {
|
.nav-links {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 20px;
|
gap: 25px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-links a {
|
.nav-links a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: var(--text);
|
color: var(--text-dim);
|
||||||
font-weight: 500;
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
transition: 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --- 3. BLOG POST CARDS --- */
|
.nav-links a:hover { color: var(--arduino-teal); }
|
||||||
.post-item {
|
|
||||||
background: #ffffff;
|
/* --- Hero & Fixed Typewriter --- */
|
||||||
border: 1px solid var(--border);
|
.hero { padding: 80px 0 40px 0; }
|
||||||
border-radius: 12px;
|
|
||||||
padding: 24px;
|
.typewriter-wrapper {
|
||||||
margin-bottom: 20px;
|
width: fit-content; /* FIX: Prevents cursor from flying to page edge */
|
||||||
transition: all 0.3s ease;
|
margin: 0;
|
||||||
cursor: pointer;
|
|
||||||
position: relative;
|
|
||||||
top: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-item:hover {
|
.hero h2 {
|
||||||
top: -5px;
|
font-size: 2rem;
|
||||||
border-color: var(--primary);
|
color: white;
|
||||||
box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.1),
|
margin: 0;
|
||||||
0 8px 10px -6px rgba(37, 99, 235, 0.1);
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
border-right: 4px solid var(--terminal-yellow);
|
||||||
|
animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-item:hover h3 a { color: var(--primary); }
|
@keyframes typing { from { width: 0 } to { width: 100% } }
|
||||||
|
@keyframes blink { 50% { border-color: transparent } }
|
||||||
|
|
||||||
/* --- 4. INTERACTIVE DEMO COMPONENT --- */
|
/* --- AI Terminal --- */
|
||||||
.interactive-demo {
|
.interactive-demo {
|
||||||
width: 100%;
|
background: var(--panel-blue);
|
||||||
margin: 2.5rem 0;
|
border: 1px solid var(--terminal-yellow);
|
||||||
padding: 1.5rem;
|
border-radius: 4px;
|
||||||
background: #ffffff;
|
margin: 40px 0;
|
||||||
border: 1px solid var(--border);
|
box-shadow: 0 10px 40px rgba(0,0,0,0.5);
|
||||||
border-radius: 12px;
|
}
|
||||||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
|
|
||||||
|
#responseContainer {
|
||||||
|
height: 380px;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 25px;
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
background: #05070a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-group {
|
.input-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
background: var(--panel-blue);
|
||||||
margin-bottom: 1rem;
|
padding: 15px;
|
||||||
|
gap: 15px;
|
||||||
|
border-top: 1px solid var(--glass-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.interactive-demo input {
|
input#userInput {
|
||||||
flex-grow: 1;
|
flex: 1;
|
||||||
padding: 14px;
|
background: #0a0f14;
|
||||||
border-radius: 8px;
|
border: 1px solid var(--arduino-teal);
|
||||||
border: 1px solid var(--border);
|
border-radius: 4px;
|
||||||
font-size: 1rem;
|
padding: 12px;
|
||||||
|
color: var(--terminal-yellow);
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
outline: none;
|
outline: none;
|
||||||
transition: border-color 0.2s, box-shadow 0.2s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.interactive-demo input:focus {
|
#submitBtn {
|
||||||
border-color: var(--primary);
|
background: var(--terminal-yellow);
|
||||||
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
|
color: #000;
|
||||||
}
|
|
||||||
|
|
||||||
.interactive-demo button {
|
|
||||||
padding: 10px 20px;
|
|
||||||
color: white;
|
|
||||||
background-color: var(--primary);
|
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 8px;
|
padding: 0 25px;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-weight: 900;
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-weight: 600;
|
transition: 0.2s;
|
||||||
transition: transform 0.1s, opacity 0.2s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.interactive-demo button:hover:not(:disabled) {
|
#submitBtn:hover { background: white; }
|
||||||
opacity: 0.9;
|
|
||||||
transform: translateY(-1px);
|
/* --- Article Cards --- */
|
||||||
|
.post-list {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||||
|
gap: 30px;
|
||||||
|
padding-bottom: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.interactive-demo button:disabled {
|
.post-item {
|
||||||
background-color: #9ca3af;
|
background: var(--panel-blue);
|
||||||
cursor: not-allowed;
|
border: 1px solid var(--glass-border);
|
||||||
}
|
padding: 30px;
|
||||||
|
border-radius: 0; /* Boxy industrial look */
|
||||||
/* Response Box & Messages */
|
|
||||||
#responseContainer {
|
|
||||||
padding: 1.25rem;
|
|
||||||
height: 450px;
|
|
||||||
background-color: var(--light-bg);
|
|
||||||
color: var(--text);
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
border-radius: 8px;
|
|
||||||
overflow-y: auto;
|
|
||||||
font-family: 'Consolas', 'Monaco', monospace;
|
|
||||||
font-size: 0.95rem;
|
|
||||||
line-height: 1.6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.msg {
|
|
||||||
margin-bottom: 1.25rem;
|
|
||||||
padding-bottom: 0.75rem;
|
|
||||||
border-bottom: 1px solid rgba(0,0,0,0.05);
|
|
||||||
}
|
|
||||||
|
|
||||||
.msg:last-child { border-bottom: none; }
|
|
||||||
|
|
||||||
.user-label { color: var(--primary); font-weight: bold; font-size: 0.8rem; text-transform: uppercase; }
|
|
||||||
.ai-label { color: var(--success); font-weight: bold; font-size: 0.8rem; text-transform: uppercase; }
|
|
||||||
|
|
||||||
.msg-text {
|
|
||||||
display: block;
|
|
||||||
margin-top: 5px;
|
|
||||||
white-space: pre-wrap; /* Keeps formatting for lists/code */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* --- 5. ANIMATIONS & LOADERS --- */
|
|
||||||
#loader {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
flex-direction: column;
|
||||||
gap: 12px;
|
transition: 0.3s;
|
||||||
padding: 0 0 15px 5px;
|
border-left: 4px solid var(--glass-border);
|
||||||
color: var(--primary);
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.spinner {
|
.post-item:hover {
|
||||||
width: 20px;
|
border-left-color: var(--terminal-yellow);
|
||||||
height: 20px;
|
background: #1c2630;
|
||||||
border: 3px solid rgba(37, 99, 235, 0.1);
|
transform: translateX(5px);
|
||||||
border-radius: 50%;
|
|
||||||
border-top-color: var(--primary);
|
|
||||||
animation: spin 0.8s linear infinite;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes spin { to { transform: rotate(360deg); } }
|
.post-item .date {
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
/* --- 6. FOOTER --- */
|
color: var(--terminal-yellow);
|
||||||
footer {
|
font-size: 0.8rem;
|
||||||
text-align: center;
|
margin-bottom: 10px;
|
||||||
padding: 3rem 0;
|
}
|
||||||
margin-top: 4rem;
|
|
||||||
color: #9ca3af;
|
.post-item h3 { margin: 0 0 15px 0; }
|
||||||
border-top: 1px solid var(--border);
|
|
||||||
|
.post-item h3 a {
|
||||||
|
color: var(--arduino-teal);
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-item p {
|
||||||
|
color: var(--text-dim);
|
||||||
|
font-size: 0.95rem;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tags Layout Fix */
|
||||||
|
.tags {
|
||||||
|
margin-top: auto;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 10px; /* Better spacing */
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-badge {
|
||||||
|
background: rgba(0, 151, 157, 0.05);
|
||||||
|
border: 1px solid var(--arduino-teal);
|
||||||
|
color: var(--arduino-teal);
|
||||||
|
padding: 5px 12px;
|
||||||
|
font-size: 0.7rem;
|
||||||
|
text-decoration: none;
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
transition: 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-badge:hover {
|
||||||
|
background: var(--terminal-yellow);
|
||||||
|
border-color: var(--terminal-yellow);
|
||||||
|
color: #000;
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,11 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="hero">
|
<section class="hero">
|
||||||
<h2 style="color: #2563eb; margin-bottom : 10%">I write about Self-hosting, Arduino, STM32.</h2>
|
<div class="container">
|
||||||
|
<div class="typewriter-wrapper">
|
||||||
|
<h2>I write about Self-hosting, Arduino, STM32.</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<div class="post-list">
|
<div class="post-list">
|
||||||
|
|||||||
Reference in New Issue
Block a user