mirror of
https://github.com/coracle-social/flotilla.git
synced 2025-12-10 10:57:04 +00:00
WE'LL DO IT LIVE
This commit is contained in:
6
build.sh
6
build.sh
@@ -21,3 +21,9 @@ fi
|
||||
|
||||
npx pwa-assets-generator
|
||||
npx vite build
|
||||
|
||||
# Replace index.html variables with stuff from our env
|
||||
perl -i -pe"s|{DESCRIPTION}|$VITE_PLATFORM_DESCRIPTION|g" build/index.html
|
||||
perl -i -pe"s|{ACCENT}|$VITE_PLATFORM_ACCENT|g" build/index.html
|
||||
perl -i -pe"s|{NAME}|$VITE_PLATFORM_NAME|g" build/index.html
|
||||
perl -i -pe"s|{URL}|$VITE_PLATFORM_URL|g" build/index.html
|
||||
|
||||
20
src/app.html
20
src/app.html
@@ -3,6 +3,26 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="{ACCENT}" />
|
||||
<meta name="description" content="{DESCRIPTION}" />
|
||||
<meta name="og:url" content="{URL}" />
|
||||
<meta name="og:type" content="website" />
|
||||
<meta name="og:title" content="{NAME}" />
|
||||
<meta name="og:description" content="{DESCRIPTION}" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:site" content="{URL}" />
|
||||
<meta name="twitter:title" content="{NAME}" />
|
||||
<meta name="twitter:description" content="{DESCRIPTION}" />
|
||||
<meta name="twitter:image" content="/maskable-icon-512x512.png" />
|
||||
<link rel="manifest" href="/manifest.webmanifest" />
|
||||
<link rel="icon" href="/favicon.ico" sizes="48x48" />
|
||||
<link rel="icon" href="/pwa-64x64.ico" sizes="any" type="image/png" />
|
||||
<link rel="icon" href="/pwa-192x192.ico" sizes="any" type="image/png" />
|
||||
<link rel="icon" href="/pwa-512x512.ico" sizes="any" type="image/png" />
|
||||
<link rel="icon" href="/pwa-64x64.ico" sizes="64x64" type="image/png" />
|
||||
<link rel="icon" href="/pwa-192x192.ico" sizes="192x192" type="image/png" />
|
||||
<link rel="icon" href="/pwa-512x512.ico" sizes="512x512" type="image/png" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon-180x180.png" />
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
<body data-sveltekit-preload-data="hover">
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script lang="ts">
|
||||
import "@src/app.css"
|
||||
import {pwaInfo} from 'virtual:pwa-info';
|
||||
import {onMount} from "svelte"
|
||||
import {get} from "svelte/store"
|
||||
import {sleep, take, sortBy, ago, now, HOUR} from "@welshman/lib"
|
||||
@@ -142,12 +141,6 @@
|
||||
})
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<meta name="theme-color" content={PLATFORM_ACCENT} />
|
||||
<link rel="icon" href={PLATFORM_LOGO} />
|
||||
<link rel="manifest" href="/manifest.webmanifest" />
|
||||
</svelte:head>
|
||||
|
||||
{#await ready}
|
||||
<div data-theme={$theme} />
|
||||
{:then}
|
||||
|
||||
@@ -9,11 +9,6 @@ import svg from "@poppanator/sveltekit-svg"
|
||||
dotenv.config({path: ".env.local"})
|
||||
dotenv.config({path: ".env"})
|
||||
|
||||
const FAVICONS_DIR = "static/favicons"
|
||||
const name = process.env.VITE_PLATFORM_NAME
|
||||
const accent = process.env.VITE_PLATFORM_ACCENT
|
||||
const description = process.env.VITE_PLATFORM_DESCRIPTION
|
||||
|
||||
export default defineConfig({
|
||||
server: {
|
||||
port: 1847,
|
||||
@@ -30,10 +25,10 @@ export default defineConfig({
|
||||
maximumFileSizeToCacheInBytes: 5 * 1024 ** 2, // 5 MB or set to something else
|
||||
},
|
||||
manifest: {
|
||||
name: name,
|
||||
short_name: name,
|
||||
theme_color: accent,
|
||||
description: description,
|
||||
name: process.env.VITE_PLATFORM_NAME,
|
||||
short_name: process.env.VITE_PLATFORM_NAME,
|
||||
theme_color: process.env.VITE_PLATFORM_ACCENT,
|
||||
description: process.env.VITE_PLATFORM_DESCRIPTION,
|
||||
permissions: ["clipboardRead", "clipboardWrite", "unlimitedStorage"],
|
||||
icons: [
|
||||
{src: "pwa-64x64.png", sizes: "64x64", type: "image/png"},
|
||||
|
||||
Reference in New Issue
Block a user