Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions site/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -503,3 +503,34 @@ img[src*="/streak"] {
height: 1.05em;
flex: none;
}

/* The profile builder link glows softly: a brighter copy of its words fades in and out over them (opacity only). */
.nav nav a.nav-builder {
position: relative;
color: var(--gold);
}

.nav-builder::after {
content: attr(data-label);
position: absolute;
inset: 0;
display: grid;
place-items: center;
color: #fff6dc;
text-shadow: 0 0 10px rgba(245, 222, 160, 0.55);
opacity: 0;
pointer-events: none;
animation: builder-glow 3.6s ease-in-out infinite;
}

@keyframes builder-glow {
50% {
opacity: 1;
}
}

@media (prefers-reduced-motion: reduce) {
.nav-builder::after {
animation: none;
}
}
5 changes: 4 additions & 1 deletion site/app/wiki/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { ReactNode } from "react";
import Nav from "@/components/Nav";
import Footer from "@/components/Footer";
import Rune from "@/components/Rune";
import { PreviewHint, PreviewLinks } from "@/components/Preview";
import { RUNES, THEMES, REPO, HOST, card, cardName, DECORATIONS, sceneName, snap, type Widget } from "@/components/data";
import { m, rich, type Tags } from "@/i18n";
import w from "./wiki.module.css";
Expand Down Expand Up @@ -35,7 +36,7 @@ const WIDGETS: Widget[] = ["stats", "languages", "streak"];
function Shot({ src, alt, scale = 2, h = 128, dark }: { src: string; alt: string; scale?: number; h?: number; dark?: string }) {
const img = <img className="pix" src={snap(`${src}&scale=${scale}`)} width={320 * scale} height={h * scale} alt={alt} loading="lazy" />;
return (
<a className={w.shot} href={src}>
<a className={w.shot} href={src} data-preview="" data-name={alt} data-h={h}>
{dark ? (
<picture>
<source media="(prefers-color-scheme: dark)" srcSet={snap(`${dark}&scale=${scale}`)} />
Expand All @@ -44,6 +45,7 @@ function Shot({ src, alt, scale = 2, h = 128, dark }: { src: string; alt: string
) : (
img
)}
<PreviewHint />
</a>
);
}
Expand Down Expand Up @@ -440,6 +442,7 @@ docker run -d -p 8080:8080 --env-file .env -v questlog-data:/data questlog`}</Co
</div>
</div>
</main>
<PreviewLinks place={m.allCards.wikiPlace} />
<Footer />
</>
);
Expand Down
1 change: 1 addition & 0 deletions site/app/wiki/wiki.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@

/* Live card that links to its full size */
.shot {
position: relative;
display: block;
overflow: hidden;
border-radius: 12px;
Expand Down
134 changes: 1 addition & 133 deletions site/components/AllCards.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
}

.shot {
position: relative;
display: block;
width: 100%;
padding: 0;
Expand Down Expand Up @@ -263,136 +264,3 @@
color: var(--muted);
}

/* the preview: the live card big, its address and what to do with it */
.preview {
width: min(100% - 2rem, 60rem);
max-height: calc(100% - 2rem);
padding: 0;
border: 1px solid var(--line);
border-radius: 24px;
background: var(--night-2);
color: var(--parchment);
box-shadow: 0 40px 100px -30px #000;
}

.preview::backdrop {
background: rgba(6, 5, 10, 0.72);
}

.previewBox {
display: grid;
gap: 1rem;
padding: 1.25rem clamp(1rem, 3vw, 1.75rem) 1.5rem;
}

.previewHead {
display: flex;
align-items: start;
justify-content: space-between;
gap: 1rem;
}

.previewTitle {
font-family: var(--display);
font-weight: 400;
font-size: clamp(1.6rem, 3vw, 2.2rem);
letter-spacing: 0;
color: var(--gold);
}

.previewSub {
color: var(--muted);
font-size: 0.95rem;
}

.previewClose,
.previewArrow {
display: grid;
flex: none;
place-items: center;
width: 2.75rem;
height: 2.75rem;
border: 1px solid rgba(242, 230, 201, 0.2);
border-radius: 999px;
background: none;
color: var(--parchment);
cursor: pointer;
}

.previewClose:hover,
.previewArrow:hover:not(:disabled) {
border-color: rgba(242, 230, 201, 0.5);
}

.previewArrow:disabled {
opacity: 0.3;
cursor: default;
}

.previewClose svg,
.previewArrow svg {
width: 1.2rem;
height: 1.2rem;
}

.previewStage {
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto;
align-items: center;
gap: 0.75rem;
}

.previewStage img {
display: block;
width: 100%;
height: auto;
border-radius: 12px;
background: rgba(8, 7, 12, 0.6);
}

.previewUrl {
display: block;
padding: 0.6rem 0.8rem;
overflow-x: auto;
border: 1px solid var(--line);
border-radius: 10px;
background: rgba(8, 7, 12, 0.7);
font-size: 0.85rem;
white-space: nowrap;
}

.previewActions {
display: flex;
flex-wrap: wrap;
gap: 0.6rem;
}

.previewActions .btn {
min-height: 2.75rem;
padding: 0 1.1rem;
font-size: 0.95rem;
}

.previewHelp {
color: var(--muted);
font-size: 0.9rem;
}

.previewHelp a {
color: var(--gold);
}

@media (max-width: 640px) {
.previewStage {
grid-template-columns: 1fr 1fr;
}

.previewStage img {
grid-column: 1 / -1;
grid-row: 1;
}

.previewArrow {
justify-self: center;
}
}
Loading
Loading