-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: optimize styles & extract greet from rust
- Loading branch information
Showing
16 changed files
with
1,296 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<script setup lang="ts"> | ||
import { ref } from 'vue' | ||
import { invoke } from '@tauri-apps/api/core' | ||
const greetMsg = ref('') | ||
const name = ref('') | ||
async function greet() { | ||
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/ | ||
greetMsg.value = await invoke('greet', { name: name.value }) | ||
} | ||
</script> | ||
|
||
<template> | ||
<form class="mt-4 gap-2 items-center justify-center p-2" flex="~" @submit.prevent="greet"> | ||
<input id="greet-input" v-model="name" placeholder="Enter a name..."> | ||
<button type="submit" class="hover:bg-light"> | ||
Greet | ||
</button> | ||
</form> | ||
<p class="p-2"> | ||
{{ greetMsg }} | ||
</p> | ||
</template> | ||
|
||
<style scoped> | ||
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); | ||
} | ||
#greet-input { | ||
margin-right: 5px; | ||
} | ||
.dark { | ||
:root { | ||
color: #f6f6f6; | ||
background-color: #2f2f2f; | ||
} | ||
a:hover { | ||
color: #24c8db; | ||
} | ||
input, | ||
button { | ||
color: #ffffff; | ||
background-color: #0f0f0f98; | ||
} | ||
button:active { | ||
background-color: #0f0f0f69; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/// <reference types="vite/client" /> | ||
|
||
declare interface Window { | ||
// extend the window | ||
__TAURI_INTERNALS__: any | ||
} | ||
|
||
declare module '*.md' { | ||
import type { DefineComponent } from 'vue' | ||
|
||
const component: DefineComponent<object, object, any> | ||
export default component | ||
} | ||
|
||
declare module '*.vue' { | ||
import type { DefineComponent } from 'vue' | ||
|
||
const component: DefineComponent<object, object, any> | ||
export default component | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.