Build Forgejo-backed community prototype
This commit is contained in:
parent
797ae5ea35
commit
6671a01d26
16 changed files with 2485 additions and 293 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -1,16 +1,29 @@
|
|||
:root {
|
||||
color-scheme: dark;
|
||||
color-scheme: light;
|
||||
font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
|
||||
line-height: 1.5;
|
||||
font-weight: 400;
|
||||
|
||||
--bg: #0d1117;
|
||||
--panel: #151b23;
|
||||
--panel-hover: #1a2230;
|
||||
--border: #2b3442;
|
||||
--text: #edf2f7;
|
||||
--muted: #9aa6b2;
|
||||
--accent: #84d7ff;
|
||||
--bg: linear-gradient(180deg, #fffaf0 0%, #f3ede1 100%);
|
||||
--panel: #fffdf8;
|
||||
--panel-hover: #f1eadf;
|
||||
--card: #ffffff;
|
||||
--border: #ded5c7;
|
||||
--text: #1f2933;
|
||||
--muted: #667085;
|
||||
--accent: #0f6f8f;
|
||||
--accent-strong: #0b5d78;
|
||||
--accent-soft: rgba(15, 111, 143, 0.12);
|
||||
--accent-border: rgba(15, 111, 143, 0.28);
|
||||
--topbar-bg: rgba(255, 253, 248, 0.92);
|
||||
--code-bg: #edf3f5;
|
||||
--warning-bg: rgba(191, 125, 22, 0.12);
|
||||
--warning-border: rgba(191, 125, 22, 0.32);
|
||||
--warning-text: #7a4700;
|
||||
--button-text: #ffffff;
|
||||
--disabled-bg: #ece6dc;
|
||||
--disabled-text: #8a8174;
|
||||
--error: #a64234;
|
||||
}
|
||||
|
||||
* {
|
||||
|
|
@ -52,6 +65,125 @@ textarea {
|
|||
padding: 2rem 1rem 3rem;
|
||||
}
|
||||
|
||||
.topbar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
border-bottom: 0.0625rem solid var(--accent-border);
|
||||
padding: 0.75rem clamp(1rem, 4vw, 2rem);
|
||||
background: var(--topbar-bg);
|
||||
backdrop-filter: blur(1rem);
|
||||
}
|
||||
|
||||
.topbar-menu {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.topbar-brand,
|
||||
.topbar-link,
|
||||
.topbar-menu-button {
|
||||
border: 0;
|
||||
color: inherit;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.topbar-brand {
|
||||
border-radius: 999rem;
|
||||
padding: 0.45rem 0.7rem;
|
||||
color: var(--accent);
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.03em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.topbar-brand:hover,
|
||||
.topbar-brand:focus-visible,
|
||||
.topbar-brand.active {
|
||||
color: var(--text);
|
||||
background: var(--accent-soft);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.topbar-nav,
|
||||
.topbar-auth {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.topbar-nav {
|
||||
flex: 1;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.topbar-link {
|
||||
border-radius: 999rem;
|
||||
padding: 0.5rem 0.7rem;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.topbar-link:hover,
|
||||
.topbar-link:focus-visible,
|
||||
.topbar-link.active {
|
||||
color: var(--text);
|
||||
background: var(--panel-hover);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.topbar-auth {
|
||||
margin-left: auto;
|
||||
justify-content: flex-end;
|
||||
color: var(--muted);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.topbar-auth p {
|
||||
max-width: 12rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.topbar-auth-muted {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.topbar-menu-button {
|
||||
display: none;
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
margin-left: auto;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 999rem;
|
||||
flex-direction: column;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.topbar-menu-button span {
|
||||
width: 1.1rem;
|
||||
height: 0.125rem;
|
||||
border-radius: 999rem;
|
||||
background: currentColor;
|
||||
}
|
||||
|
||||
.topbar-menu-button:hover,
|
||||
.topbar-menu-button:focus-visible {
|
||||
color: var(--text);
|
||||
background: var(--panel-hover);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.page-header,
|
||||
.page-section,
|
||||
.panel,
|
||||
|
|
@ -123,13 +255,15 @@ textarea {
|
|||
|
||||
.card,
|
||||
.discussion-preview-card,
|
||||
.activity-card,
|
||||
.reply-card {
|
||||
border: 0.0625rem solid var(--border);
|
||||
border-radius: 0.75rem;
|
||||
background: #111722;
|
||||
background: var(--card);
|
||||
}
|
||||
|
||||
.card,
|
||||
.activity-card,
|
||||
.reply-card {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
|
@ -148,11 +282,17 @@ textarea {
|
|||
}
|
||||
|
||||
.card h3,
|
||||
.discussion-preview-card h3 {
|
||||
.discussion-preview-card h3,
|
||||
.activity-card h3 {
|
||||
margin-bottom: 0.35rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.activity-list {
|
||||
display: grid;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.discussion-preview-card {
|
||||
width: 100%;
|
||||
padding: 1rem;
|
||||
|
|
@ -161,8 +301,17 @@ textarea {
|
|||
color: inherit;
|
||||
}
|
||||
|
||||
.activity-card-button {
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.discussion-preview-card:hover,
|
||||
.discussion-preview-card:focus-visible {
|
||||
.discussion-preview-card:focus-visible,
|
||||
.activity-card-button:hover,
|
||||
.activity-card-button:focus-visible {
|
||||
background: var(--panel-hover);
|
||||
outline: none;
|
||||
}
|
||||
|
|
@ -188,6 +337,7 @@ textarea {
|
|||
|
||||
.back-link,
|
||||
.secondary-link,
|
||||
.secondary-button,
|
||||
.compose-button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
|
@ -205,6 +355,34 @@ textarea {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
.auth-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 0.75rem;
|
||||
margin-bottom: 1rem;
|
||||
border: 0.0625rem solid var(--accent-border);
|
||||
border-radius: 0.75rem;
|
||||
padding: 0.75rem;
|
||||
color: var(--muted);
|
||||
background: var(--accent-soft);
|
||||
}
|
||||
|
||||
.secondary-button {
|
||||
flex: 0 0 auto;
|
||||
color: var(--accent);
|
||||
background: var(--panel);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.secondary-button:hover,
|
||||
.secondary-button:focus-visible,
|
||||
.back-link:hover,
|
||||
.back-link:focus-visible {
|
||||
background: var(--panel-hover);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.thread-view {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
|
|
@ -336,7 +514,7 @@ textarea {
|
|||
.markdown-content code {
|
||||
border-radius: 0.35rem;
|
||||
padding: 0.12rem 0.35rem;
|
||||
background: #0b1017;
|
||||
background: var(--code-bg);
|
||||
font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
|
||||
font-size: 0.92em;
|
||||
}
|
||||
|
|
@ -347,7 +525,7 @@ textarea {
|
|||
border: 0.0625rem solid var(--border);
|
||||
border-radius: 0.75rem;
|
||||
padding: 0.85rem 0.95rem;
|
||||
background: #0b1017;
|
||||
background: var(--code-bg);
|
||||
}
|
||||
|
||||
.markdown-content pre code {
|
||||
|
|
@ -378,15 +556,57 @@ textarea {
|
|||
gap: 0.85rem;
|
||||
}
|
||||
|
||||
.compose-input {
|
||||
.signin-page {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.signin-panel {
|
||||
max-width: 42rem;
|
||||
}
|
||||
|
||||
.signin-actions {
|
||||
display: grid;
|
||||
gap: 0.85rem;
|
||||
justify-items: start;
|
||||
}
|
||||
|
||||
.signin-callout {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 0.75rem;
|
||||
border: 0.0625rem solid var(--warning-border);
|
||||
border-radius: 0.75rem;
|
||||
padding: 0.75rem;
|
||||
color: var(--warning-text);
|
||||
background: var(--warning-bg);
|
||||
}
|
||||
|
||||
.form-label {
|
||||
color: var(--muted);
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.compose-input,
|
||||
.token-input {
|
||||
width: 100%;
|
||||
min-height: 9rem;
|
||||
resize: vertical;
|
||||
border: 0.0625rem solid var(--border);
|
||||
border-radius: 0.75rem;
|
||||
padding: 0.85rem 0.95rem;
|
||||
color: var(--text);
|
||||
background: #0f141d;
|
||||
background: var(--card);
|
||||
}
|
||||
|
||||
.compose-input {
|
||||
min-height: 9rem;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.compose-input:focus,
|
||||
.token-input:focus {
|
||||
border-color: var(--accent);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.compose-actions {
|
||||
|
|
@ -397,9 +617,35 @@ textarea {
|
|||
}
|
||||
|
||||
.compose-button {
|
||||
color: #7a8696;
|
||||
background: #101722;
|
||||
border-color: var(--accent);
|
||||
color: var(--button-text);
|
||||
background: var(--accent);
|
||||
cursor: pointer;
|
||||
font-weight: 700;
|
||||
transition:
|
||||
background 160ms ease,
|
||||
border-color 160ms ease,
|
||||
color 160ms ease,
|
||||
opacity 160ms ease;
|
||||
}
|
||||
|
||||
.compose-button:hover:not(:disabled),
|
||||
.compose-button:focus-visible:not(:disabled) {
|
||||
border-color: var(--accent-strong);
|
||||
background: var(--accent-strong);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.compose-button:disabled {
|
||||
border-color: var(--border);
|
||||
color: var(--disabled-text);
|
||||
background: var(--disabled-bg);
|
||||
cursor: not-allowed;
|
||||
opacity: 0.72;
|
||||
}
|
||||
|
||||
.compose-error {
|
||||
color: var(--error);
|
||||
}
|
||||
|
||||
.secondary-link {
|
||||
|
|
@ -407,12 +653,57 @@ textarea {
|
|||
}
|
||||
|
||||
@media (max-width: 48rem) {
|
||||
.topbar {
|
||||
display: grid;
|
||||
grid-template-columns: auto auto;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.topbar-menu-button {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.topbar-menu {
|
||||
display: none;
|
||||
grid-column: 1 / -1;
|
||||
width: 100%;
|
||||
border-top: 0.0625rem solid var(--border);
|
||||
padding-top: 0.75rem;
|
||||
}
|
||||
|
||||
.topbar-menu.open {
|
||||
display: grid;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.topbar-nav,
|
||||
.topbar-auth {
|
||||
width: 100%;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.topbar-nav {
|
||||
align-items: stretch;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.topbar-link {
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.topbar-auth {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.card-grid,
|
||||
.two-column-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.compose-actions,
|
||||
.auth-bar,
|
||||
.signin-callout,
|
||||
.subsection-header {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,14 @@ export interface SourceOfTruthCard {
|
|||
description: string;
|
||||
}
|
||||
|
||||
export interface AuthState {
|
||||
authenticated: boolean;
|
||||
login: string | null;
|
||||
source: string;
|
||||
can_reply: boolean;
|
||||
oauth_configured: boolean;
|
||||
}
|
||||
|
||||
export interface CourseCard {
|
||||
title: string;
|
||||
owner: string;
|
||||
|
|
@ -21,6 +29,7 @@ export interface CourseCard {
|
|||
summary: string;
|
||||
status: string;
|
||||
outline: CourseChapter[];
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface CourseChapter {
|
||||
|
|
@ -44,6 +53,7 @@ export interface PostCard {
|
|||
repo: string;
|
||||
kind: string;
|
||||
summary: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface EventCard {
|
||||
|
|
@ -81,6 +91,7 @@ export interface DiscussionReply {
|
|||
|
||||
export interface PrototypeData {
|
||||
hero: HeroData;
|
||||
auth: AuthState;
|
||||
source_of_truth: SourceOfTruthCard[];
|
||||
featured_courses: CourseCard[];
|
||||
recent_posts: PostCard[];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue