Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transcripts css #1106

Merged
merged 7 commits into from
Sep 29, 2023
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
2 changes: 1 addition & 1 deletion src/hooks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const prisma_client = new PrismaClient();
export const auth: Handle = async function ({ event, resolve }) {
const access_token = event.cookies.get('access_token');

event.locals.theme = event.cookies.get('theme') || 'system';
event.locals.theme = decodeURIComponent(event.cookies.get('theme')) || 'system';
// Get current user from session via access token
if (access_token) {
const user = await find_user_by_access_token(access_token);
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Pagination.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@
box-shadow: inset 0 0 0 1px oklch(var(--blacklch) / 0.05);
padding: 6px 15px;
text-align: center;
background-color: var(--black-1);
background-color: var(--bg-1);
}
a {
color: var(--fg);
&.current {
background: var(--yellow);
background: var(--primary);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/ShowCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
--max-font-size: 15rem;
font-size: clamp(1.5rem, 45cqw, var(--max-font-size));
font-weight: 900;
color: var(--yellow);
color: var(--primary);
line-height: 1;
z-index: -1;
}
Expand Down
1 change: 1 addition & 0 deletions src/lib/player/Player.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@
--media-control-padding: 0;
translate: 0 100% 0;
transition: 0.2s;
z-index: 10;
&.expanded {
translate: 0 0 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/schedule.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
background-size: 269px, 30%;
}
.tag {
background: var(--yellow);
background: var(--primary);
color: black;
font-weight: 900;
padding: 0.5rem;
Expand Down
8 changes: 4 additions & 4 deletions src/lib/transcript/TableOfContents.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
ul {
margin: 0;
padding: 0;
border: 1px solid var(--purple);
border: 1px solid var(--subtle-accent);
border-radius: 10px;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
Expand All @@ -32,9 +32,9 @@
line-height: initial;
list-style: none;
padding: 10px;
border-bottom: 1px solid var(--purple);
border-bottom: 1px solid var(--subtle-accent);
&:nth-child(odd) {
border-right: 1px solid var(--purple);
border-right: 1px solid var(--subtle-accent);
}
&:last-child {
border-bottom: none;
Expand All @@ -47,6 +47,6 @@
.timestamp {
display: block;
font-size: var(--font-size-xs);
color: var(--purple);
color: var(--subtle-accent);
}
</style>
12 changes: 6 additions & 6 deletions src/lib/transcript/Transcript.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,14 @@
.timeline {
--highlight: var(--bg-2);
--future: var(--bg-2);
--current: var(--yellow);
--past: var(--yellow);
--current: var(--primary);
--past: var(--primary);
}
.past {
--highlight: var(--past);
}
.current {
--highlight: var(--yellow);
--highlight: var(--primary);
.marker {
/* --progress: 50%; */
background-image: linear-gradient(
Expand Down Expand Up @@ -204,7 +204,7 @@
font-size: var(--font-size-xs);
position: sticky;
top: 0;
background: white;
background: var(--bg);
z-index: 2;
margin-top: var(--vertical-spacing);
margin-bottom: var(--vertical-spacing);
Expand Down Expand Up @@ -254,7 +254,7 @@
height: var(--size);
position: relative;
border-radius: 50%;
border: 1.5px solid var(--white);
border: 1.5px solid var(--bg);
background: var(--highlight);
justify-self: center;
.current & {
Expand All @@ -268,6 +268,6 @@
.speaker {
font-size: var(--font-size-sm);
font-weight: 600;
color: var(--purple);
color: var(--subtle-accent);
}
</style>
8 changes: 6 additions & 2 deletions src/params/ThemeMaker.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// TODO refactor to utility function
function getThemeName(path: string) {
let match_temp = path.match(themeName)?.[0];

return match_temp;
}

Expand Down Expand Up @@ -53,7 +52,7 @@
<div class="circle accent" />
<div class="circle warning" />
<span>
{theme_name?.replaceAll('-', ' ')}
{theme_name}
</span>
</button>
{/each}
Expand All @@ -78,7 +77,9 @@
overflow-y: scroll;
border-left: var(--border);
box-shadow: var(--shadow-6);
z-index: 10;
}

h4 {
font-style: normal;
margin-top: 0;
Expand Down Expand Up @@ -112,12 +113,15 @@
.color {
background: var(--fg-sheet);
}

.primary {
background: var(--primary);
}

.accent {
background: var(--accent);
}

.warning {
background: var(--warning);
}
Expand Down
31 changes: 27 additions & 4 deletions src/routes/shows/[show_number]/[slug]/[[tab]]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,18 @@
</div>

<div class="tabs">
<a data-sveltekit-noscroll href="/shows/{$page.params.show_number}/{$page.params.slug}"
>Show Notes</a
<a
data-sveltekit-noscroll
class:active={decodeURIComponent($page.url.pathname) ===
`/shows/${$page.params.show_number}/${$page.params.slug}`}
href="/shows/{$page.params.show_number}/{$page.params.slug}">Show Notes</a
>
<a data-sveltekit-noscroll href="/shows/{$page.params.show_number}/{$page.params.slug}/transcript"
>Transcript</a
<a
class:active={$page.url.pathname.includes(
`/shows/${$page.params.show_number}/${$page.params.slug}/transcript`
)}
data-sveltekit-noscroll
href="/shows/{$page.params.show_number}/{$page.params.slug}/transcript">Transcript</a
>
</div>

Expand Down Expand Up @@ -117,5 +124,21 @@
.show-page-date {
view-transition-name: var(--transition-name);
}

.tabs {
margin-bottom: 1rem;
display: flex;
gap: 20px;
a {
color: var(--fg);
&.active,
&:hover {
color: var(--color-sheet);
text-decoration: underline;
text-decoration-color: var(--primary);
text-decoration-thickness: 2px;
}
}
}
}
</style>
6 changes: 4 additions & 2 deletions src/styles/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
--bg-sheet: var(--black);
--primary: var(--yellow);
--accent: var(--teal);
--subtle-accent: var(--yellow-1);
--warning: var(--red);
--bg-2: var(--black);
--bg-1: var(--black);
Expand All @@ -27,13 +28,14 @@
--bg-sheet: var(--black);
--primary: var(--yellow);
--accent: var(--teal);
--subtle-accent: var(--yellow-1);
--warning: var(--red);
--bg-2: var(--black);
--bg-2: var(--black-8);
--bg-1: var(--black);
--bg: var(--black);
--fg-2: var(--black-3);
--border-color: var(--bg-sheet);
--border: solid var(--border-size) var(--border-color);
--border: solid var(--border-size) var(--fg-sheet);
--zebra: oklch(100% none none / 0.05);
}
.theme-light {
Expand Down
3 changes: 2 additions & 1 deletion src/styles/themes/level-up.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
--fg-sheet: #ebebe3;
--bg: #191324;
--bg-1: #191324;
--bg-2: #191324;
--bg-2: var(--black-6);
--bg-sheet: #191324;
--primary: #82d8d8;
--border-color: #82d8d8;
--border: solid 4px var(--border-color);
--subtle-accent: var(--purple-3);
}
9 changes: 4 additions & 5 deletions src/styles/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,14 @@
/* Interface Color */
--primary: var(--yellow);
--accent: var(--teal);
--subtle-accent: var(--purple);
--warning: var(--red);
--success: var(--green);
--zebra: oklch(var(--blacklch) / 0.05);
--line: var(--black-2);

/* Borders */
--brad: 5px;
--border-size: 1.5px;
/* Borders */
--brad: 5px;
--border-size: 1.5px;
--border: solid var(--border-size) var(--fg-sheet);
}


Loading