mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
[website] better home screen
[website[ ad units created
This commit is contained in:
parent
c6a2430767
commit
9254fb3f87
BIN
website/src/assets/spotube-screenshot-web.jpg
Normal file
BIN
website/src/assets/spotube-screenshot-web.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 323 KiB |
@ -1,9 +1,20 @@
|
|||||||
import { Button, ButtonGroup, Heading, HStack } from "@hope-ui/solid";
|
import {
|
||||||
|
Button,
|
||||||
|
ButtonGroup,
|
||||||
|
Heading,
|
||||||
|
HStack,
|
||||||
|
IconButton,
|
||||||
|
useColorMode,
|
||||||
|
} from "@hope-ui/solid";
|
||||||
import { NavLink } from "solid-app-router";
|
import { NavLink } from "solid-app-router";
|
||||||
|
import { FaLightbulb } from "solid-icons/fa";
|
||||||
|
import { FiSun } from "solid-icons/fi";
|
||||||
|
|
||||||
const Navbar = () => {
|
const Navbar = () => {
|
||||||
|
const { colorMode, toggleColorMode } = useColorMode();
|
||||||
return (
|
return (
|
||||||
<HStack as="nav" w="$full">
|
<HStack justifyContent="space-between" as="nav" w="$full">
|
||||||
|
<section>
|
||||||
<Heading p="$2" size="3xl" mr="$2" as={NavLink} href="/">
|
<Heading p="$2" size="3xl" mr="$2" as={NavLink} href="/">
|
||||||
Spotube
|
Spotube
|
||||||
</Heading>
|
</Heading>
|
||||||
@ -15,6 +26,15 @@ const Navbar = () => {
|
|||||||
About
|
About
|
||||||
</Button>
|
</Button>
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
|
</section>
|
||||||
|
<IconButton
|
||||||
|
variant="ghost"
|
||||||
|
icon={colorMode() == "dark" ? <FaLightbulb /> : <FiSun />}
|
||||||
|
aria-label="Dark Mode Toggle"
|
||||||
|
onClick={() => {
|
||||||
|
toggleColorMode();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</HStack>
|
</HStack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
19
website/src/components/special.tsx
Normal file
19
website/src/components/special.tsx
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import { createEffect } from "solid-js";
|
||||||
|
|
||||||
|
export function DisplayAd() {
|
||||||
|
createEffect(() => {
|
||||||
|
//@ts-ignore
|
||||||
|
(window.adsbygoogle = window.adsbygoogle || []).push({});
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ins
|
||||||
|
class="adsbygoogle"
|
||||||
|
style={{ display: "block" }}
|
||||||
|
data-ad-client="ca-pub-6419300932495863"
|
||||||
|
data-ad-slot="9501208974"
|
||||||
|
data-ad-format="auto"
|
||||||
|
data-full-width-responsive="true"
|
||||||
|
></ins>
|
||||||
|
);
|
||||||
|
}
|
13
website/src/misc/MarkdownComponentDefs.tsx
Normal file
13
website/src/misc/MarkdownComponentDefs.tsx
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import { Anchor, Heading, Text, hope } from "@hope-ui/solid";
|
||||||
|
|
||||||
|
export const MarkdownComponentDefs = {
|
||||||
|
a: (props: any) => <Anchor {...props} color="$info10" />,
|
||||||
|
h1: (props: any) => <Heading {...props} size="4xl" mt="$5" mb="$1_5" />,
|
||||||
|
h2: (props: any) => <Heading {...props} size="3xl" mt="$5" mb="$1_5" />,
|
||||||
|
h3: (props: any) => <Heading {...props} size="2xl" mt="$5" mb="$1_5" />,
|
||||||
|
h4: (props: any) => <Heading {...props} size="md" />,
|
||||||
|
h5: (props: any) => <Heading {...props} size="lg" />,
|
||||||
|
h6: (props: any) => <Heading {...props} size="md" />,
|
||||||
|
p: (props: any) => <Text {...props} />,
|
||||||
|
li: (props: any) => <hope.li {...props} ml="$4" />,
|
||||||
|
};
|
@ -5,10 +5,9 @@ import {
|
|||||||
AccordionItem,
|
AccordionItem,
|
||||||
AccordionPanel,
|
AccordionPanel,
|
||||||
Anchor,
|
Anchor,
|
||||||
Container,
|
|
||||||
Heading,
|
Heading,
|
||||||
HStack,
|
HStack,
|
||||||
Stack,
|
Skeleton,
|
||||||
Text,
|
Text,
|
||||||
VStack,
|
VStack,
|
||||||
} from "@hope-ui/solid";
|
} from "@hope-ui/solid";
|
||||||
@ -17,6 +16,8 @@ import { createCachedResource } from "solid-cached-resource";
|
|||||||
import SolidMarkdown from "solid-markdown";
|
import SolidMarkdown from "solid-markdown";
|
||||||
import { Platform } from "../hooks/usePlatform";
|
import { Platform } from "../hooks/usePlatform";
|
||||||
import gfm from "remark-gfm";
|
import gfm from "remark-gfm";
|
||||||
|
import { MarkdownComponentDefs } from "../misc/MarkdownComponentDefs";
|
||||||
|
import { DisplayAd } from "../components/special";
|
||||||
|
|
||||||
enum AssetTypes {
|
enum AssetTypes {
|
||||||
sums = "sums",
|
sums = "sums",
|
||||||
@ -42,8 +43,14 @@ const AllVersions = () => {
|
|||||||
If any of your version is not working correctly than you can download &
|
If any of your version is not working correctly than you can download &
|
||||||
use previous versions of Spotube too
|
use previous versions of Spotube too
|
||||||
</Text>
|
</Text>
|
||||||
|
<HStack alignItems="flex-start">
|
||||||
<VStack alignItems="stretch" spacing="$3" mr="$1">
|
<VStack alignItems="stretch" spacing="$3" mr="$1">
|
||||||
{data()?.data.map((release, i) => {
|
{data.loading &&
|
||||||
|
!data.latest && [
|
||||||
|
<Skeleton h="$6" w="$56" />,
|
||||||
|
...Array.from({ length: 8 }, () => <Skeleton h="$6" w="$96" />),
|
||||||
|
]}
|
||||||
|
{(data.latest ?? data())?.data.map((release, i) => {
|
||||||
const releaseSome = release.assets
|
const releaseSome = release.assets
|
||||||
.map((asset) => {
|
.map((asset) => {
|
||||||
const platform =
|
const platform =
|
||||||
@ -119,45 +126,7 @@ const AllVersions = () => {
|
|||||||
</AccordionButton>
|
</AccordionButton>
|
||||||
<AccordionPanel>
|
<AccordionPanel>
|
||||||
<SolidMarkdown
|
<SolidMarkdown
|
||||||
components={{
|
components={MarkdownComponentDefs}
|
||||||
a: (props) => (
|
|
||||||
<Anchor {...(props as any)} color="$info10" />
|
|
||||||
),
|
|
||||||
h1: (props) => (
|
|
||||||
<Heading
|
|
||||||
{...(props as any)}
|
|
||||||
size="4xl"
|
|
||||||
mt="$5"
|
|
||||||
mb="$1_5"
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
h2: (props) => (
|
|
||||||
<Heading
|
|
||||||
{...(props as any)}
|
|
||||||
size="3xl"
|
|
||||||
mt="$5"
|
|
||||||
mb="$1_5"
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
h3: (props) => (
|
|
||||||
<Heading
|
|
||||||
{...(props as any)}
|
|
||||||
size="2xl"
|
|
||||||
mt="$5"
|
|
||||||
mb="$1_5"
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
h4: (props) => (
|
|
||||||
<Heading {...(props as any)} size="md" />
|
|
||||||
),
|
|
||||||
h5: (props) => (
|
|
||||||
<Heading {...(props as any)} size="lg" />
|
|
||||||
),
|
|
||||||
h6: (props) => (
|
|
||||||
<Heading {...(props as any)} size="md" />
|
|
||||||
),
|
|
||||||
p: (props) => <Text {...(props as any)} size="" />,
|
|
||||||
}}
|
|
||||||
remarkPlugins={[gfm]}
|
remarkPlugins={[gfm]}
|
||||||
>
|
>
|
||||||
{release.body ?? ""}
|
{release.body ?? ""}
|
||||||
@ -169,6 +138,13 @@ const AllVersions = () => {
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</VStack>
|
</VStack>
|
||||||
|
<VStack id="Ad">
|
||||||
|
<DisplayAd />
|
||||||
|
<DisplayAd />
|
||||||
|
<DisplayAd />
|
||||||
|
<DisplayAd />
|
||||||
|
</VStack>
|
||||||
|
</HStack>
|
||||||
</VStack>
|
</VStack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -9,8 +9,10 @@ import {
|
|||||||
MenuContent,
|
MenuContent,
|
||||||
MenuItem,
|
MenuItem,
|
||||||
VStack,
|
VStack,
|
||||||
|
hope,
|
||||||
} from "@hope-ui/solid";
|
} from "@hope-ui/solid";
|
||||||
import { FaSolidCaretDown } from "solid-icons/fa";
|
import { FaSolidCaretDown } from "solid-icons/fa";
|
||||||
|
import { DisplayAd } from "../components/special";
|
||||||
import { Platform, usePlatform } from "../hooks/usePlatform";
|
import { Platform, usePlatform } from "../hooks/usePlatform";
|
||||||
|
|
||||||
const baseURL = "https://github.com/KRTirtho/spotube/releases/latest/download/";
|
const baseURL = "https://github.com/KRTirtho/spotube/releases/latest/download/";
|
||||||
@ -48,11 +50,22 @@ export const Root = () => {
|
|||||||
|
|
||||||
const currentPlatform = DownloadLinks[platform][0];
|
const currentPlatform = DownloadLinks[platform][0];
|
||||||
return (
|
return (
|
||||||
<VStack alignSelf="center" spacing="$4">
|
<VStack spacing="$4" alignItems="stretch">
|
||||||
<Heading size="5xl">Spotube</Heading>
|
<hope.section
|
||||||
<Heading size="2xl">
|
h="60vh"
|
||||||
A fast, modern, lightweight & efficient Spotify Music Client for every
|
backgroundColor="#f5f5f5"
|
||||||
platform
|
style={{
|
||||||
|
"background-image": "url(/src/assets/spotube-screenshot-web.jpg)",
|
||||||
|
"background-repeat": "no-repeat",
|
||||||
|
"background-size": "contain",
|
||||||
|
"background-position": "right",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<VStack mt="$10" mx="$6" spacing="$4" alignItems="flex-start">
|
||||||
|
<Heading color="#212121" size="5xl">Spotube</Heading>
|
||||||
|
<Heading color="#212121" size="2xl" textAlign="justify" maxW="500px">
|
||||||
|
A fast, modern, lightweight & efficient Spotify Music Client for
|
||||||
|
every platform
|
||||||
</Heading>
|
</Heading>
|
||||||
<Menu placement="bottom-end">
|
<Menu placement="bottom-end">
|
||||||
<ButtonGroup spacing="$0_5">
|
<ButtonGroup spacing="$0_5">
|
||||||
@ -79,5 +92,8 @@ export const Root = () => {
|
|||||||
</MenuContent>
|
</MenuContent>
|
||||||
</Menu>
|
</Menu>
|
||||||
</VStack>
|
</VStack>
|
||||||
|
</hope.section>
|
||||||
|
<DisplayAd />
|
||||||
|
</VStack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user