├── .gitignore ├── static ├── img │ ├── htmx-logo.png │ └── gopher-svgrepo-com.svg └── css │ └── input.css ├── go.mod ├── go.sum ├── package.json ├── tailwind.config.js ├── views ├── partials │ ├── button-up.html │ ├── modal.html │ ├── header.html │ ├── note-list.html │ └── footer.html ├── about.html ├── layouts │ └── base.layout.html └── index.html ├── .air.toml ├── db.go ├── LICENSE ├── main.go ├── README.md ├── note.model.go └── handlers.go /.gitignore: -------------------------------------------------------------------------------- 1 | tmp 2 | bin 3 | node_modules 4 | static/css/output.css 5 | notesDB.sqlite -------------------------------------------------------------------------------- /static/img/htmx-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emarifer/go-htmx-demo/HEAD/static/img/htmx-logo.png -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/emarifer/go-htmx-demo 2 | 3 | go 1.21.0 4 | 5 | require github.com/mattn/go-sqlite3 v1.14.17 6 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM= 2 | github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= 3 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "watch-css": "npx tailwindcss -i static/css/input.css -o static/css/output.css --watch", 4 | "build-css-prod": "npx tailwindcss -i static/css/input.css -o static/css/output.css --minify" 5 | }, 6 | "devDependencies": { 7 | "daisyui": "^3.9.3", 8 | "tailwindcss": "^3.3.3" 9 | } 10 | } -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ["./views/**/*.{html,js}"], 4 | theme: { 5 | extend: { 6 | fontFamily: { 7 | Kanit: ["Kanit, sans-serif"], 8 | }, 9 | }, 10 | }, 11 | plugins: [require("daisyui")], 12 | daisyui: { 13 | themes: ["dark"], 14 | }, 15 | } 16 | 17 | -------------------------------------------------------------------------------- /views/partials/button-up.html: -------------------------------------------------------------------------------- 1 | {{ define "button-up" }} 2 | 11 | {{end }} -------------------------------------------------------------------------------- /views/partials/modal.html: -------------------------------------------------------------------------------- 1 | {{ define "modal" }} 2 |
{{ .Description }}
11 |13 | {{ .CreatedAt }} 14 |
15 |