Skip to content

Commit

Permalink
Merge pull request #4 from Bolado/dev
Browse files Browse the repository at this point in the history
enhance: Changed landing page style and added footer with credits.
  • Loading branch information
Bolado authored Nov 18, 2024
2 parents 733788e + b6dc8b8 commit 2325721
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from "react";
import { Link, Outlet, useLoaderData } from "react-router-dom";

const GlobalHeader = () => {
const GlobalHeaderAndFooter = () => {
// get loader data from the router
const logged = useLoaderData();
return (
<>
<header className="flex justify-between items-center p-3 bg-slate-500/10">
<a href="/build/new">
<a href="/">
<h1 className="cinzel text-xl text-bold">
SW:Lost Centuria Rune Builder
</h1>
Expand All @@ -23,11 +23,12 @@ const GlobalHeader = () => {
)}
</header>
<Outlet />
<GlobalFooter />
</>
);
};

export default GlobalHeader;
export default GlobalHeaderAndFooter;

// discord button
const DiscordButton = () => {
Expand Down Expand Up @@ -71,3 +72,20 @@ const ProfileButton = () => {
</svg>
);
};

const GlobalFooter = () => {
return (
<footer className="p-3 bg-slate-500/10">
<p className="text-center text-sm text-gray-500">
Made with ❤️ by{" "}
<a href="https://github.com/bolado" className="text-blue-500">
bolado
</a>{" "}
-{" "}
<a href="buymeacoffee.com/bolado" className="text-blue-500">
Buy me a coffee ☕
</a>
</p>
</footer>
);
};
4 changes: 2 additions & 2 deletions frontend/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import reportWebVitals from "./reportWebVitals";
import ErrorPage from "./pages/error-page";
import Builder from "./pages/build/builder";
import Callback from "./pages/Callback";
import GlobalHeader from "./components/global-header";
import GlobalHeaderAndFooter from "./components/global-components";
import { hasTokenCookie } from "./utils/queries";
import Profile from "./pages/profile";

const router = createBrowserRouter([
{
element: <GlobalHeader />,
element: <GlobalHeaderAndFooter />,
loader: async () => {
return hasTokenCookie();
},
Expand Down
10 changes: 9 additions & 1 deletion frontend/src/pages/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@ import ButtonPrimary from "../components/button-primary";

function App() {
return (
<div className="flex items-center justify-center flex-col gap-4 min-h-[100vh]">
<div className="flex items-center justify-center flex-col gap-4 min-h-[calc(100vh-theme(spacing.24))]">
<video
className="max-w-[2560px] h-screen fixed left-1/2 top-0 -translate-x-1/2 object-cover -z-10"
src="https://hive-fn.qpyou.cn/webdev/smon/20231103_124021_SX6QW4yK1o.mp4"
muted
playsInline
autoPlay
loop
/>
<img
src={`https://cdn.streamelements.com/infinity/summoners/logo_lost_centuria.png`}
className="max-w-[50vh] h-auto"
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/build/builder.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ function Builder() {
type="text"
value={build.name}
placeholder="Enter build name"
maxLength={25}
onChange={(e) =>
setBuild((prev) => ({ ...prev, name: e.target.value }))
}
Expand Down

0 comments on commit 2325721

Please sign in to comment.