~repos /gromer

#golang#htmx#ssr

git clone https://pyrossh.dev/repos/gromer.git

gromer is a framework and cli to build multipage web apps in golang using htmx and alpinejs.


f1c6860f Peter John

3 years ago
move example
Files changed (32) hide show
  1. .snapshots/TestHtml.html +0 -106
  2. {example → _example}/.gitignore +0 -0
  3. {example → _example}/Dockerfile +0 -0
  4. {example → _example}/Dockerfile.dbmate +0 -0
  5. {example → _example}/assets/alpine.js +0 -0
  6. {example → _example}/assets/assets.go +0 -0
  7. {example → _example}/assets/icon.png +0 -0
  8. {example → _example}/components/header.go +0 -0
  9. {example → _example}/components/page.go +0 -0
  10. {example → _example}/components/todo.go +0 -0
  11. {example → _example}/config/config.go +0 -0
  12. {example → _example}/db/db.go +0 -0
  13. {example → _example}/db/init.go +0 -0
  14. {example → _example}/db/migrations/20211128110219_create_todos_table.sql +0 -0
  15. {example → _example}/db/models.go +0 -0
  16. {example → _example}/db/queries/todo.sql +0 -0
  17. {example → _example}/db/schema.sql +0 -0
  18. {example → _example}/db/sqlc.yaml +0 -0
  19. {example → _example}/db/todo.sql.go +0 -0
  20. {example → _example}/main.go +0 -0
  21. {example → _example}/makefile +0 -0
  22. {example → _example}/pages/about/get.go +0 -0
  23. {example → _example}/pages/api/recover/get.go +0 -0
  24. {example → _example}/pages/api/todos/_todoId_/delete.go +0 -0
  25. {example → _example}/pages/api/todos/_todoId_/get.go +0 -0
  26. {example → _example}/pages/api/todos/_todoId_/put.go +0 -0
  27. {example → _example}/pages/api/todos/get.go +0 -0
  28. {example → _example}/pages/api/todos/post.go +0 -0
  29. {example → _example}/pages/get.go +0 -0
  30. {example → _example}/readme.md +0 -0
  31. collection.go → collection/collection.go +1 -1
  32. readme.md +1 -1
.snapshots/TestHtml.html DELETED
@@ -1,106 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
6
- <meta content="utf-8" http-equiv="encoding">
7
- <title> 123 </title>
8
-
9
- <meta name="description" content="123">
10
- <meta name="author" content="123">
11
- <meta name="keywords" content="123">
12
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0, viewport-fit=cover">
13
- <link rel="icon" href="/assets/icon.png">
14
- <link href="/assets/icon.png" rel="apple-touch-icon">
15
- <link rel="stylesheet" href="/assets/styles.css">
16
- <script src="/assets/alpine.js" defer></script>
17
-
18
- <meta content="title" name="title">
19
- <style>
20
- *, ::before, ::after { box-sizing: border-box; }
21
- html { -moz-tab-size: 4; -o-tab-size: 4; tab-size: 4; line-height: 1.15; -webkit-text-size-adjust: 100%; }
22
- body { margin: 0; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; }
23
- hr { height: 0; color: inherit; }
24
- abbr[title] { -webkit-text-decoration: underline dotted; text-decoration: underline dotted; }
25
- b, strong { font-weight: bolder; }
26
- code, kbd, samp, pre { font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 1em; }
27
- small { font-size: 80%; }
28
- sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
29
- sub { bottom: -0.25em; }
30
- sup { top: -0.5em; }
31
- table { text-indent: 0; border-color: inherit; }
32
- button, input, optgroup, select, textarea { font-family: inherit; font-size: 100%; line-height: 1.15; margin: 0; }
33
- button, select { text-transform: none; }
34
- button, [type='button'], [type='reset'], [type='submit'] { -webkit-appearance: button; }
35
- ::-moz-focus-inner { border-style: none; padding: 0; }
36
- :-moz-focusring { outline: 1px dotted ButtonText; outline: auto; }
37
- :-moz-ui-invalid { box-shadow: none; }
38
- legend { padding: 0; }
39
- progress { vertical-align: baseline; }
40
- ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { height: auto; }
41
- [type='search'] { -webkit-appearance: textfield; outline-offset: -2px; }
42
- ::-webkit-search-decoration { -webkit-appearance: none; }
43
- ::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; }
44
- summary { display: list-item; }
45
- blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre { margin: 0; }
46
- button { background-color: transparent; background-image: none; }
47
- fieldset { margin: 0; padding: 0; }
48
- ol, ul { list-style: none; margin: 0; padding: 0; }
49
- html { 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"; line-height: 1.5; }
50
- body { font-family: inherit; line-height: inherit; }
51
- *, ::before, ::after { box-sizing: border-box; border-width: 0; border-style: solid; border-color: currentColor; }
52
- hr { border-top-width: 1px; }
53
- img { border-style: solid; }
54
- textarea { resize: vertical; }
55
- input::-moz-placeholder, textarea::-moz-placeholder { opacity: 1; color: #9ca3af; }
56
- input:-ms-input-placeholder, textarea:-ms-input-placeholder { opacity: 1; color: #9ca3af; }
57
- input::placeholder, textarea::placeholder { opacity: 1; color: #9ca3af; }
58
- button, [role="button"] { cursor: pointer; }
59
- table { border-collapse: collapse; }
60
- h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
61
- a { color: inherit; text-decoration: inherit; }
62
- button, input, optgroup, select, textarea { padding: 0; line-height: inherit; color: inherit; }
63
- pre, code, kbd, samp { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
64
- img, svg, video, canvas, audio, iframe, embed, object { display: block; vertical-align: middle; }
65
- img, video { max-width: 100%; height: auto; }
66
- [hidden] { display: none; }
67
- *, ::before, ::after { --tw-border-opacity: 1; border-color: rgba(229, 231, 235, var(--tw-border-opacity)); }
68
- .flex { display: flex; }
69
- .flex-col { flex-direction: column; }
70
- .justify-center { justify-content: center; }
71
- .items-center { align-items: center; }
72
- .text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
73
- .text-gray-700 { color: rgba(55, 65, 81, 1); }
74
- .flex-row { flex-direction: row; }
75
- .underline { text-decoration: underline; }
76
- .m-20 { margin: 5rem; }
77
- .text-5xl { font-size: 3rem; line-height: 1; }
78
- </style>
79
- </head>
80
- <body>
81
- <h1> Hello this is a h1 </h1>
82
-
83
- <h2> Hello this is a h2 </h2>
84
-
85
- <h3 x-data="{ message: 'I ❤️ Alpine' }" x-text="message"> </h3>
86
-
87
- <div class="flex flex-col justify-center items-center text-3xl text-gray-700">
88
- <div class="flex flex-row justify-center items-center"> <div class="flex flex-row justify-center items-center underline"> Counter </div>
89
- </div>
90
-
91
- <div class="flex flex-row justify-center items-center">
92
- <button @click="decrement"> - </button>
93
-
94
- <div class="flex flex-row justify-center items-center m-20 text-5xl" x-text="count"> 4 </div>
95
-
96
- <button @click="increment"> + </button>
97
- </div>
98
- </div>
99
-
100
- <script>
101
- document.addEventListener('alpine:init', () => {
102
- });
103
- </script>
104
- </body>
105
-
106
- </html>
{example → _example}/.gitignore RENAMED
File without changes
{example → _example}/Dockerfile RENAMED
File without changes
{example → _example}/Dockerfile.dbmate RENAMED
File without changes
{example → _example}/assets/alpine.js RENAMED
File without changes
{example → _example}/assets/assets.go RENAMED
File without changes
{example → _example}/assets/icon.png RENAMED
File without changes
{example → _example}/components/header.go RENAMED
File without changes
{example → _example}/components/page.go RENAMED
File without changes
{example → _example}/components/todo.go RENAMED
File without changes
{example → _example}/config/config.go RENAMED
File without changes
{example → _example}/db/db.go RENAMED
File without changes
{example → _example}/db/init.go RENAMED
File without changes
{example → _example}/db/migrations/20211128110219_create_todos_table.sql RENAMED
File without changes
{example → _example}/db/models.go RENAMED
File without changes
{example → _example}/db/queries/todo.sql RENAMED
File without changes
{example → _example}/db/schema.sql RENAMED
File without changes
{example → _example}/db/sqlc.yaml RENAMED
File without changes
{example → _example}/db/todo.sql.go RENAMED
File without changes
{example → _example}/main.go RENAMED
File without changes
{example → _example}/makefile RENAMED
File without changes
{example → _example}/pages/about/get.go RENAMED
File without changes
{example → _example}/pages/api/recover/get.go RENAMED
File without changes
{example → _example}/pages/api/todos/_todoId_/delete.go RENAMED
File without changes
{example → _example}/pages/api/todos/_todoId_/get.go RENAMED
File without changes
{example → _example}/pages/api/todos/_todoId_/put.go RENAMED
File without changes
{example → _example}/pages/api/todos/get.go RENAMED
File without changes
{example → _example}/pages/api/todos/post.go RENAMED
File without changes
{example → _example}/pages/get.go RENAMED
File without changes
{example → _example}/readme.md RENAMED
File without changes
collection.go → collection/collection.go RENAMED
@@ -1,4 +1,4 @@
1
- package gromer
1
+ package collection
2
2
 
3
3
  import (
4
4
  "context"
readme.md CHANGED
@@ -20,7 +20,7 @@ You need to follow this directory structure similar to nextjs for the api route
20
20
 
21
21
  Take a look at the example for now,
22
22
 
23
- [Example](https://github.com/pyros2097/gromer/tree/master/example)
23
+ [Example](https://github.com/pyros2097/gromer/tree/master/_example)
24
24
 
25
25
  # Templating
26
26