govuk_admin_template 2.2.0 → 2.3.0

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
  SHA1:
3
- metadata.gz: c58c9b5601e87cd15178faf990bb2ce01460e6d4
4
- data.tar.gz: 84904a2d22311865cf19b38603294b45d8d09288
3
+ metadata.gz: 00bff0cbb158cd4a78ed018fb28f52c75d3e3149
4
+ data.tar.gz: 3e2d7d51d0d803ce8e33a45cfa56bbdd376d6f68
5
5
  SHA512:
6
- metadata.gz: d03ffc7760c69cf228b0e318eb4ad09f9d9f9b0ff7c212469b098654e3ed92c63b25f84a4505d27f8e76afa49d61e9b209316140729b44a57e0b5d30e8339f2c
7
- data.tar.gz: 8847879d8dbe436c4af6027bb6a5516132cd4bc6bb58b4d1c3a48303b5af450762548d57134caac6a6598c986bc27291b8210570c450359e40bbb7308ddeb618
6
+ metadata.gz: 1ee6ec98b0ca01a08ec7f8b35e4f674ff65e715269b0e917f86579ab386f06cdfc815fd4bb26317e1202abc20059bcc4319c6058de59fc431ed23f8ad0e168fb
7
+ data.tar.gz: c99bc441dfcb1e29c5db87e7bf0bfc1d8dbd366b6c3c40cdd06eccf687f91ef8f726a16ce333ef708190e490e613e85dc0a011b404945a7b80334e98227f1895
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 2.3.0
2
+
3
+ * Allow apps to specify a custom navbar
4
+
1
5
  # 2.2.0
2
6
 
3
7
  * Add a confirm javascript module for confirming a user action: https://github.com/alphagov/govuk_admin_template/pull/64
data/README.md CHANGED
@@ -83,6 +83,7 @@ The gem [uses nested layouts](http://guides.rubyonrails.org/layouts_and_renderin
83
83
  `:footer_version` (optional) | Text indicating the release, eg commit SHA
84
84
  `:body_end` (optional) | Just before the `</body>` tag
85
85
  `:full_width` (optional, boolean) | Expand content to edges of screen. Must be used on a per-page basis. Apps must not be full width by default.
86
+ `:navbar` (optional) | Custom navbar content, overrides default navbar
86
87
 
87
88
  Example navbar_items:
88
89
  ```erb
@@ -38,47 +38,51 @@
38
38
  </head>
39
39
  <body<% if environment_style %> class="environment-<%= environment_style %>"<% end %>>
40
40
  <%= yield :body_start %>
41
- <header class="
42
- navbar
43
- navbar-default
44
- navbar-inverse
45
- navbar-static-top
46
- <% if environment_style %>environment-indicator<% end %>
47
- add-bottom-margin" role="banner">
48
- <div class="<%= content_for?(:full_width) ? 'container-fluid' : 'container' %>">
49
- <div class="navbar-header">
50
- <% if content_for?(:navbar_right) || content_for?(:navbar_items) %>
51
- <%# Bootstrap toggle for collapsed navbar content, used at smaller widths %>
52
- <a class="navbar-toggle" data-toggle="collapse" data-target="header .navbar-collapse">
53
- <span class="sr-only">Toggle navigation</span>
54
- <span class="icon-bar"></span>
55
- <span class="icon-bar"></span>
56
- <span class="icon-bar"></span>
57
- </a>
58
- <% end %>
59
- <%= link_to content_for?(:app_title) ? yield(:app_title) : "GOV.UK", app_home_path, :class => 'navbar-brand' %>
60
- <% if environment_label %>
61
- <div class="environment-label">
62
- <%= environment_label %>
63
- </div>
64
- <% end %>
65
- </div>
66
- <% if content_for?(:navbar_right) || content_for?(:navbar_items) %>
67
- <nav role="navigation" class="collapse navbar-collapse">
68
- <% if content_for?(:navbar_items) %>
69
- <ul class="nav navbar-nav">
70
- <%= yield :navbar_items %>
71
- </ul>
41
+ <% if content_for?(:navbar) %>
42
+ <%= yield(:navbar) %>
43
+ <% else %>
44
+ <header class="
45
+ navbar
46
+ navbar-default
47
+ navbar-inverse
48
+ navbar-static-top
49
+ <% if environment_style %>environment-indicator<% end %>
50
+ add-bottom-margin" role="banner">
51
+ <div class="<%= content_for?(:full_width) ? 'container-fluid' : 'container' %>">
52
+ <div class="navbar-header">
53
+ <% if content_for?(:navbar_right) || content_for?(:navbar_items) %>
54
+ <%# Bootstrap toggle for collapsed navbar content, used at smaller widths %>
55
+ <a class="navbar-toggle" data-toggle="collapse" data-target="header .navbar-collapse">
56
+ <span class="sr-only">Toggle navigation</span>
57
+ <span class="icon-bar"></span>
58
+ <span class="icon-bar"></span>
59
+ <span class="icon-bar"></span>
60
+ </a>
72
61
  <% end %>
73
- <% if content_for?(:navbar_right) %>
74
- <div class="navbar-text pull-right">
75
- <%= yield :navbar_right %>
62
+ <%= link_to content_for?(:app_title) ? yield(:app_title) : "GOV.UK", app_home_path, :class => 'navbar-brand' %>
63
+ <% if environment_label %>
64
+ <div class="environment-label">
65
+ <%= environment_label %>
76
66
  </div>
77
67
  <% end %>
78
- </nav>
79
- <% end %>
80
- </div>
81
- </header>
68
+ </div>
69
+ <% if content_for?(:navbar_right) || content_for?(:navbar_items) %>
70
+ <nav role="navigation" class="collapse navbar-collapse">
71
+ <% if content_for?(:navbar_items) %>
72
+ <ul class="nav navbar-nav">
73
+ <%= yield :navbar_items %>
74
+ </ul>
75
+ <% end %>
76
+ <% if content_for?(:navbar_right) %>
77
+ <div class="navbar-text pull-right">
78
+ <%= yield :navbar_right %>
79
+ </div>
80
+ <% end %>
81
+ </nav>
82
+ <% end %>
83
+ </div>
84
+ </header>
85
+ <% end %>
82
86
  <section class="<%= content_for?(:full_width) ? 'container-fluid' : 'container' %>">
83
87
  <main role="main">
84
88
  <%= content_for?(:content) ? yield(:content) : yield %>
@@ -1,3 +1,3 @@
1
1
  module GovukAdminTemplate
2
- VERSION = "2.2.0"
2
+ VERSION = "2.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_admin_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-30 00:00:00.000000000 Z
11
+ date: 2015-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails