Merge pull request #72 from ProjectSegfault/format

format
This commit is contained in:
Akis 2022-08-31 14:16:49 +03:00 committed by GitHub
commit 7d0012e38a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 122 additions and 108 deletions

View File

@ -1,29 +1,25 @@
name: Docker
on:
push:
branches:
- 'master'
push:
branches:
- "master"
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: projectsegfault/website:latest
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: projectsegfault/website:latest

View File

@ -2,9 +2,20 @@
import { Note, Captcha, Form, Meta, TextArea } from "$lib/Form";
</script>
<Form action="https://segfautils.projectsegfau.lt/api/form" method="POST" id="contact-form" >
<Note content="Your IP will be logged for anti-abuse measures." icon="i-fa6-solid:lock" />
<Meta inputType="email" inputPlaceholder="Your email" selectType="commentType">
<Form
action="https://segfautils.projectsegfau.lt/api/form"
method="POST"
id="contact-form"
>
<Note
content="Your IP will be logged for anti-abuse measures."
icon="i-fa6-solid:lock"
/>
<Meta
inputType="email"
inputPlaceholder="Your email"
selectType="commentType"
>
<option value="" selected disabled>Select a type of comment</option>
<option value="Feedback">Feedback</option>
<option value="Suggestion">Suggestion</option>
@ -13,4 +24,4 @@
</Meta>
<TextArea id="comment" name="message" placeholder="Your message" />
<Captcha />
</Form>
</Form>

View File

@ -1,19 +1,22 @@
<script>
import HCaptcha from "svelte-hcaptcha";
import HCaptcha from "svelte-hcaptcha";
import { Note } from "$lib/Form";
let submit = false;
let submit = false;
let showSubmitButton = () => {
submit = !submit;
};
let showSubmitButton = () => {
submit = !submit;
};
</script>
<Note content="The submit button will be visible when you complete the Captcha." icon="i-fa6-solid:circle-info" />
<Note
content="The submit button will be visible when you complete the Captcha."
icon="i-fa6-solid:circle-info"
/>
<HCaptcha
sitekey="67e84266-980c-4050-8a39-142a91928fe8"
on:success={showSubmitButton}
sitekey="67e84266-980c-4050-8a39-142a91928fe8"
on:success={showSubmitButton}
/>
{#if submit}
<input type="submit" value="Submit" class="form-button" />
{/if}
<input type="submit" value="Submit" class="form-button" />
{/if}

View File

@ -1,19 +1,15 @@
<script lang="ts">
export let action: string;
export let method: string;
export let id: string;
export let action: string;
export let method: string;
export let id: string;
</script>
<form
{action}
{method}
{id}
>
<slot />
<form {action} {method} {id}>
<slot />
</form>
<style>
form {
form {
display: flex;
flex-direction: column;
gap: 1rem;
@ -47,4 +43,4 @@
font-family: var(--font-primary);
outline: none;
}
</style>
</style>

View File

@ -1,24 +1,24 @@
<script lang="ts">
export let inputType: string;
export let inputPlaceholder: string;
export let selectType: string;
export let inputType: string;
export let inputPlaceholder: string;
export let selectType: string;
</script>
<div class="meta">
<input
type={inputType}
name={inputType}
class="form-textbox"
placeholder={inputPlaceholder}
required
/>
<select name={selectType} required class="form-button">
<slot />
</select>
<input
type={inputType}
name={inputType}
class="form-textbox"
placeholder={inputPlaceholder}
required
/>
<select name={selectType} required class="form-button">
<slot />
</select>
</div>
<style>
.meta {
.meta {
display: flex;
align-items: center;
flex-direction: row;
@ -44,4 +44,4 @@
width: 100%;
}
}
</style>
</style>

View File

@ -1,19 +1,19 @@
<script lang="ts">
export let content: string;
export let icon: string;
export let content: string;
export let icon: string;
</script>
<div class="note">
{#if icon}
<div class={icon} />
{/if}
<b>{content}</b>
{#if icon}
<div class={icon} />
{/if}
<b>{content}</b>
</div>
<style>
.note {
.note {
display: flex;
align-items: center;
gap: 4px;
}
</style>
</style>

View File

@ -1,15 +1,15 @@
<script lang="ts">
export let id: string;
export let name: string;
export let placeholder: string;
export let id: string;
export let name: string;
export let placeholder: string;
</script>
<textarea
{id}
{name}
rows="4"
cols="25"
required
class="form-textbox"
{placeholder}
/>
{id}
{name}
rows="4"
cols="25"
required
class="form-textbox"
{placeholder}
/>

View File

@ -2,4 +2,4 @@ export { default as Note } from "./Note.svelte";
export { default as Captcha } from "./Captcha.svelte";
export { default as Form } from "./Form.svelte";
export { default as Meta } from "./Meta.svelte";
export { default as TextArea } from "./TextArea.svelte";
export { default as TextArea } from "./TextArea.svelte";

View File

@ -60,4 +60,4 @@ a {
a:hover {
filter: brightness(125%);
}
}

View File

@ -26,8 +26,16 @@
marginTop="7"
>
<div class="buttons">
<LinkButton url="/services" title="Explore our services" icon="i-fa6-solid:bell-concierge" />
<LinkButton url="/projects" title="Explore our projects" icon="i-fa6-solid:tractor" />
<LinkButton
url="/services"
title="Explore our services"
icon="i-fa6-solid:bell-concierge"
/>
<LinkButton
url="/projects"
title="Explore our projects"
icon="i-fa6-solid:tractor"
/>
<LinkButton
url="/donate"
icon="i-fa6-solid:money-bill"

View File

@ -34,4 +34,4 @@ _Please be aware that Microsoft often blocks non-popular emails, if you do conta
## People
You can find ways to contact individual team members [on our team page](/team).
You can find ways to contact individual team members [on our team page](/team).

View File

@ -25,26 +25,26 @@
<h2>{group.category}</h2>
<div class="items">
{#each group.values as item}
<CardInner
title={item.name}
description={item.description}
icon={item.icon}
>
<LinksOuter>
<Link url={item.website} class="web">
<div class="withText">
<div class="i-fa6-solid:globe" />
<span>Instance link</span>
</div>
</Link>
<Link url={item.projectWebsite} class="link">
<div class="withText">
<div class="i-fa6-solid:circle-info" />
<span>Project website</span>
</div>
</Link>
</LinksOuter>
</CardInner>
<CardInner
title={item.name}
description={item.description}
icon={item.icon}
>
<LinksOuter>
<Link url={item.website} class="web">
<div class="withText">
<div class="i-fa6-solid:globe" />
<span>Instance link</span>
</div>
</Link>
<Link url={item.projectWebsite} class="link">
<div class="withText">
<div class="i-fa6-solid:circle-info" />
<span>Project website</span>
</div>
</Link>
</LinksOuter>
</CardInner>
{/each}
</div>
{/each}