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