Skip to content

Commit

Permalink
fix: fixing production site not working; added base to hrefs, correct…
Browse files Browse the repository at this point in the history
…ed base
  • Loading branch information
JCU25 committed Aug 14, 2024
1 parent dc8ece1 commit b4494db
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import { defineConfig } from 'astro/config';
// https://astro.build/config
export default defineConfig({
site: 'https://jcu25.github.io',
base: "jcu25.github.io/public"
base: "/jcu25.github.io/"
});
6 changes: 3 additions & 3 deletions src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a href="https://github.com/JCU25" target="_blank"
><img
class="icon"
src="/assets/github-vector.svg"
src="/jcu25.github.io/assets/github-vector.svg"
alt="github"
/></a
>
Expand All @@ -17,14 +17,14 @@
target="_blank"
><img
class="icon"
src="/assets/linkedin-vector.svg"
src="/jcu25.github.io/assets/linkedin-vector.svg"
alt="linkedin"
/></a
>
<a href="mailto:[email protected]" target="_blank"
><img
class="icon"
src="/assets/mail-icon-vector.svg"
src="/jcu25.github.io/assets/mail-icon-vector.svg"
alt="gmail"
/></a
>
Expand Down
8 changes: 4 additions & 4 deletions src/components/ProjectCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ const {
<!-- <a href={project_link}> -->
<div class="container">
{
img_src === "/assets/proj-discord-icon.png" && (
img_src === "/jcu25.github.io/assets/proj-discord-icon.png" && (
<a class="discord-img" href={project_link}>
<img src={img_src} alt={project_name} class="discord-img" />
</a>
)
}
{
img_src === "/assets/proj-machine-learning-icon.png" && (
img_src === "/jcu25.github.io/assets/proj-machine-learning-icon.png" && (
<a class="machine-learning-img" href={project_link}>
<img src={img_src} alt={project_name} class="machine-learning-img" />
</a>
)
}
{
img_src !== "/assets/proj-discord-icon.png" &&
img_src !== "/assets/proj-machine-learning-icon.png" && (
img_src !== "/jcu25.github.io/assets/proj-discord-icon.png" &&
img_src !== "/jcu25.github.io/assets/proj-machine-learning-icon.png" && (
<a href={project_link}>
<img src={img_src} alt={project_name} class="proj-img" />
</a>
Expand Down
24 changes: 12 additions & 12 deletions src/components/ProjectCardv2.astro
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const {
<a target="_blank" href={project_link}>
<img
class="proj-card-git-icon"
src="/public/assets/github-vector.svg"
src="/jcu25.github.io/public/assets/github-vector.svg"
alt="Github Link"
/>
</a>
Expand All @@ -46,7 +46,7 @@ const {
<a target="_blank" href={project_link}>
<img
class="proj-card-redir-icon"
src="/public/assets/open-link-icon.svg"
src="/jcu25.github.io/public/assets/open-link-icon.svg"
alt="Project Link"
/>
</a>
Expand All @@ -55,14 +55,14 @@ const {
</div>

{
img_src === "/assets/proj-discord-icon.png" && (
img_src === "/jcu25.github.io/assets/proj-discord-icon.png" && (
<a class="discord-img">
<img src={img_src} alt={project_name} class="discord-img" />
</a>
)
}
{
img_src === "/assets/proj-machine-learning-icon.png" && (
img_src === "/jcu25.github.io/assets/proj-machine-learning-icon.png" && (
<a class="machine-learning-img">
<img
src={img_src}
Expand All @@ -73,8 +73,8 @@ const {
)
}
{
img_src !== "/assets/proj-discord-icon.png" &&
img_src !== "/assets/proj-machine-learning-icon.png" && (
img_src !== "/jcu25.github.io/assets/proj-discord-icon.png" &&
img_src !== "/jcu25.github.io/assets/proj-machine-learning-icon.png" && (
<a>
<img src={img_src} alt={project_name} class="proj-img" />
</a>
Expand Down Expand Up @@ -123,7 +123,7 @@ const {
<a target="_blank" href={project_link}>
<img
class="modal-link-icon git-icon"
src="/public/assets/github-vector.svg"
src="/jcu25.github.io/public/assets/github-vector.svg"
alt="Github Link"
/>
</a>
Expand All @@ -144,7 +144,7 @@ const {
<a target="_blank" href={project_link}>
<img
class="modal-link-icon redir-icon"
src="/public/assets/open-link-icon.svg"
src="/jcu25.github.io/public/assets/open-link-icon.svg"
alt="Project Link"
/>
</a>
Expand All @@ -158,18 +158,18 @@ const {

<div class="modal-img-div">
{
img_src === "/assets/proj-discord-icon.png" && (
img_src === "/jcu25.github.io/public/assets/proj-discord-icon.png" && (
<img src={img_src} alt={project_name} class="modal-proj-icon" />
)
}
{
img_src === "/assets/proj-machine-learning-icon.png" && (
img_src === "/jcu25.github.io/public/assets/proj-machine-learning-icon.png" && (
<img src={img_src} alt={project_name} class="modal-proj-icon" />
)
}
{
img_src !== "/assets/proj-discord-icon.png" &&
img_src !== "/assets/proj-machine-learning-icon.png" && (
img_src !== "/jcu25.github.io/public/assets/proj-discord-icon.png" &&
img_src !== "/jcu25.github.io/assets/proj-machine-learning-icon.png" && (
<img class="modal-proj-img" src={img_src} alt={project_name} />
)
}
Expand Down
14 changes: 7 additions & 7 deletions src/components/ProjectHighlightLeftImg.astro
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const {
<a class="proj-redir-icon-link" target="_blank" href={proj_link}>
<img
class="proj-redir-icon"
src="/public/assets/open-link-icon.svg"
src="/jcu25.github.io/assets/open-link-icon.svg"
alt="Project Link"
/>
</a>
Expand Down Expand Up @@ -98,7 +98,7 @@ const {
<a target="_blank" href={proj_link}>
<img
class="modal-link-icon git-icon"
src="/public/assets/github-vector.svg"
src="/jcu25.github.io/assets/github-vector.svg"
alt="Github Link"
/>
</a>
Expand All @@ -119,7 +119,7 @@ const {
<a target="_blank" href={proj_link}>
<img
class="modal-link-icon redir-icon"
src="/public/assets/open-link-icon.svg"
src="/jcu25.github.io/assets/open-link-icon.svg"
alt="Project Link"
/>
</a>
Expand All @@ -133,18 +133,18 @@ const {

<div class="modal-img-div">
{
img_src === "/assets/proj-discord-icon.png" && (
img_src === "/jcu25.github.io/assets/proj-discord-icon.png" && (
<img src={img_src} alt={title} class="modal-proj-icon" />
)
}
{
img_src === "/assets/proj-machine-learning-icon.png" && (
img_src === "/jcu25.github.io/assets/proj-machine-learning-icon.png" && (
<img src={img_src} alt={title} class="modal-proj-icon" />
)
}
{
img_src !== "/assets/proj-discord-icon.png" &&
img_src !== "/assets/proj-machine-learning-icon.png" && (
img_src !== "/jcu25.github.io/assets/proj-discord-icon.png" &&
img_src !== "/jcu25.github.io/assets/proj-machine-learning-icon.png" && (
<img class="modal-proj-img" src={img_src} alt={title} />
)
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/ProjectHighlightRightImg.astro
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const {
<a target="_blank" href={proj_link}>
<img
class="modal-link-icon git-icon"
src="/public/assets/github-vector.svg"
src="/jcu25.github.io/assets/github-vector.svg"
alt="Github Link"
/>
</a>
Expand All @@ -119,7 +119,7 @@ const {
<a target="_blank" href={proj_link}>
<img
class="modal-link-icon redir-icon"
src="/public/assets/open-link-icon.svg"
src="/jcu25.github.io/public/assets/open-link-icon.svg"
alt="Project Link"
/>
</a>
Expand Down
10 changes: 5 additions & 5 deletions src/components/TopNav.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- <h6>JANELLE UY</h6> -->

<nav>
<a id="home" href="/">Home</a>
<a id="projets" href="/projects">My Projects</a>
<a id="about-me" href="/about-me">About Me</a>
<a id="home" href="/jcu25.github.io/">Home</a>
<a id="projets" href="/jcu25.github.io/projects">My Projects</a>
<a id="about-me" href="/jcu25.github.io/about-me">About Me</a>
</nav>
</div>

Expand All @@ -24,8 +24,8 @@

// text decoration when "Projects" is selected
if (
window.location.pathname == "/projects" ||
window.location.pathname == "/projects/"
window.location.pathname == "/jcu25.github.io/projects" ||
window.location.pathname == "/jcu25.github.io/projects/"
) {
if (projects) {
projects.style.textDecoration = "underline";
Expand Down
12 changes: 6 additions & 6 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ import ProjectHighlightRightImg from "../components/ProjectHighlightRightImg.ast
target="_blank"
><img
class="contact-icon"
src="/assets/github-vector.svg"
src="/jcu25.github.io/public/assets/github-vector.svg"
alt="github"
width="10px"
height="10px"
Expand All @@ -77,7 +77,7 @@ import ProjectHighlightRightImg from "../components/ProjectHighlightRightImg.ast
target="_blank"
><img
class="contact-icon"
src="/assets/linkedin-vector.svg"
src="/jcu25.github.io/public/assets/linkedin-vector.svg"
alt="github"
width="10px"
height="10px"
Expand All @@ -100,7 +100,7 @@ import ProjectHighlightRightImg from "../components/ProjectHighlightRightImg.ast

<img
class="highlight-img"
src="/assets/hero_proj_highlight.png"
src="/jcu25.github.io/public/assets/hero_proj_highlight.png"
alt="Project Highlights"
/>
</div>
Expand Down Expand Up @@ -133,7 +133,7 @@ import ProjectHighlightRightImg from "../components/ProjectHighlightRightImg.ast
<ProjectHighlightLeftImg
id="ocp"
date="Mar 2022 - Present"
img_src="/assets/ocp-website.png"
img_src="/jcu25.github.io/public/assets/ocp-website.png"
proj_link="https://mmcm-ocp.com"
title="OCP Website"
roles={[
Expand All @@ -156,7 +156,7 @@ import ProjectHighlightRightImg from "../components/ProjectHighlightRightImg.ast
<ProjectHighlightRightImg
id="ecd"
date="Oct 2023 - Feb 2024"
img_src="/assets/ecd-dsa.png"
img_src="/jcu25.github.io/public/assets/ecd-dsa.png"
proj_link=""
title="ECD-DSA: Estimating Crowd Density to Detect Sparse Areas"
roles={[
Expand All @@ -178,7 +178,7 @@ import ProjectHighlightRightImg from "../components/ProjectHighlightRightImg.ast
<ProjectHighlightLeftImg
id="ccis-website"
date="Jul 2021 - Aug 2021"
img_src="/assets/ccis-website.png"
img_src="/jcu25.github.io/public/assets/ccis-website.png"
proj_link=""
title="MMCM CCIS Website"
roles={["Backend Developer (Jul 2021 - Aug 2021)"]}
Expand Down
16 changes: 8 additions & 8 deletions src/pages/projects.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import ProjectCardv2 from "../components/ProjectCardv2.astro";
<div class="projects">
<ProjectCardv2
id="ocp"
img_src="/assets/ocp-website.png"
img_src="/jcu25.github.io/assets/ocp-website.png"
project_name="MMCM OCP Website"
project_link="https://www.mmcm-ocp.com"
project_types={[{ type: "Web Development", className: "web-dev" }]}
Expand All @@ -32,7 +32,7 @@ import ProjectCardv2 from "../components/ProjectCardv2.astro";

<ProjectCardv2
id="ecd"
img_src="/assets/ecd-dsa.png"
img_src="/jcu25.github.io/assets/ecd-dsa.png"
project_name="ECD-DSA: Estimating Crowd Density to Detect Sparse Areas"
project_link=""
project_types={[
Expand All @@ -58,7 +58,7 @@ import ProjectCardv2 from "../components/ProjectCardv2.astro";

<ProjectCardv2
id="utilitycrate"
img_src="/assets/ccis-website.png"
img_src="/jcu25.github.io/assets/ccis-website.png"
project_name="UtilityCrate"
project_link=""
project_types={[
Expand All @@ -84,7 +84,7 @@ import ProjectCardv2 from "../components/ProjectCardv2.astro";

<ProjectCardv2
id="ccis-website"
img_src="/assets/ccis-website.png"
img_src="/jcu25.github.io/assets/ccis-website.png"
project_name="MMCM CCIS Website"
project_link=""
project_types={[{ type: "Web Development", className: "web-dev" }]}
Expand All @@ -100,7 +100,7 @@ import ProjectCardv2 from "../components/ProjectCardv2.astro";

<ProjectCardv2
id="ccis-bot"
img_src="/assets/proj-discord-icon.png"
img_src="/jcu25.github.io/assets/proj-discord-icon.png"
project_name="MMCM CCIS Discord Bot"
project_link=""
project_types={[{ type: "Discord Bot", className: "discord-bot" }]}
Expand All @@ -117,7 +117,7 @@ import ProjectCardv2 from "../components/ProjectCardv2.astro";

<ProjectCardv2
id="mcm-cup-bot"
img_src="/assets/proj-discord-icon.png"
img_src="/jcu25.github.io/assets/proj-discord-icon.png"
project_name="MCM Cup 2022 Mobile Legends Discord Bot"
project_link=""
project_types={[{ type: "Discord Bot", className: "discord-bot" }]}
Expand All @@ -136,7 +136,7 @@ import ProjectCardv2 from "../components/ProjectCardv2.astro";

<ProjectCardv2
id="face-mask-ml"
img_src="/assets/proj-machine-learning-icon.png"
img_src="/jcu25.github.io/assets/proj-machine-learning-icon.png"
project_name="Face Mask Detection"
project_link="https://github.com/JCU25/Face-Mask-Detection-and-Counting"
project_types={[
Expand All @@ -155,7 +155,7 @@ import ProjectCardv2 from "../components/ProjectCardv2.astro";

<ProjectCardv2
id="waste-class-ml"
img_src="/assets/proj-machine-learning-icon.png"
img_src="/jcu25.github.io/assets/proj-machine-learning-icon.png"
project_name="Waste Classification Model"
project_link="https://github.com/JCU25/Waste-Classification-Model.git"
project_types={[
Expand Down

0 comments on commit b4494db

Please sign in to comment.