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

some css fixes #4

Merged
merged 5 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
38 changes: 15 additions & 23 deletions src/pages/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,20 +229,17 @@ const Dashboard = () => {
};

return (
<div className="min-h-screen bg-white text-black">
<ToastContainer />
<div style={{minWidth:'310px'}} className="min-h-screen flex flex-col justify-between bg-white text-black">
{fetched && user ? (
<>
<div className="p-4">
<nav className="max-w-screen-lg mx-auto flex flex-col md:flex-row items-center justify-between">
<div className="text-white font-bold text-xl mb-4 md:mb-0">
Dashboard
</div>
<div className="space-x-4 flex items-center relative">
<div className="p-4">

<ToastContainer />
<nav className="max-w-screen-lg mx-auto flex flex-col md:flex-row items-center justify-between fwrap">
<div className="text-white font-bold text-xl mb-4 md:mb-0">Dashboard</div>
<div className="flex flex-row items-center justify-between fwrap gap-4">
{/* Home button */}
<button onClick={() => router.push("/")} className="nav-button">
Home
</button>
<button onClick={() => router.push("/")} className="nav-button">Home</button>
{/* Documentation button */}
<button
onClick={() => router.push("https://docs.waifu.it")}
Expand All @@ -265,12 +262,11 @@ const Dashboard = () => {
</nav>
</div>

<div className="py-8">
<div className=" ">
<div className="max-w-screen-lg mx-auto px-4">
{randomToken && (
<div
className="max-w-md mx-auto bg-gray-100 p-4 rounded-md mb-4"
style={{ marginTop: "140px" }}
className="max-w-md mx-auto bg-gray-100 p-4 rounded-md mb-4"
>
<div className="flex justify-between items-center mb-2">
<span className="text-sm font-medium">Token:</span>
Expand All @@ -282,9 +278,8 @@ const Dashboard = () => {
type={showToken ? "text" : "password"}
value={randomToken}
readOnly
className={`w-full px-3 py-2 pr-10 rounded-md bg-white border border-gray-300 placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 ${
showToken ? "text-base" : "text-sm"
} md:text-base text-ellipsis`}
className={`w-full px-3 py-2 pr-10 rounded-md bg-white border border-gray-300 placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 ${showToken ? "text-base" : "text-sm"
} md:text-base text-ellipsis`}
onWheel={handleScroll}
/>
<div
Expand All @@ -295,7 +290,7 @@ const Dashboard = () => {
</div>
</div>

<div className="mt-4 flex justify-end space-x-2">
<div className="mt-4 flex justify-end flex-row fwrap space-x-2">
<button
onClick={handleRegenerateToken}
className="bg-blue-500 text-white px-3 py-1 rounded hover:bg-blue-600"
Expand All @@ -315,11 +310,8 @@ const Dashboard = () => {
)}
</div>
</div>
<footer
className="w-full h-12 border-t border-gray-300 flex justify-center items-center mt-auto md:mt-10 lg:mt-20 text-sm"
style={{ marginTop: "160px" }}
>
Made with ❤️ by Aeryk
<footer className="w-full h-12 border-t border-gray-300 flex justify-center items-center mb-6 text-black">
Made with ❤️ by <a className="" href="https://github.com/WaifuAPI/website/commits?author=kyrea"> Aeryk</a>
</footer>
</>
) : (
Expand Down
18 changes: 9 additions & 9 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { useState, useEffect } from "react";
import Head from "next/head";
import Link from "next/link";
import LoadingSpinner from "./components/LoadingSpinner";
import { FaUnderline } from "react-icons/fa";

// Component for the Dashboard button
const DashboardButton = ({ isSmallScreen }) => {
Expand Down Expand Up @@ -90,7 +91,7 @@ const Home = () => {
}, [loading]);

return (
<div className="bg-gray-100 min-h-screen text-black">
<div className="flex fnowrap flex-col items-center justify-center bg-gray-100 min-h-screen text-black">
<Head>
<title>Waifu.it</title>
<meta
Expand Down Expand Up @@ -120,14 +121,14 @@ const Home = () => {
</Head>

{loading ? (
<div className="flex flex-grow items-center justify-center">
<div className="min-h-screen flex flex-grow items-center justify-center">
<LoadingSpinner />
</div>
) : (
<div>
<div style={{minWidth:'320px'}} className="flex flex-grow min-h-screen90 items-center justify-between flex-col">
<DashboardButton isSmallScreen={isSmallScreen} />
<main className="max-w-screen-lg mx-auto py-20 px-4">
<h1 className="text-4xl font-bold text-center mb-6">
<main className="max-w-screen-lg py-20 px-4 flex flex-col nowrap items-center justify-center">
<h1 className="text-4xl font-bold mb-6 text-center">
<Link
className="text-blue-500 hover:underline focus:underline active:underline"
href="/"
Expand All @@ -136,7 +137,7 @@ const Home = () => {
</Link>
</h1>

<p className="text-xl text-center mb-12">
<p className="text-xl text-center mb-12 ">
An Open-source API Serving Bunch of Anime stuff
</p>

Expand Down Expand Up @@ -188,9 +189,8 @@ const Home = () => {
</Link>
</div>
</main>

<footer className="w-full h-12 border-t border-gray-300 flex justify-center items-center mt-auto md:mt-10 lg:mt-20 text-black">
Made with ❤️ by Aeryk
<footer className="w-full h-12 border-t border-gray-300 flex justify-center items-center mb-6 md:mt-10 lg:mt-20 text-black">
Made with ❤️ by <a className="" href="https://github.com/WaifuAPI/website/commits?author=kyrea"> Aeryk</a>
</footer>
</div>
)}
Expand Down
Loading