From 8598d547b285442fdb0cd871920dc4bd492b42b2 Mon Sep 17 00:00:00 2001 From: Owais Jamil Date: Sun, 22 Mar 2026 12:54:28 -0500 Subject: [PATCH] feat: components and pages (placeholders) --- README.md | 3 + docs/tasks/phase-1.md | 34 ++-- src/app/router/index.ts | 78 ++------ src/components/common/ActivityCard.vue | 131 +++++++++++++ src/components/common/EmptyState.vue | 70 +++++++ src/components/common/ErrorBoundary.vue | 85 ++++++++ src/components/common/RepoCard.vue | 169 ++++++++++++++++ src/components/common/SkeletonLoader.vue | 166 ++++++++++++++++ src/components/common/UserCard.vue | 149 ++++++++++++++ src/components/repo/FileTreeItem.vue | 89 +++++++++ src/components/repo/MarkdownRenderer.vue | 31 +++ src/features/activity/ActivityPage.vue | 101 +++++++++- src/features/explore/ExplorePage.vue | 71 ++++++- src/features/home/HomePage.vue | 70 ++++++- src/features/profile/ProfilePage.vue | 96 ++++++++- src/features/repo/RepoDetailPage.vue | 94 ++++++++- src/features/repo/RepoFiles.vue | 53 +++++ src/features/repo/RepoIssues.vue | 185 ++++++++++++++++++ src/features/repo/RepoOverview.vue | 196 +++++++++++++++++++ src/features/repo/RepoPRs.vue | 204 +++++++++++++++++++ src/mocks/repos.ts | 237 +++++++++++------------ src/router/index.ts | 22 --- src/theme/variables.css | 52 +++++ 23 files changed, 2144 insertions(+), 242 deletions(-) create mode 100644 README.md create mode 100644 src/components/common/ActivityCard.vue create mode 100644 src/components/common/EmptyState.vue create mode 100644 src/components/common/ErrorBoundary.vue create mode 100644 src/components/common/RepoCard.vue create mode 100644 src/components/common/SkeletonLoader.vue create mode 100644 src/components/common/UserCard.vue create mode 100644 src/components/repo/FileTreeItem.vue create mode 100644 src/components/repo/MarkdownRenderer.vue create mode 100644 src/features/repo/RepoFiles.vue create mode 100644 src/features/repo/RepoIssues.vue create mode 100644 src/features/repo/RepoOverview.vue create mode 100644 src/features/repo/RepoPRs.vue delete mode 100644 src/router/index.ts diff --git a/README.md b/README.md new file mode 100644 index 0000000..7e8f8ac --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Twisted + +A mobile client for [Tangled](https://tangled.org). diff --git a/docs/tasks/phase-1.md b/docs/tasks/phase-1.md index 7064e49..6aef587 100644 --- a/docs/tasks/phase-1.md +++ b/docs/tasks/phase-1.md @@ -35,26 +35,26 @@ ## Design System Components -- [ ] `components/common/RepoCard.vue` — compact repo summary (name, owner, description, language, stars) -- [ ] `components/common/UserCard.vue` — avatar + handle + bio snippet -- [ ] `components/common/ActivityCard.vue` — icon + actor + verb + target + relative timestamp -- [ ] `components/common/EmptyState.vue` — icon + message + optional action button -- [ ] `components/common/ErrorBoundary.vue` — catch errors, show retry UI -- [ ] `components/common/SkeletonLoader.vue` — shimmer placeholders (variants: card, list-item, profile) -- [ ] `components/repo/FileTreeItem.vue` — file/dir icon + name -- [ ] `components/repo/MarkdownRenderer.vue` — render markdown to HTML (stub with basic styling) +- [x] `components/common/RepoCard.vue` — compact repo summary (name, owner, description, language, stars) +- [x] `components/common/UserCard.vue` — avatar + handle + bio snippet +- [x] `components/common/ActivityCard.vue` — icon + actor + verb + target + relative timestamp +- [x] `components/common/EmptyState.vue` — icon + message + optional action button +- [x] `components/common/ErrorBoundary.vue` — catch errors, show retry UI +- [x] `components/common/SkeletonLoader.vue` — shimmer placeholders (variants: card, list-item, profile) +- [x] `components/repo/FileTreeItem.vue` — file/dir icon + name +- [x] `components/repo/MarkdownRenderer.vue` — render markdown to HTML (stub with basic styling) ## Feature Pages (placeholder with mock data) -- [ ] `features/home/HomePage.vue` — trending repos list, recent activity list -- [ ] `features/explore/ExplorePage.vue` — search bar (non-functional), repo/user tabs, repo list -- [ ] `features/repo/RepoDetailPage.vue` — segmented layout: Overview, Files, Issues, PRs -- [ ] `features/repo/RepoOverview.vue` — header, description, README placeholder, stats -- [ ] `features/repo/RepoFiles.vue` — file tree list from mock data -- [ ] `features/repo/RepoIssues.vue` — issue list from mock data -- [ ] `features/repo/RepoPRs.vue` — PR list from mock data -- [ ] `features/activity/ActivityPage.vue` — filter chips + activity card list -- [ ] `features/profile/ProfilePage.vue` — sign-in prompt (unauthenticated state) +- [x] `features/home/HomePage.vue` — trending repos list, recent activity list +- [x] `features/explore/ExplorePage.vue` — search bar (non-functional), repo/user tabs, repo list +- [x] `features/repo/RepoDetailPage.vue` — segmented layout: Overview, Files, Issues, PRs +- [x] `features/repo/RepoOverview.vue` — header, description, README placeholder, stats +- [x] `features/repo/RepoFiles.vue` — file tree list from mock data +- [x] `features/repo/RepoIssues.vue` — issue list from mock data +- [x] `features/repo/RepoPRs.vue` — PR list from mock data +- [x] `features/activity/ActivityPage.vue` — filter chips + activity card list +- [x] `features/profile/ProfilePage.vue` — sign-in prompt (unauthenticated state) ## Quality diff --git a/src/app/router/index.ts b/src/app/router/index.ts index 17ee7f0..fe6a3fd 100644 --- a/src/app/router/index.ts +++ b/src/app/router/index.ts @@ -1,76 +1,26 @@ -import { createRouter, createWebHistory } from '@ionic/vue-router'; -import type { RouteRecordRaw } from 'vue-router'; +import { createRouter, createWebHistory } from "@ionic/vue-router"; +import type { RouteRecordRaw } from "vue-router"; -import TabsPage from '@/views/TabsPage.vue'; +import TabsPage from "@/views/TabsPage.vue"; const routes: RouteRecordRaw[] = [ + { path: "/", redirect: "/tabs/home" }, { - path: '/', - redirect: '/tabs/home', - }, - { - path: '/tabs/', + path: "/tabs/", component: TabsPage, children: [ - { - path: '', - redirect: '/tabs/home', - }, - { - path: 'home', - children: [ - { - path: '', - component: () => import('@/features/home/HomePage.vue'), - }, - { - path: 'repo/:owner/:repo', - component: () => import('@/features/repo/RepoDetailPage.vue'), - }, - ], - }, - { - path: 'explore', - children: [ - { - path: '', - component: () => import('@/features/explore/ExplorePage.vue'), - }, - { - path: 'repo/:owner/:repo', - component: () => import('@/features/repo/RepoDetailPage.vue'), - }, - ], - }, - { - path: 'activity', - children: [ - { - path: '', - component: () => import('@/features/activity/ActivityPage.vue'), - }, - { - path: 'repo/:owner/:repo', - component: () => import('@/features/repo/RepoDetailPage.vue'), - }, - ], - }, - { - path: 'profile', - children: [ - { - path: '', - component: () => import('@/features/profile/ProfilePage.vue'), - }, - ], - }, + { path: "", redirect: "/tabs/home" }, + { path: "home", component: () => import("@/features/home/HomePage.vue") }, + { path: "home/repo/:owner/:repo", component: () => import("@/features/repo/RepoDetailPage.vue") }, + { path: "explore", component: () => import("@/features/explore/ExplorePage.vue") }, + { path: "explore/repo/:owner/:repo", component: () => import("@/features/repo/RepoDetailPage.vue") }, + { path: "activity", component: () => import("@/features/activity/ActivityPage.vue") }, + { path: "activity/repo/:owner/:repo", component: () => import("@/features/repo/RepoDetailPage.vue") }, + { path: "profile", component: () => import("@/features/profile/ProfilePage.vue") }, ], }, ]; -const router = createRouter({ - history: createWebHistory(import.meta.env.BASE_URL), - routes, -}); +const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), routes }); export default router; diff --git a/src/components/common/ActivityCard.vue b/src/components/common/ActivityCard.vue new file mode 100644 index 0000000..7c30b09 --- /dev/null +++ b/src/components/common/ActivityCard.vue @@ -0,0 +1,131 @@ + + + + + diff --git a/src/components/common/EmptyState.vue b/src/components/common/EmptyState.vue new file mode 100644 index 0000000..15b2812 --- /dev/null +++ b/src/components/common/EmptyState.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/src/components/common/ErrorBoundary.vue b/src/components/common/ErrorBoundary.vue new file mode 100644 index 0000000..a684281 --- /dev/null +++ b/src/components/common/ErrorBoundary.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/src/components/common/RepoCard.vue b/src/components/common/RepoCard.vue new file mode 100644 index 0000000..47fc0f0 --- /dev/null +++ b/src/components/common/RepoCard.vue @@ -0,0 +1,169 @@ + + + + + diff --git a/src/components/common/SkeletonLoader.vue b/src/components/common/SkeletonLoader.vue new file mode 100644 index 0000000..e4c1a2d --- /dev/null +++ b/src/components/common/SkeletonLoader.vue @@ -0,0 +1,166 @@ + + + + + diff --git a/src/components/common/UserCard.vue b/src/components/common/UserCard.vue new file mode 100644 index 0000000..4489759 --- /dev/null +++ b/src/components/common/UserCard.vue @@ -0,0 +1,149 @@ + + + + + diff --git a/src/components/repo/FileTreeItem.vue b/src/components/repo/FileTreeItem.vue new file mode 100644 index 0000000..948e35a --- /dev/null +++ b/src/components/repo/FileTreeItem.vue @@ -0,0 +1,89 @@ + + + + + diff --git a/src/components/repo/MarkdownRenderer.vue b/src/components/repo/MarkdownRenderer.vue new file mode 100644 index 0000000..1be96da --- /dev/null +++ b/src/components/repo/MarkdownRenderer.vue @@ -0,0 +1,31 @@ + + + + + + diff --git a/src/features/activity/ActivityPage.vue b/src/features/activity/ActivityPage.vue index a9bd2b7..a0f8812 100644 --- a/src/features/activity/ActivityPage.vue +++ b/src/features/activity/ActivityPage.vue @@ -5,16 +5,115 @@ Activity + Activity + + +
+ + {{ f.label }} + +
+ + + + + + +
+ + diff --git a/src/features/explore/ExplorePage.vue b/src/features/explore/ExplorePage.vue index 47723f7..ee13747 100644 --- a/src/features/explore/ExplorePage.vue +++ b/src/features/explore/ExplorePage.vue @@ -4,17 +4,76 @@ Explore + + + + + + Repos + Users + + + - - - Explore - - + + + + + + + diff --git a/src/features/home/HomePage.vue b/src/features/home/HomePage.vue index c898462..6a660fa 100644 --- a/src/features/home/HomePage.vue +++ b/src/features/home/HomePage.vue @@ -5,16 +5,84 @@ Home + Home + + +
+

Trending

+ + +
+ + +
+

Recent Activity

+ + + + +
+ + diff --git a/src/features/profile/ProfilePage.vue b/src/features/profile/ProfilePage.vue index 7b25ea7..4bf2b5a 100644 --- a/src/features/profile/ProfilePage.vue +++ b/src/features/profile/ProfilePage.vue @@ -5,16 +5,110 @@ Profile + Profile + + + + diff --git a/src/features/repo/RepoDetailPage.vue b/src/features/repo/RepoDetailPage.vue index 1fd9e94..1233dd1 100644 --- a/src/features/repo/RepoDetailPage.vue +++ b/src/features/repo/RepoDetailPage.vue @@ -5,27 +5,101 @@ - {{ owner }}/{{ repo }} + + {{ owner }}/{{ repoName }} + + + + + Overview + Files + Issues + PRs + + + + + + + + + + + + diff --git a/src/features/repo/RepoFiles.vue b/src/features/repo/RepoFiles.vue new file mode 100644 index 0000000..8aa054a --- /dev/null +++ b/src/features/repo/RepoFiles.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/src/features/repo/RepoIssues.vue b/src/features/repo/RepoIssues.vue new file mode 100644 index 0000000..f407861 --- /dev/null +++ b/src/features/repo/RepoIssues.vue @@ -0,0 +1,185 @@ + + + + + diff --git a/src/features/repo/RepoOverview.vue b/src/features/repo/RepoOverview.vue new file mode 100644 index 0000000..cec3da9 --- /dev/null +++ b/src/features/repo/RepoOverview.vue @@ -0,0 +1,196 @@ + + + + + diff --git a/src/features/repo/RepoPRs.vue b/src/features/repo/RepoPRs.vue new file mode 100644 index 0000000..f1223c5 --- /dev/null +++ b/src/features/repo/RepoPRs.vue @@ -0,0 +1,204 @@ + + + + + diff --git a/src/mocks/repos.ts b/src/mocks/repos.ts index f99e349..d5e5ff6 100644 --- a/src/mocks/repos.ts +++ b/src/mocks/repos.ts @@ -1,114 +1,113 @@ -import type { RepoSummary, RepoDetail, RepoFile } from '@/domain/models/repo'; +import type { RepoSummary, RepoDetail, RepoFile } from "@/domain/models/repo"; -// Timestamps within the last 30 days (relative to 2026-03-22) const MOCK_REPOS: RepoSummary[] = [ - { - atUri: 'at://did:plc:a1b2c3d4e5f6g7h8i9j0k1l2/sh.tangled.repo/atproto-explorer', - ownerDid: 'did:plc:a1b2c3d4e5f6g7h8i9j0k1l2', - ownerHandle: 'alice.tngl.sh', - name: 'atproto-explorer', - description: 'Interactive explorer for AT Protocol lexicons and records.', - primaryLanguage: 'TypeScript', - stars: 312, - forks: 28, - updatedAt: '2026-03-21T14:32:00Z', - knot: 'tangled.sh', - }, - { - atUri: 'at://did:plc:p2cp5gopk7mgjegy9waligxd/sh.tangled.repo/twisted', - ownerDid: 'did:plc:p2cp5gopk7mgjegy9waligxd', - ownerHandle: 'desertthunder.dev', - name: 'twisted', - description: 'A mobile companion reader for Tangled, built with Ionic Vue.', - primaryLanguage: 'TypeScript', - stars: 47, - forks: 3, - updatedAt: '2026-03-22T09:15:00Z', - knot: 'tangled.sh', - }, - { - atUri: 'at://did:plc:b2c3d4e5f6g7h8i9j0k1l2m3/sh.tangled.repo/git-log-pretty', - ownerDid: 'did:plc:b2c3d4e5f6g7h8i9j0k1l2m3', - ownerHandle: 'bob.tngl.sh', - name: 'git-log-pretty', - description: 'Opinionated git log formatter with colour themes and TUI.', - primaryLanguage: 'Go', - stars: 189, - forks: 14, - updatedAt: '2026-03-19T22:08:00Z', - knot: 'tangled.sh', - }, - { - atUri: 'at://did:plc:c3d4e5f6g7h8i9j0k1l2m3n4/sh.tangled.repo/iris-ui', - ownerDid: 'did:plc:c3d4e5f6g7h8i9j0k1l2m3n4', - ownerHandle: 'clara.bsky.social', - name: 'iris-ui', - description: 'Accessible component library for AT Protocol apps.', - primaryLanguage: 'TypeScript', - stars: 631, - forks: 72, - updatedAt: '2026-03-20T11:45:00Z', - knot: 'tangled.sh', - }, - { - atUri: 'at://did:plc:e5f6g7h8i9j0k1l2m3n4o5p6/sh.tangled.repo/nix-atproto', - ownerDid: 'did:plc:e5f6g7h8i9j0k1l2m3n4o5p6', - ownerHandle: 'riku.tngl.sh', - name: 'nix-atproto', - description: 'Nix flakes and modules for self-hosting AT Protocol services.', - primaryLanguage: 'Nix', - stars: 94, - forks: 11, - updatedAt: '2026-03-17T08:30:00Z', - knot: 'tangled.sh', - }, - { - atUri: 'at://did:plc:d4e5f6g7h8i9j0k1l2m3n4o5/sh.tangled.repo/tangled-cli', - ownerDid: 'did:plc:d4e5f6g7h8i9j0k1l2m3n4o5', - ownerHandle: 'dev.tangled.sh', - name: 'tangled-cli', - description: 'Official command-line tool for interacting with the Tangled platform.', - primaryLanguage: 'Go', - stars: 1842, - forks: 203, - updatedAt: '2026-03-22T07:00:00Z', - knot: 'tangled.sh', - }, - { - atUri: 'at://did:plc:a1b2c3d4e5f6g7h8i9j0k1l2/sh.tangled.repo/lexicon-validator', - ownerDid: 'did:plc:a1b2c3d4e5f6g7h8i9j0k1l2', - ownerHandle: 'alice.tngl.sh', - name: 'lexicon-validator', - description: 'Runtime validation for AT Protocol lexicon schemas.', - primaryLanguage: 'TypeScript', - stars: 77, - forks: 9, - updatedAt: '2026-03-14T16:20:00Z', - knot: 'tangled.sh', - }, - { - atUri: 'at://did:plc:p2cp5gopk7mgjegy9waligxd/sh.tangled.repo/bsky-feeds', - ownerDid: 'did:plc:p2cp5gopk7mgjegy9waligxd', - ownerHandle: 'desertthunder.dev', - name: 'bsky-feeds', - description: 'Custom Bluesky feed generators with a simple declarative API.', - primaryLanguage: 'Python', - stars: 203, - forks: 31, - updatedAt: '2026-03-10T19:55:00Z', - knot: 'tangled.sh', - }, + { + atUri: "at://did:plc:a1b2c3d4e5f6g7h8i9j0k1l2/sh.tangled.repo/atproto-explorer", + ownerDid: "did:plc:a1b2c3d4e5f6g7h8i9j0k1l2", + ownerHandle: "alice.tngl.sh", + name: "atproto-explorer", + description: "Interactive explorer for AT Protocol lexicons and records.", + primaryLanguage: "TypeScript", + stars: 312, + forks: 28, + updatedAt: "2026-03-21T14:32:00Z", + knot: "tangled.sh", + }, + { + atUri: "at://did:plc:p2cp5gopk7mgjegy9waligxd/sh.tangled.repo/twisted", + ownerDid: "did:plc:p2cp5gopk7mgjegy9waligxd", + ownerHandle: "desertthunder.dev", + name: "twisted", + description: "A mobile companion reader for Tangled, built with Ionic Vue.", + primaryLanguage: "TypeScript", + stars: 47, + forks: 3, + updatedAt: "2026-03-22T09:15:00Z", + knot: "tangled.sh", + }, + { + atUri: "at://did:plc:b2c3d4e5f6g7h8i9j0k1l2m3/sh.tangled.repo/git-log-pretty", + ownerDid: "did:plc:b2c3d4e5f6g7h8i9j0k1l2m3", + ownerHandle: "bob.tngl.sh", + name: "git-log-pretty", + description: "Opinionated git log formatter with colour themes and TUI.", + primaryLanguage: "Go", + stars: 189, + forks: 14, + updatedAt: "2026-03-19T22:08:00Z", + knot: "tangled.sh", + }, + { + atUri: "at://did:plc:c3d4e5f6g7h8i9j0k1l2m3n4/sh.tangled.repo/iris-ui", + ownerDid: "did:plc:c3d4e5f6g7h8i9j0k1l2m3n4", + ownerHandle: "clara.bsky.social", + name: "iris-ui", + description: "Accessible component library for AT Protocol apps.", + primaryLanguage: "TypeScript", + stars: 631, + forks: 72, + updatedAt: "2026-03-20T11:45:00Z", + knot: "tangled.sh", + }, + { + atUri: "at://did:plc:e5f6g7h8i9j0k1l2m3n4o5p6/sh.tangled.repo/nix-atproto", + ownerDid: "did:plc:e5f6g7h8i9j0k1l2m3n4o5p6", + ownerHandle: "riku.tngl.sh", + name: "nix-atproto", + description: "Nix flakes and modules for self-hosting AT Protocol services.", + primaryLanguage: "Nix", + stars: 94, + forks: 11, + updatedAt: "2026-03-17T08:30:00Z", + knot: "tangled.sh", + }, + { + atUri: "at://did:plc:d4e5f6g7h8i9j0k1l2m3n4o5/sh.tangled.repo/tangled-cli", + ownerDid: "did:plc:d4e5f6g7h8i9j0k1l2m3n4o5", + ownerHandle: "dev.tangled.sh", + name: "tangled-cli", + description: "Official command-line tool for interacting with the Tangled platform.", + primaryLanguage: "Go", + stars: 1842, + forks: 203, + updatedAt: "2026-03-22T07:00:00Z", + knot: "tangled.sh", + }, + { + atUri: "at://did:plc:a1b2c3d4e5f6g7h8i9j0k1l2/sh.tangled.repo/lexicon-validator", + ownerDid: "did:plc:a1b2c3d4e5f6g7h8i9j0k1l2", + ownerHandle: "alice.tngl.sh", + name: "lexicon-validator", + description: "Runtime validation for AT Protocol lexicon schemas.", + primaryLanguage: "TypeScript", + stars: 77, + forks: 9, + updatedAt: "2026-03-14T16:20:00Z", + knot: "tangled.sh", + }, + { + atUri: "at://did:plc:p2cp5gopk7mgjegy9waligxd/sh.tangled.repo/bsky-feeds", + ownerDid: "did:plc:p2cp5gopk7mgjegy9waligxd", + ownerHandle: "desertthunder.dev", + name: "bsky-feeds", + description: "Custom Bluesky feed generators with a simple declarative API.", + primaryLanguage: "Python", + stars: 203, + forks: 31, + updatedAt: "2026-03-10T19:55:00Z", + knot: "tangled.sh", + }, ]; const MOCK_REPO_FILES: RepoFile[] = [ - { path: '', name: 'src', type: 'dir', lastCommitMessage: 'feat: add skeleton loaders' }, - { path: '', name: 'docs', type: 'dir', lastCommitMessage: 'docs: update phase-1 spec' }, - { path: '', name: 'public', type: 'dir', lastCommitMessage: 'chore: add favicon' }, - { path: '', name: '.gitignore', type: 'file', size: 412, lastCommitMessage: 'chore: initial scaffold' }, - { path: '', name: 'package.json', type: 'file', size: 1840, lastCommitMessage: 'chore: add tanstack query' }, - { path: '', name: 'README.md', type: 'file', size: 2310, lastCommitMessage: 'docs: update readme' }, - { path: '', name: 'tsconfig.json', type: 'file', size: 688, lastCommitMessage: 'chore: initial scaffold' }, - { path: '', name: 'vite.config.ts', type: 'file', size: 520, lastCommitMessage: 'chore: path aliases' }, + { path: "", name: "src", type: "dir", lastCommitMessage: "feat: add skeleton loaders" }, + { path: "", name: "docs", type: "dir", lastCommitMessage: "docs: update phase-1 spec" }, + { path: "", name: "public", type: "dir", lastCommitMessage: "chore: add favicon" }, + { path: "", name: ".gitignore", type: "file", size: 412, lastCommitMessage: "chore: initial scaffold" }, + { path: "", name: "package.json", type: "file", size: 1840, lastCommitMessage: "chore: add tanstack query" }, + { path: "", name: "README.md", type: "file", size: 2310, lastCommitMessage: "docs: update readme" }, + { path: "", name: "tsconfig.json", type: "file", size: 688, lastCommitMessage: "chore: initial scaffold" }, + { path: "", name: "vite.config.ts", type: "file", size: 520, lastCommitMessage: "chore: path aliases" }, ]; const README_CONTENT = `# twisted @@ -138,28 +137,26 @@ pnpm dev `; export function getMockRepos(): RepoSummary[] { - return MOCK_REPOS; + return MOCK_REPOS; } export function getMockRepoDetail(ownerHandle: string, name: string): RepoDetail | undefined { - const summary = MOCK_REPOS.find((r) => r.ownerHandle === ownerHandle && r.name === name); - if (!summary) return undefined; + const summary = MOCK_REPOS.find((r) => r.ownerHandle === ownerHandle && r.name === name); + if (!summary) return undefined; - return { - ...summary, - readme: README_CONTENT, - defaultBranch: 'main', - languages: summary.primaryLanguage - ? { [summary.primaryLanguage]: 85, Other: 15 } - : {}, - topics: ['atproto', 'tangled', 'open-source'], - }; + return { + ...summary, + readme: README_CONTENT, + defaultBranch: "main", + languages: summary.primaryLanguage ? { [summary.primaryLanguage]: 85, Other: 15 } : {}, + topics: ["atproto", "tangled", "open-source"], + }; } export function getMockRepoFiles(): RepoFile[] { - return MOCK_REPO_FILES; + return MOCK_REPO_FILES; } export function getTrendingRepos(): RepoSummary[] { - return [...MOCK_REPOS].sort((a, b) => (b.stars ?? 0) - (a.stars ?? 0)).slice(0, 5); + return [...MOCK_REPOS].sort((a, b) => (b.stars ?? 0) - (a.stars ?? 0)).slice(0, 5); } diff --git a/src/router/index.ts b/src/router/index.ts deleted file mode 100644 index b2fff99..0000000 --- a/src/router/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { createRouter, createWebHistory } from '@ionic/vue-router'; -import { RouteRecordRaw } from 'vue-router'; -import HomePage from '../views/HomePage.vue' - -const routes: Array = [ - { - path: '/', - redirect: '/home' - }, - { - path: '/home', - name: 'Home', - component: HomePage - } -] - -const router = createRouter({ - history: createWebHistory(import.meta.env.BASE_URL), - routes -}) - -export default router diff --git a/src/theme/variables.css b/src/theme/variables.css index a134dcf..35ea05d 100644 --- a/src/theme/variables.css +++ b/src/theme/variables.css @@ -1,2 +1,54 @@ /* For information on how to create your own theme, please refer to: http://ionicframework.com/docs/theming/ */ + +/* Twisted design tokens — light */ +:root { + --t-accent: #0ea5e9; + --t-accent-dim: rgba(14, 165, 233, 0.1); + --t-amber: #d97706; + --t-amber-dim: rgba(217, 119, 6, 0.12); + --t-green: #059669; + --t-green-dim: rgba(5, 150, 105, 0.1); + --t-red: #dc2626; + --t-red-dim: rgba(220, 38, 38, 0.1); + --t-purple: #7c3aed; + + --t-surface: #ffffff; + --t-surface-raised: #f6f8fa; + --t-border: rgba(0, 0, 0, 0.08); + --t-border-strong: rgba(0, 0, 0, 0.14); + + --t-text-primary: #0d1117; + --t-text-secondary: #57606a; + --t-text-muted: #8c959f; + + --t-mono: "JetBrains Mono", "Cascadia Code", "Fira Code", ui-monospace, "Courier New", monospace; + + --t-radius-sm: 6px; + --t-radius-md: 10px; + --t-radius-lg: 14px; +} + +/* Twisted design tokens — dark */ +@media (prefers-color-scheme: dark) { + :root { + --t-accent: #22d3ee; + --t-accent-dim: rgba(34, 211, 238, 0.08); + --t-amber: #fbbf24; + --t-amber-dim: rgba(251, 191, 36, 0.1); + --t-green: #34d399; + --t-green-dim: rgba(52, 211, 153, 0.1); + --t-red: #f87171; + --t-red-dim: rgba(248, 113, 113, 0.1); + --t-purple: #a78bfa; + + --t-surface: #161b22; + --t-surface-raised: #1c2128; + --t-border: rgba(255, 255, 255, 0.07); + --t-border-strong: rgba(255, 255, 255, 0.12); + + --t-text-primary: #e6edf3; + --t-text-secondary: #8b949e; + --t-text-muted: #484f58; + } +} -- knotmirror 0.0.1