digital_nsw_template 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +3 -0
- data/assets/images/logo-white.svg +89 -0
- data/assets/images/nsw-logo.png +0 -0
- data/assets/stylesheets/digital_nsw_template/_bootstrap_variables.scss +5 -0
- data/assets/stylesheets/digital_nsw_template/_variables.scss +17 -0
- data/assets/stylesheets/digital_nsw_template/layout/alerts.scss +40 -0
- data/assets/stylesheets/digital_nsw_template/layout/article.scss +5 -0
- data/assets/stylesheets/digital_nsw_template/layout/base.scss +16 -0
- data/assets/stylesheets/digital_nsw_template/layout/errors.scss +32 -0
- data/assets/stylesheets/digital_nsw_template/layout/footer.scss +131 -0
- data/assets/stylesheets/digital_nsw_template/layout/forms.scss +385 -0
- data/assets/stylesheets/digital_nsw_template/layout/grid.scss +33 -0
- data/assets/stylesheets/digital_nsw_template/layout/header.scss +107 -0
- data/assets/stylesheets/digital_nsw_template/layout/hidden.scss +8 -0
- data/assets/stylesheets/digital_nsw_template/layout/skip-link.scss +32 -0
- data/assets/stylesheets/digital_nsw_template/layout/typography.scss +37 -0
- data/assets/stylesheets/digital_nsw_template/patterns/breadcrumbs.scss +26 -0
- data/assets/stylesheets/digital_nsw_template/patterns/buttons.scss +90 -0
- data/assets/stylesheets/digital_nsw_template/patterns/check-answers.scss +31 -0
- data/assets/stylesheets/digital_nsw_template/patterns/confirmation.scss +36 -0
- data/assets/stylesheets/digital_nsw_template/patterns/logo.scss +44 -0
- data/assets/stylesheets/digital_nsw_template.scss +22 -0
- data/digital_nsw_template.gemspec +17 -0
- data/lib/digital_nsw_template/engine.rb +13 -0
- data/lib/digital_nsw_template/version.rb +3 -0
- data/lib/digital_nsw_template.rb +64 -0
- metadata +110 -0
@@ -0,0 +1,31 @@
|
|
1
|
+
@mixin check-answers {
|
2
|
+
@include make-row();
|
3
|
+
|
4
|
+
padding-top: .5rem;
|
5
|
+
padding-bottom: 1rem;
|
6
|
+
|
7
|
+
dt, dd {
|
8
|
+
border-bottom: 1px solid $grey-3;
|
9
|
+
padding-bottom: 0.5rem;
|
10
|
+
padding-top: 0.5rem;
|
11
|
+
margin-bottom: 0;
|
12
|
+
}
|
13
|
+
|
14
|
+
dt {
|
15
|
+
@include make-col-ready();
|
16
|
+
@include make-col(4);
|
17
|
+
}
|
18
|
+
|
19
|
+
dd {
|
20
|
+
@include make-col-ready();
|
21
|
+
@include make-col(8);
|
22
|
+
|
23
|
+
.change-link {
|
24
|
+
float: right;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
dl.check-answers {
|
30
|
+
@include check-answers;
|
31
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
.confirmation {
|
2
|
+
background: $light-blue;
|
3
|
+
|
4
|
+
&, a {
|
5
|
+
color: $white;
|
6
|
+
}
|
7
|
+
a:hover {
|
8
|
+
color: darken($white, 20%);
|
9
|
+
}
|
10
|
+
a:focus {
|
11
|
+
color: $black;
|
12
|
+
}
|
13
|
+
|
14
|
+
padding: 1rem;
|
15
|
+
text-align: center;
|
16
|
+
margin-bottom: 2rem;
|
17
|
+
|
18
|
+
h1 {
|
19
|
+
font-size: 2.1rem;
|
20
|
+
margin: 1.5rem 0;
|
21
|
+
}
|
22
|
+
|
23
|
+
h2 {
|
24
|
+
font-size: 1.2rem;
|
25
|
+
margin: 1rem 0;
|
26
|
+
}
|
27
|
+
|
28
|
+
p {
|
29
|
+
margin: 0.5rem 0;
|
30
|
+
}
|
31
|
+
|
32
|
+
@include media-breakpoint-up(lg) {
|
33
|
+
padding-left: 3rem;
|
34
|
+
padding-right: 3rem;
|
35
|
+
}
|
36
|
+
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
@mixin logo {
|
2
|
+
font-size: 1.6rem;
|
3
|
+
|
4
|
+
span {
|
5
|
+
display: inline-block;
|
6
|
+
vertical-align: top;
|
7
|
+
}
|
8
|
+
|
9
|
+
.logo-container {
|
10
|
+
background: #fff;
|
11
|
+
padding-top: .7rem;
|
12
|
+
padding-left: .5rem;
|
13
|
+
height: 100px;
|
14
|
+
|
15
|
+
width: 5.5rem;
|
16
|
+
display: inline-block;
|
17
|
+
}
|
18
|
+
img.logo {
|
19
|
+
width: 4.5rem;
|
20
|
+
}
|
21
|
+
span.logo {
|
22
|
+
background: url('nsw-logo.png') no-repeat 0px 0px / cover;
|
23
|
+
text-indent: -9999px;
|
24
|
+
|
25
|
+
height: 5rem;
|
26
|
+
width: 4.5rem;
|
27
|
+
}
|
28
|
+
span.site-title {
|
29
|
+
margin-top: 3.2rem;
|
30
|
+
margin-left: 1.5rem;
|
31
|
+
font-weight: 600;
|
32
|
+
}
|
33
|
+
|
34
|
+
a {
|
35
|
+
text-decoration: none;
|
36
|
+
display: block;
|
37
|
+
color: #fff;
|
38
|
+
|
39
|
+
&:focus {
|
40
|
+
background-color: transparent;
|
41
|
+
color: #fff;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
@import 'digital_nsw_template/_bootstrap_variables';
|
2
|
+
@import 'bootstrap';
|
3
|
+
|
4
|
+
@import 'digital_nsw_template/_variables';
|
5
|
+
|
6
|
+
@import 'digital_nsw_template/patterns/breadcrumbs';
|
7
|
+
@import 'digital_nsw_template/patterns/buttons';
|
8
|
+
@import 'digital_nsw_template/patterns/check-answers';
|
9
|
+
@import 'digital_nsw_template/patterns/confirmation';
|
10
|
+
@import 'digital_nsw_template/patterns/logo';
|
11
|
+
|
12
|
+
@import 'digital_nsw_template/layout/alerts';
|
13
|
+
@import 'digital_nsw_template/layout/article';
|
14
|
+
@import 'digital_nsw_template/layout/base';
|
15
|
+
@import 'digital_nsw_template/layout/errors';
|
16
|
+
@import 'digital_nsw_template/layout/footer';
|
17
|
+
@import 'digital_nsw_template/layout/forms';
|
18
|
+
@import 'digital_nsw_template/layout/grid';
|
19
|
+
@import 'digital_nsw_template/layout/header';
|
20
|
+
@import 'digital_nsw_template/layout/hidden';
|
21
|
+
@import 'digital_nsw_template/layout/skip-link';
|
22
|
+
@import 'digital_nsw_template/layout/typography';
|
@@ -0,0 +1,17 @@
|
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'digital_nsw_template/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "digital_nsw_template"
|
7
|
+
s.version = DigitalNswTemplate::VERSION
|
8
|
+
s.authors = ['NSW Department of Finance, Services and Innovation']
|
9
|
+
s.summary = 'Base stylesheets for the Digital NSW template'
|
10
|
+
s.require_paths = ["lib"]
|
11
|
+
|
12
|
+
s.add_runtime_dependency 'sass', '>= 3.5.2'
|
13
|
+
s.add_runtime_dependency 'sprockets', '>= 3.7.0'
|
14
|
+
s.add_runtime_dependency 'bootstrap', '~> 4.0.0'
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'autoprefixer-rails'
|
2
|
+
|
3
|
+
module DigitalNswTemplate
|
4
|
+
module Rails
|
5
|
+
class Engine < ::Rails::Engine
|
6
|
+
initializer 'digital_nsw_template.assets' do |app|
|
7
|
+
%w(images stylesheets).each do |sub|
|
8
|
+
app.config.assets.paths << root.join('assets', sub).to_s
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'digital_nsw_template/version'
|
2
|
+
require 'bootstrap'
|
3
|
+
|
4
|
+
module DigitalNswTemplate
|
5
|
+
# Based on similar code used to load the Bootstrap gem
|
6
|
+
# https://github.com/twbs/bootstrap-rubygem/blob/v4.1.1/lib/bootstrap.rb
|
7
|
+
#
|
8
|
+
class << self
|
9
|
+
def load!
|
10
|
+
if rails?
|
11
|
+
register_rails_engine
|
12
|
+
elsif sprockets?
|
13
|
+
register_sprockets
|
14
|
+
end
|
15
|
+
|
16
|
+
configure_sass
|
17
|
+
end
|
18
|
+
|
19
|
+
# Paths
|
20
|
+
def gem_path
|
21
|
+
@gem_path ||= File.expand_path '..', File.dirname(__FILE__)
|
22
|
+
end
|
23
|
+
|
24
|
+
def stylesheets_path
|
25
|
+
File.join assets_path, 'stylesheets'
|
26
|
+
end
|
27
|
+
|
28
|
+
def images_path
|
29
|
+
File.join assets_path, 'images'
|
30
|
+
end
|
31
|
+
|
32
|
+
def assets_path
|
33
|
+
@assets_path ||= File.join gem_path, 'assets'
|
34
|
+
end
|
35
|
+
|
36
|
+
# Environment detection helpers
|
37
|
+
def sprockets?
|
38
|
+
defined?(::Sprockets)
|
39
|
+
end
|
40
|
+
|
41
|
+
def rails?
|
42
|
+
defined?(::Rails)
|
43
|
+
end
|
44
|
+
|
45
|
+
private
|
46
|
+
|
47
|
+
def configure_sass
|
48
|
+
require 'sass'
|
49
|
+
|
50
|
+
::Sass.load_paths << stylesheets_path
|
51
|
+
end
|
52
|
+
|
53
|
+
def register_rails_engine
|
54
|
+
require 'digital_nsw_template/engine'
|
55
|
+
end
|
56
|
+
|
57
|
+
def register_sprockets
|
58
|
+
Sprockets.append_path(stylesheets_path)
|
59
|
+
Sprockets.append_path(images_path)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
DigitalNswTemplate.load!
|
metadata
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: digital_nsw_template
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- NSW Department of Finance, Services and Innovation
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-07-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: sass
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.5.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.5.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: sprockets
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.7.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 3.7.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bootstrap
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 4.0.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 4.0.0
|
55
|
+
description:
|
56
|
+
email:
|
57
|
+
executables: []
|
58
|
+
extensions: []
|
59
|
+
extra_rdoc_files: []
|
60
|
+
files:
|
61
|
+
- README.md
|
62
|
+
- assets/images/logo-white.svg
|
63
|
+
- assets/images/nsw-logo.png
|
64
|
+
- assets/stylesheets/digital_nsw_template.scss
|
65
|
+
- assets/stylesheets/digital_nsw_template/_bootstrap_variables.scss
|
66
|
+
- assets/stylesheets/digital_nsw_template/_variables.scss
|
67
|
+
- assets/stylesheets/digital_nsw_template/layout/alerts.scss
|
68
|
+
- assets/stylesheets/digital_nsw_template/layout/article.scss
|
69
|
+
- assets/stylesheets/digital_nsw_template/layout/base.scss
|
70
|
+
- assets/stylesheets/digital_nsw_template/layout/errors.scss
|
71
|
+
- assets/stylesheets/digital_nsw_template/layout/footer.scss
|
72
|
+
- assets/stylesheets/digital_nsw_template/layout/forms.scss
|
73
|
+
- assets/stylesheets/digital_nsw_template/layout/grid.scss
|
74
|
+
- assets/stylesheets/digital_nsw_template/layout/header.scss
|
75
|
+
- assets/stylesheets/digital_nsw_template/layout/hidden.scss
|
76
|
+
- assets/stylesheets/digital_nsw_template/layout/skip-link.scss
|
77
|
+
- assets/stylesheets/digital_nsw_template/layout/typography.scss
|
78
|
+
- assets/stylesheets/digital_nsw_template/patterns/breadcrumbs.scss
|
79
|
+
- assets/stylesheets/digital_nsw_template/patterns/buttons.scss
|
80
|
+
- assets/stylesheets/digital_nsw_template/patterns/check-answers.scss
|
81
|
+
- assets/stylesheets/digital_nsw_template/patterns/confirmation.scss
|
82
|
+
- assets/stylesheets/digital_nsw_template/patterns/logo.scss
|
83
|
+
- digital_nsw_template.gemspec
|
84
|
+
- lib/digital_nsw_template.rb
|
85
|
+
- lib/digital_nsw_template/engine.rb
|
86
|
+
- lib/digital_nsw_template/version.rb
|
87
|
+
homepage:
|
88
|
+
licenses: []
|
89
|
+
metadata: {}
|
90
|
+
post_install_message:
|
91
|
+
rdoc_options: []
|
92
|
+
require_paths:
|
93
|
+
- lib
|
94
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
99
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
requirements: []
|
105
|
+
rubyforge_project:
|
106
|
+
rubygems_version: 2.7.3
|
107
|
+
signing_key:
|
108
|
+
specification_version: 4
|
109
|
+
summary: Base stylesheets for the Digital NSW template
|
110
|
+
test_files: []
|