aaf-lipstick 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Rakefile +17 -0
- data/app/assets/images/favicon.png +0 -0
- data/app/assets/images/logo.png +0 -0
- data/app/assets/javascripts/aaf-layout.js +35 -0
- data/app/assets/stylesheets/aaf-layout.css.scss +204 -0
- data/app/views/layouts/email_branding.html.erb +289 -0
- data/lib/aaf-lipstick.rb +1 -0
- data/lib/lipstick.rb +12 -0
- data/lib/lipstick/action_view_tilt_template.rb +17 -0
- data/lib/lipstick/auto_validation.rb +73 -0
- data/lib/lipstick/email_message.rb +29 -0
- data/lib/lipstick/engine.rb +11 -0
- data/lib/lipstick/helpers.rb +9 -0
- data/lib/lipstick/helpers/form_helper.rb +197 -0
- data/lib/lipstick/helpers/layout_helper.rb +143 -0
- data/lib/lipstick/helpers/nav_helper.rb +50 -0
- data/lib/lipstick/helpers/semantic_form_builder.rb +2 -0
- data/lib/lipstick/images.rb +7 -0
- data/lib/lipstick/images/email_banner.rb +154 -0
- data/lib/lipstick/images/processor.rb +27 -0
- data/lib/lipstick/version.rb +3 -0
- metadata +275 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c20ae11553ab491a02b20612babb2c9442b4cbfb
|
4
|
+
data.tar.gz: 12a68ea57c36f2777a2ef829533e3daa7418557f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5d8d81ad300b65950957eb6651ef9099e2346aad6705165ddf6e463164d89abc10f8605526dca4c6791ddf67627d2e6eba1f74be497b7abccb696f13ddce7ea0
|
7
|
+
data.tar.gz: 63e16bf6c500735fbde2bfd757933f34f411ed9558defab1913faf73cf076695fa5d005f74cfa2948318dc935152b8b368a9342a5d8ae6c58c8748fbf4c506c6
|
data/Rakefile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'AafServiceBase'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
Bundler::GemHelper.install_tasks
|
Binary file
|
Binary file
|
@@ -0,0 +1,35 @@
|
|
1
|
+
jQuery(function($) {
|
2
|
+
$('.nav.collapsing.button .open.button').click(function() {
|
3
|
+
$(this).parents('.collapsing.nav.parent').toggleClass('expanded');
|
4
|
+
return false;
|
5
|
+
});
|
6
|
+
|
7
|
+
$('.field-help-text').popup({
|
8
|
+
"inline": true,
|
9
|
+
"position": "right center"
|
10
|
+
});
|
11
|
+
|
12
|
+
$('.ui.dropdown:not(.simple)').dropdown();
|
13
|
+
|
14
|
+
/* Our nav menu has a layout bug; the same as reported at:
|
15
|
+
* https://github.com/Semantic-Org/Semantic-UI/issues/839
|
16
|
+
*
|
17
|
+
* The suggested fix on that issue did not correct it.
|
18
|
+
*
|
19
|
+
* We can detect the bug when the window.load event fires, by checking the
|
20
|
+
* relative positioning of the right menu. Using a hide/show forces the
|
21
|
+
* browser to recalculate, which corrects the layout.
|
22
|
+
*/
|
23
|
+
$('.aaf-header nav > .ui.menu').each(function() {
|
24
|
+
var e = this;
|
25
|
+
$(window).load(function() {
|
26
|
+
var bar_pos = $(e).position();
|
27
|
+
var right_menu_pos = $(e).find('.right.menu').position();
|
28
|
+
|
29
|
+
if (bar_pos.top < right_menu_pos.top) {
|
30
|
+
$(e).attr('style', 'display: none !important');
|
31
|
+
setTimeout(function() { $(e).attr('style', 'display: block'); }, 0);
|
32
|
+
}
|
33
|
+
});
|
34
|
+
});
|
35
|
+
});
|
@@ -0,0 +1,204 @@
|
|
1
|
+
@mixin no-header-margins() {
|
2
|
+
h1, h2, h3, h4, h5, h6 {
|
3
|
+
margin: 0px;
|
4
|
+
}
|
5
|
+
}
|
6
|
+
|
7
|
+
@mixin responsive-min-gutter($width, $gutter) {
|
8
|
+
@media only screen and (max-width: $width) {
|
9
|
+
padding-left: $gutter;
|
10
|
+
padding-right: $gutter;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
|
14
|
+
@mixin responsive-gutter($width, $gutter) {
|
15
|
+
@media only screen and (min-width: $width) {
|
16
|
+
padding-left: $gutter;
|
17
|
+
padding-right: $gutter;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
@mixin responsive-fixed($screen, $content) {
|
22
|
+
@media only screen and (min-width: $screen) {
|
23
|
+
width: $content;
|
24
|
+
margin-left: auto;
|
25
|
+
margin-right: auto;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
@mixin responsive-width {
|
30
|
+
@include responsive-min-gutter(959px, 5px);
|
31
|
+
@include responsive-gutter(960px, 50px);
|
32
|
+
@include responsive-gutter(1280px, 100px);
|
33
|
+
@include responsive-fixed(1560px, 1360px);
|
34
|
+
}
|
35
|
+
|
36
|
+
body {
|
37
|
+
margin: 0px;
|
38
|
+
padding: 0px;
|
39
|
+
|
40
|
+
font-size: 14px;
|
41
|
+
font-family: "Open Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
|
42
|
+
color: black;
|
43
|
+
background: white;
|
44
|
+
}
|
45
|
+
|
46
|
+
section.content {
|
47
|
+
@include responsive-width;
|
48
|
+
}
|
49
|
+
|
50
|
+
main {
|
51
|
+
margin-top: 1em;
|
52
|
+
|
53
|
+
a {
|
54
|
+
text-decoration: none;
|
55
|
+
color: #08c;
|
56
|
+
}
|
57
|
+
|
58
|
+
a:hover {
|
59
|
+
text-decoration: underline;
|
60
|
+
}
|
61
|
+
|
62
|
+
table {
|
63
|
+
text-align: left;
|
64
|
+
}
|
65
|
+
|
66
|
+
.ui.error.message ul.list li {
|
67
|
+
list-style-type: circle;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
footer {
|
72
|
+
@include responsive-width;
|
73
|
+
|
74
|
+
font-size: 12px;
|
75
|
+
color: #aaaaaa;
|
76
|
+
line-height: 1.6em;
|
77
|
+
|
78
|
+
a {
|
79
|
+
text-decoration: none;
|
80
|
+
color: inherit;
|
81
|
+
}
|
82
|
+
|
83
|
+
a:hover {
|
84
|
+
color: initial;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
.aaf-header {
|
89
|
+
$background: #495666;
|
90
|
+
|
91
|
+
background-color: $background;
|
92
|
+
min-height: 80px;
|
93
|
+
letter-spacing: 0.5px;
|
94
|
+
|
95
|
+
.ui.header {
|
96
|
+
font-weight: normal;
|
97
|
+
|
98
|
+
img {
|
99
|
+
width: 138px;
|
100
|
+
height: 80px;
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
nav {
|
105
|
+
@include responsive-width;
|
106
|
+
|
107
|
+
.ui.menu {
|
108
|
+
background-color: darken($background, 7%);
|
109
|
+
|
110
|
+
a.item:hover, div.dropdown.item:hover {
|
111
|
+
background-color: rgba(0, 0, 0, .15);
|
112
|
+
}
|
113
|
+
|
114
|
+
.dropdown.item .menu {
|
115
|
+
background-color: $background;
|
116
|
+
|
117
|
+
.item {
|
118
|
+
color: white !important;
|
119
|
+
}
|
120
|
+
|
121
|
+
.item:hover {
|
122
|
+
background-color: rgba(0, 0, 0, .15);
|
123
|
+
}
|
124
|
+
}
|
125
|
+
}
|
126
|
+
|
127
|
+
.collapsing.nav.button .open.button {
|
128
|
+
display: none;
|
129
|
+
}
|
130
|
+
|
131
|
+
@media only screen and (max-width: 560px) {
|
132
|
+
.ui.menu .item {
|
133
|
+
display: block;
|
134
|
+
}
|
135
|
+
|
136
|
+
.collapsing.nav.button .open.button {
|
137
|
+
display: block;
|
138
|
+
float: right;
|
139
|
+
margin: 5px;
|
140
|
+
position: relative;
|
141
|
+
z-index: 5;
|
142
|
+
}
|
143
|
+
|
144
|
+
.collapsing.nav.content {
|
145
|
+
display: none;
|
146
|
+
}
|
147
|
+
|
148
|
+
.collapsing.nav.parent.expanded .collapsing.nav.content {
|
149
|
+
display: block;
|
150
|
+
|
151
|
+
.item { display: block; }
|
152
|
+
.ui.simple.dropdown {
|
153
|
+
.menu {
|
154
|
+
position: relative;
|
155
|
+
top: 0.6em !important;
|
156
|
+
height: auto;
|
157
|
+
opacity: inherit;
|
158
|
+
}
|
159
|
+
}
|
160
|
+
.menu.right { float: none; }
|
161
|
+
}
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
.banner {
|
166
|
+
@include no-header-margins;
|
167
|
+
@include responsive-width;
|
168
|
+
|
169
|
+
.content, .environment {
|
170
|
+
height: 80px;
|
171
|
+
line-height: 80px;
|
172
|
+
vertical-align: middle;
|
173
|
+
}
|
174
|
+
|
175
|
+
.environment {
|
176
|
+
float: right;
|
177
|
+
font-size: 130%;
|
178
|
+
color: #dd7727;
|
179
|
+
margin-right: 5px;
|
180
|
+
}
|
181
|
+
|
182
|
+
@media only screen and (max-width: 560px) {
|
183
|
+
.environment {
|
184
|
+
float: none;
|
185
|
+
text-align: right;
|
186
|
+
line-height: 1em;
|
187
|
+
position: absolute;
|
188
|
+
right: 5px;
|
189
|
+
top: 5px;
|
190
|
+
}
|
191
|
+
}
|
192
|
+
|
193
|
+
.logo {
|
194
|
+
float: left;
|
195
|
+
margin-right: 28px;
|
196
|
+
}
|
197
|
+
}
|
198
|
+
}
|
199
|
+
|
200
|
+
.clearfix:after {
|
201
|
+
content: "";
|
202
|
+
display: table;
|
203
|
+
clear: both;
|
204
|
+
}
|
@@ -0,0 +1,289 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
5
|
+
<title><%= title %></title>
|
6
|
+
|
7
|
+
<style type="text/css">
|
8
|
+
/* Client-specific Styles */
|
9
|
+
#outlook a{padding:0;} /* Force Outlook to provide a "view in browser" button. */
|
10
|
+
body{width:100% !important;} .ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */
|
11
|
+
body{-webkit-text-size-adjust:none;} /* Prevent Webkit platforms from changing default text sizes. */
|
12
|
+
|
13
|
+
/* Reset Styles */
|
14
|
+
body{margin:0; padding:0;}
|
15
|
+
img{border:0; height:auto; line-height:100%; outline:none; text-decoration:none;}
|
16
|
+
table td{border-collapse:collapse;}
|
17
|
+
#backgroundTable{height:100% !important; margin:0; padding:0; width:100% !important;}
|
18
|
+
|
19
|
+
body, #backgroundTable{
|
20
|
+
background-color:#FAFAFA;
|
21
|
+
}
|
22
|
+
|
23
|
+
#templateContainer{
|
24
|
+
border: 1px solid #DDDDDD;
|
25
|
+
}
|
26
|
+
|
27
|
+
h1, .h1{
|
28
|
+
color:#666666;
|
29
|
+
display:block;
|
30
|
+
font-family:Arial;
|
31
|
+
font-size:34px;
|
32
|
+
font-weight:bold;
|
33
|
+
line-height:100%;
|
34
|
+
margin-top:0;
|
35
|
+
margin-right:0;
|
36
|
+
margin-bottom:10px;
|
37
|
+
margin-left:0;
|
38
|
+
text-align:left;
|
39
|
+
}
|
40
|
+
|
41
|
+
h2, .h2{
|
42
|
+
color:#666666;
|
43
|
+
display:block;
|
44
|
+
font-family:Arial;
|
45
|
+
font-size:30px;
|
46
|
+
font-weight:bold;
|
47
|
+
line-height:100%;
|
48
|
+
margin-top:0;
|
49
|
+
margin-right:0;
|
50
|
+
margin-bottom:10px;
|
51
|
+
margin-left:0;
|
52
|
+
text-align:left;
|
53
|
+
}
|
54
|
+
|
55
|
+
h3, .h3{
|
56
|
+
color:#666666;
|
57
|
+
display:block;
|
58
|
+
font-family:Arial;
|
59
|
+
font-size:26px;
|
60
|
+
font-weight:bold;
|
61
|
+
line-height:100%;
|
62
|
+
margin-top:0;
|
63
|
+
margin-right:0;
|
64
|
+
margin-bottom:10px;
|
65
|
+
margin-left:0;
|
66
|
+
text-align:left;
|
67
|
+
}
|
68
|
+
|
69
|
+
h4, .h4{
|
70
|
+
color:#666666;
|
71
|
+
display:block;
|
72
|
+
font-family:Arial;
|
73
|
+
font-size:22px;
|
74
|
+
font-weight:bold;
|
75
|
+
line-height:100%;
|
76
|
+
margin-top:0;
|
77
|
+
margin-right:0;
|
78
|
+
margin-bottom:10px;
|
79
|
+
margin-left:0;
|
80
|
+
text-align:left;
|
81
|
+
}
|
82
|
+
|
83
|
+
h5, .h5{
|
84
|
+
color:#666666;
|
85
|
+
display:block;
|
86
|
+
font-family:Arial;
|
87
|
+
font-size:16px;
|
88
|
+
font-weight:bold;
|
89
|
+
line-height:100%;
|
90
|
+
margin-top:0;
|
91
|
+
margin-right:0;
|
92
|
+
margin-bottom:8px;
|
93
|
+
margin-left:0;
|
94
|
+
text-align:left;
|
95
|
+
}
|
96
|
+
|
97
|
+
#templatePreheader{
|
98
|
+
background-color:#FAFAFA;
|
99
|
+
}
|
100
|
+
|
101
|
+
.preheaderContent div{
|
102
|
+
color:#505050;
|
103
|
+
font-family:Arial;
|
104
|
+
font-size:10px;
|
105
|
+
line-height:100%;
|
106
|
+
text-align:left;
|
107
|
+
}
|
108
|
+
|
109
|
+
.preheaderContent div a:link, .preheaderContent div a:visited, /* Yahoo! Mail Override */ .preheaderContent div a .yshortcuts /* Yahoo! Mail Override */{
|
110
|
+
color:#336699;
|
111
|
+
font-weight:normal;
|
112
|
+
text-decoration:underline;
|
113
|
+
}
|
114
|
+
|
115
|
+
#templateHeader{
|
116
|
+
background-color:#FFFFFF;
|
117
|
+
border-bottom:0;
|
118
|
+
}
|
119
|
+
|
120
|
+
.headerContent{
|
121
|
+
color:#666666;
|
122
|
+
font-family:Arial;
|
123
|
+
font-size:34px;
|
124
|
+
font-weight:bold;
|
125
|
+
line-height:100%;
|
126
|
+
padding:0;
|
127
|
+
text-align:center;
|
128
|
+
vertical-align:middle;
|
129
|
+
}
|
130
|
+
|
131
|
+
.headerContent a:link, .headerContent a:visited, /* Yahoo! Mail Override */ .headerContent a .yshortcuts /* Yahoo! Mail Override */{
|
132
|
+
color:#336699;
|
133
|
+
font-weight:normal;
|
134
|
+
text-decoration:underline;
|
135
|
+
}
|
136
|
+
|
137
|
+
#headerImage{
|
138
|
+
height:auto;
|
139
|
+
max-width:600px;
|
140
|
+
}
|
141
|
+
|
142
|
+
#templateContainer, .bodyContent{
|
143
|
+
background-color:#FFFFFF;
|
144
|
+
}
|
145
|
+
|
146
|
+
.bodyContent div{
|
147
|
+
color:#505050;
|
148
|
+
font-family:Arial;
|
149
|
+
font-size:14px;
|
150
|
+
line-height:150%;
|
151
|
+
text-align:left;
|
152
|
+
}
|
153
|
+
|
154
|
+
.bodyContent div a:link, .bodyContent div a:visited, /* Yahoo! Mail Override */ .bodyContent div a .yshortcuts /* Yahoo! Mail Override */{
|
155
|
+
color:#336699;
|
156
|
+
font-weight:normal;
|
157
|
+
text-decoration:underline;
|
158
|
+
}
|
159
|
+
|
160
|
+
.bodyContent img{
|
161
|
+
display:inline;
|
162
|
+
height:auto;
|
163
|
+
}
|
164
|
+
|
165
|
+
#templateFooter{
|
166
|
+
background-color:#FFFFFF;
|
167
|
+
border-top:0;
|
168
|
+
}
|
169
|
+
|
170
|
+
.footerContent div{
|
171
|
+
color:#707070;
|
172
|
+
font-family:Arial;
|
173
|
+
font-size:12px;
|
174
|
+
line-height:125%;
|
175
|
+
text-align:left;
|
176
|
+
}
|
177
|
+
|
178
|
+
.footerContent div a:link, .footerContent div a:visited, /* Yahoo! Mail Override */ .footerContent div a .yshortcuts /* Yahoo! Mail Override */{
|
179
|
+
color:#336699;
|
180
|
+
font-weight:normal;
|
181
|
+
text-decoration:underline;
|
182
|
+
}
|
183
|
+
|
184
|
+
.footerContent img{
|
185
|
+
display:inline;
|
186
|
+
}
|
187
|
+
|
188
|
+
#social{
|
189
|
+
background-color:#FAFAFA;
|
190
|
+
border:0;
|
191
|
+
}
|
192
|
+
|
193
|
+
#social a {
|
194
|
+
font-weight: bold;
|
195
|
+
color:#E36C0A;
|
196
|
+
}
|
197
|
+
|
198
|
+
#social div{
|
199
|
+
text-align:center;
|
200
|
+
}
|
201
|
+
</style>
|
202
|
+
</head>
|
203
|
+
<body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
|
204
|
+
<center>
|
205
|
+
<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="backgroundTable" style="background-color:#FAFAFA;">
|
206
|
+
<tr>
|
207
|
+
<td align="center" valign="top">
|
208
|
+
<table border="0" cellpadding="10" cellspacing="0" width="600" id="templatePreheader">
|
209
|
+
<tr>
|
210
|
+
<td valign="top" class="preheaderContent" style="color:#505050; font-family:Arial; font-size:10px; line-height:100%; text-align:left;">
|
211
|
+
<table border="0" cellpadding="10" cellspacing="0" width="100%">
|
212
|
+
<tr>
|
213
|
+
<td valign="top">
|
214
|
+
<div >
|
215
|
+
A message from the AAF Support Team
|
216
|
+
</div>
|
217
|
+
</td>
|
218
|
+
<td valign="top" width="190">
|
219
|
+
<div >
|
220
|
+
Do you need help?<br /><a href="http://support.aaf.edu.au" target="_blank">Access the AAF Support service</a>.
|
221
|
+
</div>
|
222
|
+
</td>
|
223
|
+
</tr>
|
224
|
+
</table>
|
225
|
+
</td>
|
226
|
+
</tr>
|
227
|
+
</table>
|
228
|
+
|
229
|
+
<table border="0" cellpadding="0" cellspacing="0" width="600" id="templateContainer" style="border: 1px solid #DDDDDD">
|
230
|
+
<tr>
|
231
|
+
<td align="center" valign="top">
|
232
|
+
<table border="0" cellpadding="0" cellspacing="0" width="600" id="templateHeader">
|
233
|
+
<tr>
|
234
|
+
<td class="headerContent">
|
235
|
+
<img src="<%= image_url %>" alt="AAF Email Header" width="600"/>
|
236
|
+
</td>
|
237
|
+
</tr>
|
238
|
+
</table>
|
239
|
+
</td>
|
240
|
+
</tr>
|
241
|
+
<tr>
|
242
|
+
<td align="center" valign="top">
|
243
|
+
<table border="0" cellpadding="0" cellspacing="0" width="600" id="templateBody">
|
244
|
+
<tr>
|
245
|
+
<td valign="top" class="bodyContent" style="background-color:#FFFFFF;">
|
246
|
+
<table border="0" cellpadding="20" cellspacing="0" width="100%">
|
247
|
+
<tr >
|
248
|
+
<td valign="top">
|
249
|
+
<div >
|
250
|
+
<%= content %>
|
251
|
+
<br />
|
252
|
+
<br />
|
253
|
+
</div>
|
254
|
+
</td>
|
255
|
+
</tr>
|
256
|
+
</table>
|
257
|
+
</td>
|
258
|
+
</tr>
|
259
|
+
</table>
|
260
|
+
</td>
|
261
|
+
</tr>
|
262
|
+
<tr>
|
263
|
+
<td align="center" valign="top">
|
264
|
+
<table border="0" cellpadding="10" cellspacing="0" width="600" id="templateFooter">
|
265
|
+
<tr>
|
266
|
+
<td valign="top" class="footerContent">
|
267
|
+
<table border="0" cellpadding="10" cellspacing="0" width="100%">
|
268
|
+
<tr>
|
269
|
+
<td colspan="2" valign="middle" id="social" style="background-color:#FAFAFA; border:0;">
|
270
|
+
<div style="text-align:center;">
|
271
|
+
<a href="http://twitter.com/ausaccessfed" style="font-weight: bold; color:#E36C0A;">Follow on Twitter</a> | <a href="http://www.facebook.com/ausaccessfed" style="font-weight: bold; color:#E36C0A;">Friend on Facebook</a> | <a href="https://support.aaf.edu.au" style="font-weight: bold; color:#E36C0A;">Get AAF Support</a>
|
272
|
+
</div>
|
273
|
+
</td>
|
274
|
+
</tr>
|
275
|
+
</table>
|
276
|
+
</td>
|
277
|
+
</tr>
|
278
|
+
</table>
|
279
|
+
</td>
|
280
|
+
</tr>
|
281
|
+
</table>
|
282
|
+
<br>
|
283
|
+
</td>
|
284
|
+
</tr>
|
285
|
+
</table>
|
286
|
+
</center>
|
287
|
+
<br><br><br>
|
288
|
+
</body>
|
289
|
+
</html>
|