lato 0.3.13 → 0.3.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f662c360d33a7b7f18454aa5d5de9686af2bff73ad50c412a320f78f7723959
4
- data.tar.gz: 8c6dcc8af9a72d7fd615d039b66c999456c4f98861869c46b1860e81d4b9b6a3
3
+ metadata.gz: 302c2a627f5f75a13174216ad6b32df1d666e5dc997469443b7d49edacb91ec4
4
+ data.tar.gz: 77a93fb8e1e637ebad2d5efcc155eb89e87225cc706656607b1300f84c5c4ee9
5
5
  SHA512:
6
- metadata.gz: 8836e6f4dbcbd22a4115cd41a82258d0ec9285f9b99a9096a15ad56d47522f5fad6e6e8f81dd832cb882c47979c6e3662cea9f409525fb6bfe3c408df986d3a1
7
- data.tar.gz: f78176b6c4c0ea9f838cef76f1fc44dd1bb03ecb1cd4899878aa3ea83377674e5317cceb2f6eb64338b7d67611c09dfcf25d9b3d9e1bb93383c727dd31d3b453
6
+ metadata.gz: 537eee642fe7e40dbb923835035268e88dabb2c661769fdcb51964fe6cf0c58ab0fe98d5bf9cfaa34d4feace3b9868eb14c22642af03a315098cb9fe13e1d350
7
+ data.tar.gz: 767284a00c8954e437abc5c00c1e8c7089310a3010065070688cd4c0898701f65e4495ddfdd0b8a0569b79ef0579d06411f189e144244b1199ec2dd640316a99
@@ -5,6 +5,9 @@ module Lato
5
5
  included do
6
6
  before_action do
7
7
  show_sidebar
8
+
9
+ @layout_page_title = Lato.config.application_title
10
+ @layout_body_classes = []
8
11
  end
9
12
  end
10
13
 
@@ -23,5 +26,17 @@ module Lato
23
26
  def active_navbar(key)
24
27
  @navbar_key = key
25
28
  end
29
+
30
+ def page_title(title)
31
+ @layout_page_title = title
32
+ end
33
+
34
+ def page_class(class_name)
35
+ @layout_body_classes << class_name
36
+ end
37
+
38
+ def page_classes(classes)
39
+ @layout_body_classes = classes
40
+ end
26
41
  end
27
42
  end
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no,shrink-to-fit=no">
6
- <title><%= Lato.config.application_title %></title>
6
+ <title><%= @layout_page_title %></title>
7
7
  <%= csrf_meta_tags %>
8
8
  <%= csp_meta_tag %>
9
9
 
@@ -16,7 +16,7 @@
16
16
  <%= javascript_importmap_tags %>
17
17
  </head>
18
18
  <body
19
- class="controller-<%= controller_name %> action-<%= action_name %>"
19
+ class="controller-<%= controller_name %> action-<%= action_name %> <%= @layout_body_classes.join(' ') %>"
20
20
  data-controller="lato-action"
21
21
  >
22
22
  <header>
data/lib/lato/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lato
2
- VERSION = "0.3.13"
2
+ VERSION = "0.3.14"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lato
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.13
4
+ version: 0.3.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregorio Galante
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-25 00:00:00.000000000 Z
11
+ date: 2023-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails