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

Move header into hero on home page #1156

Merged
merged 3 commits into from
Oct 10, 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: 2 additions & 0 deletions src/lib/PodcastHero.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import Header from '../routes/(site)/Header.svelte';
import Logo from './Logo.svelte';
import PodcastLinks from './PodcastLinks.svelte';
import Schedule from './schedule.svelte';
Expand All @@ -10,6 +11,7 @@
style:--fg="var(--white)"
class="zone full layout"
>
<Header transparent={true} />
<div class="hero">
<div class="logo">
<a href="/"><Logo /></a>
Expand Down
5 changes: 4 additions & 1 deletion src/routes/(site)/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import AdminMenu from '$lib/AdminMenu.svelte';
import { debug_mode } from '$state/debug';
import ThemeMaker from '../../params/ThemeMaker.svelte';
import { page } from '$app/stores';
export let data;
$: ({ user, user_theme } = data);

Expand All @@ -34,7 +35,9 @@
<!-- <Meta /> -->

<div class={'theme-' + ($theme || user_theme) + ' theme-wrapper'} class:debug={$debug_mode}>
<Header />
{#if $page.url.pathname !== '/'}
<Header />
{/if}

<main class="page-layout layout zone" style:--bg="var(--bg-sheet)" style:--fg="var(--fg-sheet)">
<slot />
Expand Down
10 changes: 9 additions & 1 deletion src/routes/(site)/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
import Search from '$lib/search/Search.svelte';
import MobileNav from './MobileNav.svelte';
import { page } from '$app/stores';
export let transparent: boolean = false;
</script>

<header class="layout">
<header class="layout" class:transparent>
<div class="header-container content">
<div class="logo">
{#if $page.url.pathname !== '/'}
Expand Down Expand Up @@ -33,6 +34,9 @@
background-color: var(--bg);
color: var(--fg);
padding: 0 0.5rem;
&.transparent {
background: none;
}
}

.header-container {
Expand Down Expand Up @@ -61,6 +65,10 @@
gap: 10px;
justify-content: end;
align-items: center;
.transparent & {
grid-column: 1 / -1;
justify-content: center;
}
a {
display: block;
text-decoration: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
×
<span class="topics">
{#each show.aiShowNote?.topics?.slice(0, 5) || [] as topic}
<span class="topic">#{topic.name}</span>
<span class="topic">{topic.name.startsWith('#') ? '' : '#'}{topic.name}</span>
{/each}
</span>
</p>
Expand Down
Loading