Skip to content

Commit

Permalink
7
Browse files Browse the repository at this point in the history
  • Loading branch information
bobgus39 committed Jan 16, 2024
1 parent ebed51c commit d89838c
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 20 deletions.
Submodule [email protected]!bobgus39!marielWebPage.github.io.git added at 8cf4a0
20 changes: 10 additions & 10 deletions node_modules/.vite/deps/_metadata.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"name": "mariu",
"private": true,
"homepage": "http://marielWebPage.github.io",
"version": "0.0.0",
"type": "module",
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
"deploy": "gh-pages -d dist",
"dev": "vite",
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
Expand Down
10 changes: 8 additions & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@ function App() {
<>
<BrowserRouter>
<Routes>
<Route index element={<Home></Home>}></Route>
<Route path="/panes" element={<Panes></Panes>}></Route>
<Route
path="/marielWebPage.github.io"
element={<Home></Home>}
></Route>
<Route
path="/marielWebPage.github.io/panes"
element={<Panes></Panes>}
></Route>
</Routes>
</BrowserRouter>
</>
Expand Down
12 changes: 9 additions & 3 deletions src/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { NavLink, useLocation } from "react-router-dom";
function Header() {
const [menu, setMenu] = useState(true);
const location = useLocation();

console.log(location);
useEffect(() => {
const handleResize = () => {
const width = window.innerWidth;
Expand Down Expand Up @@ -66,7 +66,9 @@ function Header() {
<li>
<NavLink
className={
location.pathname !== "/panes" ? "menuNav" : "activated"
location.pathname !== "/marielWebPage.github.io/panes"
? "menuNav"
: "activated"
}
to="/panes"
>
Expand All @@ -75,7 +77,11 @@ function Header() {
</li>
<li>
<NavLink
className={location.pathname !== "/" ? "menuNav" : "activated"}
className={
location.pathname !== "/marielWebPage.github.io"
? "menuNav"
: "activated"
}
to="/"
>
Menu
Expand Down
7 changes: 4 additions & 3 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
})
base: "http://bobgus39.github.io/marielWebPage.github.io",
});

0 comments on commit d89838c

Please sign in to comment.