mkbrut 0.13.0 → 0.14.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e47f56a294f86846a1c0208761666445865f082b2f7c11bccca3bf28e03dbf93
|
4
|
+
data.tar.gz: c20106cea730e498c1fbf4ad2eeb46761434cf4178619e8adc0124d4035ba2ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1b1ad32d03aa581e339f67d8f75028bf01cfe81163e7d3fa400b61fb76bd5e03f46e33d35b0303f7a4347e4c6fdec022373b62fd48b5e07eae9f22a503f6c8a
|
7
|
+
data.tar.gz: 81d2b97d4576784a8c73057617c3d7422cb587db2c89371332e0f94acd2610bc9007f82c4d6d469ebd0499fabf79575aa380eda7120def3c475b5774b098147d
|
data/lib/mkbrut/version.rb
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
# A blank layout that just renders whatever the page content is.
|
2
|
+
# This is useful for a page that can respond to Ajax and not want
|
3
|
+
# the surrounding HTML metadata.
|
4
|
+
class BlankLayout < Brut::FrontEnd::Layout
|
5
|
+
include Brut::FrontEnd::Components
|
6
|
+
|
7
|
+
def view_template
|
8
|
+
yield
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
@@ -4,10 +4,6 @@
|
|
4
4
|
class DefaultLayout < Brut::FrontEnd::Layout
|
5
5
|
include Brut::FrontEnd::Components
|
6
6
|
|
7
|
-
def initialize(page_name:)
|
8
|
-
@page_name = page_name
|
9
|
-
end
|
10
|
-
|
11
7
|
# Brut::FrontEnd::Page's view_template ultimately calls this method
|
12
8
|
# to wrap itself in the layout defined below.
|
13
9
|
def view_template
|
@@ -35,7 +31,8 @@ class DefaultLayout < Brut::FrontEnd::Layout
|
|
35
31
|
|
36
32
|
# Brut::FrontEnd::Components::PageIdentifier, which produces
|
37
33
|
# a <meta> tag with the page's name. Useful for end to end tests.
|
38
|
-
|
34
|
+
# Does not generate anything in production.
|
35
|
+
PageIdentifier(page)
|
39
36
|
|
40
37
|
# Brut::FrontEnd::Components::I18nTranslations, which includes
|
41
38
|
# translations starting with cv.cs for use with client-side
|
@@ -60,7 +57,7 @@ class DefaultLayout < Brut::FrontEnd::Layout
|
|
60
57
|
end
|
61
58
|
# Adds the page's name as a class name. You can use this for
|
62
59
|
# CSS if needed.
|
63
|
-
body(class:
|
60
|
+
body(class: page.page_name) do
|
64
61
|
# Render the <brut-tracing> element, which will send
|
65
62
|
# OpenTelemetry traces back to the server to be joined up with
|
66
63
|
# the server's traces.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mkbrut
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Copeland
|
@@ -103,6 +103,7 @@ files:
|
|
103
103
|
- templates/Base/app/src/front_end/images/icon.png
|
104
104
|
- templates/Base/app/src/front_end/images/mkicons.sh
|
105
105
|
- templates/Base/app/src/front_end/js/index.js
|
106
|
+
- templates/Base/app/src/front_end/layouts/blank_layout.rb
|
106
107
|
- templates/Base/app/src/front_end/layouts/default_layout.rb.erb
|
107
108
|
- templates/Base/app/src/front_end/pages/app_page.rb
|
108
109
|
- templates/Base/app/src/front_end/pages/home_page.rb
|