From 3f9d113e8b24f2bf29e4f67b6d7ce9bb4376211c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=90=91=E5=A4=9C?= Date: Wed, 20 Nov 2024 00:20:00 +0800 Subject: [PATCH] feat(signup): implement signup page --- .changes/signup-panel.md | 5 ++ .cspell.json | 1 + src/App.vue | 6 +- src/assets/tailwind.css | 125 ++++++++++++++++++-------------------- src/views/login.vue | 87 ++++++++++++++------------- src/views/signup.vue | 126 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 237 insertions(+), 113 deletions(-) create mode 100644 .changes/signup-panel.md create mode 100644 src/views/signup.vue diff --git a/.changes/signup-panel.md b/.changes/signup-panel.md new file mode 100644 index 0000000..9b74c00 --- /dev/null +++ b/.changes/signup-panel.md @@ -0,0 +1,5 @@ +--- +"algohub": patch:feat +--- + +Add sign up panel in `signup.vue`. diff --git a/.cspell.json b/.cspell.json index f52ad6c..efff715 100644 --- a/.cspell.json +++ b/.cspell.json @@ -6,6 +6,7 @@ "pinia", "primeicons", "primevue", + "signup", "SWPU", "tailwindcss", "tauri", diff --git a/src/App.vue b/src/App.vue index aa2926a..82151fe 100644 --- a/src/App.vue +++ b/src/App.vue @@ -7,6 +7,8 @@ themeStore.init(); diff --git a/src/assets/tailwind.css b/src/assets/tailwind.css index a728324..274beac 100644 --- a/src/assets/tailwind.css +++ b/src/assets/tailwind.css @@ -554,14 +554,52 @@ video { display: none; } -.m-10 { - margin: 2.5rem; +.container { + width: 100%; +} + +@media (min-width: 640px) { + .container { + max-width: 640px; + } +} + +@media (min-width: 768px) { + .container { + max-width: 768px; + } +} + +@media (min-width: 1024px) { + .container { + max-width: 1024px; + } +} + +@media (min-width: 1280px) { + .container { + max-width: 1280px; + } +} + +@media (min-width: 1536px) { + .container { + max-width: 1536px; + } } .m-auto { margin: auto; } +.m-10 { + margin: 2.5rem; +} + +.mb-4 { + margin-bottom: 1rem; +} + .mt-6 { margin-top: 1.5rem; } @@ -570,14 +608,14 @@ video { display: flex; } -.grid { - display: grid; -} - .hidden { display: none; } +.\!hidden { + display: none !important; +} + .h-full { height: 100%; } @@ -586,12 +624,8 @@ video { height: 100vh; } -.max-h-full { - max-height: 100%; -} - -.max-h-screen { - max-height: 100vh; +.h-80 { + height: 20rem; } .w-full { @@ -602,8 +636,8 @@ video { flex: 1 1 0%; } -.flex-shrink { - flex-shrink: 1; +.basis-\[40rem\] { + flex-basis: 40rem; } .flex-row { @@ -614,10 +648,6 @@ video { flex-direction: column; } -.flex-col-reverse { - flex-direction: column-reverse; -} - .items-start { align-items: flex-start; } @@ -650,27 +680,17 @@ video { gap: 1rem; } -.overflow-hidden { - overflow: hidden; -} - .p-6 { padding: 1.5rem; } -.px-6 { - padding-left: 1.5rem; - padding-right: 1.5rem; -} - -.py-12 { - padding-top: 3rem; - padding-bottom: 3rem; +.text-center { + text-align: center; } -.text-4xl { - font-size: 2.25rem; - line-height: 2.5rem; +.text-3xl { + font-size: 1.875rem; + line-height: 2.25rem; } .text-sm { @@ -678,11 +698,6 @@ video { line-height: 1.25rem; } -.text-3xl { - font-size: 1.875rem; - line-height: 2.25rem; -} - .font-bold { font-weight: 700; } @@ -700,32 +715,12 @@ video { display: flex; } - .md\:h-full { - height: 100%; - } - - .md\:flex-1 { - flex: 1 1 0%; - } - - .md\:grid-cols-2 { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - - .md\:flex-row { - flex-direction: row; + .md\:\!flex { + display: flex !important; } - .md\:flex-col { - flex-direction: column; - } - - .md\:items-center { - align-items: center; - } - - .md\:justify-center { - justify-content: center; + .md\:\!hidden { + display: none !important; } .md\:text-4xl { @@ -733,9 +728,3 @@ video { line-height: 2.5rem; } } - -@media (min-width: 1024px) { - .lg\:w-full { - width: 100%; - } -} diff --git a/src/views/login.vue b/src/views/login.vue index c4d6fad..4935613 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -53,50 +53,51 @@ const onLogin = async ({ valid }: { valid: boolean }) => { diff --git a/src/views/signup.vue b/src/views/signup.vue new file mode 100644 index 0000000..227d194 --- /dev/null +++ b/src/views/signup.vue @@ -0,0 +1,126 @@ + + +