small about page

This commit is contained in:
smolgrrr 2023-10-31 00:01:58 +11:00
parent 8b5295dd27
commit c670870a94
4 changed files with 31 additions and 9 deletions

BIN
client/public/tao.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -5,6 +5,7 @@ import Settings from './components/Settings';
import SwipeableViews from 'react-swipeable-views'; import SwipeableViews from 'react-swipeable-views';
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'; import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
import Thread from './components/Thread/Thread'; import Thread from './components/Thread/Thread';
import Header from './components/Header/Header';
function App() { function App() {
const [index, setIndex] = React.useState(1); const [index, setIndex] = React.useState(1);
@ -16,6 +17,7 @@ function App() {
return ( return (
<Router> <Router>
<Header />
<Routes> <Routes>
<Route path="/settings" element={<Settings />} /> <Route path="/settings" element={<Settings />} />
<Route path="/home" element={<Home />} /> <Route path="/home" element={<Home />} />

View File

@ -1,13 +1,24 @@
import { CogIcon } from '@heroicons/react/24/outline'; import { Cog6ToothIcon, QuestionMarkCircleIcon } from '@heroicons/react/24/outline';
export default function Header() { export default function Header() {
return ( return (
<footer className="fixed bottom-0 z-20 w-full bg-gradient-to-r from-blue-900 to-cyan-500 shadow-lg shadow-black"> <header className="hidden lg:block text-white p-4">
<div className="flex justify-end items-center h-14"> {/* Adjust height as needed */} <div className="container mx-auto flex justify-between items-center">
<button tabIndex={0} className="p-4"> <a href='/'>
<CogIcon className="h-12 w-12 text-transperant" /> <div className="flex items-center">
<img src="tao.png" className="h-8" />
<span className="font-bold">The Anon Operation</span>
</div>
</a>
<button className="ml-auto pr-4">
<QuestionMarkCircleIcon className="h-6 w-6 text-transperant" />
</button> </button>
<a href='/settings'>
<button className="">
<Cog6ToothIcon className="h-6 w-6 text-transperant" />
</button>
</a>
</div> </div>
</footer> </header>
); );
} }

View File

@ -4,8 +4,8 @@ import React, { useEffect, useState } from 'react';
import { addRelay } from '../utils/relays'; import { addRelay } from '../utils/relays';
const Settings = () => { const Settings = () => {
const [filterDifficulty, setFilterDifficulty] = useState(localStorage.getItem('filterDifficulty') || 20); const [filterDifficulty, setFilterDifficulty] = useState(localStorage.getItem('filterDifficulty') || 21);
const [difficulty, setDifficulty] = useState(localStorage.getItem('difficulty') || 20); const [difficulty, setDifficulty] = useState(localStorage.getItem('difficulty') || 21);
const handleSubmit = (e: React.FormEvent) => { const handleSubmit = (e: React.FormEvent) => {
e.preventDefault(); e.preventDefault();
@ -25,7 +25,7 @@ const Settings = () => {
// }, []); // }, []);
return ( return (
<div className="settings-page bg-black text-white min-h-screen p-8"> <div className="settings-page bg-black text-white p-8">
<h1 className="text-lg font-semibold mb-4">Settings</h1> <h1 className="text-lg font-semibold mb-4">Settings</h1>
<form onSubmit={handleSubmit}> <form onSubmit={handleSubmit}>
<div className="flex flex-wrap -mx-2 mb-4"> <div className="flex flex-wrap -mx-2 mb-4">
@ -59,6 +59,15 @@ const Settings = () => {
Save Settings Save Settings
</button> </button>
</form> </form>
<div className="settings-page py-10">
<h1 className="text-lg font-semibold mb-4">About</h1>
<div className='flex'>
<a href='https://github.com/smolgrrr/TAO'>
<img src="https://img.shields.io/github/stars/smolgrrr/TAO.svg?style=social"/>
</a>
</div>
</div>
</div> </div>
); );