Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Deploy SvelteKit to GitHub Pages

on:
push:
branches: [main]
workflow_dispatch: # allows manual trigger
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove this? I dont want this to be run outside of a push to main

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to keep this until the action is validated. Added to new issue: #26


permissions:
contents: read
Expand All @@ -22,10 +21,9 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm # cache node_modules for faster builds

- name: Install dependencies
run: npm ci # ci (not install) to install exact versions from package-lock.json
run: npm i

# Build the SvelteKit project
- name: Build project
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v22.17.0
v22.22.0
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SCN website (operated by LCL)

Code repo for the seattlecommunitynetwork.org website.
Code repo for the https://seattlecommunitynetwork.org website.

This site is built using [SvelteKit](https://svelte.dev/docs/kit/introduction). SvelteKit supports building fully static sites - which is how this site is built. SvelteKit uses NodeJS to run the static site build.

Expand Down
3 changes: 1 addition & 2 deletions create-redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { existsSync, mkdirSync } from 'fs';

const redirects = [
['/aboutUs.html', "/about-us"],
['/ourSites.html', "/our-sites"],
['/donate.html', "/donate"]
['/ourSites.html', "/our-sites"]
];

const template =
Expand Down
2 changes: 1 addition & 1 deletion e2e/donate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { expect, test } from '@playwright/test';
import { expectH1AndTitle } from './lib/lib';

test.beforeEach(async ({ page }) => {
await page.goto('/donate/');
await page.goto('/donate');
});

test.describe('Donate', () => {
Expand Down
3 changes: 1 addition & 2 deletions e2e/our-sites.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ test.describe('Our Sites', () => {
});
});

// skip for now, destination page is down
test.skip('main CTAs link correctly', async ({ page }) => {
test('main CTAs link correctly', async ({ page }) => {
await expectLinks({
page,
pageName: 'our-sites',
Expand Down
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default ts.config(

// https://github.com/sveltejs/eslint-plugin-svelte/issues/1353
'svelte/no-navigation-without-resolve': 'off',
'svelte/require-each-key': 'off'

}
},
Expand Down
2 changes: 1 addition & 1 deletion messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
"pages.sites.sites.iframe.title": "Sites and Estimated LTE Coverage Map",
"pages.sites.sites.paragraphs.1": "For more specific information on signal strength, upload speed, and more:",
"pages.sites.sites.cta": "Visit Our Map Page",
"pages.sites.sites.href": "https://coverage.seattlecommunitynetwork.org/",
"pages.sites.sites.href": "https://map.seattlecommunitynetwork.org/",



Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<p>{m['common.mission.desc']()}</p>
</div>
<div class="ctas">
{#each buttons as { href, cta} (href)}
{#each buttons as { href, cta}}
<div>
<Button {href} type="medium">{cta}</Button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

<nav class="nav" data-test="site-nav">
<div class="nav-items" class:show-nav={showNav}>
{#each navItems as {href, label} (href)}
{#each navItems as {href, label}}
<a
href={href}
class="nav-link"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Socials.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</script>

<div class={cssClass}>
{#each socials as { href, cta, src } (href)}
{#each socials as { href, cta, src }}
<a {href} data-test={`social-${cta.toLowerCase()}`}>
<img src={src[type]} alt={cta} />
</a>
Expand Down
4 changes: 2 additions & 2 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
{m['pages.home.overview.header']()}
</h2>

{#each overview as over (over)}
{#each overview as over}
<p>{@html over}</p>
{/each}

Expand All @@ -91,7 +91,7 @@
</h2>

<div class="button-row">
{#each buttons as { href, cta, dataTest } (href)}
{#each buttons as { href, cta, dataTest }}
<Button {href} arrow={true} dataTest={dataTest}>
{cta}
</Button>
Expand Down
4 changes: 2 additions & 2 deletions src/routes/about-us/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<PageTitle title={m["pages.about.title"]()} />

<Wrapper dataTest="about-page">
{#each sections as section, index (section.key)}
{#each sections as section, index}
<section data-test={`about-us-${section.key}`}>
<Panel type="plain">
{#if index === 0}
Expand All @@ -61,7 +61,7 @@
<h2>{section.header}</h2>
{/if}

{#each section.paragraphs as paragraph (paragraph) }
{#each section.paragraphs as paragraph}
<p>{@html paragraph}</p>
{/each}

Expand Down
25 changes: 0 additions & 25 deletions src/routes/donate.html/+page.svelte

This file was deleted.

11 changes: 10 additions & 1 deletion src/routes/donate/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import { page } from '$app/state';
import { m } from '$lib/paraglide/messages.js';

import Button from '$lib/components/Button.svelte';
Expand All @@ -18,6 +19,14 @@

</script>


<svelte:head>
{#if page.url.pathname.endsWith('.html')}
<meta http-equiv="refresh" content="0; url='/donate'" />
<title>Redirecting...</title>
{/if}
</svelte:head>

<PageTitle title={m['pages.donate.title']()} />

<div class="wave" style="--wave-url: url(/pages/donate/upsidedown-wave.min.png)">
Expand All @@ -39,7 +48,7 @@
<img alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
</form>

{#each buttons as { href, cta } (href)}
{#each buttons as { href, cta }}
<Button {href} type="donate" dataTest={`donate-${cta.toLowerCase()}`}>{cta}</Button>
{/each}
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/routes/our-sites/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<p>{m["pages.sites.details.paragraphs.2"]()}</p>

<ul>
{#each detailsList as detail (detail)}
{#each detailsList as detail}
<li>{detail}</li>
{/each}
</ul>
Expand All @@ -66,7 +66,7 @@
<h2>{m["pages.sites.eligibility.header"]()}</h2>
<p>{m["pages.sites.eligibility.paragraphs.0"]()}</p>
<ul>
{#each eligibilityList as eligibility (eligibility)}
{#each eligibilityList as eligibility}
<li>{eligibility}</li>
{/each}
</ul>
Expand All @@ -80,7 +80,7 @@
<h3>{m["pages.sites.locations.subheader"]()}</h3>

<div class="locations">
{#each locations as location (location)}
{#each locations as location}
<div class="location">
<img
src={m[`pages.sites.locations.locations.${location}.src`]()}
Expand Down