diff options
| author | mo khan <mo@mokhan.ca> | 2025-04-22 16:01:31 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-04-22 16:01:31 -0600 |
| commit | a4c1a145950739ac307eb7607ccedd7b10584d90 (patch) | |
| tree | 74c032d9004218fcd1021f0f301b8edf84150a49 /app/views | |
| parent | 28ec60ecbc0a39901246f5cb59a8ad05c20de6b1 (diff) | |
feat: require login to view sparkle form
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/dashboard/show.html.tmpl | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/app/views/dashboard/show.html.tmpl b/app/views/dashboard/show.html.tmpl index acb0b3f..899b798 100644 --- a/app/views/dashboard/show.html.tmpl +++ b/app/views/dashboard/show.html.tmpl @@ -6,12 +6,14 @@ <meta name="color-scheme" content="light dark"> <title>SparkleLab</title> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"> + <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script> + <script src="/application.js"></script> </head> <body> - <main class="container"> + <main id="app" class="container"> <nav> <ul> - <li><strong>SparkleLab</strong></li> + <li><strong>SparkleLab✨</strong></li> </ul> <ul> <li> @@ -21,10 +23,19 @@ </li> </ul> </nav> + + <form v-on:submit.prevent="submitSparkle"> + <label>/sparkle <input type="text" placeholder="@tanuki for helping me with my homework!" v-model="sparkle" /> </label> + <button type="submit" v-bind:disabled="isDisabled">✨ Sparkle</button> + </form> + <span class="error">${ errorMessage }</span> + + <h1>${ heading }</h1> + <div v-for="sparkle in recentSparkles"> + <p> <strong>${ sparkle.sparklee }</strong> ${ sparkle.reason } </p> + </div> {{range .Sparkles}} <div>{{ . }}</div> - {{else}} - <div><strong>No Sparkles</strong></div> {{end}} </main> </body> |
