✨ Sunset services
This commit is contained in:
		| @@ -11,7 +11,7 @@ | ||||
|       <div class="text-center"> | ||||
|         <img src="/favicon.svg" width="64" height="64" class="mx-auto" /> | ||||
|  | ||||
|         <h1 class="text-2xl font-bold">Redirecting...</h1> | ||||
|         <h1 id="title" class="text-2xl font-bold">Redirecting...</h1> | ||||
|  | ||||
|         <p class="text-lg mt-3">SmartSheep is now known as Solsynth</p> | ||||
|         <p>We also updated our domain.</p> | ||||
| @@ -24,7 +24,7 @@ | ||||
|  | ||||
|         <p class="mt-3">Please add our new domain to your browser favorites.</p> | ||||
|  | ||||
|         <div class="mt-3 text-sm text-center"> | ||||
|         <div id="redirect-info" class="mt-3 text-sm text-center"> | ||||
|           <p>You are going to redirect to</p> | ||||
|           <code id="redirect-target">https://solsynth.dev</code> | ||||
|           <p>in 5 seconds</p> | ||||
|   | ||||
							
								
								
									
										25
									
								
								src/main.ts
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								src/main.ts
									
									
									
									
									
								
							| @@ -7,10 +7,25 @@ import "@fontsource/roboto/latin.css" | ||||
|  | ||||
| import { sitemap } from "./site" | ||||
|  | ||||
| const site = sitemap[location.host] ?? location.host.replace("smartsheep.studio", "solsynth.dev") | ||||
| const url = location.protocol + "//" + site + location.pathname + location.search + location.hash | ||||
| if (sitemap[location.host] !== false) { | ||||
|   const site = sitemap[location.host] ?? location.host.replace("smartsheep.studio", "solsynth.dev") | ||||
|   const url = location.protocol + "//" + site + location.pathname + location.search + location.hash | ||||
|  | ||||
| const target = document.querySelector("#redirect-target") | ||||
| if (target) target.innerHTML = url | ||||
|   const target = document.querySelector("#redirect-target") | ||||
|   if (target) target.innerHTML = url | ||||
|  | ||||
| setTimeout(() => window.open(url, "_self"), 5000) | ||||
|   setTimeout(() => window.open(url, "_self"), 5000) | ||||
| } else { | ||||
|   const title = document.querySelector("#title") | ||||
|   if (title) { | ||||
|     title.classList.replace("text-2xl", "text-xl") | ||||
|     title.innerHTML = "Sorry, this service not available anymore..." | ||||
|   } | ||||
|   const info = document.querySelector("#redirect-info") | ||||
|   if (info) { | ||||
|     info.innerHTML = | ||||
|       "<p>We decided sunset this service for some reasons.</p>" + | ||||
|       "<p>More information please check out our official website.</p>" + | ||||
|       "<p>We're sorry, but this is the final decision.</p>" | ||||
|   } | ||||
| } | ||||
|   | ||||
							
								
								
									
										18
									
								
								src/site.ts
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								src/site.ts
									
									
									
									
									
								
							| @@ -1,9 +1,13 @@ | ||||
| export const sitemap: { [id: string]: string } = { | ||||
|     // Goatworks | ||||
|     "smartsheep.studio": "solsynth.dev", | ||||
|     "code.smartsheep.studio": "git.solsynth.dev", | ||||
| export const sitemap: { [id: string]: string | boolean } = { | ||||
|   // Goatworks | ||||
|   "smartsheep.studio": "solsynth.dev", | ||||
|   "code.smartsheep.studio": "git.solsynth.dev", | ||||
|  | ||||
|     // Hydrogen | ||||
|     "id.smartsheep.studio": "id.solsynth.dev", | ||||
|     "feed.smartsheep.studio": "co.solsynth.dev" | ||||
|   // Hydrogen | ||||
|   "id.smartsheep.studio": "id.solsynth.dev", | ||||
|   "feed.smartsheep.studio": "co.solsynth.dev", | ||||
|  | ||||
|   // Matrix | ||||
|   "matrix.smartsheep.studio": false, | ||||
|   "chat.smartsheep.studio": false | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user