Skip to content

Commit

Permalink
Merge pull request #753 from EthanThatOneKid/orgin/enhancement/711
Browse files Browse the repository at this point in the history
Create Shortlinks page
  • Loading branch information
DavidJSolano committed Feb 6, 2023
2 parents 3a24006 + 979ec94 commit 32a1c49
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
70 changes: 70 additions & 0 deletions src/routes/(site)/shorter/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<script lang="ts">
import Spacing from '$lib/public/legacy/spacing.svelte';
import { LINKS } from '$lib/public/links';
</script>

<Spacing --min="175px" --med="200px" --max="200px" />

<svelte:head>
<title>Shortlinks | ACM at CSUF</title>
</svelte:head>

<main class="responsive-width">
<section id="top">
<div class="header">
<h1 class="size-lg">Shortlinks</h1>
</div>
<p class="brand-em">
{#each Object.entries(LINKS) as [pathname, destination]}
{pathname}: <a href={destination}>{destination}</a>
<br />
<br />
{/each}
</p>
</section>
</main>

<Spacing --min="40px" --med="95px" --max="120px" />

<style lang="scss">
.responsive-width {
width: min(800px, 80vw);
max-width: 540px;
margin: 0 auto;
}
h1 {
display: flex;
align-items: center;
justify-content: center;
margin: 0;
}
main {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
section {
width: min(800px, 80vw);
max-width: 540px;
margin: 0 auto;
margin-bottom: 50px;
p {
margin: 1em 0;
word-break: break-word;
}
a {
transition: 0.25s ease-in-out;
&:hover {
color: var(--acm-blue);
}
}
}
}
</style>
8 changes: 8 additions & 0 deletions src/routes/(site)/shorter/page.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { expect, test } from '@playwright/test';

test.describe.configure({ mode: 'parallel' });

test('first contributions page has expected h1', async ({ page }) => {
await page.goto('/shorter');
expect(await page.textContent('h1')).toBe('Shortlinks');
});

0 comments on commit 32a1c49

Please sign in to comment.