feat: some shit?
This commit is contained in:
parent
2f9f2d81bf
commit
5e4fcfbdaa
@ -34,10 +34,7 @@ export const MainLayout = (
|
||||
<title>{title}</title>}
|
||||
</Head>
|
||||
<aside class="p-4 hidden md:block">
|
||||
<nav
|
||||
class="min-h-fit rounded-3xl p-3 grid gap-3 fixed t-0"
|
||||
hx-boost="true"
|
||||
>
|
||||
<nav class="min-h-fit rounded-3xl p-3 grid gap-3 fixed t-0">
|
||||
{Object.values(resources).map((m) => {
|
||||
return (
|
||||
<a
|
||||
|
@ -23,3 +23,5 @@ export const TYPESENSE_API_KEY = Deno.env.get("TYPESENSE_API_KEY");
|
||||
|
||||
export const LOG_LEVEL: string = Deno.env.get("LOG_LEVEL") ||
|
||||
"warn";
|
||||
|
||||
console.log({ LOG_LEVEL });
|
||||
|
18
lib/log.ts
18
lib/log.ts
@ -1,5 +1,5 @@
|
||||
import { EventEmitter } from "https://deno.land/x/evtemitter@v3.0.0/mod.ts"
|
||||
import {LOG_LEVEL as _LOG_LEVEL} from "@lib/env.ts"
|
||||
import { EventEmitter } from "https://deno.land/x/evtemitter@v3.0.0/mod.ts";
|
||||
import { LOG_LEVEL as _LOG_LEVEL } from "@lib/env.ts";
|
||||
|
||||
enum LOG_LEVEL {
|
||||
DEBUG = 0,
|
||||
@ -9,11 +9,11 @@ enum LOG_LEVEL {
|
||||
}
|
||||
|
||||
const logMap = {
|
||||
"debug":LOG_LEVEL.DEBUG,
|
||||
"info":LOG_LEVEL.INFO,
|
||||
"warn":LOG_LEVEL.WARN,
|
||||
"error":LOG_LEVEL.ERROR
|
||||
} as const
|
||||
"debug": LOG_LEVEL.DEBUG,
|
||||
"info": LOG_LEVEL.INFO,
|
||||
"warn": LOG_LEVEL.WARN,
|
||||
"error": LOG_LEVEL.ERROR,
|
||||
} as const;
|
||||
|
||||
const logFuncs = {
|
||||
[LOG_LEVEL.DEBUG]: console.debug,
|
||||
@ -23,7 +23,9 @@ const logFuncs = {
|
||||
} as const;
|
||||
|
||||
let longestScope = 0;
|
||||
let logLevel = (_LOG_LEVEL && _LOG_LEVEL in logMap && logMap[_LOG_LEVEL] )|| LOG_LEVEL.WARN;
|
||||
let logLevel = (_LOG_LEVEL && _LOG_LEVEL in logMap && logMap[_LOG_LEVEL]) ||
|
||||
LOG_LEVEL.WARN;
|
||||
console.log({ logLevel, logMap });
|
||||
|
||||
const ee = new EventEmitter<{
|
||||
log: { level: LOG_LEVEL; scope: string; args: unknown[] };
|
||||
|
@ -31,8 +31,6 @@ export default function App({ Component }: AppProps) {
|
||||
<meta name="theme-color" content="#141218" />
|
||||
<script src="/thumbnails.js" type="module"></script>
|
||||
|
||||
<script src="/htmx.min.js" type="module"></script>
|
||||
|
||||
<style>
|
||||
{`
|
||||
:root {
|
||||
|
1
static/htmx.min.js
vendored
1
static/htmx.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user