Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasFG committed Sep 28, 2024
1 parent bc1de01 commit 491e949
Show file tree
Hide file tree
Showing 25 changed files with 611 additions and 242 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ninja_i18n.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

name: Ninja i18n action

on: pull_request_target

# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
permissions:
pull-requests: write # Necessary to comment on PRs
issues: read # Necessary to read issue comments
contents: read # Necessary to access the repo content

jobs:
ninja-i18n:
name: Ninja i18n - GitHub Lint Action
runs-on: ubuntu-latest

steps:
- name: Run Ninja i18n
# @main ensures that the latest version of the action is used
uses: opral/ninja-i18n-action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"inlang.vs-code-extension"
]
}
Binary file modified bun.lockb
Binary file not shown.
3 changes: 3 additions & 0 deletions messages/da-dk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format"
}
3 changes: 3 additions & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format"
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"deploy": "bun run build && bunx gh-pages -d build -t true"
},
"devDependencies": {
"@inlang/paraglide-js": "1.11.2",
"@inlang/paraglide-js-adapter-sveltekit": "^0.6.7",
"@sveltejs/adapter-auto": "^3.2.4",
"@sveltejs/adapter-static": "^3.0.4",
"@sveltejs/enhanced-img": "^0.3.4",
Expand Down Expand Up @@ -47,7 +49,8 @@
"luxon": "^3.5.0",
"@theatre/core": "^0.7.2",
"@theatre/r3f": "^0.7.2",
"@theatre/studio": "^0.7.2"
"@theatre/studio": "^0.7.2",
"@inlang/paraglide-sveltekit": "0.11.0"
},
"trustedDependencies": [
"@sveltejs/kit",
Expand Down
1 change: 1 addition & 0 deletions project.inlang/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cache
1 change: 1 addition & 0 deletions project.inlang/project_id
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cd12fab6b95ff87242c90ec1c83acb1fbd249a825352d8f1039e618260a5dd54
18 changes: 18 additions & 0 deletions project.inlang/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://inlang.com/schema/project-settings",
"sourceLanguageTag": "en",
"languageTags": [
"en",
"da-dk"
],
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-empty-pattern@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-missing-translation@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-without-source@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@latest/dist/index.js"
],
"plugin.inlang.messageFormat": {
"pathPattern": "./messages/{languageTag}.json"
}
}
6 changes: 5 additions & 1 deletion src/app.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import type { AvailableLanguageTag } from "../../lib/paraglide/runtime"
import type { ParaglideLocals } from "@inlang/paraglide-sveltekit"
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
interface Locals {
paraglide: ParaglideLocals<AvailableLanguageTag>,
}
// interface PageData {}
// interface PageState {}
// interface Platform {}
Expand Down
2 changes: 1 addition & 1 deletion src/app.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html lang="%paraglide.lang%" dir="%paraglide.textDirection%">
<head>
<meta charset="utf-8" />
<link
Expand Down
6 changes: 6 additions & 0 deletions src/hooks.server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// file initialized by the Paraglide-SvelteKit CLI - Feel free to edit it
import { sequence } from "@sveltejs/kit/hooks"
import { i18n } from "$lib/i18n"

// add your own hooks as part of the sequence here
export const handle = sequence(i18n.handle())
4 changes: 4 additions & 0 deletions src/hooks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// file initialized by the Paraglide-SvelteKit CLI - Feel free to edit it
import { i18n } from "$lib/i18n"

export const reroute = i18n.reroute()
29 changes: 16 additions & 13 deletions src/lib/components/Navbar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,27 @@
import ThemeSwitcher from '$lib/components/ThemeSwitcher.svelte'
import logo from '$lib/images/logo.png'
import { LinkHandler } from '$lib/utility/LinkHandler'
import SidebarButton from './sidebar/SidebarButton.svelte'
</script>

<div
class="mx-auto flex h-16 w-full flex-wrap items-center justify-between divide-gray-100 border-b border-gray-200 px-2 py-2.5 sm:px-4 dark:divide-gray-700 dark:border-gray-700"
>
<a
href={LinkHandler('/')}
class="flex flex-row justify-start"
>
<img
src={logo}
class="me-3 h-9"
alt="Flowbite Logo"
/>
<span
class="self-center whitespace-nowrap text-xl font-semibold dark:text-white"
>Volleyball Drills</span
<div class="flex flex-row gap-2">
<SidebarButton />
<a
href={LinkHandler('/')}
class="flex flex-row items-center justify-start"
>
</a>
<img
src={logo}
class="me-4 h-9 w-9"
alt="Flowbite Logo"
/>
<span class="text-xl font-semibold dark:text-white"
>Volleyball Drills</span
>
</a>
</div>
<ThemeSwitcher />
</div>
79 changes: 33 additions & 46 deletions src/lib/components/Player.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
export let type: keyof typeof PlayerMapping = 'P'
export let team: 1 | 2 | 3 | 4 | null = null
export let size: number = 400
export let size: number = 300
export let x: number = 0
export let y: number = 0
export let opacity: number = 1
Expand All @@ -13,58 +13,45 @@
const uniqueId = crypto.randomUUID()
</script>

<!-- prettier-ignore-start -->
<svg {...$$restProps} x={x} y={y} opacity={opacity} scale={scale} width={size} height={size} viewBox="0 0 1200 1200" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id={"Player-"+uniqueId} clip-path="url(#{"clip0_0_1-"+uniqueId})">
<!-- Player Circle -->
<circle id={"PlayerCircle-"+uniqueId} class="
fill-gray-600 stroke-gray-600
{team === 1 ? 'stroke-red-400' : ''}
{team === 2 ? 'stroke-green-400' : ''}
{team === 3 ? 'stroke-teal-400' : ''}
{team === 4 ? 'stroke-violet-400' : ''}
{team === null ? 'stroke-gray-600' : ''}
{type === 'C' ? ' fill-sky-400 stroke-sky-400' : ''}
" cx="500" cy="700" r="490" stroke-width="70" clip-path="url(#{"PlayerCircleClip-"+uniqueId})"/>

<!-- Player Type Text (Centered in the Player Circle) -->
<text id={"PlayerType-"+uniqueId} class="fill-white select-none" x="500" y="740" text-anchor="middle" dominant-baseline="middle" font-family="Inter" font-size="450" font-weight="bold" letter-spacing="0em">
<tspan>{type}</tspan>
</text>
<Tooltip
reference={'#Player-' + uniqueId}
triggeredBy={'#Player-' + uniqueId}
>
{PlayerMapping[type]}
{#if team !== null}
team {team}
{/if}
</Tooltip>

<!-- prettier-ignore-start -->
<svg class="fill-transparent" {...$$restProps} {x} {y} opacity={opacity} scale={scale} width={size} height={size} viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<g>
<rect width="100" height="100" class="fill-transparent"/>
<circle id={"Player-Ring-"+uniqueId} class="
fill-gray-600
{team === 1 ? 'fill-red-400' : ''}
{team === 2 ? 'fill-green-400' : ''}
{team === 3 ? 'fill-teal-400' : ''}
{team === 4 ? 'fill-violet-400' : ''}
{team === null ? 'fill-gray-600' : ''}
{type === 'C' ? ' fill-sky-400' : ''}
" cx="50" cy="44" r="44"/>
<circle id={"Player-Type-Circle-"+uniqueId} class="
fill-gray-600
{type === 'C' ? ' fill-sky-400' : ''}
"
cx="50" cy="44" r="38.1333"/>
<text id={"Player-Type-Text-"+uniqueId} class="fill-white select-none" x="50" y="55" text-anchor="middle" dominant-baseline="center" font-family="Inter" font-size="28" font-weight="800" letter-spacing="0em"><tspan>{type}</tspan></text>
{#if team !== null}
<!-- Team Number Circle -->
<circle id={"TeamNumberCircle-"+uniqueId} class="
<circle id={"Player-Team-Circle-"+uniqueId} class="
{team === 1 ? 'fill-red-400' : ''}
{team === 2 ? 'fill-green-400' : ''}
{team === 3 ? 'fill-teal-400' : ''}
{team === 4 ? 'fill-violet-400' : ''}
" cx="974.5" cy="225.5" r="225.5" />

<!-- Team Number Text (Centered in the Team Circle) -->
<text id={"TeamNumber-"+uniqueId} class="fill-white select-none" x="974.5" y="245.5" text-anchor="middle" dominant-baseline="middle" font-family="Inter" font-size="300" font-weight="bold" letter-spacing="0em">
<tspan>{team}</tspan>
</text>
" cx="50" cy="82.1332" r="17.6"/>
<text id={"Player-Team-Text-"+uniqueId} class="fill-white select-none" x="50" y="88" text-anchor="middle" dominant-baseline="center" font-family="Inter" font-size="18" font-weight="800" letter-spacing="0em"><tspan>{team}</tspan></text>
{/if}
<rect class="cursor-pointer fill-transparent" width="1200" height="1200"/>
</g>
<defs>
<clipPath id={"PlayerCircleClip-"+uniqueId}>
<use xlink:href={"#PlayerCircle-"+uniqueId}/>
</clipPath>
<clipPath id={"clip0_0_1-"+uniqueId}>
<rect width="1200" height="1200" fill="white"/>
</clipPath>
</defs>
<rect id={"Player-"+uniqueId} class="fill-transparent" width="100" height="100"/>
</svg>
<!-- prettier-ignore-end -->
<Tooltip
class="z-50"
reference={'#PlayerCircle-' + uniqueId}
triggeredBy={'#Player-' + uniqueId}
>
{PlayerMapping[type]}
{#if team !== null}
team {team}
{/if}
</Tooltip>
98 changes: 0 additions & 98 deletions src/lib/components/Sidebar.svelte

This file was deleted.

Loading

0 comments on commit 491e949

Please sign in to comment.