added in several workflow QOL features and updated flake
This commit is contained in:
parent
153276f49c
commit
bc27ffab4e
14 changed files with 3764 additions and 312 deletions
3162
assets/htmx.min.js
vendored
3162
assets/htmx.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -44,7 +44,7 @@ html {
|
|||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
/* 3 */
|
||||
font-family: Inter var, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
/* 4 */
|
||||
font-feature-settings: normal;
|
||||
/* 5 */
|
||||
|
|
@ -534,6 +534,19 @@ video {
|
|||
--tw-backdrop-sepia: ;
|
||||
}
|
||||
|
||||
.m-auto {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.my-4 {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.block {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,12 @@
|
|||
run-dev = pkgs.writeShellScriptBin "run-dev" ''
|
||||
#!/usr/bin/env zsh
|
||||
set -e
|
||||
cargo run test_data/test.json
|
||||
cargo watch -x 'run test_data/test.json'
|
||||
'';
|
||||
run-prettier = pkgs.writeShellScriptBin "run-prettier" ''
|
||||
#!/usr/bin/env zsh
|
||||
set -e
|
||||
pnpm prettier --write --ignore-unknown .
|
||||
'';
|
||||
|
||||
in {
|
||||
|
|
@ -30,6 +35,7 @@
|
|||
pkgconfig
|
||||
rustc
|
||||
cargo
|
||||
cargo-watch
|
||||
nodejs_20
|
||||
nodePackages_latest.pnpm
|
||||
];
|
||||
|
|
@ -43,5 +49,6 @@
|
|||
|
||||
build-tailwind = build-tailwind;
|
||||
run-dev = run-dev;
|
||||
run-prettier = run-prettier;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
785
pnpm-lock.yaml
generated
785
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -4,7 +4,9 @@ use crate::templates::RootTemplate;
|
|||
use crate::util::HtmlTemplate;
|
||||
|
||||
pub async fn root() -> impl IntoResponse {
|
||||
let template = RootTemplate {};
|
||||
let template = RootTemplate {
|
||||
name: "Steven"
|
||||
};
|
||||
HtmlTemplate(template)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,4 +2,14 @@ use askama::Template;
|
|||
|
||||
#[derive(Template)]
|
||||
#[template(path = "root.html")]
|
||||
pub struct RootTemplate;
|
||||
pub struct RootTemplate<'a>{
|
||||
pub name: &'a str,
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path="base.html")]
|
||||
pub struct BaseTemplate;
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path="head.html")]
|
||||
pub struct HeadTemplate;
|
||||
|
|
@ -1,13 +1,7 @@
|
|||
const { fontFamily } = require('tailwindcss/defaultTheme');
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: ['./templates/*.html'],
|
||||
content: ["./templates/*.html"],
|
||||
theme: {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
sans: ['Inter var', ...fontFamily.sans],
|
||||
},
|
||||
},
|
||||
extend: {},
|
||||
},
|
||||
};
|
||||
11
templates/base.html
Normal file
11
templates/base.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>SK TCG Trader</title>
|
||||
<link rel="stylesheet" href="/assets/main.css" />
|
||||
<script src="/assets/htmx.min.js"></script>
|
||||
</head>
|
||||
<body class="bg-slate-700 m-auto">
|
||||
{% block body %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
0
templates/head.html
Normal file
0
templates/head.html
Normal file
|
|
@ -1,20 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>SK TCG Trader</title>
|
||||
<link rel="stylesheet" href="/assets/main.css">
|
||||
<script src="/assets/htmx.min.js"></script>
|
||||
</head>
|
||||
<body class="bg-slate-700">
|
||||
{% extends "base.html" %} {% block body %}
|
||||
<div class="flex flex-col items-center">
|
||||
<h1 class="text-2xl text-white">SK TCG Trader</h1>
|
||||
<h2 class="text-xl text-white" id="help-text">Click the button below to get the metrics</h2>
|
||||
<h1 class="text-2xl text-white">{{ name }}'s SK TCG Trader</h1>
|
||||
<br />
|
||||
<h2 class="my-4 text-xl text-white" id="help-text">
|
||||
Click the button below to get the metrics
|
||||
</h2>
|
||||
<br />
|
||||
<p class="font-bold text-white" id="data"></p>
|
||||
<br />
|
||||
<button class="bg-purple-500 p-4 rounded-lg text-white font-bold" id="submit" hx-get="/metrics" hx-target='#data' hx-swap="innerHTML">Get Data</button>
|
||||
<button
|
||||
class="bg-purple-500 p-4 rounded-lg text-white font-bold"
|
||||
id="submit"
|
||||
hx-get="/metrics"
|
||||
hx-target="#data"
|
||||
hx-swap="innerHTML"
|
||||
>
|
||||
Get Data
|
||||
</button>
|
||||
</div>
|
||||
</body>
|
||||
<style>
|
||||
</style>
|
||||
</html>
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue