#30 Prepare for deploy. Images need to be public, added swa-cli. Defined VITE_API_URL to the env var for azure

This commit is contained in:
Dominic Villemure
2024-04-21 13:52:40 -04:00
parent d812b15c8f
commit 5d37cefec1
63 changed files with 57 additions and 36 deletions

View File

@@ -1 +1 @@
VITE_API_URL=todo VITE_API_URL=https://hutopy.azurewebsites.net/

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 741 KiB

After

Width:  |  Height:  |  Size: 741 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 224 KiB

After

Width:  |  Height:  |  Size: 224 KiB

View File

Before

Width:  |  Height:  |  Size: 893 KiB

After

Width:  |  Height:  |  Size: 893 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 192 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

Before

Width:  |  Height:  |  Size: 3.0 MiB

After

Width:  |  Height:  |  Size: 3.0 MiB

View File

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

Before

Width:  |  Height:  |  Size: 2.8 MiB

After

Width:  |  Height:  |  Size: 2.8 MiB

View File

Before

Width:  |  Height:  |  Size: 931 KiB

After

Width:  |  Height:  |  Size: 931 KiB

View File

Before

Width:  |  Height:  |  Size: 852 KiB

After

Width:  |  Height:  |  Size: 852 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

Before

Width:  |  Height:  |  Size: 724 KiB

After

Width:  |  Height:  |  Size: 724 KiB

View File

Before

Width:  |  Height:  |  Size: 975 KiB

After

Width:  |  Height:  |  Size: 975 KiB

View File

Before

Width:  |  Height:  |  Size: 640 KiB

After

Width:  |  Height:  |  Size: 640 KiB

View File

Before

Width:  |  Height:  |  Size: 791 KiB

After

Width:  |  Height:  |  Size: 791 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 65 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

Before

Width:  |  Height:  |  Size: 143 KiB

After

Width:  |  Height:  |  Size: 143 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 MiB

After

Width:  |  Height:  |  Size: 2.8 MiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -20,17 +20,17 @@
<v-row justify="center"> <v-row justify="center">
<v-col cols="auto"> <v-col cols="auto">
<a href="https://www.facebook.com/profile.php?id=61556819217561"> <a href="https://www.facebook.com/profile.php?id=61556819217561">
<img class="icons" src="../../images/facebookiconblackpink.png" alt="Description image 2"> <img class="icons" src="../../public/images/facebookiconblackpink.png" alt="Description image 2">
</a> </a>
</v-col> </v-col>
<v-col cols="auto"> <v-col cols="auto">
<a href="https://www.instagram.com/hutopy.inc/"> <a href="https://www.instagram.com/hutopy.inc/">
<img src="../../images/instagramblackpink.png" alt="Description image 3" class="icons"> <img src="../../public/images/instagramblackpink.png" alt="Description image 3" class="icons">
</a> </a>
</v-col> </v-col>
<v-col cols="auto"> <v-col cols="auto">
<router-link :to="{ name: 'home' }"> <router-link :to="{ name: 'home' }">
<img src="../../images/xblackpink.png" alt="Description image 1" class="icons"> <img src="../../public/images/xblackpink.png" alt="Description image 1" class="icons">
</router-link> </router-link>
</v-col> </v-col>
</v-row> </v-row>

View File

@@ -8,7 +8,7 @@
<v-row align="center" justify="center"> <v-row align="center" justify="center">
<!-- Header --> <!-- Header -->
<v-col cols="8" lg="8" md="10" sm="10" xs="10" style=" align-items: center; "> <v-col cols="8" lg="8" md="10" sm="10" xs="10" style=" align-items: center; ">
<img class="login-picture" src="../../images/loginpage/loginhutopy.png"> <img class="login-picture" src="../../public/images/loginpage/loginhutopy.png">
</v-col> </v-col>
<!-- Connexion-objects --> <!-- Connexion-objects -->
@@ -58,7 +58,7 @@
<div class="sm:hidden flex flex-col items-center justify-start" <div class="sm:hidden flex flex-col items-center justify-start"
style="background-color: #f4f4f4; height: 100vh;"> style="background-color: #f4f4f4; height: 100vh;">
<img style="margin-top: 10%; width: 350px; box-shadow: 0 4px 6px rgba(0, 0, 0, .5); border-radius: 25px; " <img style="margin-top: 10%; width: 350px; box-shadow: 0 4px 6px rgba(0, 0, 0, .5); border-radius: 25px; "
src="../../images/loginpage/loginhutopy.png"> src="../../public/images/loginpage/loginhutopy.png">
<h1 class="h1-connexion">Connexion</h1> <h1 class="h1-connexion">Connexion</h1>
<h2 class="h2-connexion">Comment souhaitez-vous <h2 class="h2-connexion">Comment souhaitez-vous

View File

@@ -8,7 +8,7 @@
<v-col xl="7" lg="9" md="11" sm="12" xs="12"> </v-col> <v-col xl="7" lg="9" md="11" sm="12" xs="12"> </v-col>
<img class="hutopy-header-image" src="../../../images/hutopy.png"> <img class="hutopy-header-image" src="../../../public/images/hutopy.png">
<v-col class="ml-0 text-left "> <v-col class="ml-0 text-left ">
@@ -27,7 +27,7 @@
<v-row> <v-row>
<v-col> <v-col>
<img class="contact-image" src="../../../images/contactpage/contactpicture.png"> <img class="contact-image" src="../../../public/images/contactpage/contactpicture.png">
</v-col> </v-col>
<v-col class="row-joinus"> <v-col class="row-joinus">

View File

@@ -1,8 +1,8 @@
<v-container> <v-container>
<v-container> <v-container>
<div> <div>
<img src="../../../images/guillaimeaime.png" class="banner-creator " <img src="../../../public/images/guillaimeaime.png" class="banner-creator "
style="width: 98.25%; height: 100%; object-fit: cover; border-top-left-radius: 50px; border-top-right-radius: 50px;"> style="width: 98.25%; height: 100%; object-fit: cover; border-top-left-radius: 50px; border-top-right-radius: 50px;">
</div> </div>
<v-countainer > <v-countainer >

View File

@@ -14,8 +14,8 @@
<div style="margin-top: -1.6%;"> <div style="margin-top: -1.6%;">
<v-row> <v-row>
<v-col cols="12"> <v-col cols="12">
<img src="../../../images/guillaimeaime3x.png" class="banner-image" alt="Bannière" <img src="../../../public/images/guillaimeaime3x.png" class="banner-image" alt="Bannière"
style="width: 100vw; border-top: 5px solid rgba(107, 0, 101, 1);"> style="width: 100vw; border-top: 5px solid rgba(107, 0, 101, 1);">
</v-col> </v-col>
</v-row> </v-row>
</div> </div>

View File

@@ -246,17 +246,17 @@
<v-col cols="7" style="margin-top: 1%; margin-bottom: -2%;"> <v-col cols="7" style="margin-top: 1%; margin-bottom: -2%;">
<v-row> <v-row>
<a href="https://www.facebook.com/profile.php?id=61556819217561"> <a href="https://www.facebook.com/profile.php?id=61556819217561">
<img class="socialicons invert-color" src="../../../images/facebookicon.png" <img class="socialicons invert-color" src="../../../public/images/facebookicon.png"
alt="Description image 2"> alt="Description image 2">
</a> </a>
<a href="https://www.facebook.com/profile.php?id=61556819217561"> <a href="https://www.facebook.com/profile.php?id=61556819217561">
<img class="socialicons" src="../../../images/instaicon.png" alt="Description image 2"> <img class="socialicons" src="../../../public/images/instaicon.png" alt="Description image 2">
</a> </a>
<a href="https://www.facebook.com/profile.php?id=61556819217561"> <a href="https://www.facebook.com/profile.php?id=61556819217561">
<img class="socialicons invert-color" src="../../../images/xicon.png" alt="Description image 2"> <img class="socialicons invert-color" src="../../../public/images/xicon.png" alt="Description image 2">
</a> </a>
<a href="https://www.facebook.com/profile.php?id=61556819217561"> <a href="https://www.facebook.com/profile.php?id=61556819217561">
<img class="socialicons invert-color" src="../../../images/tiktok.png" alt="Description image 2"> <img class="socialicons invert-color" src="../../../public/images/tiktok.png" alt="Description image 2">
</a> </a>
</v-row> </v-row>
</v-col> </v-col>

View File

@@ -191,17 +191,17 @@
<v-row justify="center" class="profile-images"> <v-row justify="center" class="profile-images">
<v-col> <v-col>
<router-link :to="{ name: 'creatorfolio' }"> <router-link :to="{ name: 'creatorfolio' }">
<img src="../../../images/anonymelarge.png" alt="Profile Image" class="profile-image "> <img src="../../../public/images/anonymelarge.png" alt="Profile Image" class="profile-image ">
</router-link> </router-link>
</v-col> </v-col>
<v-col> <v-col>
<router-link :to="{ name: 'creatorfolio' }"> <router-link :to="{ name: 'creatorfolio' }">
<img src="../../../images/guillaume.jpg" alt="Profile Image" class="profile-image"> <img src="../../../public/images/guillaume.jpg" alt="Profile Image" class="profile-image">
</router-link> </router-link>
</v-col> </v-col>
<v-col> <v-col>
<router-link :to="{ name: 'creatorfolio' }"> <router-link :to="{ name: 'creatorfolio' }">
<img src="../../../images/anonymelarge.png" alt="Profile Image" class="profile-image"> <img src="../../../public/images/anonymelarge.png" alt="Profile Image" class="profile-image">
</router-link> </router-link>
</v-col> </v-col>
@@ -227,8 +227,8 @@
<div> <div>
<img src="../../../images/homepage/bannierehomepage.png" class="banner-image" alt="Bannière" <img src="../../../public/images/homepage/bannierehomepage.png" class="banner-image" alt="Bannière"
style="margin-top: -100px;"> style="margin-top: -100px;">
<div> <div>
<v-card-text> <v-card-text>
@@ -301,19 +301,19 @@
<div class="d-flex justify-content-center" <div class="d-flex justify-content-center"
style="margin-left: -10px; margin-right: 10px; margin-top: 50px;"> style="margin-left: -10px; margin-right: 10px; margin-top: 50px;">
<router-link :to="{ name: 'creatorfolio' }"> <router-link :to="{ name: 'creatorfolio' }">
<img src="../../../images/guillaume.png" alt="Profile Image" class="profile-image" <img src="../../../public/images/guillaume.png" alt="Profile Image" class="profile-image"
style="border-radius: 50%; margin-right: 20px; width: 120px; height: auto;" /> style="border-radius: 50%; margin-right: 20px; width: 120px; height: auto;" />
</router-link> </router-link>
<router-link :to="{ name: 'creatorfolio' }"> <router-link :to="{ name: 'creatorfolio' }">
<img src="../../../images/guillaume.png" alt="Profile Image" class="profile-image" <img src="../../../public/images/guillaume.png" alt="Profile Image" class="profile-image"
style="border-radius: 50%; margin: 0 20px; width: 120px; height: auto;" /> style="border-radius: 50%; margin: 0 20px; width: 120px; height: auto;" />
</router-link> </router-link>
<router-link :to="{ name: 'creatorfolio' }"> <router-link :to="{ name: 'creatorfolio' }">
<img src="../../../images/guillaume.png" alt="Profile Image" class="profile-image" <img src="../../../public/images/guillaume.png" alt="Profile Image" class="profile-image"
style="border-radius: 50%; margin-left: 20px; width: 120px; height: auto;" /> style="border-radius: 50%; margin-left: 20px; width: 120px; height: auto;" />
</router-link> </router-link>
</div> </div>

13
swa-cli.config.json Normal file
View File

@@ -0,0 +1,13 @@
{
"$schema": "https://aka.ms/azure/static-web-apps-cli/schema",
"configurations": {
"taim-ui": {
"appLocation": ".",
"outputLocation": "dist",
"appBuildCommand": "npm run build",
"run": "npm run dev",
"appDevserverUrl": "https://hutopy.azurewebsites.net",
"apiDevserverUrl": "https://hutopy.azurewebsites.net"
}
}
}

View File

@@ -1,16 +1,24 @@
import { fileURLToPath, URL } from 'node:url' import { fileURLToPath, URL } from 'node:url'
import { defineConfig, loadEnv } from 'vite'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig(({ mode }) => {
plugins: [ // Load environment variables based on the mode
vue(), const env = loadEnv(mode, process.cwd(), '')
], return {
resolve: { plugins: [
alias: { vue(),
'@': fileURLToPath(new URL('./src', import.meta.url)) ],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
define: {
// Define a global constant __APP_ENV__ based on loaded environment variables
VITE_API_URL: JSON.stringify(env.VITE_API_URL)
} }
} }
}) })