add: dark mode

This commit is contained in:
2026-05-29 21:26:22 -07:00
parent ac09a31961
commit 93101b1503
5 changed files with 60 additions and 44 deletions
+8 -8
View File
@@ -10,11 +10,11 @@
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, sans-serif; "Helvetica Neue", Arial, sans-serif;
line-height: 1.6; line-height: 1.6;
color: #333; color: #e6edf3;
max-width: 1000px; max-width: 1000px;
margin: 0 auto; margin: 0 auto;
padding: 2rem; padding: 2rem;
background-color: #f4f7f9; background-color: #0d1117;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
@@ -24,18 +24,18 @@
margin-bottom: 2rem; margin-bottom: 2rem;
} }
h1 { h1 {
color: #2c3e50; color: #e6edf3;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
} }
.date { .date {
color: #7f8c8d; color: #8b949e;
font-style: italic; font-style: italic;
} }
.pdf-container { .pdf-container {
width: 100%; width: 100%;
height: 80vh; height: 80vh;
border: 1px solid #ccc; border: 1px solid #21262d;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
} }
@@ -47,14 +47,14 @@
.btn { .btn {
display: inline-block; display: inline-block;
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
background-color: #3498db; background-color: #1f6feb;
color: white; color: white;
text-decoration: none; text-decoration: none;
border-radius: 4px; border-radius: 4px;
transition: background-color 0.2s; transition: background-color 0.2s;
} }
.btn:hover { .btn:hover {
background-color: #2980b9; background-color: #388bfd;
} }
</style> </style>
</head> </head>
View File
+22 -17
View File
@@ -14,16 +14,19 @@
margin: 0 auto; margin: 0 auto;
padding: 2rem; padding: 2rem;
line-height: 1.5; line-height: 1.5;
background: #0d1117;
color: #e6edf3;
} }
h1 { h1 {
border-bottom: 2px solid #eaecef; border-bottom: 2px solid #21262d;
padding-bottom: 0.3em; padding-bottom: 0.3em;
} }
.event { .event {
padding: 1rem; padding: 1rem;
border: 1px solid #eaecef; border: 1px solid #21262d;
border-radius: 6px; border-radius: 6px;
margin-bottom: 1rem; margin-bottom: 1rem;
background: #161b22;
} }
.event-title { .event-title {
font-weight: bold; font-weight: bold;
@@ -31,13 +34,13 @@
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
} }
.event-details { .event-details {
color: #586069; color: #8b949e;
font-size: 0.9rem; font-size: 0.9rem;
} }
.btn { .btn {
display: inline-block; display: inline-block;
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
background-color: #0366d6; background-color: #1f6feb;
color: white; color: white;
text-decoration: none; text-decoration: none;
border-radius: 6px; border-radius: 6px;
@@ -45,19 +48,19 @@
margin-top: 1rem; margin-top: 1rem;
} }
.btn:hover { .btn:hover {
background-color: #0256b6; background-color: #388bfd;
} }
a.back { a.back {
display: block; display: block;
margin-bottom: 1rem; margin-bottom: 1rem;
color: #0366d6; color: #58a6ff;
text-decoration: none; text-decoration: none;
} }
.google-sub { .google-sub {
margin-top: 2rem; margin-top: 2rem;
padding: 1.5rem; padding: 1.5rem;
background-color: #f6f8fa; background-color: #161b22;
border: 1px solid #eaecef; border: 1px solid #21262d;
border-radius: 6px; border-radius: 6px;
} }
.google-sub h3 { .google-sub h3 {
@@ -68,9 +71,9 @@
display: flex; display: flex;
gap: 0.5rem; gap: 0.5rem;
align-items: center; align-items: center;
background: white; background: #0d1117;
padding: 0.5rem; padding: 0.5rem;
border: 1px solid #d1d5da; border: 1px solid #30363d;
border-radius: 4px; border-radius: 4px;
margin: 1rem 0; margin: 1rem 0;
} }
@@ -81,22 +84,24 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
color: #e6edf3;
} }
.btn-copy { .btn-copy {
padding: 0.3rem 0.6rem; padding: 0.3rem 0.6rem;
background-color: #fafbfc; background-color: #21262d;
border: 1px solid #d1d5da; border: 1px solid #30363d;
border-radius: 4px; border-radius: 4px;
cursor: pointer; cursor: pointer;
font-size: 0.8rem; font-size: 0.8rem;
font-weight: bold; font-weight: bold;
color: #e6edf3;
} }
.btn-copy:hover { .btn-copy:hover {
background-color: #f3f4f6; background-color: #30363d;
} }
.hint { .hint {
font-size: 0.85rem; font-size: 0.85rem;
color: #586069; color: #8b949e;
} }
</style> </style>
</head> </head>
@@ -112,7 +117,7 @@
<strong>Location:</strong> Google CRSM1240, Sunnyvale CA 94089 <strong>Location:</strong> Google CRSM1240, Sunnyvale CA 94089
</div> </div>
<div class="btn-group"> <div class="btn-group">
<a href="/events.ics" class="btn">Download ICS</a> <a href="/calendar/events.ics" class="btn">Download ICS</a>
<a <a
href="https://www.google.com/calendar/render?action=TEMPLATE&text=FLUG+Meeting&dates=20260530T033000Z/20260530T053000Z&details=FLUG+Meeting&location=Google+CRSM1240%2C+Sunnyvale+CA+94089" href="https://www.google.com/calendar/render?action=TEMPLATE&text=FLUG+Meeting&dates=20260530T033000Z/20260530T053000Z&details=FLUG+Meeting&location=Google+CRSM1240%2C+Sunnyvale+CA+94089"
class="btn btn-google" class="btn btn-google"
@@ -141,9 +146,9 @@
</div> </div>
<script> <script>
const fullUrl = window.location.origin + "/events.ics"; const fullUrl = window.location.origin + "/calendar/events.ics";
document.getElementById("subscribe-btn").href = document.getElementById("subscribe-btn").href =
"webcal://" + window.location.host + "/events.ics"; "webcal://" + window.location.host + "/calendar/events.ics";
document.getElementById("cal-url").textContent = fullUrl; document.getElementById("cal-url").textContent = fullUrl;
document.getElementById("copy-url-btn").onclick = function () { document.getElementById("copy-url-btn").onclick = function () {
+9 -6
View File
@@ -14,9 +14,11 @@
margin: 0 auto; margin: 0 auto;
padding: 2rem; padding: 2rem;
line-height: 1.5; line-height: 1.5;
background: #0d1117;
color: #e6edf3;
} }
h1 { h1 {
border-bottom: 2px solid #eaecef; border-bottom: 2px solid #21262d;
padding-bottom: 0.3em; padding-bottom: 0.3em;
} }
ul { ul {
@@ -26,12 +28,13 @@
li { li {
margin-bottom: 1rem; margin-bottom: 1rem;
padding: 1rem; padding: 1rem;
border: 1px solid #eaecef; border: 1px solid #21262d;
border-radius: 6px; border-radius: 6px;
background: #161b22;
} }
a { a {
text-decoration: none; text-decoration: none;
color: #0366d6; color: #58a6ff;
font-weight: bold; font-weight: bold;
font-size: 1.2rem; font-size: 1.2rem;
} }
@@ -39,7 +42,7 @@
text-decoration: underline; text-decoration: underline;
} }
.date { .date {
color: #586069; color: #8b949e;
font-size: 0.9rem; font-size: 0.9rem;
margin-top: 0.5rem; margin-top: 0.5rem;
} }
@@ -51,8 +54,8 @@
<p> <p>
<a <a
href="/calendar.html" href="/calendar/"
style="font-size: 1rem; font-weight: normal; color: #0366d6" style="font-size: 1rem; font-weight: normal; color: #58a6ff"
>📅 View Calendar & Add to yours</a >📅 View Calendar & Add to yours</a
> >
</p> </p>
+21 -13
View File
@@ -29,8 +29,24 @@ function getInputs() {
export default defineConfig({ export default defineConfig({
plugins: [ plugins: [
{ {
name: "copy-pdfs", name: "copy-assets",
writeBundle() { writeBundle() {
function copyDir(srcDir, destDir, skipFile) {
const entries = fs.readdirSync(srcDir, { withFileTypes: true });
for (const entry of entries) {
if (skipFile && entry.name === skipFile) continue;
const src = resolve(srcDir, entry.name);
const dest = resolve(destDir, entry.name);
if (entry.isDirectory()) {
fs.mkdirSync(dest, { recursive: true });
copyDir(src, dest);
} else {
fs.mkdirSync(destDir, { recursive: true });
fs.copyFileSync(src, dest);
}
}
}
const entries = fs.readdirSync(__dirname, { withFileTypes: true }); const entries = fs.readdirSync(__dirname, { withFileTypes: true });
for (const entry of entries) { for (const entry of entries) {
if ( if (
@@ -40,19 +56,11 @@ export default defineConfig({
!entry.name.startsWith(".") !entry.name.startsWith(".")
) { ) {
const dirPath = resolve(__dirname, entry.name); const dirPath = resolve(__dirname, entry.name);
const files = fs.readdirSync(dirPath); const indexPath = resolve(dirPath, "index.html");
for (const file of files) { if (!fs.existsSync(indexPath)) continue;
if (file.toLowerCase().endsWith(".pdf")) {
const src = resolve(dirPath, file);
const destDir = resolve(__dirname, "dist", entry.name);
const dest = resolve(destDir, file);
if (!fs.existsSync(destDir)) { const destDir = resolve(__dirname, "dist", entry.name);
fs.mkdirSync(destDir, { recursive: true }); copyDir(dirPath, destDir, "index.html");
}
fs.copyFileSync(src, dest);
}
}
} }
} }
}, },