hanamismith 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +1 -1
- data/hanamismith.gemspec +1 -1
- data/lib/hanamismith/builders/bundler.rb +1 -1
- data/lib/hanamismith/builders/caliber.rb +1 -1
- data/lib/hanamismith/builders/javascript.rb +1 -1
- data/lib/hanamismith/builders/layout.rb +45 -0
- data/lib/hanamismith/builders/slices/health.rb +0 -16
- data/lib/hanamismith/builders/slices/home.rb +0 -28
- data/lib/hanamismith/builders/stylesheet.rb +1 -1
- data/lib/hanamismith/cli/commands/build.rb +1 -0
- data/lib/hanamismith/extensions/asset.rb +4 -19
- data/lib/hanamismith/templates/%project_name%/{slices/home → app}/assets/css/app.css.erb +27 -17
- data/lib/hanamismith/templates/%project_name%/{slices/home → app}/templates/layouts/app.html.erb.erb +4 -3
- data/lib/hanamismith/templates/%project_name%/slices/health/view.rb.erb +1 -0
- data/lib/hanamismith/templates/%project_name%/slices/home/templates/show.html.erb.erb +2 -13
- data/lib/hanamismith/templates/%project_name%/slices/home/view.rb.erb +1 -0
- data.tar.gz.sig +0 -0
- metadata +6 -6
- metadata.gz.sig +0 -0
- data/lib/hanamismith/templates/%project_name%/slices/health/templates/layouts/app.html.erb.erb +0 -29
- /data/lib/hanamismith/templates/%project_name%/{slices/home → app}/assets/js/app.js.erb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 445647f6ddc43e3d30c619a1bac483ba08fba6ee0a6f4e8dd5d05b7b23671c31
|
4
|
+
data.tar.gz: 261de84aec6a7455421b76cdcdfe7d7c2a2bb1179264f24930a88c0f7700a5e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 885901810474886fd5f676bffaf0fb71afb68a6d57d41e2c53501abdde05bc6b67486c28490e4853cfc19265cd9fe2a0605d2705f891c42dafcfd63e20d511ce
|
7
|
+
data.tar.gz: c650e51bb7ff77e0de34a4695150942ffea161083e356b808acc424b5ddb31a4b854644d992db371582520c40bcca0fefcbdaaf4b0ea70f54029934036c70ce6
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -37,7 +37,7 @@ toc::[]
|
|
37
37
|
|
38
38
|
== Screenshots/Screencasts
|
39
39
|
|
40
|
-
image:https://alchemists.io/images/projects/hanamismith/screenshots/home.png[Home,width=
|
40
|
+
image:https://alchemists.io/images/projects/hanamismith/screenshots/home.png[Home,width=1060,height=725,role=focal_point]
|
41
41
|
|
42
42
|
The above is a screenshot of a _Demo_ project that was generated locally. For a fully working demonstration application -- as built by this gem -- check out the link:https://github.com/bkuhlmann/hemo[Hemo] project as shown in this screencast:
|
43
43
|
|
data/hanamismith.gemspec
CHANGED
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "refinements/struct"
|
4
|
+
|
5
|
+
module Hanamismith
|
6
|
+
module Builders
|
7
|
+
# Builds app layout.
|
8
|
+
class Layout < Rubysmith::Builders::Abstract
|
9
|
+
using Refinements::Struct
|
10
|
+
|
11
|
+
def call
|
12
|
+
path = "%project_name%/app/templates/layouts/app.html.erb.erb"
|
13
|
+
builder.call(settings.merge(template_path: path))
|
14
|
+
.render
|
15
|
+
.replace("<!-- title -->", "<%= content_for :title %>")
|
16
|
+
.replace("<!-- icon -->", icon)
|
17
|
+
.replace("<!-- manifest -->", manifest)
|
18
|
+
.replace("<!-- stylesheet -->", stylesheet)
|
19
|
+
.replace("<!-- yield -->", "<%= yield %>")
|
20
|
+
|
21
|
+
true
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def icon
|
27
|
+
%(<%= tag.link title: "#{settings.project_label}: Icon",\n) +
|
28
|
+
%( rel: :icon,\n) +
|
29
|
+
%( href: app_assets["icon.svg"],\n) +
|
30
|
+
%( type: "image/svg+xml" %>)
|
31
|
+
end
|
32
|
+
|
33
|
+
def manifest
|
34
|
+
%(<%= tag.link title: "#{settings.project_label}: Manifest",\n) +
|
35
|
+
%( rel: :manifest,\n) +
|
36
|
+
%( href: app_assets["manifest.webmanifest"] %>)
|
37
|
+
end
|
38
|
+
|
39
|
+
def stylesheet
|
40
|
+
%(<%= tag.link title: "#{settings.project_label}: Stylesheet", rel: :stylesheet, ) +
|
41
|
+
%(href: app_assets["app.css"] %>)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -31,22 +31,6 @@ module Hanamismith
|
|
31
31
|
builder.call(settings.merge(template_path: path)).render
|
32
32
|
end
|
33
33
|
|
34
|
-
def add_layout
|
35
|
-
path = "%project_name%/slices/health/templates/layouts/app.html.erb.erb"
|
36
|
-
builder.call(settings.merge(template_path: path))
|
37
|
-
.render
|
38
|
-
.replace("<!-- title -->", "<%= content_for :title %>")
|
39
|
-
.replace("<!-- favicon -->", favicon)
|
40
|
-
.replace("<!-- yield -->", "<%= yield %>")
|
41
|
-
end
|
42
|
-
|
43
|
-
def favicon
|
44
|
-
%(<%= favicon_tag app_assets["icon.svg"],\n) +
|
45
|
-
%( title: "#{settings.project_label}: Icon",\n) +
|
46
|
-
%( rel: :icon,\n) +
|
47
|
-
%( type: "image/svg+xml" %>)
|
48
|
-
end
|
49
|
-
|
50
34
|
def add_show_template
|
51
35
|
path = "%project_name%/slices/health/templates/show.html.erb.erb"
|
52
36
|
|
@@ -36,34 +36,6 @@ module Hanamismith
|
|
36
36
|
builder.call(settings.merge(template_path: path)).render
|
37
37
|
end
|
38
38
|
|
39
|
-
def add_layout_template
|
40
|
-
path = "%project_name%/slices/home/templates/layouts/app.html.erb.erb"
|
41
|
-
builder.call(settings.merge(template_path: path))
|
42
|
-
.render
|
43
|
-
.replace("<!-- title -->", "<%= content_for :title %>")
|
44
|
-
.replace("<!-- favicon -->", favicon)
|
45
|
-
.replace("<!-- manifest -->", manifest)
|
46
|
-
.replace("<!-- stylesheet -->", stylesheet)
|
47
|
-
.replace("<!-- yield -->", "<%= yield %>")
|
48
|
-
end
|
49
|
-
|
50
|
-
def favicon
|
51
|
-
%(<%= favicon_tag app_assets["icon.svg"],\n) +
|
52
|
-
%( title: "#{settings.project_label}: Icon",\n) +
|
53
|
-
%( rel: :icon,\n) +
|
54
|
-
%( type: "image/svg+xml" %>)
|
55
|
-
end
|
56
|
-
|
57
|
-
def manifest
|
58
|
-
%(<%= tag.link title: "#{settings.project_label}: Manifest",\n) +
|
59
|
-
%( rel: :manifest,\n) +
|
60
|
-
%( href: app_assets["manifest.webmanifest"] %>)
|
61
|
-
end
|
62
|
-
|
63
|
-
def stylesheet
|
64
|
-
%(<%= stylesheet_tag "app", title: "#{settings.project_label}: Stylesheet" %>)
|
65
|
-
end
|
66
|
-
|
67
39
|
def add_context
|
68
40
|
path = "%project_name%/slices/home/views/context.rb.erb"
|
69
41
|
builder.call(settings.merge(template_path: path)).render
|
@@ -1,36 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "refinements/pathname"
|
4
|
-
|
5
3
|
module Hanamismith
|
6
4
|
module Extensions
|
7
5
|
# Ensures assets are compiled.
|
8
6
|
class Asset
|
9
7
|
include Dependencies[:settings, :kernel, :logger]
|
10
8
|
|
11
|
-
using Refinements::Pathname
|
12
|
-
|
13
9
|
def call
|
14
|
-
logger.error { "Unable to compile assets. Try: `hanami assets compile`." } unless
|
10
|
+
logger.error { "Unable to compile assets. Try: `hanami assets compile`." } unless compile
|
15
11
|
true
|
16
12
|
end
|
17
13
|
|
18
14
|
private
|
19
15
|
|
20
|
-
def
|
21
|
-
|
22
|
-
|
23
|
-
success
|
24
|
-
end
|
25
|
-
|
26
|
-
def compile_app
|
27
|
-
kernel.system "node config/assets.js -- --path=app --dest=public/assets > /dev/null 2>&1"
|
28
|
-
end
|
29
|
-
|
30
|
-
def compile_home
|
31
|
-
kernel.system(
|
32
|
-
"node config/assets.js -- --path=slices/home --dest=public/assets/_home > /dev/null 2>&1"
|
33
|
-
)
|
16
|
+
def compile
|
17
|
+
kernel.system "node config/assets.js -- --path=app --dest=public/assets > /dev/null 2>&1",
|
18
|
+
chdir: settings.project_root
|
34
19
|
end
|
35
20
|
end
|
36
21
|
end
|
@@ -1,39 +1,49 @@
|
|
1
|
+
@media (prefers-reduced-motion: no-preference) {
|
2
|
+
@view-transition {
|
3
|
+
navigation: auto;
|
4
|
+
}
|
5
|
+
}
|
6
|
+
|
1
7
|
html {
|
2
8
|
height: 100%;
|
3
9
|
}
|
4
10
|
|
5
|
-
.
|
11
|
+
.site-page {
|
6
12
|
--color-pink: hsl(306, 81%, 77%);
|
7
13
|
--color-red: hsl(11, 86%, 46%);
|
8
14
|
--color-rose: hsl(338, 27%, 88%);
|
9
15
|
--color-white: hsl(0, 0%, 100%);
|
16
|
+
--color-black: hsl(0, 0%, 0%);
|
10
17
|
--font-family: Verdana;
|
11
18
|
|
12
|
-
background-color: var(--color-
|
19
|
+
background-color: var(--color-black);
|
13
20
|
background-image: linear-gradient(
|
14
21
|
0deg,
|
15
|
-
hsl(
|
16
|
-
hsl(
|
17
|
-
hsl(
|
18
|
-
hsl(
|
19
|
-
hsl(
|
20
|
-
hsl(
|
21
|
-
hsl(
|
22
|
-
hsl(
|
23
|
-
hsl(
|
24
|
-
hsl(
|
25
|
-
hsl(
|
26
|
-
hsl(
|
27
|
-
hsl(
|
28
|
-
hsl(300deg 100% 100%) 84%,
|
29
|
-
hsl(0deg 0% 100%) 100%
|
22
|
+
hsl(0deg 0% 0%) 0%,
|
23
|
+
hsl(262deg 82% 7%) 8%,
|
24
|
+
hsl(255deg 51% 10%) 17%,
|
25
|
+
hsl(250deg 39% 13%) 25%,
|
26
|
+
hsl(251deg 35% 15%) 33%,
|
27
|
+
hsl(252deg 31% 17%) 42%,
|
28
|
+
hsl(252deg 28% 19%) 50%,
|
29
|
+
hsl(253deg 25% 21%) 58%,
|
30
|
+
hsl(253deg 23% 24%) 67%,
|
31
|
+
hsl(253deg 22% 26%) 75%,
|
32
|
+
hsl(254deg 20% 28%) 83%,
|
33
|
+
hsl(254deg 19% 31%) 92%,
|
34
|
+
hsl(254deg 18% 33%) 100%
|
30
35
|
);
|
36
|
+
color: var(--color-white);
|
31
37
|
display: flex;
|
32
38
|
flex-direction: column;
|
33
39
|
font-family: var(--font-family);
|
34
40
|
justify-content: space-between;
|
35
41
|
min-height: 97vh;
|
36
42
|
|
43
|
+
.link {
|
44
|
+
color: var(--color-white);
|
45
|
+
}
|
46
|
+
|
37
47
|
.navigation {
|
38
48
|
align-items: center;
|
39
49
|
display: flex;
|
data/lib/hanamismith/templates/%project_name%/{slices/home → app}/templates/layouts/app.html.erb.erb
RENAMED
@@ -12,20 +12,21 @@
|
|
12
12
|
<meta name="mobile-web-app-capable" content="yes">
|
13
13
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
14
14
|
|
15
|
-
<link title="<%= settings.project_label %>:
|
15
|
+
<link title="<%= settings.project_label %>: Favicon"
|
16
16
|
rel="icon"
|
17
17
|
href="https://alchemists.io/images/projects/hanamismith/icons/favicon.ico"
|
18
18
|
sizes="32x32">
|
19
|
-
<!--
|
19
|
+
<!-- icon -->
|
20
20
|
<link title="<%= settings.project_label %>: Apple Icon"
|
21
21
|
rel="apple-touch-icon"
|
22
22
|
href="https://alchemists.io/images/projects/hanamismith/icons/apple.png"
|
23
23
|
type="image/png">
|
24
24
|
<!-- manifest -->
|
25
|
+
|
25
26
|
<!-- stylesheet -->
|
26
27
|
</head>
|
27
28
|
|
28
|
-
<body class="
|
29
|
+
<body class="site-page">
|
29
30
|
<!-- yield -->
|
30
31
|
</body>
|
31
32
|
</html>
|
@@ -20,26 +20,15 @@
|
|
20
20
|
|
21
21
|
<footer class="footer">
|
22
22
|
<ul class="group">
|
23
|
+
<li><a href="https://alchemists.io/projects/hanamismith" class="link">Hanamismith</a></li>
|
23
24
|
<li><a href="https://hanamirb.org" class="link">Hanami</a></li>
|
24
|
-
|
25
|
-
<li>
|
26
|
-
<a href="https://guides.hanamirb.org/v2.0/introduction/getting-started" class="link">
|
27
|
-
Guides
|
28
|
-
</a>
|
29
|
-
</li>
|
30
|
-
|
25
|
+
<li><a href="https://guides.hanamirb.org" class="link">Guides</a></li>
|
31
26
|
<li><a href="https://discourse.hanamirb.org" class="link">Forum</a></li>
|
32
27
|
<li><a href="https://github.com/hanami/hanami/issues" class="link">Issues</a></li>
|
33
28
|
<li><a href="https://hanamirb.org/status/" class="link">Status</a></li>
|
34
29
|
<li><a href="https://github.com/hanami/hanami" class="link">Source</a></li>
|
35
30
|
</ul>
|
36
31
|
|
37
|
-
<ul class="group">
|
38
|
-
<li><a href="https://alchemists.io/projects/hanamismith" class="link">Hanamismith</a></li>
|
39
|
-
<li><a href="https://github.com/bkuhlmann/hanamismith/issues" class="link">Issues</a></li>
|
40
|
-
<li><a href="https://github.com/bkuhlmann/hanamismith" class="link">Source</a></li>
|
41
|
-
</ul>
|
42
|
-
|
43
32
|
<ul class="group">
|
44
33
|
<li>Ruby <!-- ruby_version --></li>
|
45
34
|
<li>Hanami <!-- hanami_version --></li>
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanamismith
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
34
34
|
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
35
35
|
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2025-
|
37
|
+
date: 2025-03-09 00:00:00.000000000 Z
|
38
38
|
dependencies:
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: cogger
|
@@ -248,6 +248,7 @@ files:
|
|
248
248
|
- lib/hanamismith/builders/git_hub/ci.rb
|
249
249
|
- lib/hanamismith/builders/icon.rb
|
250
250
|
- lib/hanamismith/builders/javascript.rb
|
251
|
+
- lib/hanamismith/builders/layout.rb
|
251
252
|
- lib/hanamismith/builders/node.rb
|
252
253
|
- lib/hanamismith/builders/puma/configuration.rb
|
253
254
|
- lib/hanamismith/builders/puma/procfile.rb
|
@@ -276,11 +277,14 @@ files:
|
|
276
277
|
- lib/hanamismith/templates/%project_name%/Procfile.dev.erb
|
277
278
|
- lib/hanamismith/templates/%project_name%/Procfile.erb
|
278
279
|
- lib/hanamismith/templates/%project_name%/app/action.rb.erb
|
280
|
+
- lib/hanamismith/templates/%project_name%/app/assets/css/app.css.erb
|
279
281
|
- lib/hanamismith/templates/%project_name%/app/assets/images/icon.svg.erb
|
282
|
+
- lib/hanamismith/templates/%project_name%/app/assets/js/app.js.erb
|
280
283
|
- lib/hanamismith/templates/%project_name%/app/assets/pwa/manifest.webmanifest.erb
|
281
284
|
- lib/hanamismith/templates/%project_name%/app/db/relation.rb.erb
|
282
285
|
- lib/hanamismith/templates/%project_name%/app/db/repository.rb.erb
|
283
286
|
- lib/hanamismith/templates/%project_name%/app/db/struct.rb.erb
|
287
|
+
- lib/hanamismith/templates/%project_name%/app/templates/layouts/app.html.erb.erb
|
284
288
|
- lib/hanamismith/templates/%project_name%/app/view.rb.erb
|
285
289
|
- lib/hanamismith/templates/%project_name%/bin/hanami.erb
|
286
290
|
- lib/hanamismith/templates/%project_name%/config.ru.erb
|
@@ -304,17 +308,13 @@ files:
|
|
304
308
|
- lib/hanamismith/templates/%project_name%/public/500.html.erb
|
305
309
|
- lib/hanamismith/templates/%project_name%/slices/health/action.rb.erb
|
306
310
|
- lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
|
307
|
-
- lib/hanamismith/templates/%project_name%/slices/health/templates/layouts/app.html.erb.erb
|
308
311
|
- lib/hanamismith/templates/%project_name%/slices/health/templates/show.html.erb.erb
|
309
312
|
- lib/hanamismith/templates/%project_name%/slices/health/view.rb.erb
|
310
313
|
- lib/hanamismith/templates/%project_name%/slices/health/views/context.rb.erb
|
311
314
|
- lib/hanamismith/templates/%project_name%/slices/health/views/show.rb.erb
|
312
315
|
- lib/hanamismith/templates/%project_name%/slices/home/action.rb.erb
|
313
316
|
- lib/hanamismith/templates/%project_name%/slices/home/actions/show.rb.erb
|
314
|
-
- lib/hanamismith/templates/%project_name%/slices/home/assets/css/app.css.erb
|
315
|
-
- lib/hanamismith/templates/%project_name%/slices/home/assets/js/app.js.erb
|
316
317
|
- lib/hanamismith/templates/%project_name%/slices/home/repository.rb.erb
|
317
|
-
- lib/hanamismith/templates/%project_name%/slices/home/templates/layouts/app.html.erb.erb
|
318
318
|
- lib/hanamismith/templates/%project_name%/slices/home/templates/show.html.erb.erb
|
319
319
|
- lib/hanamismith/templates/%project_name%/slices/home/view.rb.erb
|
320
320
|
- lib/hanamismith/templates/%project_name%/slices/home/views/context.rb.erb
|
metadata.gz.sig
CHANGED
Binary file
|
data/lib/hanamismith/templates/%project_name%/slices/health/templates/layouts/app.html.erb.erb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html lang="en">
|
4
|
-
<head>
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
|
6
|
-
|
7
|
-
<title><!-- title --></title>
|
8
|
-
|
9
|
-
<meta charset="utf-8">
|
10
|
-
<meta name="description" content="A Hanamismith skeleton application.">
|
11
|
-
<meta name="author" content="Hanamismith">
|
12
|
-
<meta name="mobile-web-app-capable" content="yes">
|
13
|
-
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
14
|
-
|
15
|
-
<link title="<%= settings.project_label %>: Favorite Icon"
|
16
|
-
rel="icon"
|
17
|
-
href="https://alchemists.io/images/projects/hanamismith/icons/favicon.ico"
|
18
|
-
sizes="32x32">
|
19
|
-
<!-- favicon -->
|
20
|
-
<link title="<%= settings.project_label %>: Apple Icon"
|
21
|
-
rel="apple-touch-icon"
|
22
|
-
href="https://alchemists.io/images/projects/hanamismith/icons/apple.png"
|
23
|
-
type="image/png">
|
24
|
-
</head>
|
25
|
-
|
26
|
-
<body>
|
27
|
-
<!-- yield -->
|
28
|
-
</body>
|
29
|
-
</html>
|
File without changes
|