Css experimentation
This commit is contained in:
parent
757e670dbb
commit
37ff3da023
2 changed files with 7 additions and 8 deletions
|
@ -4,8 +4,8 @@ import { LoginContext, ModalContext } from "./Root";
|
||||||
export function LoginForm() {
|
export function LoginForm() {
|
||||||
const modal_ctx = useContext(ModalContext);
|
const modal_ctx = useContext(ModalContext);
|
||||||
const login_ctx = useContext(LoginContext);
|
const login_ctx = useContext(LoginContext);
|
||||||
const [username, setUsername] = createSignal("");
|
const [username, setUsername] = createSignal<string>("");
|
||||||
const [password, setPassword] = createSignal("");
|
const [password, setPassword] = createSignal<string>("");
|
||||||
const [waiting, setWaiting] = createSignal(false);
|
const [waiting, setWaiting] = createSignal(false);
|
||||||
const [error, setError] = createSignal(false);
|
const [error, setError] = createSignal(false);
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { LoginForm } from "./Login";
|
||||||
function Menu() {
|
function Menu() {
|
||||||
let login_ctx = useContext(LoginContext);
|
let login_ctx = useContext(LoginContext);
|
||||||
return (
|
return (
|
||||||
<ul class="menu menu-horizontal bg-base-200 rounded-box space-x-2">
|
<ul class="menu menu-horizontal bg-base-100 rounded-box space-x-2">
|
||||||
<li>
|
<li>
|
||||||
<A href="/" end>
|
<A href="/" end>
|
||||||
Home
|
Home
|
||||||
|
@ -31,21 +31,20 @@ export function Navbar() {
|
||||||
let login_ctx = useContext(LoginContext);
|
let login_ctx = useContext(LoginContext);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="navbar bg-base-100 max-w-3xl max-w flex">
|
<div class="navbar text-neutral-content max-w-3xl max-w">
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
<A href={"/"} class="btn btn-ghost normal-case text-xl">
|
<A href={"/"} class="btn btn-ghost normal-case text-xl">
|
||||||
FrostByte
|
FrostByte
|
||||||
</A>
|
</A>
|
||||||
</div>
|
</div>
|
||||||
<div class="">
|
<div class="hidden md:flex">
|
||||||
<Menu />
|
<Menu />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-1 justify-end">
|
<div class="flex-1 justify-end hidden md:flex">
|
||||||
<A
|
<A
|
||||||
href="#"
|
href="#"
|
||||||
class="btn btn-ghost normal-case text-sm"
|
class="btn btn-ghost normal-case text-sm"
|
||||||
onClick={(b) => {
|
onClick={() => {
|
||||||
b.preventDefault();
|
|
||||||
if (login_ctx?.token() != "") {
|
if (login_ctx?.token() != "") {
|
||||||
localStorage.setItem("token", "");
|
localStorage.setItem("token", "");
|
||||||
localStorage.setItem("username", "");
|
localStorage.setItem("username", "");
|
||||||
|
|
Loading…
Reference in a new issue