mirror of
https://github.com/LukeHagar/sveltesociety.dev.git
synced 2025-12-09 12:47:44 +00:00
fix design and add recipes page
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# create-svelte
|
# Svelte Society 2021 Website
|
||||||
|
|
||||||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte);
|
Using SvelteKit!
|
||||||
|
|
||||||
## Creating a project
|
## Creating a project
|
||||||
|
|
||||||
|
|||||||
2053
pnpm-lock.yaml
generated
2053
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -161,11 +161,11 @@ h1 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
font-size: var(--font-600);
|
font-size: var(--font-500);
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
font-size: var(--font-500);
|
font-size: var(--font-400);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -211,13 +211,6 @@ blockquote {
|
|||||||
background: rgba(0, 0, 0, 0.99);
|
background: rgba(0, 0, 0, 0.99);
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
|
||||||
display: grid;
|
|
||||||
place-items: center;
|
|
||||||
padding: var(--space-200) 0;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.heading {
|
.heading {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: var(--space-600);
|
margin: var(--space-600);
|
||||||
|
|||||||
@@ -11,12 +11,17 @@
|
|||||||
export let npm = "";
|
export let npm = "";
|
||||||
export let repo = "";
|
export let repo = "";
|
||||||
|
|
||||||
|
let clipboardCopy = false
|
||||||
const copyToClipboard = (text) => {
|
const copyToClipboard = (text) => {
|
||||||
navigator.permissions.query({name: "clipboard-write"}).then(result => {
|
navigator.permissions.query({name: "clipboard-write"}).then(result => {
|
||||||
if (result.state == "granted" || result.state == "prompt") {
|
if (result.state == "granted" || result.state == "prompt") {
|
||||||
navigator.clipboard.writeText(text)
|
navigator.clipboard.writeText(text)
|
||||||
|
clipboardCopy = true
|
||||||
|
setTimeout(() => {
|
||||||
|
clipboardCopy = false
|
||||||
|
}, 1000)
|
||||||
}
|
}
|
||||||
});
|
}).catch(() => alert("Clipboard copy Permission denied"));
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -29,9 +34,15 @@
|
|||||||
background: #f3f6f9;
|
background: #f3f6f9;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
.card h1 {
|
.card h3 {
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
h3 a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
h3 a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
.active,
|
.active,
|
||||||
.card:hover {
|
.card:hover {
|
||||||
background: #e8f3fe;
|
background: #e8f3fe;
|
||||||
@@ -59,21 +70,18 @@
|
|||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card h1 {
|
.card h3 {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="card" class:active id="component-{escape(title)}">
|
<div class="card" class:active id="component-{escape(title)}">
|
||||||
{#if image}
|
<h3>
|
||||||
<img src={image} alt={title} />
|
<a href={url}>{title}</a>
|
||||||
{/if}
|
{#if npm}<Tag click={() => copyToClipboard(`npm install ${npm}`)} variant="copy" title={clipboardCopy ? 'copied!' : `npm install ${npm}`}/>{/if}
|
||||||
<h1>
|
</h3>
|
||||||
<a href={url}>{title}</a> <a href="#component-{escape(title)}">#</a>
|
<p class="flex-grow"><a href="#component-{escape(title)}">#</a> {description}</p>
|
||||||
{#if npm}<Tag click={() => copyToClipboard(`npm install ${npm}`)} variant="copy" title="npm install {npm}"/>{/if}
|
|
||||||
</h1>
|
|
||||||
<p class="flex-grow">{description}</p>
|
|
||||||
<div class="card__tags">
|
<div class="card__tags">
|
||||||
{#each tags as tag}
|
{#each tags as tag}
|
||||||
<Tag title={tag} variant='blue' />
|
<Tag title={tag} variant='blue' />
|
||||||
@@ -83,15 +91,21 @@
|
|||||||
<div>
|
<div>
|
||||||
{#if stars > 0}
|
{#if stars > 0}
|
||||||
{#if (repo || url).includes('github')}
|
{#if (repo || url).includes('github')}
|
||||||
<img src="/images/github_logo.svg" alt="github logo" />
|
<img style="display:inline" src="/images/github_logo.svg" alt="github logo" />
|
||||||
{:else if (repo || url).includes('gitlab')}
|
{:else if (repo || url).includes('gitlab')}
|
||||||
<img src="/images/gitlab_logo.svg" alt="gitlab logo" />
|
<img style="display:inline" src="/images/gitlab_logo.svg" alt="gitlab logo" />
|
||||||
{:else}
|
<!-- {:else} -->
|
||||||
|
{/if}
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
★
|
★
|
||||||
{/if}
|
<code>{stars}</code>
|
||||||
{stars}
|
</div>
|
||||||
|
<!-- commenting out dates just cause it is not very updated yet - all the cards show same date. put back in when we have better scraping -->
|
||||||
|
<!-- <datetime value={addedOn}>{new Intl.DateTimeFormat('en-Us').format(Date.parse(addedOn))}</datetime> -->
|
||||||
|
</div>
|
||||||
|
{#if image}
|
||||||
|
<img src={image} alt={title} />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<div>{new Intl.DateTimeFormat('en-Us').format(Date.parse(addedOn))}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
font-family: Overpass;
|
font-family: Overpass;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 27px;
|
|
||||||
line-height: 150%;
|
line-height: 150%;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
@@ -38,7 +37,7 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<h1 id="category-{escape(title)}">{title} <a href="#{escape(title)}">#</a></h1>
|
<h1 id="category-{escape(title)}">{title} <a href="#category-{escape(title)}">#</a></h1>
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<!--society section-->
|
<!--society section-->
|
||||||
<div class="society-wrapper">
|
<div class="society-wrapper">
|
||||||
<h5 class="title">Societys arround the world</h5>
|
<h3 class="title">Societies around the world</h3>
|
||||||
{#each societies as society}
|
{#each societies as society}
|
||||||
{#if society.continent}
|
{#if society.continent}
|
||||||
<h6 class="continent">{society.continent}</h6>
|
<h6 class="continent">{society.continent}</h6>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
Want to contribute? Pick up an issue on
|
Want to contribute? Pick up an issue on
|
||||||
<a
|
<a
|
||||||
class="ghlink"
|
class="ghlink"
|
||||||
href="https://github.com/svelte-society/sveltesociety.dev"
|
href="https://github.com/svelte-society/sveltesociety-2021/"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener">GitHub</a
|
rel="noopener">GitHub</a
|
||||||
>!
|
>!
|
||||||
|
|||||||
@@ -31,9 +31,9 @@
|
|||||||
display: grid;
|
display: grid;
|
||||||
grid-template-rows: 0fr 1fr 0fr;
|
grid-template-rows: 0fr 1fr 0fr;
|
||||||
}
|
}
|
||||||
|
.container main {
|
||||||
main {
|
padding-left: 1rem;
|
||||||
min-height: 100vh;
|
padding-bottom: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,6 +1,22 @@
|
|||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>About Svelte Society</title>
|
<title>About Svelte Society</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
<main>
|
<div class="wrapper">
|
||||||
<slot />
|
<slot />
|
||||||
</main>
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.wrapper {
|
||||||
|
max-width: 65ch;
|
||||||
|
}
|
||||||
|
.wrapper :global(h2), .wrapper :global(h3) {
|
||||||
|
margin-top: 2rem;
|
||||||
|
margin-bottom: 1.25rem;
|
||||||
|
}
|
||||||
|
.wrapper :global(p) {
|
||||||
|
margin-bottom: 1.25rem;
|
||||||
|
}
|
||||||
|
.wrapper :global(li) {
|
||||||
|
margin-bottom: 1.1rem;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<main>
|
<main class="wrapper">
|
||||||
<h1>Components</h1>
|
<h1>Components</h1>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<div class="inputs">
|
<div class="inputs">
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
max-width: 60ch;
|
max-width: 60ch;
|
||||||
|
margin-bottom: var(--space-300);
|
||||||
}
|
}
|
||||||
ul {
|
ul {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
|||||||
22
src/routes/recipes/__layout.svelte
Normal file
22
src/routes/recipes/__layout.svelte
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<svelte:head>
|
||||||
|
<title>About Svelte Society</title>
|
||||||
|
</svelte:head>
|
||||||
|
<div class="wrapper">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.wrapper {
|
||||||
|
max-width: 65ch;
|
||||||
|
}
|
||||||
|
.wrapper :global(h2), .wrapper :global(h3) {
|
||||||
|
margin-top: 2rem;
|
||||||
|
margin-bottom: 1.25rem;
|
||||||
|
}
|
||||||
|
.wrapper :global(p) {
|
||||||
|
margin-bottom: 1.25rem;
|
||||||
|
}
|
||||||
|
.wrapper :global(li) {
|
||||||
|
margin-bottom: 1.1rem;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
3
src/routes/recipes/index.svx
Normal file
3
src/routes/recipes/index.svx
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Recipes
|
||||||
|
|
||||||
|
This part of the site is still under construction. Help us out! https://github.com/svelte-society/sveltesociety-2021/
|
||||||
Reference in New Issue
Block a user