added ios splash screens
BIN
public/splashes/apple-splash-dark-1125-2436.jpg
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
public/splashes/apple-splash-dark-1136-640.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/splashes/apple-splash-dark-1170-2532.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
public/splashes/apple-splash-dark-1179-2556.jpg
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
public/splashes/apple-splash-dark-1206-2622.jpg
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
public/splashes/apple-splash-dark-1242-2208.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
public/splashes/apple-splash-dark-1242-2688.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
public/splashes/apple-splash-dark-1284-2778.jpg
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
public/splashes/apple-splash-dark-1290-2796.jpg
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
public/splashes/apple-splash-dark-1320-2868.jpg
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
public/splashes/apple-splash-dark-1334-750.jpg
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
public/splashes/apple-splash-dark-1488-2266.jpg
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
public/splashes/apple-splash-dark-1536-2048.jpg
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
public/splashes/apple-splash-dark-1620-2160.jpg
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
public/splashes/apple-splash-dark-1640-2360.jpg
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
public/splashes/apple-splash-dark-1668-2224.jpg
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
public/splashes/apple-splash-dark-1668-2388.jpg
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
public/splashes/apple-splash-dark-1792-828.jpg
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
public/splashes/apple-splash-dark-2048-1536.jpg
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
public/splashes/apple-splash-dark-2048-2732.jpg
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
public/splashes/apple-splash-dark-2160-1620.jpg
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
public/splashes/apple-splash-dark-2208-1242.jpg
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
public/splashes/apple-splash-dark-2224-1668.jpg
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
public/splashes/apple-splash-dark-2266-1488.jpg
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
public/splashes/apple-splash-dark-2360-1640.jpg
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
public/splashes/apple-splash-dark-2388-1668.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
public/splashes/apple-splash-dark-2436-1125.jpg
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
public/splashes/apple-splash-dark-2532-1170.jpg
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
public/splashes/apple-splash-dark-2556-1179.jpg
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
public/splashes/apple-splash-dark-2622-1206.jpg
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
public/splashes/apple-splash-dark-2688-1242.jpg
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
public/splashes/apple-splash-dark-2732-2048.jpg
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
public/splashes/apple-splash-dark-2778-1284.jpg
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
public/splashes/apple-splash-dark-2796-1290.jpg
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
public/splashes/apple-splash-dark-2868-1320.jpg
Normal file
After Width: | Height: | Size: 48 KiB |
BIN
public/splashes/apple-splash-dark-640-1136.jpg
Normal file
After Width: | Height: | Size: 7.9 KiB |
BIN
public/splashes/apple-splash-dark-750-1334.jpg
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
public/splashes/apple-splash-dark-828-1792.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
48
src/app/head.tsx
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
const Head = () => (
|
||||||
|
<>
|
||||||
|
<meta name="apple-mobile-web-app-title" content="ClipFusion" />
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-2048-2732.jpg" media="(prefers-color-scheme: dark) and (device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-2732-2048.jpg" media="(prefers-color-scheme: dark) and (device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-1668-2388.jpg" media="(prefers-color-scheme: dark) and (device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-2388-1668.jpg" media="(prefers-color-scheme: dark) and (device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-1536-2048.jpg" media="(prefers-color-scheme: dark) and (device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-2048-1536.jpg" media="(prefers-color-scheme: dark) and (device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-1640-2360.jpg" media="(prefers-color-scheme: dark) and (device-width: 820px) and (device-height: 1180px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-2360-1640.jpg" media="(prefers-color-scheme: dark) and (device-width: 820px) and (device-height: 1180px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-1668-2224.jpg" media="(prefers-color-scheme: dark) and (device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-2224-1668.jpg" media="(prefers-color-scheme: dark) and (device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-1620-2160.jpg" media="(prefers-color-scheme: dark) and (device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-2160-1620.jpg" media="(prefers-color-scheme: dark) and (device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-1488-2266.jpg" media="(prefers-color-scheme: dark) and (device-width: 744px) and (device-height: 1133px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-2266-1488.jpg" media="(prefers-color-scheme: dark) and (device-width: 744px) and (device-height: 1133px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-1320-2868.jpg" media="(prefers-color-scheme: dark) and (device-width: 440px) and (device-height: 956px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-2868-1320.jpg" media="(prefers-color-scheme: dark) and (device-width: 440px) and (device-height: 956px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-1206-2622.jpg" media="(prefers-color-scheme: dark) and (device-width: 402px) and (device-height: 874px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-2622-1206.jpg" media="(prefers-color-scheme: dark) and (device-width: 402px) and (device-height: 874px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-1290-2796.jpg" media="(prefers-color-scheme: dark) and (device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-2796-1290.jpg" media="(prefers-color-scheme: dark) and (device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-1179-2556.jpg" media="(prefers-color-scheme: dark) and (device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-2556-1179.jpg" media="(prefers-color-scheme: dark) and (device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-1170-2532.jpg" media="(prefers-color-scheme: dark) and (device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-2532-1170.jpg" media="(prefers-color-scheme: dark) and (device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-1284-2778.jpg" media="(prefers-color-scheme: dark) and (device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-2778-1284.jpg" media="(prefers-color-scheme: dark) and (device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-1125-2436.jpg" media="(prefers-color-scheme: dark) and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-2436-1125.jpg" media="(prefers-color-scheme: dark) and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-1242-2688.jpg" media="(prefers-color-scheme: dark) and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-2688-1242.jpg" media="(prefers-color-scheme: dark) and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-828-1792.jpg" media="(prefers-color-scheme: dark) and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-1792-828.jpg" media="(prefers-color-scheme: dark) and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-1242-2208.jpg" media="(prefers-color-scheme: dark) and (device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-2208-1242.jpg" media="(prefers-color-scheme: dark) and (device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-750-1334.jpg" media="(prefers-color-scheme: dark) and (device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-1334-750.jpg" media="(prefers-color-scheme: dark) and (device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-640-1136.jpg" media="(prefers-color-scheme: dark) and (device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" />
|
||||||
|
<link rel="apple-touch-startup-image" href="public/splashes/apple-splash-dark-1136-640.jpg" media="(prefers-color-scheme: dark) and (device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)" />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default Head;
|
@ -8,6 +8,7 @@ import ThemeProvider from "./theme-provider";
|
|||||||
import Analytics from "./analytics";
|
import Analytics from "./analytics";
|
||||||
import PersistenceProvider from "./persistence-provider";
|
import PersistenceProvider from "./persistence-provider";
|
||||||
import { Toaster } from "@/components/ui/sonner";
|
import { Toaster } from "@/components/ui/sonner";
|
||||||
|
import Head from "./head";
|
||||||
|
|
||||||
const geist = Geist({
|
const geist = Geist({
|
||||||
variable: "--font-geist",
|
variable: "--font-geist",
|
||||||
@ -28,11 +29,7 @@ export const viewport: Viewport = {
|
|||||||
width: 'device-width',
|
width: 'device-width',
|
||||||
initialScale: 1,
|
initialScale: 1,
|
||||||
maximumScale: 1,
|
maximumScale: 1,
|
||||||
viewportFit: 'cover',
|
viewportFit: 'cover'
|
||||||
themeColor: [
|
|
||||||
{ media: "(prefers-color-scheme: dark)", color: "#0a0a0a" },
|
|
||||||
{ media: "(prefers-color-scheme: light)", color: "#ffffff" }
|
|
||||||
]
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default async function RootLayout({
|
export default async function RootLayout({
|
||||||
@ -43,9 +40,7 @@ export default async function RootLayout({
|
|||||||
return (
|
return (
|
||||||
<html lang="en" suppressHydrationWarning>
|
<html lang="en" suppressHydrationWarning>
|
||||||
<head>
|
<head>
|
||||||
<meta name="apple-mobile-web-app-title" content="ClipFusion" />
|
<Head/>
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
||||||
<Analytics/>
|
<Analytics/>
|
||||||
</head>
|
</head>
|
||||||
<body className={`${geist.variable} ${geistMono.variable} antialiased`}>
|
<body className={`${geist.variable} ${geistMono.variable} antialiased`}>
|
||||||
|
@ -1,8 +1,28 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import { ThemeProvider as NextThemeProvider } from "next-themes";
|
import { ThemeProvider as NextThemeProvider } from "next-themes";
|
||||||
import { ComponentProps, ReactNode } from "react";
|
import { ComponentProps, ReactNode, useEffect } from "react";
|
||||||
|
|
||||||
|
const useMetaTheme = () => {
|
||||||
|
useEffect(() => {
|
||||||
|
const updateThemeColor = () => {
|
||||||
|
const bgColor = window.getComputedStyle(document.body).backgroundColor;
|
||||||
|
const metaThemeColor = document.querySelector("meta[name=theme-color]");
|
||||||
|
metaThemeColor?.setAttribute("content", bgColor);
|
||||||
|
};
|
||||||
|
|
||||||
|
const observer = new MutationObserver(updateThemeColor);
|
||||||
|
|
||||||
|
observer.observe(document.documentElement, {
|
||||||
|
attributes: true,
|
||||||
|
attributeFilter: ["class"]
|
||||||
|
});
|
||||||
|
|
||||||
|
return () => observer.disconnect();
|
||||||
|
}, []);
|
||||||
|
};
|
||||||
|
|
||||||
const ThemeProvider = (props: ComponentProps<typeof NextThemeProvider>): ReactNode => {
|
const ThemeProvider = (props: ComponentProps<typeof NextThemeProvider>): ReactNode => {
|
||||||
|
useMetaTheme();
|
||||||
return (
|
return (
|
||||||
<NextThemeProvider {...props} attribute="class" defaultTheme="system" enableSystem disableTransitionOnChange>
|
<NextThemeProvider {...props} attribute="class" defaultTheme="system" enableSystem disableTransitionOnChange>
|
||||||
{props.children}
|
{props.children}
|
||||||
|
@ -10,16 +10,16 @@ export const ThemeSwitcher = ({
|
|||||||
}: {
|
}: {
|
||||||
variant?: "with-text"
|
variant?: "with-text"
|
||||||
}): ReactNode => {
|
}): ReactNode => {
|
||||||
const { theme, setTheme } = useTheme();
|
const { resolvedTheme, setTheme } = useTheme();
|
||||||
const [dark, setDark] = useState(false);
|
const [dark, setDark] = useState(false);
|
||||||
|
|
||||||
const onThemeChange = useCallback(() => {
|
const onThemeChange = useCallback(() => {
|
||||||
setTheme(theme == "dark" ? "light" : "dark");
|
setTheme(resolvedTheme == "dark" ? "light" : "dark");
|
||||||
setDark(!dark);
|
setDark(resolvedTheme == "light");
|
||||||
}, [theme, dark]);
|
}, [resolvedTheme, dark]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setDark(theme == "dark");
|
setDark(resolvedTheme == "dark");
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
|
darkMode: 'selector',
|
||||||
plugins: [
|
plugins: [
|
||||||
require("@tailwindcss/line-clamp")
|
require("@tailwindcss/line-clamp")
|
||||||
]
|
]
|
||||||
|