mirror of
https://github.com/LukeHagar/sveltesociety.dev.git
synced 2025-12-07 12:47:45 +00:00
Fix ESLint errors
This commit is contained in:
@@ -5,7 +5,6 @@
|
|||||||
export let description = '';
|
export let description = '';
|
||||||
export let tags = [];
|
export let tags = [];
|
||||||
export let stars;
|
export let stars;
|
||||||
export let addedOn = new Date();
|
|
||||||
export let url = '';
|
export let url = '';
|
||||||
export let npm = '';
|
export let npm = '';
|
||||||
export let repo = '';
|
export let repo = '';
|
||||||
@@ -33,9 +32,9 @@
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="card" class:active id="component-{escape(title)}">
|
<div class="card" class:active id="component-{encodeURI(title)}">
|
||||||
<h3>
|
<h3>
|
||||||
<a href="#component-{escape(title)}">#</a> <a href={url}>{title}</a>
|
<a href="#component-{encodeURI(title)}">#</a> <a href={url}>{title}</a>
|
||||||
{#if npm}<Tag
|
{#if npm}<Tag
|
||||||
click={() => copyToClipboard(`${packageManagers[manager]}l ${cleanupNpm(npm)}`)}
|
click={() => copyToClipboard(`${packageManagers[manager]}l ${cleanupNpm(npm)}`)}
|
||||||
variant="copy"
|
variant="copy"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<h1 id="category-{escape(title)}">{title} <a href="#category-{escape(title)}">#</a></h1>
|
<h1 id="category-{encodeURI(title)}">{title} <a href="#category-{encodeURI(title)}">#</a></h1>
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -59,20 +59,4 @@
|
|||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* mobile design */
|
|
||||||
@media only screen and (max-width: 768px) {
|
|
||||||
.wrapper {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
.society-wrapper {
|
|
||||||
flex: 0 1 auto;
|
|
||||||
margin-top: 5%;
|
|
||||||
padding: 2rem;
|
|
||||||
--tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
||||||
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),
|
|
||||||
var(--tw-shadow);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -65,11 +65,6 @@
|
|||||||
var(--tw-shadow);
|
var(--tw-shadow);
|
||||||
border-radius: 0.5rem;
|
border-radius: 0.5rem;
|
||||||
}
|
}
|
||||||
h5.title {
|
|
||||||
font-size: 1.5em;
|
|
||||||
margin-block-start: 0.8em;
|
|
||||||
margin-block-end: 0.5em;
|
|
||||||
}
|
|
||||||
h6.continent {
|
h6.continent {
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
color: #64748b;
|
color: #64748b;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
export let nodes;
|
export let nodes;
|
||||||
export let currentPath;
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
import { categories } from '$lib/stores/recipes';
|
import { categories } from '$lib/stores/recipes';
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
|
|
||||||
export let title,
|
export let title;
|
||||||
description = '';
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
@@ -40,9 +39,6 @@
|
|||||||
.TOCLink.active a {
|
.TOCLink.active a {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.TOCLink img {
|
|
||||||
height: 1em;
|
|
||||||
}
|
|
||||||
@media (min-width: 1024px) {
|
@media (min-width: 1024px) {
|
||||||
main {
|
main {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
|
|
||||||
const childrenNodes = $categories.find((c) => c.path === $page.path).children || [];
|
const childrenNodes = $categories.find((c) => c.path === $page.path).children || [];
|
||||||
|
|
||||||
export let title,
|
export let title;
|
||||||
description = '';
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
@@ -50,9 +49,6 @@
|
|||||||
.TOCLink.active a {
|
.TOCLink.active a {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.TOCLink img {
|
|
||||||
height: 1em;
|
|
||||||
}
|
|
||||||
@media (min-width: 1024px) {
|
@media (min-width: 1024px) {
|
||||||
main {
|
main {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import type { Writable } from 'svelte/store';
|
|||||||
import { writable } from 'svelte/store';
|
import { writable } from 'svelte/store';
|
||||||
|
|
||||||
type Recipe = {
|
type Recipe = {
|
||||||
meta: any;
|
meta: unknown;
|
||||||
filename: string;
|
filename: string;
|
||||||
path: string;
|
path: string;
|
||||||
children: Recipe[];
|
children: Recipe[];
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* @type {import('@sveltejs/kit').RequestHandler}
|
* @type {import('@sveltejs/kit').RequestHandler}
|
||||||
*/
|
*/
|
||||||
export async function get() {
|
import type { EndpointOutput } from '@sveltejs/kit';
|
||||||
|
|
||||||
|
export async function get(): Promise<EndpointOutput> {
|
||||||
const events = await Promise.all(
|
const events = await Promise.all(
|
||||||
Object.entries(import.meta.glob('./*.svx')).map(async ([path, page]) => {
|
Object.entries(import.meta.glob('./*.svx')).map(async ([path, page]) => {
|
||||||
const { metadata } = await page();
|
const { metadata } = await page();
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<script lang="ts" context="module">
|
<script lang="ts" context="module">
|
||||||
export async function load({ fetch }) {
|
import type { LoadInput, LoadOutput } from '@sveltejs/kit';
|
||||||
|
|
||||||
|
export async function load({ fetch }: LoadInput): Promise<LoadOutput> {
|
||||||
const res = await fetch('/events/events');
|
const res = await fetch('/events/events');
|
||||||
if (res.ok) return { props: { events: await res.json() } };
|
if (res.ok) return { props: { events: await res.json() } };
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
<script lang="ts" context="module">
|
<script lang="ts" context="module">
|
||||||
import { categories } from '$lib/stores/recipes';
|
import { categories } from '$lib/stores/recipes';
|
||||||
import '$styles/highlight.css';
|
import '$styles/highlight.css';
|
||||||
|
import type { LoadInput, LoadOutput } from '@sveltejs/kit';
|
||||||
|
|
||||||
export async function load({ fetch }) {
|
export async function load({ fetch }: LoadInput): Promise<LoadOutput> {
|
||||||
const res = await fetch('/recipes/recipes');
|
const res = await fetch('/recipes/recipes');
|
||||||
const recipeCategories = await res.json();
|
const recipeCategories = await res.json();
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
|
import type { EndpointOutput } from '@sveltejs/kit';
|
||||||
/**
|
/**
|
||||||
* @type {import('@sveltejs/kit').RequestHandler}
|
* @type {import('@sveltejs/kit').RequestHandler}
|
||||||
*/
|
*/
|
||||||
export async function get() {
|
export async function get(): Promise<EndpointOutput> {
|
||||||
const pages = await Promise.all(
|
const pages = await Promise.all(
|
||||||
Object.entries(import.meta.glob('./**/*.svx')).map(async ([path, page]) => {
|
Object.entries(import.meta.glob('./**/*.svx')).map(async ([path, page]) => {
|
||||||
const { metadata } = await page();
|
const { metadata } = await page();
|
||||||
|
|||||||
Reference in New Issue
Block a user