Compare commits
10 commits
1013f18082
...
c9196ccbd6
Author | SHA1 | Date | |
---|---|---|---|
c9196ccbd6 | |||
487b026a06 | |||
f2cfca2f1b | |||
b17de3a8e1 | |||
6e6db6d109 | |||
697dfdab18 | |||
bf089dd078 | |||
6f9336a08d | |||
246b874d25 | |||
92ee5122ea |
5 changed files with 115 additions and 14 deletions
|
@ -20,6 +20,7 @@
|
||||||
"href": "https://github.com/pancakesmeow",
|
"href": "https://github.com/pancakesmeow",
|
||||||
"icon": "github-mark.png",
|
"icon": "github-mark.png",
|
||||||
"iconInvert": true,
|
"iconInvert": true,
|
||||||
|
"mainOnly": true,
|
||||||
"name": "GitHub (inactive)",
|
"name": "GitHub (inactive)",
|
||||||
"username": "pancakesmeow"
|
"username": "pancakesmeow"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import links from "../../data/links.json";
|
|
||||||
import { page } from "$app/stores";
|
import { page } from "$app/stores";
|
||||||
|
import links from "../../data/links.json";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<a href="#main-content" class="skip-to-main">Skip to main content</a>
|
<a href="#main-content" class="skip-to-main">Skip to main content</a>
|
||||||
|
@ -10,19 +10,22 @@
|
||||||
<a href="/">pancakes</a>
|
<a href="/">pancakes</a>
|
||||||
</span>
|
</span>
|
||||||
{#if $page.url.pathname !== "/"}
|
{#if $page.url.pathname !== "/"}
|
||||||
<ul>
|
<ul class="links">
|
||||||
{#each links as link}
|
{#each links as link}
|
||||||
<li>
|
{#if link.href && !link.mainOnly}
|
||||||
<div class="icon-link">
|
<li>
|
||||||
<img
|
<div class="icon-link">
|
||||||
src={"/assets/icons/" + link.icon}
|
<img
|
||||||
alt={link.name}
|
class={link.iconInvert ? "invert" : ""}
|
||||||
/>
|
src={"/assets/icons/" + link.icon}
|
||||||
<a href={link.href} target="_blank">
|
alt={link.name}
|
||||||
{link.name}
|
/>
|
||||||
</a>
|
<a href={link.href} target="_blank">
|
||||||
</div>
|
{link.name}
|
||||||
</li>
|
</a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
</ul>
|
</ul>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
content={"https://trypancakes.com" + $page.url.pathname}
|
content={"https://trypancakes.com" + $page.url.pathname}
|
||||||
/>
|
/>
|
||||||
<meta property="og:title" content={$page.data.title || "pancakes"} />
|
<meta property="og:title" content={$page.data.title || "pancakes"} />
|
||||||
<meta property="og:image" content="https://trypancakes.com/favicon.png" />
|
<meta property="og:image" content="/favicon.png" />
|
||||||
<meta property="og:image:alt" content="a black cat with large eyes" />
|
<meta property="og:image:alt" content="a black cat with large eyes" />
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,35 @@
|
||||||
import links from "../data/links.json";
|
import links from "../data/links.json";
|
||||||
|
|
||||||
const pages = getPages();
|
const pages = getPages();
|
||||||
|
|
||||||
|
async function sendNtfyMessage() {
|
||||||
|
const message = document.getElementById("ntfy-message").value;
|
||||||
|
if (message.length < 15)
|
||||||
|
return alert(
|
||||||
|
`Message must be 15 to 128 characters. Current length is ${message.length}`,
|
||||||
|
);
|
||||||
|
var resp = await fetch("https://ntfy.meow.company/pancakes", {
|
||||||
|
method: "POST",
|
||||||
|
body: message,
|
||||||
|
headers: {
|
||||||
|
Title: "pancakes.gay",
|
||||||
|
Priority: "low",
|
||||||
|
Tags: "black_cat",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
if (resp.ok) alert(`Sent: ${message}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateNtfyCharCount(_) {
|
||||||
|
const message = document.getElementById("ntfy-message").value;
|
||||||
|
const el = document.getElementById("ntfy-char-count");
|
||||||
|
|
||||||
|
if (message.length >= 15 && message.length <= 128)
|
||||||
|
el.setAttribute("style", "color: var(--success);");
|
||||||
|
else el.setAttribute("style", "color: var(--error);");
|
||||||
|
|
||||||
|
el.innerText = 128 - message.length;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<main id="main-content">
|
<main id="main-content">
|
||||||
|
@ -91,6 +120,15 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="https://meow.company" target="_blank" title="meow.company">
|
||||||
|
<img
|
||||||
|
src="https://meow.company/88x31.png"
|
||||||
|
alt="meow dot company"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="https://aagaming.me/" target="_blank" title="aagaming">
|
<a href="https://aagaming.me/" target="_blank" title="aagaming">
|
||||||
<img
|
<img
|
||||||
|
@ -325,6 +363,28 @@
|
||||||
<img src="/assets/buttons/wii.png" alt="Wii" title="Wii" />
|
<img src="/assets/buttons/wii.png" alt="Wii" title="Wii" />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h2 id="Notify">Notify</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Send me a push notification. This will be a silent notification on my
|
||||||
|
phone with no popup, vibration, or sound.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<input
|
||||||
|
on:input={updateNtfyCharCount}
|
||||||
|
type="text"
|
||||||
|
id="ntfy-message"
|
||||||
|
name="ntfy-message"
|
||||||
|
placeholder="Message"
|
||||||
|
minlength="15"
|
||||||
|
maxlength="128"
|
||||||
|
/>
|
||||||
|
<label for="ntfy-message" id="ntfy-char-count" style="color: var(--error);">
|
||||||
|
128
|
||||||
|
</label>
|
||||||
|
<br />
|
||||||
|
<button on:click={sendNtfyMessage} style="margin-top: 1rem;"> Send </button>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -137,6 +137,16 @@ main:first-of-type {
|
||||||
max-width: 768px;
|
max-width: 768px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
max-width: 768px;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav .links {
|
||||||
|
font-size: small;
|
||||||
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
border-bottom: 2px solid var(--accent-2);
|
border-bottom: 2px solid var(--accent-2);
|
||||||
font-size: xx-large;
|
font-size: xx-large;
|
||||||
|
@ -386,6 +396,33 @@ mark {
|
||||||
color: var(--background);
|
color: var(--background);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
input[type="submit"] {
|
||||||
|
padding: 0.5em 1em;
|
||||||
|
|
||||||
|
background-color: var(--accent-2);
|
||||||
|
color: var(--background);
|
||||||
|
border: none;
|
||||||
|
border-radius: var(--radius);
|
||||||
|
font-weight: bold;
|
||||||
|
text-transform: uppercase;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="text"] {
|
||||||
|
padding: 0.5em;
|
||||||
|
|
||||||
|
outline: none;
|
||||||
|
background-color: var(--background-2);
|
||||||
|
color: var(--foreground);
|
||||||
|
border: 1px solid var(--foreground);
|
||||||
|
border-radius: var(--radius);
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="text"]:focus {
|
||||||
|
border-color: var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
td,
|
td,
|
||||||
th {
|
th {
|
||||||
padding: 0.25em;
|
padding: 0.25em;
|
||||||
|
|
Loading…
Reference in a new issue