moj_template 0.16.1 → 0.17.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: d8190ec76ed80edefbb0ab8b9349de9f80fc8a63
4
- data.tar.gz: 5df41d18fd7235748d354b455ac86b3d4dec3bfa
3
+ metadata.gz: 4574a8951c6a7aef9a1c8890134eb59ea2259bd1
4
+ data.tar.gz: 51497fe4bd233eab3ea0a6c61ee16cf492e885a6
5
5
  SHA512:
6
- metadata.gz: 0a8d21c441304adff95de7fdedc874edb9d80a66cb26d21c18b37137de5fcf0f8516e459545ae5180f24db0c038d6009f16043e0ac81988d45c74481f299031e
7
- data.tar.gz: 935f8309d0899a46e539c40aa28dd00b7fe2dde20ae29d83a0b7fd491b5e5469f9ac6067a4a0b5ed8fca2a30db27fe652f73e2313ee4b565ee065b2f74058e9c
6
+ metadata.gz: 879437360eb74f5b9c7b351a1ab9c4534a437db3bbc6b4fa19f33ef50ad1100fd18f55caa0a53d60f9a4be0e4db0d0e6b4e7a66cf53add1a1d1bfa6da7e8a871
7
+ data.tar.gz: be8e7192149f68f8a122974c83165b57a654bb47d1941a3385ef430c01713ee19a36f245520a74dcca4336a4287202ea5a2a827486dc016d1b7397723b0c206e
data/README.md CHANGED
@@ -21,6 +21,7 @@ At present this generates 5 output formats:
21
21
  4. [a tarball containing Mustache Inheritance templates](#mustache-inheritance-version)
22
22
  5. [a tarball](#tarball-version)
23
23
  6. [a django python package](#django-version)
24
+ 6. [a Jinja python package](#jinja-version)
24
25
 
25
26
  ### Gem version
26
27
 
@@ -97,6 +98,24 @@ Then add the following to your `TEMPLATE_CONTEXT_PROCESSORS` in `settings.py`:
97
98
 
98
99
  "{app_path}.context_processors.globals"
99
100
 
101
+ ### Jinja version
102
+
103
+ Similarly to Django instructions include the package in `requirements.txt`:
104
+
105
+ jinja-moj-template==0.17.0
106
+
107
+ Add `moj_template` to your `INSTALLED_APPS` in `settings.py` file:
108
+
109
+ INSTALLED_APPS = (
110
+ ...
111
+ 'moj_template',
112
+ ...
113
+ )
114
+ Extend from Jinja base template:
115
+
116
+ {% extends 'moj_template/base.jinja' %}
117
+
118
+
100
119
  ### Play version
101
120
 
102
121
  To generate the tarball of Play Framework templates run `bundle exec rake build:play`. This will produce a tarball in the `pkg` directory.
@@ -42,7 +42,7 @@
42
42
  // Invite interested developers to join us
43
43
  moj.Modules.devs = {
44
44
  init: function () {
45
- var m = ' ___ ___ ___\n /__/\\ / /\\ / /\\\n | |::\\ / /::\\ / /:/\n | |:|:\\ / /:/\\:\\ /__/::\\\n __|__|:|\\:\\ / /:/ \\:\\\\__\\/\\:\\\n /__/::::| \\:\\/__/:/ \\__\\:\\ \\ \\:\\\n \\ \\:\\~~\\__\\/\\ \\:\\ / /:/ \\__\\:\\\n \\ \\:\\ \\ \\:\\ /:/ / /:/\n \\ \\:\\ \\ \\:\\/:/ /__/:/\n \\ \\:\\ \\ \\::/ \\__\\/\n \\__\\/ \\__\\/',
45
+ var m = ' ___ ___ ___\n /__/\\ / /\\ / /\\\n | |::\\ / /::\\ / /:/\n | |:|:\\ / /:/\\:\\ /__/::\\\n __|__|:|\\:\\ / /:/ \\:\\\\__\\/\\:\\\n /__/::::| \\:\\/__/:/ \\__\\:\\ \\ \\:\\\n \\ \\:\\~~\\__\\/\\ \\:\\ / /:/ \\__\\:\\\n \\ \\:\\ \\ \\:\\ /:/ / /:/\n \\ \\:\\ \\ \\:\\/:/ /__/:/\n \\ \\:\\ \\ \\::/ \\__\\/\n \\__\\/ \\__\\/',
46
46
  txt = '\n\nLike what you see? Want to make a difference?'+
47
47
  '\n\nFind out how we\'re making the Ministry Of Justice Digital by Default.'+
48
48
  '\nhttps://mojdigital.blog.gov.uk/.'+
@@ -5,7 +5,8 @@
5
5
  <head>
6
6
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
7
7
 
8
- <title><%= content_for?(:page_title) ? yield(:page_title) : "GOV.UK - The best place to find government services and information" %></title>
8
+ <title><%= content_for?(:page_title) ? yield(:page_title) : "GOV.UK - The best place to find government services and information" %>
9
+ </title>
9
10
 
10
11
  <script type="text/javascript">
11
12
  (function(){if(navigator.userAgent.match(/IEMobile\/10\.0/)){var d=document,c="appendChild",a=d.createElement("style");a[c](d.createTextNode("@-ms-viewport{width:auto!important}"));d.getElementsByTagName("head")[0][c](a);}})();
@@ -63,7 +64,8 @@
63
64
 
64
65
  </head>
65
66
 
66
- <body class="<%= content_for?(:body_classes) ? raw("#{yield(:body_classes)}") : "#{config_item(:phase).to_s.downcase} #{config_item(:product_type).to_s.downcase}" %>">
67
+ <body class="<%= content_for?(:body_classes) ? raw("#{yield(:body_classes)}") : "#{config_item(:phase).to_s.downcase} #{config_item(:product_type).to_s.downcase}" %>
68
+ ">
67
69
  <script type="text/javascript">document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script>
68
70
 
69
71
  <div id="skiplink-container">
@@ -81,6 +83,7 @@
81
83
  <% else %>
82
84
  <p>GOV.UK uses cookies to make the site simpler. <a href="https://www.gov.uk/help/cookies">Find out more about cookies</a></p>
83
85
  <% end %>
86
+
84
87
 
85
88
  </div>
86
89
  </div>
@@ -88,7 +91,8 @@
88
91
  <!--end global-cookie-message-->
89
92
 
90
93
 
91
- <header role="banner" id="global-header" class="with-proposition <%= yield :header_class %>">
94
+ <header role="banner" id="global-header" class="with-proposition <%= yield :header_class %>
95
+ ">
92
96
  <div class="header-wrapper">
93
97
  <div class="header-global">
94
98
  <div class="header-logo">
@@ -99,16 +103,17 @@
99
103
  <%= yield :inside_header %>
100
104
  </div>
101
105
  <% if content_for?(:proposition_header) %>
102
- <%= yield(:proposition_header) %>
103
- <% else %>
104
- <div class="header-proposition">
105
- <div class="content">
106
- <a href="/" id="proposition-name"><%= "#{config_item(:proposition_title)}" %></a>
107
- <a href="https://www.gov.uk/service-manual/phases/<%= "#{config_item(:phase).to_s.downcase}" %>.html" class="proposition-phase"><%= "#{config_item(:phase).to_s.capitalize}" %></a>
108
- <%= yield(:proposition_links) %>
109
- </div>
106
+ <%= yield(:proposition_header) %>
107
+ <% else %>
108
+ <div class="header-proposition">
109
+ <div class="content">
110
+ <a href="/" id="proposition-name"><%= "#{config_item(:proposition_title)}" %></a>
111
+ <a href="https://www.gov.uk/service-manual/phases/<%= "#{config_item(:phase).to_s.downcase}" %>.html" class="proposition-phase"><%= "#{config_item(:phase).to_s.capitalize}" %></a>
112
+ <%= yield(:proposition_links) %>
110
113
  </div>
111
- <% end %>
114
+ </div>
115
+ <% end %>
116
+
112
117
  </div>
113
118
  </header>
114
119
  <!--end header-->
@@ -117,6 +122,7 @@
117
122
  <!--[if lte IE 6]><script>document.body.className = document.body.className.replace('js-enabled','');</script><![endif]-->
118
123
  <%= yield :after_header %>
119
124
 
125
+
120
126
  <div id="global-header-bar">
121
127
  <div class="inner-block">
122
128
  <div class="header-bar"></div>
@@ -136,6 +142,7 @@
136
142
  </div>
137
143
  <% end %>
138
144
 
145
+
139
146
  <footer class="group js-footer" id="footer" role="contentinfo">
140
147
 
141
148
  <div class="footer-wrapper">
@@ -145,14 +152,14 @@
145
152
  <div class="footer-meta-inner">
146
153
  <h2 class="visuallyhidden">Support links</h2>
147
154
  <ul>
148
- <% if content_for?(:footer_app_links) %>
149
- <%= yield(:footer_app_links) %>
150
- <% else %>
151
- <li><a href="http://www.gov.uk/help">Help</a></li>
152
- <li><a href="http://www.gov.uk/help/cookies">Cookies</a></li>
153
- <li><a href="http://www.gov.uk/contact">Contact</a></li>
154
- <li><a href="http://www.gov.uk/cymraeg">Cymraeg</a></li>
155
- <% end %>
155
+ <% if content_for?(:footer_app_links) %>
156
+ <%= yield(:footer_app_links) %>
157
+ <% else %>
158
+ <li><a href="http://www.gov.uk/help">Help</a></li>
159
+ <li><a href="http://www.gov.uk/help/cookies">Cookies</a></li>
160
+ <li><a href="http://www.gov.uk/contact">Contact</a></li>
161
+ <li><a href="http://www.gov.uk/cymraeg">Cymraeg</a></li>
162
+ <% end %>
156
163
  <li>
157
164
  Built by
158
165
  <a href="https://mojdigital.blog.gov.uk/"><abbr title="Ministry of Justice">MOJ</abbr> Digital Services</a>
@@ -189,5 +196,6 @@
189
196
  <!--<![endif]-->
190
197
 
191
198
  <%= yield :body_end %>
199
+
192
200
  </body>
193
201
  </html>
@@ -1,3 +1,3 @@
1
1
  module MojTemplate
2
- VERSION = "0.16.1"
2
+ VERSION = "0.17.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moj_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.1
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dom Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-11 00:00:00.000000000 Z
11
+ date: 2014-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails