Remove themes page

This commit is contained in:
Jon Staab
2024-10-22 09:22:55 -07:00
parent 8faf341503
commit ec6846f1af
5 changed files with 61 additions and 139 deletions

View File

@@ -11,7 +11,8 @@
const next = () => {
window.open("https://relay.tools/signup")
pushModal(SpaceInviteAccept)
setTimeout(() => pushModal(SpaceInviteAccept), 300)
}
</script>

View File

@@ -1,27 +0,0 @@
<script lang="ts">
import {fly} from "@lib/transition"
import Icon from "@lib/components/Icon.svelte"
import Page from "@lib/components/Page.svelte"
import SecondaryNav from "@lib/components/SecondaryNav.svelte"
import SecondaryNavItem from "@lib/components/SecondaryNavItem.svelte"
import SecondaryNavSection from "@lib/components/SecondaryNavSection.svelte"
</script>
<SecondaryNav>
<SecondaryNavSection>
<div in:fly>
<SecondaryNavItem href="/discover">
<Icon icon="widget" /> Spaces
</SecondaryNavItem>
</div>
<div in:fly={{delay: 50}}>
<SecondaryNavItem href="/discover/themes">
<Icon icon="pallete-2" /> Themes
</SecondaryNavItem>
</div>
</SecondaryNavSection>
</SecondaryNav>
<Page>
<slot />
</Page>

View File

@@ -6,6 +6,7 @@
import {relays, createSearch, relaySelections} from "@welshman/app"
import {createScroller} from "@lib/html"
import Icon from "@lib/components/Icon.svelte"
import Page from "@lib/components/Page.svelte"
import Button from "@lib/components/Button.svelte"
import PageHeader from "@lib/components/PageHeader.svelte"
import RelayName from "@app/components/RelayName.svelte"
@@ -72,7 +73,8 @@
})
</script>
<div class="content column gap-4" bind:this={element}>
<Page>
<div class="content column gap-4" bind:this={element}>
<PageHeader>
<div slot="title">Discover Spaces</div>
<div slot="info">Find communities all across the nostr network</div>
@@ -123,4 +125,5 @@
{/if}
</Button>
{/each}
</div>
</div>
</Page>

View File

@@ -1,31 +0,0 @@
<script lang="ts">
import themes from "daisyui/src/theming/themes"
import {identity} from "@welshman/lib"
import {createSearch} from "@welshman/app"
import Icon from "@lib/components/Icon.svelte"
import PageHeader from "@lib/components/PageHeader.svelte"
import {theme} from "@app/theme"
let term = ""
const searchThemes = createSearch(Object.keys(themes), {getValue: identity})
</script>
<div class="content column gap-4">
<PageHeader>
<div slot="title">Discover Themes</div>
<div slot="info">Make your community feel like home</div>
</PageHeader>
<label class="input input-bordered flex w-full items-center gap-2">
<Icon icon="magnifer" />
<input bind:value={term} class="grow" type="text" placeholder="Search for themes..." />
</label>
<div class="grid grid-cols-2 gap-4 md:grid-cols-2">
{#each searchThemes.searchValues(term) as name}
<div class="card2 bg-alt flex flex-col justify-center gap-4 shadow-xl" data-theme={name}>
<h2 class="card2 bg-alt text-center capitalize">{name}</h2>
<button class="btn btn-primary w-full" on:click={() => theme.set(name)}>Use Theme</button>
</div>
{/each}
</div>
</div>

View File

@@ -1,4 +1,7 @@
import daisyui from "daisyui"
import themes from "daisyui/src/theming/themes"
console.log(themes["dark"])
/** @type {import('tailwindcss').Config} */
export default {
@@ -20,38 +23,11 @@ export default {
plugins: [daisyui],
daisyui: {
themes: [
"light",
"dark",
"cupcake",
"bumblebee",
"emerald",
"corporate",
"synthwave",
"retro",
"cyberpunk",
"valentine",
"halloween",
"garden",
"forest",
"aqua",
"lofi",
"pastel",
"fantasy",
"wireframe",
"black",
"luxury",
"dracula",
"cmyk",
"autumn",
"business",
"acid",
"lemonade",
"night",
"coffee",
"winter",
"dim",
"nord",
"sunset",
{
dark: {
...themes["dark"],
},
},
],
},
}