Skip to content

Commit

Permalink
Merge branches 'develop' and 'feature/user-info-page' of github.com:N…
Browse files Browse the repository at this point in the history
…IAEFEUP/website-niaefeup-frontend into feature/user-info-page
  • Loading branch information
peucastro committed Dec 4, 2024
2 parents afe3aae + c06cc9d commit c1b80af
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 18 deletions.
9 changes: 4 additions & 5 deletions dev.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
#!/bin/env bash

which docker-compose &> /dev/null
which docker &> /dev/null
if [ $? -ne 0 ]; then
echo "Docker compose not installed"
echo "Please read the README at https://github.com/NIAEFEUP/website-niaefeup-frontend"
exit
fi

docker-compose up -d website-niaefeup-frontend-dev
docker-compose up -d website-niaefeup-frontend-storybook
docker compose up -d website-niaefeup-frontend-dev
docker compose up -d website-niaefeup-frontend-storybook

trap_ctrl_c() {
docker-compose down
docker compose down
clear

exit
}

trap "trap_ctrl_c" 2

clear
echo "Containers are up and running"
echo ""
echo "Press Ctrl-C to exit"
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
website-niaefeup-frontend-dev:
build:
Expand All @@ -11,6 +10,7 @@ services:
- ./static:/usr/src/website-niaefeup-frontend/static
environment:
- PORT=3000
network_mode: 'host' # do not add this to prod!

website-niaefeup-frontend-storybook:
build:
Expand Down
4 changes: 2 additions & 2 deletions src/routes/(app)/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
:global(html) {
height: 100%;
min-height: 100vh;
overflow: scroll;
overflow: auto;
}
:global(body) {
height: 100%;
min-height: 100vh;
display: flex;
flex-direction: column;
overflow: scroll;
overflow: auto;
}
</style>
8 changes: 4 additions & 4 deletions src/routes/(app)/_components/layout/navbar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
aria-label="Navigation Bar"
>
<div class="flex w-full justify-start">
<a href="#/" class="flex items-center gap-4">
<a href="/" class="flex items-center gap-4">
<img src="/images/ni_logo.png" alt="NIAEFEUP's logo" width="40" height="40" />
<span>NIAEFEUP</span>
</a>
</div>
<div class="flex justify-end gap-7">
<a href="#/">Equipa</a>
<a href="#/">Projetos</a>
<a href="#/">Eventos</a>
<a href="/#/">Equipa</a>
<a href="/#/">Projetos</a>
<a href="/#/">Eventos</a>
<a href="/contacts">Contactos</a>
</div>
</nav>
10 changes: 7 additions & 3 deletions src/routes/(app)/login/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
password
})
}).then((res) => res.ok);
message = success ? 'Login successful' : 'Login failed';
if (success == true) {
window.location.href = '/';
}
}
</script>

<section
class="flex h-full w-full flex-col items-center justify-center font-raleway text-base font-[700] sm:text-base lg:text-lg xl:text-xl 2xl:text-2xl"
>
<form on:submit={submitLogin}>
<form method="POST" action="">
<div class="grid justify-center rounded-[15px] bg-muted-red-500 p-[5dvh] lg:min-w-[60%]">
<h1 class="text-taupe-100">Área Membro</h1>
<input
Expand All @@ -43,9 +47,9 @@
<br />
</div>
<button
type="submit"
type="button"
class="z-20 my-4 w-full rounded-[15px] bg-taupe-100 p-[2dvh] text-muted-red-700"
>Iniciar Sessão</button
on:click={submitLogin}>Iniciar Sessão</button
>
<br />
<p class="h-[2dvh] text-center">{message}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@
import Icon from '@/lib/components/icons/icon.svelte';
import Icons from '@/lib/components/icons/icons';
export let value: string;
let visible = false;
$: type = visible ? 'text' : 'password';
$: icon = visible ? Icons.Hidden : Icons.Visible;
</script>

<div class="relative">
<input
{type}
{...{ type }}
{...$$restProps}
class="col-start-1 col-end-3 row-start-1 {$$props.class}"
data-testid="password-input"
aria-label="Password input"
bind:value
/>
<button
type="button"
Expand Down
4 changes: 2 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/env bash

which docker-compose &> /dev/null
which docker &> /dev/null
if [ $? -ne 0 ]; then
echo "Docker compose not installed"
echo "Please read the README at https://github.com/NIAEFEUP/website-niaefeup-frontend"
exit
fi

docker-compose run --rm website-niaefeup-frontend-test
docker compose run --rm website-niaefeup-frontend-test

0 comments on commit c1b80af

Please sign in to comment.