diff --git a/examples/api/.gitignore b/examples/api/.gitignore deleted file mode 100644 index 48c3ca4..0000000 --- a/examples/api/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/dist/ -/target/ -/Cargo.lock diff --git a/examples/api/.taurignore b/examples/api/.taurignore deleted file mode 100644 index 1ebdc6d..0000000 --- a/examples/api/.taurignore +++ /dev/null @@ -1,3 +0,0 @@ -/src -/public -/Cargo.toml \ No newline at end of file diff --git a/examples/api/Cargo.toml b/examples/api/Cargo.toml deleted file mode 100644 index 37c7504..0000000 --- a/examples/api/Cargo.toml +++ /dev/null @@ -1,21 +0,0 @@ -[package] -name = "tauri-app-ui" -version = "0.0.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] -tauri-sys = { path = "../../", features = ["all"] } -serde = { version = "1.0.140", features = ["derive"] } -sycamore = { git = "https://github.com/sycamore-rs/sycamore", rev = "abd556cbc02047042dad2ebd04405e455a9b11b2", features = ["suspense", "hydrate"] } -sycamore-router = { git = "https://github.com/sycamore-rs/sycamore", rev = "abd556cbc02047042dad2ebd04405e455a9b11b2" } -log = "0.4.17" -wasm-logger = "0.2.0" -gloo-timers = "0.2.4" -shared = { path = "shared" } - -[features] -ssg = ["sycamore/ssr"] - -[workspace] -members = ["src-tauri", "shared"] diff --git a/examples/api/Trunk.toml b/examples/api/Trunk.toml deleted file mode 100644 index 60ac6db..0000000 --- a/examples/api/Trunk.toml +++ /dev/null @@ -1,16 +0,0 @@ -[build] -target = "./index.html" - -[watch] -ignore = ["./src-tauri"] - -[serve] -address = "127.0.0.1" -port = 1420 -open = false - -# [[hooks]] -# # Runs SSG on production builds -# stage = "post_build" -# command = "bash" -# command_arguments = ["-c", "if [[ $TRUNK_PROFILE == \"release\" ]]; then cargo run --release --features ssg -- $TRUNK_STAGING_DIR; fi"] diff --git a/examples/api/index.html b/examples/api/index.html deleted file mode 100644 index fc029e0..0000000 --- a/examples/api/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - Tauri + Yew App - - - - - - - diff --git a/examples/api/public/tauri_logo.png b/examples/api/public/tauri_logo.png deleted file mode 100644 index 2c53b8c..0000000 Binary files a/examples/api/public/tauri_logo.png and /dev/null differ diff --git a/examples/api/shared/Cargo.toml b/examples/api/shared/Cargo.toml deleted file mode 100644 index 92a9d17..0000000 --- a/examples/api/shared/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "shared" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -serde = { version = "1.0.140", features = ["derive"] } \ No newline at end of file diff --git a/examples/api/shared/src/lib.rs b/examples/api/shared/src/lib.rs deleted file mode 100644 index 1ebbc1d..0000000 --- a/examples/api/shared/src/lib.rs +++ /dev/null @@ -1,12 +0,0 @@ -use serde::{Serialize, Deserialize}; - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct Reply<'a> { - pub data: &'a str, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct RequestBody<'a> { - pub id: i32, - pub name: &'a str, -} \ No newline at end of file diff --git a/examples/api/src-tauri/.gitignore b/examples/api/src-tauri/.gitignore deleted file mode 100644 index f4dfb82..0000000 --- a/examples/api/src-tauri/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Generated by Cargo -# will have compiled files and executables -/target/ - diff --git a/examples/api/src-tauri/Cargo.toml b/examples/api/src-tauri/Cargo.toml deleted file mode 100644 index ee6ef6f..0000000 --- a/examples/api/src-tauri/Cargo.toml +++ /dev/null @@ -1,28 +0,0 @@ -[package] -name = "tauri-app" -version = "0.0.0" -description = "A Tauri App" -authors = ["you"] -license = "" -repository = "" -edition = "2021" -rust-version = "1.57" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[build-dependencies] -tauri-build = { git = "https://github.com/tauri-apps/tauri", features = [] } - -[dependencies] -serde_json = "1.0" -serde = { version = "1.0", features = ["derive"] } -tauri = { git = "https://github.com/tauri-apps/tauri", features = ["api-all"] } -shared = { path = "../shared" } - -[features] -# by default Tauri runs in production mode -# when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL -default = [ "custom-protocol" ] -# this feature is used used for production builds where `devPath` points to the filesystem -# DO NOT remove this -custom-protocol = [ "tauri/custom-protocol" ] diff --git a/examples/api/src-tauri/build.rs b/examples/api/src-tauri/build.rs deleted file mode 100644 index d860e1e..0000000 --- a/examples/api/src-tauri/build.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - tauri_build::build() -} diff --git a/examples/api/src-tauri/icons/128x128.png b/examples/api/src-tauri/icons/128x128.png deleted file mode 100644 index 6be5e50..0000000 Binary files a/examples/api/src-tauri/icons/128x128.png and /dev/null differ diff --git a/examples/api/src-tauri/icons/128x128@2x.png b/examples/api/src-tauri/icons/128x128@2x.png deleted file mode 100644 index e81bece..0000000 Binary files a/examples/api/src-tauri/icons/128x128@2x.png and /dev/null differ diff --git a/examples/api/src-tauri/icons/32x32.png b/examples/api/src-tauri/icons/32x32.png deleted file mode 100644 index a437dd5..0000000 Binary files a/examples/api/src-tauri/icons/32x32.png and /dev/null differ diff --git a/examples/api/src-tauri/icons/Square107x107Logo.png b/examples/api/src-tauri/icons/Square107x107Logo.png deleted file mode 100644 index 0ca4f27..0000000 Binary files a/examples/api/src-tauri/icons/Square107x107Logo.png and /dev/null differ diff --git a/examples/api/src-tauri/icons/Square142x142Logo.png b/examples/api/src-tauri/icons/Square142x142Logo.png deleted file mode 100644 index b81f820..0000000 Binary files a/examples/api/src-tauri/icons/Square142x142Logo.png and /dev/null differ diff --git a/examples/api/src-tauri/icons/Square150x150Logo.png b/examples/api/src-tauri/icons/Square150x150Logo.png deleted file mode 100644 index 624c7bf..0000000 Binary files a/examples/api/src-tauri/icons/Square150x150Logo.png and /dev/null differ diff --git a/examples/api/src-tauri/icons/Square284x284Logo.png b/examples/api/src-tauri/icons/Square284x284Logo.png deleted file mode 100644 index c021d2b..0000000 Binary files a/examples/api/src-tauri/icons/Square284x284Logo.png and /dev/null differ diff --git a/examples/api/src-tauri/icons/Square30x30Logo.png b/examples/api/src-tauri/icons/Square30x30Logo.png deleted file mode 100644 index 6219700..0000000 Binary files a/examples/api/src-tauri/icons/Square30x30Logo.png and /dev/null differ diff --git a/examples/api/src-tauri/icons/Square310x310Logo.png b/examples/api/src-tauri/icons/Square310x310Logo.png deleted file mode 100644 index f9bc048..0000000 Binary files a/examples/api/src-tauri/icons/Square310x310Logo.png and /dev/null differ diff --git a/examples/api/src-tauri/icons/Square44x44Logo.png b/examples/api/src-tauri/icons/Square44x44Logo.png deleted file mode 100644 index d5fbfb2..0000000 Binary files a/examples/api/src-tauri/icons/Square44x44Logo.png and /dev/null differ diff --git a/examples/api/src-tauri/icons/Square71x71Logo.png b/examples/api/src-tauri/icons/Square71x71Logo.png deleted file mode 100644 index 63440d7..0000000 Binary files a/examples/api/src-tauri/icons/Square71x71Logo.png and /dev/null differ diff --git a/examples/api/src-tauri/icons/Square89x89Logo.png b/examples/api/src-tauri/icons/Square89x89Logo.png deleted file mode 100644 index f3f705a..0000000 Binary files a/examples/api/src-tauri/icons/Square89x89Logo.png and /dev/null differ diff --git a/examples/api/src-tauri/icons/StoreLogo.png b/examples/api/src-tauri/icons/StoreLogo.png deleted file mode 100644 index 4556388..0000000 Binary files a/examples/api/src-tauri/icons/StoreLogo.png and /dev/null differ diff --git a/examples/api/src-tauri/icons/icon.icns b/examples/api/src-tauri/icons/icon.icns deleted file mode 100644 index 12a5bce..0000000 Binary files a/examples/api/src-tauri/icons/icon.icns and /dev/null differ diff --git a/examples/api/src-tauri/icons/icon.ico b/examples/api/src-tauri/icons/icon.ico deleted file mode 100644 index b3636e4..0000000 Binary files a/examples/api/src-tauri/icons/icon.ico and /dev/null differ diff --git a/examples/api/src-tauri/icons/icon.png b/examples/api/src-tauri/icons/icon.png deleted file mode 100644 index e1cd261..0000000 Binary files a/examples/api/src-tauri/icons/icon.png and /dev/null differ diff --git a/examples/api/src-tauri/src/main.rs b/examples/api/src-tauri/src/main.rs deleted file mode 100644 index bea1e9a..0000000 --- a/examples/api/src-tauri/src/main.rs +++ /dev/null @@ -1,37 +0,0 @@ -#![cfg_attr( - all(not(debug_assertions), target_os = "windows"), - windows_subsystem = "windows" -)] - -use shared::{Reply, RequestBody}; - -#[tauri::command] -fn log_operation(event: String, payload: Option) { - println!("{} {:?}", event, payload); -} - -#[tauri::command] -fn perform_request(endpoint: String, body: RequestBody) -> String { - println!("{} {:?}", endpoint, body); - "message response".into() -} - -fn main() { - tauri::Builder::default() - .invoke_handler(tauri::generate_handler![log_operation, perform_request]) - .on_page_load(|window, _| { - let window_ = window.clone(); - window.listen("js-event", move |event| { - println!("got js-event with message '{:?}'", event.payload()); - let reply = Reply { - data: "something else", - }; - - window_ - .emit("rust-event", Some(reply)) - .expect("failed to emit"); - }); - }) - .run(tauri::generate_context!()) - .expect("error while running tauri application"); -} diff --git a/examples/api/src-tauri/tauri.conf.json b/examples/api/src-tauri/tauri.conf.json deleted file mode 100644 index 15e818e..0000000 --- a/examples/api/src-tauri/tauri.conf.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "build": { - "beforeDevCommand": "trunk serve", - "beforeBuildCommand": "trunk build --release", - "devPath": "http://localhost:1420", - "distDir": "../dist", - "withGlobalTauri": true - }, - "package": { - "productName": "tauri-app", - "version": "0.0.0" - }, - "tauri": { - "allowlist": { - "all": true - }, - "bundle": { - "active": true, - "category": "DeveloperTool", - "copyright": "", - "deb": { - "depends": [] - }, - "externalBin": [], - "icon": [ - "icons/32x32.png", - "icons/128x128.png", - "icons/128x128@2x.png", - "icons/icon.icns", - "icons/icon.ico" - ], - "identifier": "com.tauri.dev", - "longDescription": "", - "macOS": { - "entitlements": null, - "exceptionDomain": "", - "frameworks": [], - "providerShortName": null, - "signingIdentity": null - }, - "resources": [], - "shortDescription": "", - "targets": "all", - "windows": { - "certificateThumbprint": null, - "digestAlgorithm": "sha256", - "timestampUrl": "" - } - }, - "security": { - "csp": null - }, - "updater": { - "active": false - }, - "windows": [ - { - "fullscreen": false, - "height": 600, - "resizable": true, - "title": "tauri-app", - "width": 800 - } - ] - } -} diff --git a/examples/api/src/main.rs b/examples/api/src/main.rs deleted file mode 100644 index c3f88ef..0000000 --- a/examples/api/src/main.rs +++ /dev/null @@ -1,82 +0,0 @@ -mod views; - -use sycamore::prelude::*; -#[cfg(not(feature = "ssg"))] -use sycamore_router::{Router, HistoryIntegration}; - -#[component] -fn Header(cx: Scope) -> View { - view! { cx, - header(style="display: flex; gap: 1em; margin-bottom: 1em;") { - a(href="/") { - "Welcome" - } - a(href="/app") { - "App" - } - a(href="/clipboard") { - "Clipboard" - } - a(href="/communication") { - "Communication" - } - a(href="/window") { - "Window" - } - } - } -} - -#[cfg(all(not(debug_assertions), not(feature = "ssg")))] -fn main() { - wasm_logger::init(wasm_logger::Config::default()); - - sycamore::hydrate(|cx| view! { cx, - Header - Router( - integration=HistoryIntegration::new(), - view=views::switch - ) - }); -} - -#[cfg(all(debug_assertions, not(feature = "ssg")))] -fn main() { - use sycamore::view; - - wasm_logger::init(wasm_logger::Config::default()); - - sycamore::render(|cx| view! { cx, - Header - Router( - integration=HistoryIntegration::new(), - view=views::switch - ) - }); -} - -#[cfg(feature = "ssg")] -fn main() { - use sycamore_router::StaticRouter; - - let out_dir = std::env::args().nth(1).unwrap(); - - println!("out_dir {}", out_dir); - - let template = std::fs::read_to_string(format!("{}/index.html", out_dir)).unwrap(); - - let html = sycamore::render_to_string(|cx| view! { cx, - Header - StaticRouter( - route=route.clone(), - view=views::switch - ) - }); - - let html = template.replace("\n", &html); - - let path = format!("{}/index.html", out_dir); - - println!("Writing html to file \"{}\"", path); - std::fs::write(path, html).unwrap(); -} diff --git a/examples/api/src/views/app.rs b/examples/api/src/views/app.rs deleted file mode 100644 index 9b04817..0000000 --- a/examples/api/src/views/app.rs +++ /dev/null @@ -1,78 +0,0 @@ -use gloo_timers::callback::Timeout; -use sycamore::prelude::*; -use tauri_sys::app; - -#[component] -pub fn App(cx: Scope) -> View { - let show_app = |_| { - sycamore::futures::spawn_local(async move { - let res = app::hide().await; - - log::debug!("app hide res {:?}", res); - - let timeout = Timeout::new(2_000, move || { - sycamore::futures::spawn_local(async move { - let res = app::show().await; - - log::debug!("app show res {:?}", res); - }); - }); - - timeout.forget(); - }); - }; - - let hide_app = |_| { - sycamore::futures::spawn_local(async move { - let res = app::hide().await; - - log::debug!("app hide res {:?}", res); - }); - }; - - let get_name = |_| { - sycamore::futures::spawn_local(async move { - let res = app::get_name().await; - - log::debug!("app name {:?}", res); - }); - }; - - let get_version = |_| { - sycamore::futures::spawn_local(async move { - let res = app::get_version().await; - - log::debug!("app version {:?}", res); - }); - }; - - let get_tauri_version = |_| { - sycamore::futures::spawn_local(async move { - let res = app::get_tauri_version().await; - - log::debug!("tauri version {:?}", res); - }); - }; - - view! { cx, - div { - button(class="btn",id="get_name",on:click=get_name) { - "Get App Name" - } - button(class="btn",id="get_version",on:click=get_version) { - "Get App Version" - } - button(class="btn",id="get_tauri_version",on:click=get_tauri_version) { - "Get Tauri Version" - } - } - div { - button(class="btn",id="show",title="Hides and shows the app after 2 seconds",on:click=show_app) { - "Show" - } - button(class="btn",id="hide",on:click=hide_app) { - "Hide" - } - } - } -} diff --git a/examples/api/src/views/clipboard.rs b/examples/api/src/views/clipboard.rs deleted file mode 100644 index 1a2093a..0000000 --- a/examples/api/src/views/clipboard.rs +++ /dev/null @@ -1,42 +0,0 @@ -use sycamore::prelude::*; -use tauri_sys::clipboard::{read_text, write_text}; - -#[component] -pub fn Clipboard(cx: Scope) -> View { - let text = create_signal(cx, "clipboard message".to_string()); - - let write = move |_| { - sycamore::futures::spawn_local_scoped(cx, async move { - write_text(&text.get()).await - // .then(() => { - // onMessage('Wrote to the clipboard') - // }) - // .catch(onMessage) - }); - }; - - let read = |_| { - sycamore::futures::spawn_local(async move { - let text = read_text().await; - - log::info!("Read text from clipboard {:?}", text); - // readText() - // .then((contents) => { - // onMessage(`Clipboard contents: ${contents}`) - // }) - // .catch(onMessage) - }); - }; - - view! { cx, - div(class="flex gap-1") { - input(class="grow input",placeholder="Text to write to the clipboard",bind:value=text) - button(class="btn",type="button",on:click=write) { - "Write" - } - button(class="btn",type="button",on:click=read) { - "Read" - } - } - } -} diff --git a/examples/api/src/views/communication.rs b/examples/api/src/views/communication.rs deleted file mode 100644 index 5c0ed4d..0000000 --- a/examples/api/src/views/communication.rs +++ /dev/null @@ -1,90 +0,0 @@ -use serde::{Deserialize, Serialize}; -use sycamore::prelude::*; -use tauri_sys::event::{emit, listen}; -use tauri_sys::tauri::invoke; -use shared::RequestBody; - -#[component] -pub fn Communication<'a, G: Html>(cx: Scope<'a>) -> View { - let unlisten = create_signal::>>(cx, None); - - // on_mount(cx, move || { - - // sycamore::futures::spawn_local_scoped(cx, async move { - // let unlisten_raw = listen::("rust-event", &|reply| log::debug!("got reply {:?}", reply)).await; - - // unlisten.set(Some(Box::new(&unlisten_raw))); - // }); - // }); - - // on_cleanup(cx, || { - // if let Some(unlisten) = unlisten .take().as_deref() { - // (unlisten)() - // } - // }); - - let log = |_| { - #[derive(Serialize)] - struct Payload<'a> { - event: &'a str, - payload: &'a str, - } - - sycamore::futures::spawn_local(async move { - let res = invoke::<_, ()>( - "log_operation", - &Payload { - event: "tauri-click", - payload: "this payload is optional because we used Option in Rust", - }, - ) - .await; - - log::debug!("Emitted event, response {:?}", res); - }); - }; - - let perform_request = |_| { - sycamore::futures::spawn_local(async move { - #[derive(Serialize)] - struct Payload<'a> { - endpoint: &'a str, - body: RequestBody<'a> - } - - let res = invoke::<_, String>( - "perform_request", - &Payload { - endpoint: "dummy endpoint arg", - body: RequestBody { - id: 5, - name: "test", - }, - }, - ) - .await; - - log::debug!("Got reply {:?}", res); - }); - }; - - let emit_event = |_| { - sycamore::futures::spawn_local(async move { - emit("js-event", &"this is the payload string").await; - }); - }; - - view! { cx, - div { - button(class="btn",id="log",on:click=log) { - "Call Log API" - } - button(class="btn",mid="request",on:click=perform_request) { - "Call Request (async) API" - } - button(class="btn",id="event",on:click=emit_event) { - "Send event to Rust" - } - } - } -} diff --git a/examples/api/src/views/mod.rs b/examples/api/src/views/mod.rs deleted file mode 100644 index f735ed2..0000000 --- a/examples/api/src/views/mod.rs +++ /dev/null @@ -1,33 +0,0 @@ -mod app; -mod clipboard; -mod communication; -mod welcome; -mod window; - -use sycamore::view::View; -use sycamore_router::Route; -use sycamore::prelude::*; - -#[derive(Debug, Clone, Route)] -pub enum Page { - #[to("/app")] - App, - #[to("/clipboard")] - Clipboard, - #[to("/communication")] - Communication, - #[to("/window")] - Window, - #[not_found] - NotFound -} - -pub fn switch(cx: Scope, route: &ReadSignal) -> View { - match route.get().as_ref() { - Page::App => app::App(cx), - Page::Clipboard => clipboard::Clipboard(cx), - Page::Communication => communication::Communication(cx), - Page::Window => window::Window(cx), - Page::NotFound => welcome::Welcome(cx) - } -} \ No newline at end of file diff --git a/examples/api/src/views/welcome.rs b/examples/api/src/views/welcome.rs deleted file mode 100644 index 1fffd14..0000000 --- a/examples/api/src/views/welcome.rs +++ /dev/null @@ -1,10 +0,0 @@ -use sycamore::prelude::*; - -#[component] -pub fn Welcome(cx: Scope) -> View { - view! { cx, - h1 { - "Welcome" - } - } -} \ No newline at end of file diff --git a/examples/api/src/views/window.rs b/examples/api/src/views/window.rs deleted file mode 100644 index a8e67e8..0000000 --- a/examples/api/src/views/window.rs +++ /dev/null @@ -1,63 +0,0 @@ -use sycamore::prelude::*; -use tauri_sys::window; - -#[component] -pub fn Window(cx: Scope) -> View { - let get_current = |_| { - let win = window::current_window(); - - log::debug!("{:?}", win); - }; - - let get_all = |_| { - let windows = window::all_windows(); - - log::debug!("{:?}", windows); - }; - - let get_current_monitor = |_| { - sycamore::futures::spawn_local(async move { - let monitor = window::current_monitor().await; - - log::debug!("{:?}", monitor); - }); - }; - - let get_primary_monitor = |_| { - sycamore::futures::spawn_local(async move { - let monitor = window::primary_monitor().await; - - log::debug!("{:?}", monitor); - }); - }; - - let get_all_monitors = |_| { - sycamore::futures::spawn_local(async move { - let monitors = window::available_monitors().await.collect::>(); - - log::debug!("{:?}", monitors); - }); - }; - - view! { cx, - div { - button(class="btn",id="get_name",on:click=get_current) { - "Get Current Window" - } - button(class="btn",id="get_version",on:click=get_all) { - "Get All Windows" - } - } - div { - button(class="btn",id="get_tauri_version",on:click=get_current_monitor) { - "Get Current Monitor" - } - button(class="btn",id="get_tauri_version",on:click=get_primary_monitor) { - "Get Primary Monitor" - } - button(class="btn",id="get_tauri_version",on:click=get_all_monitors) { - "Get All Monitors" - } - } - } -} diff --git a/examples/api/style.css b/examples/api/style.css deleted file mode 100644 index a3fbd74..0000000 --- a/examples/api/style.css +++ /dev/null @@ -1,120 +0,0 @@ -.logo.yew:hover { - filter: drop-shadow(0 0 2em #20a88a); -} -.logo.sycamore { - color: #0000; - font-size: 3rem; - line-height: 1; - font-weight: 800; - -webkit-background-clip: text; - background-clip: text; - background-image: linear-gradient(to right,#fdba74, #f87171); - font-family: Inter,system-ui,sans-serif; -} -.logo.sycamore:hover { - filter: drop-shadow(0 0 2em #f87171); -} - -:root { - font-family: Inter, Avenir, Helvetica, Arial, sans-serif; - font-size: 16px; - line-height: 24px; - font-weight: 400; - - color: #0f0f0f; - background-color: #f6f6f6; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -.container { - margin: 0; - padding-top: 10vh; - display: flex; - flex-direction: column; - justify-content: center; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; - transition: 0.75s; -} - -.logo.tauri:hover { - filter: drop-shadow(0 0 2em #24c8db); -} - -.row { - display: flex; - justify-content: center; - align-items: center; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} - -a:hover { - color: #535bf2; -} - -h1 { - text-align: center; -} - -input, -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - color: #0f0f0f; - background-color: #ffffff; - transition: border-color 0.25s; - box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2); -} - -button { - cursor: pointer; -} - -button:hover { - border-color: #396cd8; -} - -input, -button { - outline: none; -} - -#greet-input { - margin-right: 5px; -} - -@media (prefers-color-scheme: dark) { - :root { - color: #f6f6f6; - background-color: #2f2f2f; - } - - a:hover { - color: #24c8db; - } - - input, - button { - color: #ffffff; - background-color: #0f0f0f98; - } -}