Skip to content

Commit

Permalink
update versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ia3andy committed Jul 6, 2024
1 parent 8c78848 commit 438e2dd
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 114 deletions.
14 changes: 10 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<maven.compiler.release>17</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus-renarde.version>3.0.7</quarkus-renarde.version>
<quarkus-renarde.version>3.0.17</quarkus-renarde.version>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>3.9.3</quarkus.platform.version>
<quarkus.platform.version>3.12.1</quarkus.platform.version>
<skipITs>true</skipITs>
<surefire-plugin.version>3.0.0-M7</surefire-plugin.version>
<quarkus-web-bundler.version>1.5.0.CR1</quarkus-web-bundler.version>
<quarkus-web-bundler.version>1.6.0</quarkus-web-bundler.version>
</properties>
<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -60,7 +60,13 @@
<dependency>
<groupId>org.mvnpm</groupId>
<artifactId>htmx.org</artifactId>
<version>1.9.2</version>
<version>1.9.12</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mvnpm.at.popperjs</groupId>
<artifactId>core</artifactId>
<version>2.11.8</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
5 changes: 4 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
quarkus.web-bundler.bundle.components=true
quarkus.web-bundler.bundle.components.key=main
quarkus.web-bundler.bundle.components.qute-tags=true
#quarkus.web-bundler.dependencies.auto-import=all


quarkus.web-bundler.dependencies.auto-import=all

145 changes: 73 additions & 72 deletions src/main/resources/templates/Notes/notes.html
Original file line number Diff line number Diff line change
@@ -1,79 +1,80 @@
{#include main.html}
{#title}My Notes{/title}
<div class="left-bar d-flex justify-content-between">
<div class="p-2">
<div class="mb-3 d-flex">
<a
class="btn btn-light"
href="{uri:Notes.newNote()}"
hx-get="{uri:Notes.newNote()}"
hx-push-url="true"
hx-target="#note-editor"
><i class="bi bi-plus"></i> New Note</a>
{#NoteSearch value=search /}
</div>
<div class="p-2">
<div class="mb-3 d-flex">
<a
class="btn btn-light"
href="{uri:Notes.newNote()}"
hx-get="{uri:Notes.newNote()}"
hx-push-url="true"
hx-target="#note-editor"
><i class="bi bi-plus"></i> New Note</a>
{#NoteSearch value=search /}
</div>

{#fragment id="noteList"}
<ul
id="note-list"
hx-swap-oob="true"
class="note-list list-group"
{#fragment id="noteList"}
<ul
id="note-list"
hx-swap-oob="true"
class="note-list list-group"
>
{#for note in notes}
<li class="{#if note.id == currentNoteId}active {/if}list-group-item note-item d-flex justify-content-between align-items-center">
<a
href="{uri:Notes.editNote(note.id)}"
hx-get="{uri:Notes.editNote(note.id)}"
hx-push-url="true"
hx-target="#note-editor"
hx-swap="innerHTML"
>
{#for note in notes}
<li class="{#if note.id == currentNoteId}active {/if}list-group-item note-item d-flex justify-content-between align-items-center" >
<a
href="{uri:Notes.editNote(note.id)}"
hx-get="{uri:Notes.editNote(note.id)}"
hx-push-url="true"
hx-target="#note-editor"
hx-swap="innerHTML"
>
{note.name}
</a>
{#if note.id != currentNoteId}
<button class="btn note-delete"
hx-delete="{uri:Notes.deleteNote(note.id)}"
hx-confirm="Are you sure?"
hx-target="closest .note-item"
hx-swap="outerHTML swap:0.5s"
/>
<i class="bi bi-trash"></i>
</button>
{#else}
<i class="bi bi-caret-right"></i>
{/if}
</li>
{/for}
</ul>
{/fragment}
</div>
<div id="note-editor" class="flex-grow-1 p-2">
{#if currentNote}
{#fragment id="noteForm"}
{#let path=currentNote.id.ifTruthy(uri:Notes.saveNote(currentNote.id)).or(uri:Notes.saveNewNote())}
<form class="note-form" hx-post="{path}" hx-encoding='multipart/form-data' hx-target="this" hx-push-url="true">
{#authenticityToken/}
<div class="editor-wrapper">
<div>
<input name="name" class="form-control {#ifError 'name'}is-invalid{/}" value="{inject:flash.get('name') ?: currentNote.name}" placeholder="Enter new note name"/>
{#ifError 'name'}
<div class="invalid-feedback">
Error: {#error 'name'/}
</div>
{/ifError}
</div>
<div class="mb-3">
{#NoteEditor id="note-content" name="content" value=inject:flash.get('content').or(currentNote.content) /}
{#ifError 'content'}
<div class="invalid-feedback">
Error: {#error 'content'/}
</div>
{/ifError}
</div>
</div>
<button class="btn btn-primary">Save</button>
</form>
{/fragment}
{note.name}
</a>
{#if note.id != currentNoteId}
<button class="btn note-delete"
hx-delete="{uri:Notes.deleteNote(note.id)}"
hx-confirm="Are you sure?"
hx-target="closest .note-item"
hx-swap="outerHTML swap:0.5s"
/>
<i class="bi bi-trash"></i>
</button>
{#else}
<i class="bi bi-caret-right"></i>
{/if}
</div>
</li>
{/for}
</ul>
{/fragment}
</div>
<div id="note-editor" class="flex-grow-1 p-2">
{#if currentNote}
{#fragment id="noteForm"}
{#let path=currentNote.id.ifTruthy(uri:Notes.saveNote(currentNote.id)).or(uri:Notes.saveNewNote())}
<form class="note-form" hx-post="{path}" hx-encoding='multipart/form-data' hx-target="this" hx-push-url="true">
{#authenticityToken/}
<div class="editor-wrapper">
<div>
<input name="name" class="form-control {#ifError 'name'}is-invalid{/}"
value="{inject:flash.get('name') ?: currentNote.name}" placeholder="Enter new note name"/>
{#ifError 'name'}
<div class="invalid-feedback">
Error: {#error 'name'/}
</div>
{/ifError}
</div>
<div class="mb-3">
{#NoteEditor id="note-content" name="content" value=inject:flash.get('content').or(currentNote.content) /}
{#ifError 'content'}
<div class="invalid-feedback">
Error: {#error 'content'/}
</div>
{/ifError}
</div>
</div>
<button class="btn btn-primary">Save</button>
</form>
{/fragment}
{/if}
</div>
</div>
32 changes: 16 additions & 16 deletions src/main/resources/templates/main.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<title>{#insert title/}</title>
{#bundle tag="style"/}
<head>
<title>{#insert title/}</title>
{#bundle tag="style"/}

</head>
<body hx-ext="morphdom-swap" hx-headers='{"{inject:csrf.headerName}":"{inject:csrf.token}"}'>
<div class="navbar navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="{uri:Notes.notes}">
<img src="/static/assets/images/logo.svg" alt="" width="30" height="24" class="d-inline-block align-text-top">
My Notes
</a>
</div>
</div>
{#insert /}
{#bundle tag="script"/}
</body>
</head>
<body hx-ext="morphdom-swap" hx-headers='{"{inject:csrf.headerName}":"{inject:csrf.token}"}'>
<div class="navbar navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="{uri:Notes.notes}">
<img src="/static/assets/images/logo.svg" alt="" width="30" height="24" class="d-inline-block align-text-top">
My Notes
</a>
</div>
</div>
{#insert /}
{#bundle tag="script"/}
</body>
</html>
42 changes: 21 additions & 21 deletions src/main/resources/web/components/NoteSearch/NoteSearch.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<div class="d-flex flex-grow-1" data-controller="search" data-action="refreshNoteList@document->search#clear">
<a
class="btn search-open"
data-search-target="open"
data-action="click->search#open"
><i class="bi bi-search"></i> Search</a>
<a
class="btn search-close"
data-search-target="close"
data-action="click->search#close"
><i class="bi bi-caret-left"></i></a>
<input type="search"
data-search-target="input"
class="search form-control flex-grow-1"
name="search"
value="{value}"
placeholder="search"
hx-trigger="keyup changed delay:500ms, search"
hx-params="*"
hx-get="{uri:Notes.notes()}"
hx-target="#note-list"
/>
<a
class="btn search-open"
data-search-target="open"
data-action="click->search#open"
><i class="bi bi-search"></i> Search</a>
<a
class="btn search-close"
data-search-target="close"
data-action="click->search#close"
><i class="bi bi-caret-left"></i></a>
<input type="search"
data-search-target="input"
class="search form-control flex-grow-1"
name="search"
value="{value}"
placeholder="search"
hx-trigger="keyup changed delay:500ms, search"
hx-params="*"
hx-get="{uri:Notes.notes()}"
hx-target="#note-list"
/>
</div>

0 comments on commit 438e2dd

Please sign in to comment.