victor HF staff commited on
Commit
7173f4f
1 Parent(s): 9187ced

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/apple-touch-icon.png ADDED
static/chatui/favicon.ico ADDED
static/chatui/favicon.png DELETED
Binary file (4.65 kB)
 
static/chatui/favicon.svg CHANGED
static/chatui/icon-128x128.png ADDED
static/chatui/icon-256x256.png ADDED
static/chatui/icon-512x512.png ADDED
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/chatui/touch-icon-ipad-retina.png DELETED
Binary file (5.19 kB)
 
static/chatui/touch-icon-ipad.png DELETED
Binary file (4.69 kB)
 
static/chatui/touch-icon-iphone-retina.png DELETED
Binary file (1.57 kB)
 
static/huggingchat/apple-touch-icon.png ADDED
static/huggingchat/favicon.ico ADDED
static/huggingchat/favicon.png DELETED
Binary file (2.77 kB)
 
static/huggingchat/favicon.svg CHANGED
static/huggingchat/icon-128x128.png ADDED
static/huggingchat/icon-256x256.png ADDED
static/huggingchat/icon-512x512.png ADDED
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
static/huggingchat/touch-icon-ipad-retina.png DELETED
Binary file (8.12 kB)
 
static/huggingchat/touch-icon-ipad.png DELETED
Binary file (8.07 kB)
 
static/huggingchat/touch-icon-iphone-retina.png DELETED
Binary file (9.2 kB)