Added /about and /create to properly clean the state without a hard refresh

This commit is contained in:
Simon Cambier 2023-11-25 16:29:06 +01:00
parent 1afb6b664f
commit 3b0918311b
5 changed files with 18 additions and 7 deletions

View File

@ -4,7 +4,7 @@
This is a rewrite of https://nopaste.boris.sh/, which is a rewrite of https://topaz.github.io/paste/ This is a rewrite of https://nopaste.boris.sh/, which is a rewrite of https://topaz.github.io/paste/
[More information on this self-hosted "about" page](https://paste.scambier.xyz/?l=md#G1kEQCwPuDPLA5HZei/6YuLXI4CNnhokMPJdPX6CMk6AV6sRXN4KLSpfl7bVV9K+gXfaZ7V2MvAN0QZxE4en1XIehfAI5ZLNUVqTdXzdO/VgUeYHhcd0qVJe7X4xDduM5NzWwDg+EJj3ekXABlhqhM5CK+tLOS3PdcEsjGiTldkr3nCbBOg4yVND30EgE7TqErXwMg+BHW6IFplIC5n+anoPN0ChZlYsmC6kBy3EcBcS2586pAasFog++QYxh3UJ2TIKX7jGA+wD0BVx5amWAyX631A90A6synh4xP8J4euj0JF2uZewQuWgCXjQyWe/7QzxEEba6qG3g2cu9pFaJSXZ3JE+M0qmFl4Vo+sZ+pCB9PNSrY1YLoQZcTVDjpXepdLTN+PUeXgB1jSkV8ONR0GQTdOaozBrzPBaOJNz9rS7kIW9agQr7vEI2Q+WfRQyGjUhgr+V+TtQGILv8Nor7GkbT1yBBmcJkKqGmMBEDfSNzCU56GIHxuKj4vUgJG70sVZnFwVnpfN62HhUa2Gw9hL5CH3ybuCivf6sgNV/tD2NY0G9R7NI+OB85upexroYIJX5l4zDWRyO/9PeJaUB0vZ1Pw5fTiwyrpPHTIoiHVZAqx44zIhpjCS3rWYO+5NuASdaqsc+ZmkLMg==) [More information on this self-hosted "about" page](https://paste.scambier.xyz/about)
## Maximum lengths for links ## Maximum lengths for links

View File

@ -1,14 +1,15 @@
<script> <script lang="ts">
import { aboutUrl } from '$lib/utils'
</script> </script>
<div <div
class="flex flex-wrap justify-between items-center px-3 py-1 text-sm w-full z-10 shadow-md gap-2 font-mono bg-gray-700" class="flex flex-wrap justify-between items-center px-3 py-1 text-sm w-full z-10 shadow-md gap-2 font-mono bg-gray-700"
> >
<div class="flex items-center"> <div class="flex items-center">
<h1 class="text-xl"><a href="/editor" title="Create a new note">Paste</a></h1> <h1 class="text-xl">
<a href="/create" title="Create a new note">Paste</a>
</h1>
<span class="ml-8 text-xs"> <span class="ml-8 text-xs">
<a href={aboutUrl}>About</a> <a href="/about">About</a>
<a class="ml-4" href="https://git.scambier.xyz/scambier/paste" target="_blank">Source</a> <a class="ml-4" href="https://git.scambier.xyz/scambier/paste" target="_blank">Source</a>
</span> </span>
</div> </div>

View File

@ -37,5 +37,3 @@ export const byId = (id: string) => document.getElementById(id)
export const staticMetaDescription = export const staticMetaDescription =
'Paste is a client-side paste service with no database, and no back-end code. The data is stored entirely in the shared link' 'Paste is a client-side paste service with no database, and no back-end code. The data is stored entirely in the shared link'
export const aboutUrl =
'/?l=md#G1kEQCwPuDPLA5HZei/6YuLXI4CNnhokMPJdPX6CMk6AV6sRXN4KLSpfl7bVV9K+gXfaZ7V2MvAN0QZxE4en1XIehfAI5ZLNUVqTdXzdO/VgUeYHhcd0qVJe7X4xDduM5NzWwDg+EJj3ekXABlhqhM5CK+tLOS3PdcEsjGiTldkr3nCbBOg4yVND30EgE7TqErXwMg+BHW6IFplIC5n+anoPN0ChZlYsmC6kBy3EcBcS2586pAasFog++QYxh3UJ2TIKX7jGA+wD0BVx5amWAyX631A90A6synh4xP8J4euj0JF2uZewQuWgCXjQyWe/7QzxEEba6qG3g2cu9pFaJSXZ3JE+M0qmFl4Vo+sZ+pCB9PNSrY1YLoQZcTVDjpXepdLTN+PUeXgB1jSkV8ONR0GQTdOaozBrzPBaOJNz9rS7kIW9agQr7vEI2Q+WfRQyGjUhgr+V+TtQGILv8Nor7GkbT1yBBmcJkKqGmMBEDfSNzCU56GIHxuKj4vUgJG70sVZnFwVnpfN62HhUa2Gw9hL5CH3ybuCivf6sgNV/tD2NY0G9R7NI+OB85upexroYIJX5l4zDWRyO/9PeJaUB0vZ1Pw5fTiwyrpPHTIoiHVZAqx44zIhpjCS3rWYO+5NuASdaqsc+ZmkLMg=='

View File

@ -0,0 +1,7 @@
<script lang="ts">
import { goto } from '$app/navigation'
goto(
'/?l=md#G1kEQCwPuDPLA5HZei/6YuLXI4CNnhokMPJdPX6CMk6AV6sRXN4KLSpfl7bVV9K+gXfaZ7V2MvAN0QZxE4en1XIehfAI5ZLNUVqTdXzdO/VgUeYHhcd0qVJe7X4xDduM5NzWwDg+EJj3ekXABlhqhM5CK+tLOS3PdcEsjGiTldkr3nCbBOg4yVND30EgE7TqErXwMg+BHW6IFplIC5n+anoPN0ChZlYsmC6kBy3EcBcS2586pAasFog++QYxh3UJ2TIKX7jGA+wD0BVx5amWAyX631A90A6synh4xP8J4euj0JF2uZewQuWgCXjQyWe/7QzxEEba6qG3g2cu9pFaJSXZ3JE+M0qmFl4Vo+sZ+pCB9PNSrY1YLoQZcTVDjpXepdLTN+PUeXgB1jSkV8ONR0GQTdOaozBrzPBaOJNz9rS7kIW9agQr7vEI2Q+WfRQyGjUhgr+V+TtQGILv8Nor7GkbT1yBBmcJkKqGmMBEDfSNzCU56GIHxuKj4vUgJG70sVZnFwVnpfN62HhUa2Gw9hL5CH3ybuCivf6sgNV/tD2NY0G9R7NI+OB85upexroYIJX5l4zDWRyO/9PeJaUB0vZ1Pw5fTiwyrpPHTIoiHVZAqx44zIhpjCS3rWYO+5NuASdaqsc+ZmkLMg=='
)
</script>

View File

@ -0,0 +1,5 @@
<script lang="ts">
import { goto } from '$app/navigation'
goto('/editor')
</script>