mkbrut 0.13.0 → 0.15.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: 6986dada6a9fb7a979c3567052615e69420ec2f518c433a70a85980382f4063f
4
- data.tar.gz: '097a548d278960a23650d26c54f3de85fd0668187fb596d67be2110747a143ec'
3
+ metadata.gz: 44490857b7335985f6af254391ecc787fccfcb53bc5a42023462d6bf164a86b7
4
+ data.tar.gz: c664733ee5228fbe20616d919036c2b4717fad9fb2fdfe78d14da9ffc7118694
5
5
  SHA512:
6
- metadata.gz: 8cae529f81a7ef035875d79335d0f5f9eda60c0646137adb7b5f55f09197e51993b76e8e56de927e7b5f8a80cf5d24469c93535fb18bec508c0b474b0eca6642
7
- data.tar.gz: f04686da33d79d15e8b358ac4af8a4059fa859649b24d7a692a47ab3600a969ebbb6c5365cbe6b7fac135bc2af4c22f79fb3a1ddfaf4e268e5158f9f0fb7bd6c
6
+ metadata.gz: f72502451676ded40f36837d6cf214d60ab8a0c4a5d28295cc859ef823ede5235521e04e3ef6497df61770ac69777116b01d6f42903e54160cf88b185ac307c2
7
+ data.tar.gz: 6c39188a7be33648d0a9907f665088483cdcbbf8f6c0294f4b4e446770e9d21a815877c1431b4adf3d00bb8e40ce1594de81541063e2421e8928a37768fead1c
@@ -1,3 +1,3 @@
1
1
  module MKBrut
2
- VERSION = "0.13.0"
2
+ VERSION = "0.15.0"
3
3
  end
@@ -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
- PageIdentifier(@page_name)
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: @page_name) do
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.13.0
4
+ version: 0.15.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