stuff
Some checks failed
Quality Check / QS Backend (push) Successful in 19s
Quality Check / QS Frontend (push) Failing after 36s
Quality Check / QS Mixed (push) Failing after 33s

This commit is contained in:
Snoweuph 2024-07-27 20:58:39 +02:00
parent 4706efacae
commit f5291924c3
Signed by: Snoweuph
GPG key ID: A494330694B208EF
17 changed files with 105 additions and 69 deletions

View file

@ -0,0 +1,6 @@
{
"name": "Euph Website",
"image": "git.euph.dev/development_tools/symfony:latest",
"forwardPorts": [8080],
workspaceMount: ""
}

View file

@ -1,5 +1,5 @@
twig: twig:
default_path: '%kernel.project_dir%/frontend/templates' default_path: '%kernel.project_dir%/frontend/templates/'
when@test: when@test:
twig: twig:

View file

@ -6,19 +6,12 @@
"extends": [ "extends": [
"eslint:recommended", "eslint:recommended",
"plugin:@typescript-eslint/strict", "plugin:@typescript-eslint/strict",
"plugin:svelte/recommended"
], ],
"parser": "@typescript-eslint/parser", "parser": "@typescript-eslint/parser",
"parserOptions": { "parserOptions": {
"ecmaVersion": "latest", "ecmaVersion": "latest",
"sourceType": "module" "sourceType": "module"
}, },
"overrides": [
{
"files": ["*.svelte"],
"parser": "svelte-eslint-parser"
}
],
"plugins": [ "plugins": [
"@typescript-eslint" "@typescript-eslint"
], ],

View file

@ -1 +1,2 @@
import '#styles/app.scss';
import '#pkg/stimulus'; import '#pkg/stimulus';

View file

@ -0,0 +1,9 @@
@import "sizes";
@import "components/Header/_";
@import "components/BurgerMenu/_";
:root, body {
margin: 0;
min-height: 100%;
}

View file

@ -0,0 +1,5 @@
#burger-menu {
&__container {
display: none;
}
}

View file

@ -0,0 +1,7 @@
#header {
display: flex;
height: $size-xxl;
padding: $size-xs;
gap: $size-xs;
justify-items: center;
}

View file

@ -0,0 +1,7 @@
$size-xxs: 0.25rem; // 4px
$size-xs: 0.5rem; // 8px
$size-s: 0.75rem; // 12px
$size-m: 1rem; // 16px
$size-l: 1.5rem; // 24px
$size-xl: 2rem; // 32px
$size-xxl: 3rem; // 48px

View file

@ -21,7 +21,7 @@
</head> </head>
<body> <body>
<twig:Header/> <twig:Header:_/>
{% block body %}{% endblock %} {% block body %}{% endblock %}
</body> </body>
</html> </html>

View file

@ -1,55 +0,0 @@
{% set logged_in = true %}
<button>
<twig:ux:icon name="fa6-solid:bars" />
</button>
<div tabindex="-1">
<button>
<twig:ux:icon name="fa6-solid:x" />
</button>
<div>
<div >
<twig:ux:icon name="fa6-solid:circle-user" />
</div>
{% if logged_in %}
<span>Username</span>
<span>username@email.com</span>
<div>
{{ _self.user_action('Profile', 'user') }}
{{ _self.user_action('Settings', 'gear') }}
{{ _self.user_action('Logout', 'right-from-bracket') }}
</div>
{% else %}
<span>not logged in</span>
{% endif %}
</div>
{% if not logged_in %}
<hr/>
<a>
<span>Login with Euphcloud</span>
</a>
{% endif %}
<hr/>
<nav>
<ul>
{{ _self.nav_item('Test1', '#test1', 'bars') }}
{{ _self.nav_item('Test2', '#test2', 'bars') }}
{{ _self.nav_item('Test3', '#test3', 'bars') }}
</ul>
</nav>
</div>
{% macro user_action(name, icon) %}
<button>
<twig:ux:icon name="fa6-solid:{{ icon }}" />
<span>{{ name }}</span>
</button>
{% endmacro %}
{% macro nav_item(name, href, icon) %}
<li>
<a href="{{ href }}">
<twig:ux:icon name="fa6-solid:{{ icon }}" />
<span>{{ name }}</span>
</a>
</li>
{% endmacro %}

View file

@ -0,0 +1,6 @@
{% set logged_in = false %}
{% if not logged_in %}
<a>
<span>Login with Euphcloud</span>
</a>
{% endif %}

View file

@ -0,0 +1,16 @@
<nav id="burger-menu-navigation">
<ul>
{{ _self.nav_item('Test1', '#test1', 'bars') }}
{{ _self.nav_item('Test2', '#test2', 'bars') }}
{{ _self.nav_item('Test3', '#test3', 'bars') }}
</ul>
</nav>
{% macro nav_item(name, href, icon) %}
<li>
<a href="{{ href }}">
<twig:ux:icon name="fa6-solid:{{ icon }}" />
<span>{{ name }}</span>
</a>
</li>
{% endmacro %}

View file

@ -0,0 +1,26 @@
{% set logged_in = false %}
<div id="burger-menu-user">
<div >
<twig:ux:icon name="fa6-solid:circle-user" />
</div>
{% if logged_in %}
<span>Username</span>
<span>username@email.com</span>
<div>
{{ _self.user_action('Profile', 'user') }}
{{ _self.user_action('Settings', 'gear') }}
{{ _self.user_action('Logout', 'right-from-bracket') }}
</div>
{% else %}
<span>not logged in</span>
{% endif %}
</div>
{% macro user_action(name, icon) %}
<button>
<twig:ux:icon name="fa6-solid:{{ icon }}" />
<span>{{ name }}</span>
</button>
{% endmacro %}

View file

@ -0,0 +1,14 @@
<button id="burger-menu">
<twig:ux:icon name="fa6-solid:bars" />
</button>
<div id="burger-menu__container" tabindex="-1">
<button>
<twig:ux:icon name="fa6-solid:x" />
</button>
<twig:BurgerMenu:User/>
<hr/>
<twig:BurgerMenu:Login/>
<hr/>
<twig:BurgerMenu:Navigation/>
</div>

View file

@ -1,14 +1,12 @@
<header id="header"> <header id="header">
<img <img
id="header__logo"
src="{{ asset("icons/logo/logo.svg") }}" src="{{ asset("icons/logo/logo.svg") }}"
alt="Euph Logo" alt="Euph Logo"
> >
<img <img
id="header__logo-dark"
src="{{ asset("icons/logo/dark-logo.svg") }}" src="{{ asset("icons/logo/dark-logo.svg") }}"
alt="Euph Logo" alt="Euph Logo"
> >
<h1 id="header__logo-text">Euph</h1> <h1>Euph</h1>
<twig:BurgerMenu/> <twig:BurgerMenu:_/>
</header> </header>

View file

@ -22,6 +22,9 @@
"#pkg/*": [ "#pkg/*": [
"./packages/*" "./packages/*"
], ],
"#styles/*": [
"./styles/*"
],
"#types/*": [ "#types/*": [
"./types/*" "./types/*"
] ]

View file

@ -32,7 +32,7 @@ Encore
config.corejs = '3.23'; config.corejs = '3.23';
}) })
.enableStimulusBridge('./frontend/controllers/controllers.json') .enableStimulusBridge('./frontend/controllers/controllers.json')
//.enableSassLoader() .enableSassLoader()
.enableTypeScriptLoader(function tsconfigCallback(tsConfig) { .enableTypeScriptLoader(function tsconfigCallback(tsConfig) {
tsConfig.configFile = TS_CONFIG_PATH; tsConfig.configFile = TS_CONFIG_PATH;
}) })