Fix layout

This commit is contained in:
Mark Nellemann 2023-03-03 07:44:49 +01:00
parent 9e9dcb2fe9
commit b6f9275218
4 changed files with 16 additions and 5 deletions

View file

@ -0,0 +1,10 @@
.htmx-indicator{
opacity:0;
transition: opacity 500ms ease-in;
}
.htmx-request .htmx-indicator{
opacity:1
}
.htmx-request.htmx-indicator{
opacity:1
}

View file

View file

@ -8,6 +8,7 @@
<title th:replace="${title}">Hello Micronaut</title> <title th:replace="${title}">Hello Micronaut</title>
<link rel="icon" type="image/x-icon" href="/assets/images/favicon.ico"> <link rel="icon" type="image/x-icon" href="/assets/images/favicon.ico">
<link href="/assets/vendor/bulma/css/bulma.min.css" rel="stylesheet"> <link href="/assets/vendor/bulma/css/bulma.min.css" rel="stylesheet">
<link href="/assets/application.css" rel="stylesheet">
</head> </head>
<body> <body>

View file

@ -13,24 +13,24 @@
<article class="message"> <article class="message">
<div class="message-header"> <div class="message-header">
<p>Hello Micronaut from <span th:text="${hostname}"></span></span></p> <p>Hello Micronaut from <span th:text="${hostname}"></span></span></p>
<button class="delete" aria-label="delete"></button>
</div> </div>
<div class="message-body" th:text="${info}"> <div class="message-body" th:text="${info}">
</div> </div>
</article> </article>
<div class="columns"> <div class="columns">
<div class="column"> <div class="column is-full">
<form hx-post="/ping"> <form hx-post="/ping">
<div class="field has-addons" hx-target="#pong"> <div class="field has-addons" hx-target="#pong">
<div class="control"> <div class="control">
<input name="message" class="input" type="text" placeholder="Enter message"> <input name="message" class="input" type="text" placeholder="Enter message" maxlength="128" size="64">
</div> </div>
<div class="control"> <div class="control">
<a class="button is-info" hx-post="/ping" hx-include="[msg='message']"> <a class="button is-info" hx-post="/ping" hx-include="[msg='message']" hx-indicator="#spinner">
Submit Submit
</a> </a>
<img id="spinner" class="htmx-indicator" src="/img/spinner.svg"/>
</div> </div>
</div> </div>
</form> </form>
@ -39,7 +39,7 @@
</div> </div>
<div class="columns mt-4"> <div class="columns mt-4">
<div class="collumn" id="pong" hx-get="/ping" hx-trigger="load, queue:last, every 3s"> <div class="column is-full" id="pong" hx-get="/ping" hx-trigger="load, queue:last, every 3s">
</div> </div>
</div> </div>