Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Landing page #15

Merged
merged 16 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions .env

This file was deleted.

79 changes: 28 additions & 51 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,58 +1,35 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_NAME=ENEI
APP_ENV=local # Use "maintenance" to enable the maitenance page
APP_KEY=base64:AVegBkyjHs2QQsx53M9Kt9GbnrDLc6yG4cRg+WMJrbA=
APP_DEBUG=true
APP_URL=http://localhost
APP_URL=http://localhost:8000
APP_PORT=8000

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug
LOCALE=pt
FAKER_LOCALE=pt_PT

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
DB_HOST=pgsql
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_DATABASE=sinf-website-2023
DB_CONNECTION=pgsql

BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=database
SESSION_LIFETIME=120
MAIL_HOST=mailpit
MAIL_PORT=1025

MEMCACHED_HOST=127.0.0.1
REDIS_HOST=redis

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAINTENANCE_DRIVER=cache

MAIL_MAILER=smtp
MAIL_HOST=mailpit
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1

VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
CACHE_DRIVER=redis

QUEUE_CONNECTION=redis

SCOUT_QUEUE=true
SCOUT_DRIVER=meilisearch
MEILISEARCH_HOST=http://meilisearch:7700

MEILISEARCH_NO_ANALYTICS=false

LOG_CHANNEL="eneiWebsite"
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
/public/storage
/storage/*.key
/vendor
.env.backup
.env.production
.env.railway
.env*
!.env*.example
!.env*.encrypted
.phpunit.result.cache
Homestead.json
Homestead.yaml
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
build:
context: .
dockerfile: ./dockerfiles/Dockerfile.website
target: deploy
target: deploy-nocache
args:
- LARAVEL_ENV=${APP_ENV:-local}
- LARAVEL_ENV_FILE=.env
Expand Down
12 changes: 9 additions & 3 deletions dockerfiles/Dockerfile.website
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ COPY routes/ ./routes/

RUN composer install --no-interaction --optimize-autoloader --no-dev --prefer-dist

# deploy
FROM trafex/php-nginx:3.6.0 AS deploy
# deploy-nocache
FROM trafex/php-nginx:3.6.0 AS deploy-nocache
WORKDIR /var/www/html

USER root
Expand Down Expand Up @@ -72,10 +72,16 @@ COPY --chown=nobody --from=assets-build /app/public/ ./public/
ENV APP_ENV=${LARAVEL_ENV}

RUN [ -z "${LARAVEL_ENV_FILE_KEY}" ] || ( mv .env.${LARAVEL_ENV} .env.${LARAVEL_ENV}.encrypted && php artisan env:decrypt -n --env=${LARAVEL_ENV} --key=${LARAVEL_ENV_FILE_KEY} )

COPY --chown=nobody ./etc/entrypoint.nocache.sh /entrypoint.sh
CMD [ "/entrypoint.sh" ]

# deploy
FROM deploy-nocache AS deploy

RUN php artisan storage:link -n
RUN php artisan event:cache -n
RUN php artisan route:cache -n
RUN php artisan view:cache -n

COPY --chown=nobody ./etc/entrypoint.sh /entrypoint.sh
CMD [ "/entrypoint.sh" ]
5 changes: 5 additions & 0 deletions etc/entrypoint.nocache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

set -e

/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/fonts/SpaceGrotesk-Bold.ttf
Binary file not shown.
Binary file added public/fonts/SpaceGrotesk-Light.ttf
Binary file not shown.
Binary file added public/fonts/SpaceGrotesk-Medium.ttf
Binary file not shown.
Binary file added public/fonts/SpaceGrotesk-Regular.ttf
Binary file not shown.
Binary file added public/fonts/SpaceGrotesk-SemiBold.ttf
Binary file not shown.
Binary file added public/images/background.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/enei-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/gradient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/landing-page-background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/images/logo-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions resources/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@
@tailwind components;
@tailwind utilities;

@layer base {
@font-face {
font-family: 'Space Grotesk';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/SpaceGrotesk-Regular.ttf') format('truetype');
}

@font-face {
font-family: 'Space Grotesk';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/SpaceGrotesk-Bold.ttf') format('truetype');
}
}

/* Custom utility for hiding elements */
[x-cloak] {
display: none;
}
74 changes: 29 additions & 45 deletions resources/js/Components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import Dropdown from "@/Components/Dropdown.vue";
import DropdownTrigger from "@/Components/DropdownTrigger.vue";
import DropdownLink from "@/Components/DropdownLink.vue";
import HamburgerMenu from "@/Components/HamburgerMenu.vue";

Check failure on line 6 in resources/js/Components/Navbar.vue

View workflow job for this annotation

GitHub Actions / Lint Typescript code

'HamburgerMenu' is defined but never used
import route, {
type QueryParams,
type RouteParamsWithQueryOverload,
} from "ziggy-js";
import { usePage } from "@inertiajs/vue3";

Check failure on line 11 in resources/js/Components/Navbar.vue

View workflow job for this annotation

GitHub Actions / Lint Typescript code

'usePage' is defined but never used
import { OhVueIcon } from "oh-vue-icons";
//import { OhVueIcon } from "oh-vue-icons";
import { isAdmin as checkIsAdmin } from "@/Types/User";

Check failure on line 13 in resources/js/Components/Navbar.vue

View workflow job for this annotation

GitHub Actions / Lint Typescript code

'checkIsAdmin' is defined but never used

interface Route {
label: string;
Expand All @@ -19,41 +19,41 @@
type Routes = Record<string, Route>;

const homeSections: Routes = {
aboutus: {
/*aboutus: {
label: "Sobre nós",
},
speakers: { label: "Oradores" },
sponsors: { label: "Patrocínios" },
sponsors: { label: "Patrocínios" },*/
};

const pageRoutes: Routes = {
program: { label: "Programa" },
/*program: { label: "Programa" },
"shop.show": { label: "Loja" },
team: { label: "Equipa" },
team: { label: "Equipa" },*/
};

const editionRoutes = [2022, 2021, 2020, 2019, 2018];
// const editionRoutes = [2022, 2021, 2020, 2019, 2018];

const { props } = usePage();
// const { props } = usePage();

const options = {
pages: pageRoutes,
competitions: props.competitions,
editions: editionRoutes,
};
// const options = {
// pages: pageRoutes,
// competitions: props.competitions,
// editions: editionRoutes,
// };

const isAdmin = checkIsAdmin(props.auth.user);
// const isAdmin = checkIsAdmin(props.auth.user);
</script>

<template>
<nav class="flex border-b-2 border-black bg-2023-bg py-2">
<nav class="flex bg-transparent py-4">
<Dropdown align="center" width="32" class="ml-10 max-md:hidden">
<template #trigger>
<DropdownTrigger class="group">
<a :href="route('home')">
<img
class="w-24 max-md:w-16"
src="/images/cy-sinf-small.svg"
class="w-48 max-md:w-24"
src="/images/logo-white.svg"
alt="Stylized SINF logo"
/>
</a>
Expand All @@ -71,8 +71,8 @@
</Dropdown>
<NavLink :href="route('home')" class="md:hidden">
<img
class="w-24 max-md:w-16"
src="/images/cy-sinf-small.svg"
class="w-24 max-md:w-24"
src="/images/logo-white.svg"
alt="Stylized SINF logo"
/>
</NavLink>
Expand All @@ -92,7 +92,8 @@
{{ label }}
</NavLink>
</template>
<Dropdown
<!-- COMPETITIONS DROPDOWN -->
<!--<Dropdown
v-if="props.competitions.length > 0"
align="center"
width="32"
Expand All @@ -112,33 +113,12 @@
</DropdownLink>
</template>
</template>
</Dropdown>
</Dropdown>-->
</div>

<div class="mr-4 flex w-full justify-end">
<div class="hidden h-full gap-1 md:flex lg:gap-4">
<Dropdown align="center" width="20">
<template #trigger>
<DropdownTrigger> 2023 </DropdownTrigger>
</template>
<template #content>
<template
v-for="edition in editionRoutes"
:key="edition"
>
<DropdownLink
as="a"
:href="`https://${edition}.sinf.pt`"
>
{{ edition }}
</DropdownLink>
</template>
</template>
</Dropdown>
</div>

<div class="ml-2 flex items-center lg:mx-4">
<template v-if="$page.props.auth.user">
<!-- <template v-if="$page.props.auth.user">
<Dropdown align="right" :width="isAdmin ? '32' : '20'">
<template #trigger>
<img
Expand All @@ -164,14 +144,18 @@
</Dropdown>
</template>
<template v-else>
<a :href="route('login')">
<a
:href="route('login')"
class="bg-enei-blue px-2 py-2 font-space-grotesk font-bold text-enei-beige md:px-4"
>
Login
<OhVueIcon name="io-person" scale="1.7" fill="#025259">
</OhVueIcon>
</a>
</template>
</template> -->
</div>

<HamburgerMenu :options="options" />
<!-- <HamburgerMenu :options="options" /> -->
</div>
</nav>
</template>
15 changes: 8 additions & 7 deletions resources/js/Layouts/AppLayout.vue
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
<script setup lang="ts">
import { Head } from "@inertiajs/vue3";
import Navbar from "@/Components/Navbar.vue";
import Footer from "@/Components/Footer.vue";
import Banner from "@/Components/Banner.vue";
//import Footer from "@/Components/Footer.vue";
//import Banner from "@/Components/Banner.vue";

interface Props {
title: string;
showNavbar?: boolean;
}

defineProps<Props>();
withDefaults(defineProps<Props>(), {
showNavbar: true,
});
</script>

<template>
<div>
limwa marked this conversation as resolved.
Show resolved Hide resolved
<Head :title="title" />
<div class="sticky top-0 z-30">
<div v-show="showNavbar" class="sticky left-0 right-0 top-0 z-30">
limwa marked this conversation as resolved.
Show resolved Hide resolved
<Navbar />
<Banner />
</div>
<main class="min-h-screen bg-2023-bg">
<main class="min-h-screen">
limwa marked this conversation as resolved.
Show resolved Hide resolved
<slot />
</main>
<Footer />
</div>
</template>

Expand Down
Loading
Loading