parent
44d4fcac3e
commit
1039c2694d
@ -0,0 +1,23 @@ |
||||
<script lang="ts"> |
||||
</script> |
||||
|
||||
<div role="alert" class="alert alert-info"> |
||||
<p class="text-3xl font-bold underline">Hello world!</p> |
||||
</div> |
||||
|
||||
<article class="prose lg:prose-xl"> |
||||
<h1>Garlic bread with cheese: What the science tells us</h1> |
||||
<p> |
||||
For years parents have espoused the health benefits of eating garlic bread with cheese to |
||||
their children, with the food earning such an iconic status in our culture that kids will |
||||
often dress up as warm, cheesy loaf for Halloween. |
||||
</p> |
||||
<p> |
||||
But a recent study shows that the celebrated appetizer may be linked to a series of rabies |
||||
cases springing up around the country. |
||||
</p> |
||||
</article> |
||||
|
||||
<style> |
||||
|
||||
</style> |
@ -1,22 +1,6 @@ |
||||
import { invoke } from "@tauri-apps/api/core"; |
||||
import { mount } from "svelte"; |
||||
import App from "./App.svelte"; |
||||
|
||||
let greetInputEl: HTMLInputElement | null; |
||||
let greetMsgEl: HTMLElement | null; |
||||
const app = mount(App, { target: document.getElementById("app") as Element }); |
||||
|
||||
async function greet() { |
||||
if (greetMsgEl && greetInputEl) { |
||||
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
||||
greetMsgEl.textContent = await invoke("greet", { |
||||
name: greetInputEl.value, |
||||
}); |
||||
} |
||||
} |
||||
|
||||
window.addEventListener("DOMContentLoaded", () => { |
||||
greetInputEl = document.querySelector("#greet-input"); |
||||
greetMsgEl = document.querySelector("#greet-msg"); |
||||
document.querySelector("#greet-form")?.addEventListener("submit", (e) => { |
||||
e.preventDefault(); |
||||
greet(); |
||||
}); |
||||
}); |
||||
export default app; |
||||
|
@ -0,0 +1,6 @@ |
||||
// svelte.config.js
|
||||
export default { |
||||
vitePlugin: { |
||||
//inspector: true
|
||||
} |
||||
}; |
@ -1,12 +1,11 @@ |
||||
/** @type {import('tailwindcss').Config} */ |
||||
export default { |
||||
content: ['./src/**/*.{html,js,svelte,ts}'], |
||||
content: ["./src/**/*.{html,js,svelte,ts}"], |
||||
theme: { |
||||
extend: {}, |
||||
extend: {} |
||||
}, |
||||
plugins: [], |
||||
daisyui: { |
||||
//themes: ['valentine']
|
||||
} |
||||
} |
||||
|
||||
}; |
||||
|
Loading…
Reference in new issue