Skip to content

Commit

Permalink
chore: formatted files
Browse files Browse the repository at this point in the history
  • Loading branch information
SachsenspieltCoding committed May 24, 2023
1 parent b1f7134 commit 90aeaa3
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/components/BackMenu.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
import { faArrowCircleLeft } from '@fortawesome/free-solid-svg-icons/faArrowCircleLeft';
import Icon from "./Icon.svelte";
import Icon from './Icon.svelte';
</script>

<div class="fixed left-0 top-0 flex h-20 w-20 items-center justify-center">
Expand Down
7 changes: 5 additions & 2 deletions src/components/Home/Favorites/FavButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { faTrash } from '@fortawesome/free-solid-svg-icons';
import { getFavorite, removeFavorite } from '$lib/favorites';
import { getCredentials } from '$lib/api/session';
import Icon from "../../Icon.svelte";
import Icon from '../../Icon.svelte';
export let id: number;
Expand Down Expand Up @@ -40,7 +40,10 @@
>{isFavorite ? short : `Favorit ${id}`}
</a>
{#if isFavorite}
<button on:click={clear} class="dynborder aspect-square h-full rounded-[7px] p-1 flex items-center justify-center">
<button
on:click={clear}
class="dynborder flex aspect-square h-full items-center justify-center rounded-[7px] p-1"
>
<Icon icon={faTrash} size="1.3x" />
</button>
{/if}
Expand Down
6 changes: 3 additions & 3 deletions src/components/Home/OverviewLinkButton.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import type {IconDefinition} from "@fortawesome/fontawesome-svg-core";
import Icon from "../Icon.svelte";
import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
import Icon from '../Icon.svelte';
export let text: string;
export let icon: IconDefinition;
Expand All @@ -12,7 +12,7 @@
class="dynborder m-auto flex aspect-square max-w-[10rem] flex-col items-center justify-center rounded-[13px] p-2"
{href}
>
<Icon icon={icon} size="3x" />
<Icon {icon} size="3x" />
</a>
<p class="text-md text-center">{text}</p>
</div>
10 changes: 5 additions & 5 deletions src/components/Icon.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script lang="ts">
import type {IconDefinition} from "@fortawesome/fontawesome-svg-core";
import Fa from "svelte-fa";
import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
import Fa from 'svelte-fa';
export let icon: IconDefinition;
export let size: string;
export let icon: IconDefinition;
export let size: string;
</script>

<Fa icon={icon} size={size} />
<Fa {icon} {size} />
2 changes: 1 addition & 1 deletion src/components/Login/LoginDialog.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { onMount } from 'svelte';
import { faRightFromBracket } from '@fortawesome/free-solid-svg-icons';
import Dialog from '../Dialog.svelte';
import Icon from "../Icon.svelte";
import Icon from '../Icon.svelte';
let message = null;
let credentials: Credentials | null = null;
Expand Down
6 changes: 3 additions & 3 deletions src/components/LoginAndSettings/LoginAndSettingsIcon.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import type {IconDefinition} from "@fortawesome/fontawesome-svg-core";
import Icon from "../Icon.svelte";
import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
import Icon from '../Icon.svelte';
export let icon: IconDefinition;
export let onClick: () => void = () => null;
Expand All @@ -14,5 +14,5 @@
class="dynborder flex aspect-square cursor-pointer items-center justify-center rounded-[7px] p-[0.35rem]"
on:click={handleClick}
>
<Icon icon={icon} size="1.2x" />
<Icon {icon} size="1.2x" />
</button>
2 changes: 1 addition & 1 deletion src/components/Plan/PlanSwitchArrow.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { faChevronRight } from '@fortawesome/free-solid-svg-icons';
import { date } from './stores';
import addBusinessDays from 'date-fns/addBusinessDays';
import Icon from "../Icon.svelte";
import Icon from '../Icon.svelte';
export let holidays: Date[];
export let turned: boolean;
Expand Down
14 changes: 10 additions & 4 deletions src/routes/plan/[short]/[[date]]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import { _fetchPlanData } from './+page';
import { de } from 'date-fns/locale';
import { format } from 'date-fns';
import Icon from "../../../../components/Icon.svelte";
import Icon from '../../../../components/Icon.svelte';
export let data: PageData;
Expand Down Expand Up @@ -77,7 +77,11 @@
<div>
<div class="flex items-center justify-between px-8">
<PlanSwitchArrow holidays={planData.schoolPlan.holidays} />
<div class="text-center leading-tight cursor-pointer" on:keypress={() => undefined} on:click={resetDate}>
<div
class="cursor-pointer text-center leading-tight"
on:keypress={() => undefined}
on:click={resetDate}
>
<p class="text-md">{format(new Date($date), 'EEEE', { locale: de })}</p>
<p class="text-sm">
{new Date($date).toLocaleDateString()}
Expand All @@ -86,11 +90,13 @@
<PlanSwitchArrow holidays={planData.schoolPlan.holidays} turned />
</div>

<p class="w-full text-center text-grayedOut text-sm mt-1">
<p class="mt-1 w-full text-center text-sm text-grayedOut">
{#if isRefreshing}
Lade...
{:else}
{planData.schoolPlan.created ? new Date(planData.schoolPlan.created).toLocaleString() : ''}
{planData.schoolPlan.created
? new Date(planData.schoolPlan.created).toLocaleString()
: ''}
{/if}
</p>
</div>
Expand Down

0 comments on commit 90aeaa3

Please sign in to comment.