Compare commits

..

3 Commits

Author SHA1 Message Date
a9869e23ef Styles & html for a single post 2023-12-03 07:54:10 -05:00
7d305f911d htmx form 2023-11-11 17:41:09 -05:00
db6648e7f9 changes 2023-11-10 20:49:35 -05:00
17 changed files with 334 additions and 708 deletions

View File

@ -25,6 +25,15 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>

View File

@ -1,18 +0,0 @@
package dev.araozu.jerguero;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@Controller
public class GreetingController {
@GetMapping("/greeting")
public String greeting(
@RequestParam(name = "name", required = false, defaultValue = "World") String name,
Model model
) {
model.addAttribute("name", name);
return "greeting";
}
}

View File

@ -0,0 +1,17 @@
package dev.araozu.jerguero.controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class IndexController {
@GetMapping("/")
public String index(Model model) {
model.addAttribute("time", System.currentTimeMillis());
return "views/index";
}
}

View File

@ -0,0 +1,42 @@
package dev.araozu.jerguero.controller.post;
import dev.araozu.jerguero.model.Post;
import dev.araozu.jerguero.model.PostRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
@Controller
public class PostController {
PostRepository postRepository;
public PostController(PostRepository postRepository) {
this.postRepository = postRepository;
}
@GetMapping("/crear")
public String createEntry() {
return "post/create";
}
@RequestMapping(
value = "/crear",
method = RequestMethod.POST,
consumes = "application/x-www-form-urlencoded",
params = {"definition-title", "definition-content"}
)
public String createEntryPost(
@RequestParam("definition-title") String title,
@RequestParam("definition-content") String content,
Model model
) {
postRepository.save(new Post(title, content));
model.addAttribute("title", title);
model.addAttribute("content", content);
return "post/create_result";
}
}

View File

@ -0,0 +1,44 @@
package dev.araozu.jerguero.model;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
@Entity
public class Post {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String title;
private String content;
protected Post() {
}
public Post(String title, String content) {
this.title = title;
this.content = content;
}
@Override
public String toString() {
return String.format(
"Post[id=%d, title='%s', content='%s']",
id, title, content
);
}
public Long getId() {
return id;
}
public String getTitle() {
return title;
}
public String getContent() {
return content;
}
}

View File

@ -0,0 +1,13 @@
package dev.araozu.jerguero.model;
import org.springframework.data.repository.CrudRepository;
import java.util.List;
public interface PostRepository extends CrudRepository<Post, Long> {
List<Post> findByTitle(String title);
Post findById(long id);
}

View File

@ -4,7 +4,11 @@
/* Base variables */
:root {
--chicha-green: #61f908;
--chicha-yellow: #ffff00;
--chicha-orange: #ffaa00;
--chicha-pink: #ff007a;
--gray-1: #9ca3af;
}
/* Dark theme by default */
@ -13,9 +17,21 @@
--c-on-bg: white;
}
/* Light theme */
@media (prefers-color-scheme: light) {
:root {
--c-bg: white;
--c-on-bg: black;
--c-outline: var(--gray-1);
}
}
html {
background-color: var(--c-bg);
color: var(--c-on-bg);
}
body {
font-family: Rubik, sans-serif;
}

View File

@ -5,14 +5,21 @@ module.exports = {
"../static/**/*.{html,js}",
],
theme: {
extend: {
fontFamily: {
"mono": ["Iosevka", "monospace"],
}
},
extend: {},
colors: {
"c-bg": "var(--c-bg)",
"c-on-bg": "var(--c-on-bg)",
"c-chicha-green": "var(--chicha-green)",
"c-chicha-pink": "var(--chicha-pink)",
"c-chicha-yellow": "var(--chicha-yellow)",
"c-chicha-orange": "var(--chicha-orange)",
"c-outline": "var(--c-outline)",
},
fontFamily: {
"chicha": ["Lobster", "serif"],
"rubik": ["Rubik", "sans-serif"],
"vina-sans": ["Vina Sans", "sans-serif"],
"mono": ["Iosevka", "monospace"],
}
},
plugins: [],

View File

@ -1,30 +0,0 @@
<!doctype html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Jerguero</title>
<!-- tailwind -->
<link href="/main.css" rel="stylesheet">
</head>
<body>
<h1 class="text-4xl font-bold">
Jerguero D:
</h1>
<button
class="bg-c-on-bg text-c-bg py-2 px-4 rounded-xl shadow"
hx-get="/sampuru"
hx-swap="innerHTML"
>
carita feliz :D
</button>
<!-- htmx -->
<script src="https://unpkg.com/htmx.org@1.9.8/dist/htmx.min.js"></script>
</body>
</html>

View File

@ -1,629 +0,0 @@
/*
! tailwindcss v3.3.5 | MIT License | https://tailwindcss.com
*/
/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/
*,
::before,
::after {
box-sizing: border-box;
/* 1 */
border-width: 0;
/* 2 */
border-style: solid;
/* 2 */
border-color: currentColor;
/* 2 */
}
::before,
::after {
--tw-content: '';
}
/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
*/
html {
line-height: 1.5;
/* 1 */
-webkit-text-size-adjust: 100%;
/* 2 */
-moz-tab-size: 4;
/* 3 */
-o-tab-size: 4;
tab-size: 4;
/* 3 */
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
/* 4 */
font-feature-settings: normal;
/* 5 */
font-variation-settings: normal;
/* 6 */
}
/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/
body {
margin: 0;
/* 1 */
line-height: inherit;
/* 2 */
}
/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/
hr {
height: 0;
/* 1 */
color: inherit;
/* 2 */
border-top-width: 1px;
/* 3 */
}
/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/
abbr:where([title]) {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
}
/*
Remove the default font size and weight for headings.
*/
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: inherit;
font-weight: inherit;
}
/*
Reset links to optimize for opt-in styling instead of opt-out.
*/
a {
color: inherit;
text-decoration: inherit;
}
/*
Add the correct font weight in Edge and Safari.
*/
b,
strong {
font-weight: bolder;
}
/*
1. Use the user's configured `mono` font family by default.
2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp,
pre {
font-family: Iosevka, monospace;
/* 1 */
font-size: 1em;
/* 2 */
}
/*
Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/
table {
text-indent: 0;
/* 1 */
border-color: inherit;
/* 2 */
border-collapse: collapse;
/* 3 */
}
/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
/* 1 */
font-feature-settings: inherit;
/* 1 */
font-variation-settings: inherit;
/* 1 */
font-size: 100%;
/* 1 */
font-weight: inherit;
/* 1 */
line-height: inherit;
/* 1 */
color: inherit;
/* 1 */
margin: 0;
/* 2 */
padding: 0;
/* 3 */
}
/*
Remove the inheritance of text transform in Edge and Firefox.
*/
button,
select {
text-transform: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/
button,
[type='button'],
[type='reset'],
[type='submit'] {
-webkit-appearance: button;
/* 1 */
background-color: transparent;
/* 2 */
background-image: none;
/* 2 */
}
/*
Use the modern Firefox focus style for all focusable elements.
*/
:-moz-focusring {
outline: auto;
}
/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/
:-moz-ui-invalid {
box-shadow: none;
}
/*
Add the correct vertical alignment in Chrome and Firefox.
*/
progress {
vertical-align: baseline;
}
/*
Correct the cursor style of increment and decrement buttons in Safari.
*/
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
height: auto;
}
/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/
[type='search'] {
-webkit-appearance: textfield;
/* 1 */
outline-offset: -2px;
/* 2 */
}
/*
Remove the inner padding in Chrome and Safari on macOS.
*/
::-webkit-search-decoration {
-webkit-appearance: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button;
/* 1 */
font: inherit;
/* 2 */
}
/*
Add the correct display in Chrome and Safari.
*/
summary {
display: list-item;
}
/*
Removes the default spacing and border for appropriate elements.
*/
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
margin: 0;
}
fieldset {
margin: 0;
padding: 0;
}
legend {
padding: 0;
}
ol,
ul,
menu {
list-style: none;
margin: 0;
padding: 0;
}
/*
Reset default styling for dialogs.
*/
dialog {
padding: 0;
}
/*
Prevent resizing textareas horizontally by default.
*/
textarea {
resize: vertical;
}
/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/
input::-moz-placeholder, textarea::-moz-placeholder {
opacity: 1;
/* 1 */
color: #9ca3af;
/* 2 */
}
input::placeholder,
textarea::placeholder {
opacity: 1;
/* 1 */
color: #9ca3af;
/* 2 */
}
/*
Set the default cursor for buttons.
*/
button,
[role="button"] {
cursor: pointer;
}
/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
cursor: default;
}
/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
This can trigger a poorly considered lint error in some tools but is included by design.
*/
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
display: block;
/* 1 */
vertical-align: middle;
/* 2 */
}
/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/
img,
video {
max-width: 100%;
height: auto;
}
/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden] {
display: none;
}
*, ::before, ::after {
--tw-border-spacing-x: 0;
--tw-border-spacing-y: 0;
--tw-translate-x: 0;
--tw-translate-y: 0;
--tw-rotate: 0;
--tw-skew-x: 0;
--tw-skew-y: 0;
--tw-scale-x: 1;
--tw-scale-y: 1;
--tw-pan-x: ;
--tw-pan-y: ;
--tw-pinch-zoom: ;
--tw-scroll-snap-strictness: proximity;
--tw-gradient-from-position: ;
--tw-gradient-via-position: ;
--tw-gradient-to-position: ;
--tw-ordinal: ;
--tw-slashed-zero: ;
--tw-numeric-figure: ;
--tw-numeric-spacing: ;
--tw-numeric-fraction: ;
--tw-ring-inset: ;
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-color: rgb(59 130 246 / 0.5);
--tw-ring-offset-shadow: 0 0 #0000;
--tw-ring-shadow: 0 0 #0000;
--tw-shadow: 0 0 #0000;
--tw-shadow-colored: 0 0 #0000;
--tw-blur: ;
--tw-brightness: ;
--tw-contrast: ;
--tw-grayscale: ;
--tw-hue-rotate: ;
--tw-invert: ;
--tw-saturate: ;
--tw-sepia: ;
--tw-drop-shadow: ;
--tw-backdrop-blur: ;
--tw-backdrop-brightness: ;
--tw-backdrop-contrast: ;
--tw-backdrop-grayscale: ;
--tw-backdrop-hue-rotate: ;
--tw-backdrop-invert: ;
--tw-backdrop-opacity: ;
--tw-backdrop-saturate: ;
--tw-backdrop-sepia: ;
}
::backdrop {
--tw-border-spacing-x: 0;
--tw-border-spacing-y: 0;
--tw-translate-x: 0;
--tw-translate-y: 0;
--tw-rotate: 0;
--tw-skew-x: 0;
--tw-skew-y: 0;
--tw-scale-x: 1;
--tw-scale-y: 1;
--tw-pan-x: ;
--tw-pan-y: ;
--tw-pinch-zoom: ;
--tw-scroll-snap-strictness: proximity;
--tw-gradient-from-position: ;
--tw-gradient-via-position: ;
--tw-gradient-to-position: ;
--tw-ordinal: ;
--tw-slashed-zero: ;
--tw-numeric-figure: ;
--tw-numeric-spacing: ;
--tw-numeric-fraction: ;
--tw-ring-inset: ;
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-color: rgb(59 130 246 / 0.5);
--tw-ring-offset-shadow: 0 0 #0000;
--tw-ring-shadow: 0 0 #0000;
--tw-shadow: 0 0 #0000;
--tw-shadow-colored: 0 0 #0000;
--tw-blur: ;
--tw-brightness: ;
--tw-contrast: ;
--tw-grayscale: ;
--tw-hue-rotate: ;
--tw-invert: ;
--tw-saturate: ;
--tw-sepia: ;
--tw-drop-shadow: ;
--tw-backdrop-blur: ;
--tw-backdrop-brightness: ;
--tw-backdrop-contrast: ;
--tw-backdrop-grayscale: ;
--tw-backdrop-hue-rotate: ;
--tw-backdrop-invert: ;
--tw-backdrop-opacity: ;
--tw-backdrop-saturate: ;
--tw-backdrop-sepia: ;
}
.m-4 {
margin: 1rem;
}
.my-2 {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
.rounded-md {
border-radius: 0.375rem;
}
.rounded-xl {
border-radius: 0.75rem;
}
.bg-c-on-bg {
background-color: var(--c-on-bg);
}
.p-2 {
padding: 0.5rem;
}
.p-4 {
padding: 1rem;
}
.px-4 {
padding-left: 1rem;
padding-right: 1rem;
}
.py-2 {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
.font-mono {
font-family: Iosevka, monospace;
}
.text-4xl {
font-size: 2.25rem;
line-height: 2.5rem;
}
.font-bold {
font-weight: 700;
}
.uppercase {
text-transform: uppercase;
}
.text-\[white\] {
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity));
}
.text-c-bg {
color: var(--c-bg);
}
.shadow {
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.shadow-inner {
--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
/* Base variables */
:root {
}
/* Dark theme by default */
:root {
--c-bg: #202020;
--c-on-bg: white;
}
html {
background-color: var(--c-bg);
color: var(--c-on-bg);
}

View File

@ -0,0 +1,43 @@
<div class="m-2 p-4 border-2 border-c-chicha-green rounded-md">
<h2 class="text-4xl font-vina-sans text-c-chicha-pink pb-1">
Palta
</h2>
<div class="pb-4 text-xl">
<span class="text-sm opacity-50">
Usado en:
</span>
<br>
<span title="Perú" class="cursor-pointer mr-1">
🇵🇪
</span>
<span title="Chile" class="cursor-pointer mr-1">
🇨🇱
</span>
</div>
<p>
- Problema, dificultad, obstáculo.
<br>
<span class="pl-4 opacity-75">Esa ya no es mi palta causita</span>
</p>
<p>
- Otro nombre para "Aguacate"
<br>
<span class="pl-4 opacity-75">Corre a la tienda y compra 1 kilo de palta</span>
</p>
<div class="pt-4">
<span class="text-xs opacity-50">
Creado por:
</span>
<br>
<a href="/usuario/1" class="relative
before:block before:absolute before:-inset-1 before:-skew-y-1 before:bg-c-chicha-orange">
<span class="relative text-[black] hover:underline font-vina-sans text-xl">
pablito de los backyardigans
</span>
</a>
</div>
</div>

View File

@ -0,0 +1,14 @@
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Jerguero</title>
<!-- tailwind -->
<link href="/main.css" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lobster&family=Rubik:wght@400;600&display=swap" rel="stylesheet">
</head>

View File

@ -0,0 +1,23 @@
<nav class="p-1 border-b-4 border-c-chicha-green" th:fragment="nav">
<div class="grid grid-cols-[9.5rem_auto] gap-2">
<div class="text-4xl font-bold font-vina-sans inline-block px-2 pt-2 pb-4
bg-[black] rounded-xl">
<span class="text-c-chicha-green inline-block relative -translate-y-1">
J</span><span
class="text-c-chicha-orange">e</span><span
class="text-c-chicha-pink inline-block relative translate-y-1">r</span><span
class="text-c-chicha-yellow">g</span><span
class="text-c-chicha-green inline-block relative translate-y-1">u</span><span
class="text-c-chicha-orange">e</span><span
class="text-c-chicha-pink inline-block relative translate-y-1">r</span><span
class="text-c-chicha-yellow">o</span>
</div>
<div class="flex items-center">
<input
class="border border-c-outline rounded-xl px-2 py-2 w-full"
type="text"
placeholder="Buscar"
>
</div>
</div>
</nav>

View File

@ -1,25 +0,0 @@
<!doctype html>
<html lang="es" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Jerguero</title>
<!-- tailwind -->
<link href="/main.css" rel="stylesheet">
</head>
<body>
<div class="bg-teal-900 text-white rounded-xl p-4 m-4 shadow">
<p th:text="|Oh hi ${name}, thanks for checking in, im|" />
<p class="bg-white text-teal-900 p-2 my-2 rounded-xl shadow-inner">
still a piece of garbage
</p>
</div>
<!-- htmx -->
<script src="https://unpkg.com/htmx.org@1.9.8/dist/htmx.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,53 @@
<!doctype html>
<html lang="es" xmlns:th="http://www.thymeleaf.org">
<head th:replace="fragments/head :: head"></head>
<body>
<nav th:replace="fragments/navbar :: nav"></nav>
<h1 class="font-rubik font-semibold text-c-chicha-pink text-4xl uppercase">
Nueva definición
</h1>
<div id="result"></div>
<form hx-post="/crear" hx-target="#result" hx-swap="outerHTML" hx-trigger="submit">
<label for="definition-title">Palabra o expresión:</label>
<br>
<input
type="text"
id="definition-title"
name="definition-title"
class="border border-c-on-bg p-2 rounded-md
inline-block w-full"
placeholder="Palabra o expresión"
>
<br>
<br>
<label for="definition-content">Definición: </label>
<br>
<textarea
type="text"
id="definition-content"
name="definition-content"
class="border border-c-on-bg p-2 rounded-md
inline-block w-full"
placeholder="Escribe aquí la definición"
>
</textarea>
<input
type="submit"
class="px-2 py-1 bg-c-chicha-green text-[black] font-chicha
text-xl rounded-md mt-4"
value="Crear definición"
>
</form>
<!-- htmx -->
<script src="https://unpkg.com/htmx.org@1.9.8/dist/htmx.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,5 @@
<div class="font-4xl">
Create result: :D
<span th:text="${title}">Titulo del post</span>
<span th:text="${content}">Contenido del post</span>
</div>

View File

@ -0,0 +1,42 @@
<!doctype html>
<html lang="es" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Jerguero</title>
<!-- tailwind -->
<link th:href="|/main.css?t=${time}|" href="/main.css" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lobster&family=Vina+Sans&display=swap" rel="stylesheet">
</head>
<body>
<nav th:replace="fragments/navbar :: nav"></nav>
<button
class="font-chicha bg-c-chicha-yellow text-c-bg px-2 py-2 rounded text-xl"
>
<a href="/crear">
Crear post
</a>
</button>
<button
class="bg-c-on-bg text-c-bg py-2 px-4 rounded-xl shadow"
hx-get="/sampuru"
hx-swap="innerHTML"
>
carita feliz :D
</button>
<div th:replace="fragments/definition"></div>
<!-- htmx -->
<script src="https://unpkg.com/htmx.org@1.9.8/dist/htmx.min.js"></script>
</body>
</html>