victor HF Staff commited on
Commit
922a0f7
·
unverified ·
1 Parent(s): c087a6b

Manifest update (#513)

Browse files

* display = standalone

* meta theme-color

* mobile rounded menu

* update images

* thumbnail

fit in a square too

src/app.html CHANGED
@@ -3,12 +3,16 @@
3
  <head>
4
  <meta charset="utf-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
 
6
  <script>
7
  if (
8
  localStorage.theme === "dark" ||
9
  (!("theme" in localStorage) && window.matchMedia("(prefers-color-scheme: dark)").matches)
10
  ) {
11
  document.documentElement.classList.add("dark");
 
 
 
12
  }
13
 
14
  // For some reason, Sveltekit doesn't let us load env variables from .env here, so we load it from hooks.server.ts
 
3
  <head>
4
  <meta charset="utf-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
6
+ <meta name="theme-color" content="rgb(249, 250, 251)" />
7
  <script>
8
  if (
9
  localStorage.theme === "dark" ||
10
  (!("theme" in localStorage) && window.matchMedia("(prefers-color-scheme: dark)").matches)
11
  ) {
12
  document.documentElement.classList.add("dark");
13
+ document
14
+ .querySelector('meta[name="theme-color"]')
15
+ .setAttribute("content", "rgb(26, 36, 50)");
16
  }
17
 
18
  // For some reason, Sveltekit doesn't let us load env variables from .env here, so we load it from hooks.server.ts
src/lib/components/MobileNav.svelte CHANGED
@@ -45,7 +45,7 @@
45
  >
46
  </nav>
47
  <nav
48
- class="fixed inset-0 z-30 grid max-h-screen grid-cols-1 grid-rows-[auto,auto,1fr,auto] bg-white bg-gradient-to-l from-gray-50 dark:bg-gray-900 dark:from-gray-800/30 {isOpen
49
  ? 'block'
50
  : 'hidden'}"
51
  >
 
45
  >
46
  </nav>
47
  <nav
48
+ class="fixed inset-0 z-30 grid max-h-screen grid-cols-1 grid-rows-[auto,auto,1fr,auto] bg-white bg-gradient-to-l from-gray-50 dark:bg-gray-900 dark:from-gray-800/30 max-sm:rounded-t-2xl {isOpen
49
  ? 'block'
50
  : 'hidden'}"
51
  >
src/lib/switchTheme.ts CHANGED
@@ -1,10 +1,14 @@
1
  export function switchTheme() {
2
  const { classList } = document.querySelector("html") as HTMLElement;
 
 
3
  if (classList.contains("dark")) {
4
  classList.remove("dark");
 
5
  localStorage.theme = "light";
6
  } else {
7
  classList.add("dark");
 
8
  localStorage.theme = "dark";
9
  }
10
  }
 
1
  export function switchTheme() {
2
  const { classList } = document.querySelector("html") as HTMLElement;
3
+ const metaTheme = document.querySelector('meta[name="theme-color"]') as HTMLMetaElement;
4
+
5
  if (classList.contains("dark")) {
6
  classList.remove("dark");
7
+ metaTheme.setAttribute("content", "rgb(249, 250, 251)");
8
  localStorage.theme = "light";
9
  } else {
10
  classList.add("dark");
11
+ metaTheme.setAttribute("content", "rgb(26, 36, 50)");
12
  localStorage.theme = "dark";
13
  }
14
  }
src/routes/+layout.svelte CHANGED
@@ -128,33 +128,17 @@
128
  />
129
  <link
130
  rel="icon"
131
- href="{PUBLIC_ORIGIN || $page.url.origin}{base}/{PUBLIC_APP_ASSETS}/favicon.svg"
132
- type="image/svg+xml"
133
  />
134
  <link
135
  rel="icon"
136
- href="{PUBLIC_ORIGIN || $page.url.origin}{base}/{PUBLIC_APP_ASSETS}/favicon.png"
137
- type="image/png"
138
- />
139
- <!-- Icon Support for iOS Bookmark Home Screen -->
140
- <link
141
- rel="apple-touch-icon"
142
- href="{PUBLIC_ORIGIN || $page.url.origin}{base}/{PUBLIC_APP_ASSETS}/touch-icon-ipad-retina.png"
143
- sizes="167x167"
144
- type="image/png"
145
- />
146
- <link
147
- rel="apple-touch-icon"
148
- href="{PUBLIC_ORIGIN || $page.url.origin}{base}/{PUBLIC_APP_ASSETS}/touch-icon-ipad.png"
149
- sizes="152x152"
150
- type="image/png"
151
  />
152
  <link
153
  rel="apple-touch-icon"
154
- href="{PUBLIC_ORIGIN ||
155
- $page.url.origin}{base}/{PUBLIC_APP_ASSETS}/touch-icon-iphone-retina.png"
156
- sizes="180x180"
157
- type="image/png"
158
  />
159
  <link
160
  rel="manifest"
 
128
  />
129
  <link
130
  rel="icon"
131
+ href="{PUBLIC_ORIGIN || $page.url.origin}{base}/{PUBLIC_APP_ASSETS}/favicon.ico"
132
+ sizes="32x32"
133
  />
134
  <link
135
  rel="icon"
136
+ href="{PUBLIC_ORIGIN || $page.url.origin}{base}/{PUBLIC_APP_ASSETS}/icon.svg"
137
+ type="image/svg+xml"
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  />
139
  <link
140
  rel="apple-touch-icon"
141
+ href="{PUBLIC_ORIGIN || $page.url.origin}{base}/{PUBLIC_APP_ASSETS}/apple-touch-icon.png"
 
 
 
142
  />
143
  <link
144
  rel="manifest"
static/chatui/{favicon.png → apple-touch-icon.png} RENAMED
File without changes
static/chatui/favicon.ico ADDED
static/chatui/favicon.svg CHANGED
static/chatui/{touch-icon-ipad-retina.png → icon-128x128.png} RENAMED
File without changes
static/chatui/{touch-icon-ipad.png → icon-256x256.png} RENAMED
File without changes
static/chatui/{touch-icon-iphone-retina.png → icon-512x512.png} RENAMED
File without changes
static/chatui/icon.svg ADDED
static/chatui/manifest.json CHANGED
@@ -1,29 +1,23 @@
1
  {
2
  "background_color": "#ffffff",
3
- "theme_color": "#3b82f6",
4
  "name": "Chat UI",
5
  "short_name": "Chat UI",
6
- "display": "minimal-ui",
7
  "start_url": "/",
8
  "icons": [
9
  {
10
- "src": "/chatui/touch-icon-ipad-retina.png",
11
- "sizes": "167x167",
12
  "type": "image/png"
13
  },
14
  {
15
- "src": "/chatui/touch-icon-ipad.png",
16
- "sizes": "152x152",
17
  "type": "image/png"
18
  },
19
  {
20
- "src": "/chatui/touch-icon-iphone-retina.png",
21
- "sizes": "180x180",
22
- "type": "image/png"
23
- },
24
- {
25
- "src": "/chatui/favicon.png",
26
- "sizes": "192x192",
27
  "type": "image/png"
28
  }
29
  ]
 
1
  {
2
  "background_color": "#ffffff",
 
3
  "name": "Chat UI",
4
  "short_name": "Chat UI",
5
+ "display": "standalone",
6
  "start_url": "/",
7
  "icons": [
8
  {
9
+ "src": "/chatui/icon-128x128.png",
10
+ "sizes": "128x128",
11
  "type": "image/png"
12
  },
13
  {
14
+ "src": "/chatui/icon-256x256.png",
15
+ "sizes": "256x256",
16
  "type": "image/png"
17
  },
18
  {
19
+ "src": "/chatui/icon-512x512.png",
20
+ "sizes": "512x512",
 
 
 
 
 
21
  "type": "image/png"
22
  }
23
  ]
static/huggingchat/apple-touch-icon.png ADDED

Git LFS Details

  • SHA256: 08a796f8cd63c025022f7c05c8b8494e73c2b1f5069b50cc1f3120d6a960448d
  • Pointer size: 129 Bytes
  • Size of remote file: 2.7 kB
static/huggingchat/favicon.ico ADDED
static/huggingchat/favicon.png DELETED

Git LFS Details

  • SHA256: cc839709e8a2452522e83b462e7491ae631964e51ee0995793bea5369b344737
  • Pointer size: 129 Bytes
  • Size of remote file: 2.77 kB
static/huggingchat/favicon.svg CHANGED
static/huggingchat/icon-128x128.png ADDED

Git LFS Details

  • SHA256: b29470941a3fa93e445cba9431fb216a3310561f2a6e6ffb13f9c4f2635c08ef
  • Pointer size: 129 Bytes
  • Size of remote file: 1.99 kB
static/huggingchat/icon-256x256.png ADDED

Git LFS Details

  • SHA256: 21c1b7d723da49ec890adda367604cdd5adbea251d526049423874c9603f862f
  • Pointer size: 129 Bytes
  • Size of remote file: 3.77 kB
static/huggingchat/icon-512x512.png ADDED

Git LFS Details

  • SHA256: cd8cb0d6ea945d929e559377266951b34605b1ac0c80d56a036b3138195aa7a1
  • Pointer size: 129 Bytes
  • Size of remote file: 7.72 kB
static/huggingchat/icon.svg ADDED
static/huggingchat/manifest.json CHANGED
@@ -1,29 +1,23 @@
1
  {
2
  "background_color": "#ffffff",
3
- "theme_color": "#eab308",
4
  "name": "HuggingChat",
5
  "short_name": "HuggingChat",
6
- "display": "minimal-ui",
7
  "start_url": "/chat",
8
  "icons": [
9
  {
10
- "src": "/huggingchat/touch-icon-ipad-retina.png",
11
- "sizes": "167x167",
12
  "type": "image/png"
13
  },
14
  {
15
- "src": "/huggingchat/touch-icon-ipad.png",
16
- "sizes": "152x152",
17
  "type": "image/png"
18
  },
19
  {
20
- "src": "/huggingchat/touch-icon-iphone-retina.png",
21
- "sizes": "180x180",
22
- "type": "image/png"
23
- },
24
- {
25
- "src": "/huggingchat/favicon.png",
26
- "sizes": "192x192",
27
  "type": "image/png"
28
  }
29
  ]
 
1
  {
2
  "background_color": "#ffffff",
 
3
  "name": "HuggingChat",
4
  "short_name": "HuggingChat",
5
+ "display": "standalone",
6
  "start_url": "/chat",
7
  "icons": [
8
  {
9
+ "src": "/huggingchat/icon-128x128.png",
10
+ "sizes": "128x128",
11
  "type": "image/png"
12
  },
13
  {
14
+ "src": "/huggingchat/icon-256x256.png",
15
+ "sizes": "256x256",
16
  "type": "image/png"
17
  },
18
  {
19
+ "src": "/huggingchat/icon-512x512.png",
20
+ "sizes": "512x512",
 
 
 
 
 
21
  "type": "image/png"
22
  }
23
  ]
static/huggingchat/thumbnail.png CHANGED

Git LFS Details

  • SHA256: 3b8fff56fb933f5ce380d5c7a58806b5b365c26f02c8bd6219945c94857e7058
  • Pointer size: 130 Bytes
  • Size of remote file: 16.8 kB

Git LFS Details

  • SHA256: 7df3570943d07ab30c4d5e54008809452e5032d29612135015fa662fb23805c7
  • Pointer size: 130 Bytes
  • Size of remote file: 13.4 kB
static/huggingchat/touch-icon-ipad-retina.png DELETED

Git LFS Details

  • SHA256: e05e44905ba7ce0264b9da19aca798a4e24813bd5a658f8ae739895266405ab5
  • Pointer size: 129 Bytes
  • Size of remote file: 8.12 kB
static/huggingchat/touch-icon-ipad.png DELETED

Git LFS Details

  • SHA256: 2cefd4d6804ffef630b7642b06e6b1b06a60bb3cb71e626cb52d0c9859c7c0f4
  • Pointer size: 129 Bytes
  • Size of remote file: 8.07 kB
static/huggingchat/touch-icon-iphone-retina.png DELETED

Git LFS Details

  • SHA256: fd398da221b305b005585ba61798c6b24d091902cfb2a17db63c7d83bbf27ccc
  • Pointer size: 129 Bytes
  • Size of remote file: 9.2 kB