Skip to content

Commit fb8340c

Browse files
authored
Merge pull request #15 from codehead/feat/templates
Feat/templates
2 parents 1ffbc4d + 0f8c7bb commit fb8340c

File tree

13 files changed

+675
-38
lines changed

13 files changed

+675
-38
lines changed

.gitignore

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,50 @@ pgdata/*
2929

3030
##Configurations
3131
conf/*
32+
33+
### JetBrains template
34+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
35+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
36+
37+
# User-specific stuff:
38+
.idea/**/workspace.xml
39+
.idea/**/tasks.xml
40+
.idea/dictionaries
41+
42+
# Sensitive or high-churn files:
43+
.idea/**/dataSources/
44+
.idea/**/dataSources.ids
45+
.idea/**/dataSources.xml
46+
.idea/**/dataSources.local.xml
47+
.idea/**/sqlDataSources.xml
48+
.idea/**/dynamic.xml
49+
.idea/**/uiDesigner.xml
50+
51+
# Gradle:
52+
.idea/**/gradle.xml
53+
.idea/**/libraries
54+
55+
# Mongo Explorer plugin:
56+
.idea/**/mongoSettings.xml
57+
58+
## File-based project format:
59+
*.iws
60+
61+
## Plugin-specific files:
62+
63+
# IntelliJ
64+
/out/
65+
66+
# mpeltonen/sbt-idea plugin
67+
.idea_modules/
68+
69+
# JIRA plugin
70+
atlassian-ide-plugin.xml
71+
72+
# Crashlytics plugin (for Android Studio and IntelliJ)
73+
com_crashlytics_export_strings.xml
74+
crashlytics.properties
75+
crashlytics-build.properties
76+
fabric.properties
77+
78+
pgdata/

cpanfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ requires 'Mojolicious::Plugin::OAuth2';
33
requires 'IO::Socket::SSL';
44
requires 'DBD::Pg';
55
requires 'Mojo::Pg';
6+
requires 'Gravatar::URL';

public/css/main.css

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
@import url('https://fonts.googleapis.com/css?family=Raleway:700,800,900|Rock+Salt|Montserrat:700');
2+
3+
body, html {
4+
width: 100%;
5+
height: 100%;
6+
}
7+
8+
body {
9+
margin-top: 50px;
10+
}
11+
12+
.wow {
13+
visibility: hidden;
14+
}
15+
16+
h1, h2, h3, h4, h5 {
17+
font-family: Montserrat, sans-serif;
18+
font-weight: 900;
19+
}
20+
21+
h1 {
22+
text-align: center;
23+
}
24+
25+
#home h1 {
26+
text-transform: none;
27+
-webkit-font-smoothing: antialias;
28+
font-family: 'Rock Salt', cursive;
29+
font-size: 4em;
30+
color: #fff;
31+
text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
32+
text-align: center;
33+
padding-top: 1em;
34+
}
35+
36+
#home h2 {
37+
font-size: 2.2em;
38+
color: #fff;
39+
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
40+
text-align: center;
41+
padding: 1em 0;
42+
}
43+
44+
#home h3 {
45+
font-size: 1.7em;
46+
color: #fff;
47+
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
48+
text-align: center;
49+
padding: 1em 0;
50+
}
51+
52+
section {
53+
padding: 80px 0;
54+
min-height: 95%;
55+
}
56+
57+
#home {
58+
min-height: 100%;
59+
background: url(/img/home.jpeg) no-repeat center center fixed;
60+
background-size: cover;
61+
}
62+
63+
#home .title {
64+
height: 60%;
65+
}
66+
67+
#home .buttons {
68+
height: 50%;
69+
}
70+
71+
#home .more {
72+
height: 10%;
73+
}
74+
75+
#about,
76+
#sponsors {
77+
background-color: #dd6666;
78+
color: #dddd00;
79+
}
80+
81+
#schedule {
82+
background: url(/img/schedule.jpeg) no-repeat center center fixed;
83+
background-size: cover;
84+
}
85+
86+
#sponsors h1,
87+
#schedule h1,
88+
#venue h1 {
89+
color: #fff;
90+
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
91+
margin-bottom: 48px;
92+
}
93+
94+
#schedule .day-schedule {
95+
margin: 1em auto;
96+
background-color: rgba(1, 1, 1, 0.5);
97+
color: #fff;
98+
margin-top: 48px;
99+
}
100+
101+
.day-schedule .title {
102+
font-size: 1.1em;
103+
padding: 0.5em 0;
104+
background-color: rgba(1, 1, 1, 0.2);
105+
text-align: center;
106+
}
107+
108+
.day-schedule ul {
109+
font-family: Consolas, "Liberation Mono", Courier, monospace;
110+
padding: 16px;
111+
list-style: none;
112+
}
113+
114+
.day-schedule a {
115+
color: #ddd;
116+
text-decoration: underline;
117+
}
118+
119+
#speakers {
120+
background-color: #ddd;
121+
}
122+
123+
#register {
124+
background: url(/img/register.jpeg) no-repeat center center fixed;
125+
background-size: cover;
126+
min-height: 50%;
127+
}
128+
129+
#sponsors {
130+
min-height: 50%;
131+
}
132+
133+
#sponsors .sponsor {
134+
text-align: center;
135+
color: #ddd;
136+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
137+
font-size: 3em;
138+
font-weight: 800;
139+
background-color: rgba(0, 0, 0, 0.1);
140+
padding: 48px 12px;
141+
margin: 12px 0;
142+
}
143+
144+
#contact {
145+
background-color: #ffffff;
146+
min-height: 80%;
147+
}
148+
149+
footer {
150+
background-color: #000;
151+
color: #fff;
152+
min-height: 240px;
153+
}
154+
155+
#contact .row {
156+
margin-top: 48px;
157+
}
158+
159+
#contact .icon {
160+
font-size: 4em;
161+
color: #fff;
162+
text-shadow: -1px -1px 2px #444, 1px 1px 2px #fff;
163+
background-color: #007ba4;
164+
width: 1.6em;
165+
height: 1.6em;
166+
margin: 0 auto;
167+
padding-top: 0.1em;
168+
border-radius: 0.8em;
169+
}
170+
171+
div.contact-details > div {
172+
text-align: center;
173+
margin-bottom: 32px;
174+
}
175+
176+
div.contact-details h2 {
177+
border-bottom: 2px solid #000;
178+
}
179+
180+
.powered-by-eb {
181+
color: #dddddd;
182+
text-decoration: none;
183+
}
184+
185+
.speaker-info {
186+
padding-top: 50px;
187+
text-align: center;
188+
}
189+
190+
.speaker-info .name {
191+
font-size: 1.5em;
192+
font-weight: bold;
193+
margin: 0.5em 0;
194+
}
195+
196+
.speaker-modal .modal-header {
197+
text-align: center;
198+
}
199+
200+
.speaker-social {
201+
padding-top: 12px;
202+
}
203+
204+
.mugshot {
205+
width: 140px;
206+
padding: 10px;
207+
transition: 0.5s;
208+
}
209+
210+
.speaker-info:hover .mugshot {
211+
padding: 0;
212+
}
213+
214+
#venue {
215+
background-color: #d9534f;
216+
}
217+
218+
#venue #map {
219+
width: 100%;
220+
height: 360px;
221+
}

public/data/speaker.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{ "success": true,
2+
"data": [
3+
{"id":0,"name":"Larry Wall","photo":"/img/speaker/lwall.png","bio":"Lorem ipsum dolor sit amet 0"},
4+
{"id":1,"name":"Larry Wall","photo":"/img/speaker/lwall.png","bio":"Lorem ipsum dolor sit amet 1"},
5+
{"id":2,"name":"Larry Wall","photo":"/img/speaker/lwall.png","bio":"Lorem ipsum dolor sit amet 2"},
6+
{"id":3,"name":"Larry Wall","photo":"/img/speaker/lwall.png","bio":"Lorem ipsum dolor sit amet 3"},
7+
{"id":4,"name":"Larry Wall","photo":"/img/speaker/lwall.png","bio":"Lorem ipsum dolor sit amet 4"}
8+
]
9+
}

public/img/home.jpeg

295 KB
Loading

public/img/register.jpeg

549 KB
Loading

public/img/schedule.jpeg

117 KB
Loading

public/img/speaker/lwall.png

427 KB
Loading

public/js/main.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
$(document).ready(function() {
2+
// https://gist.github.com/flesler/3f3e1166690108abf747
3+
$('a[href^="#"],a[href^="/#"]').click(function(e) {
4+
var url = new URL(document.URL);
5+
if(url.pathname==this.pathname) {
6+
e.preventDefault();
7+
console.log(this, this.hash);
8+
$(window).stop(true).scrollTo(this.hash, {duration: 1000, interrupt: true});
9+
}
10+
});
11+
// initialize WOW animations
12+
new WOW().init();
13+
// process sections
14+
var sections = ['speaker'];
15+
$(sections).each(function(i){
16+
var section = this;
17+
var html = $("#"+section+"-template").html();
18+
var template = Handlebars.compile(html);
19+
$.getJSON("/data/"+section+".json").done(
20+
function(response){
21+
// check for success flag
22+
if(response && response.success) {
23+
var str = "";
24+
// process data entries
25+
$(response.data).each(function(i){
26+
// perform calculations, normalizations, etc.
27+
this._n = i;
28+
this._delay = 500*i;
29+
// process template
30+
str = str + template(this);
31+
});
32+
// output to #section-list
33+
$('#'+section+'-list').append(str);
34+
}
35+
}
36+
).fail(function( jqxhr, textStatus, error ) {
37+
var err = textStatus + ", " + error;
38+
console.log( "Request Failed for "+section+": " + err );
39+
});
40+
});
41+
});

templates/comp/signin.html.ep

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown">
2+
<i class="fa fa-fw fa-sign-in"></i> Sign in <b class="caret"></b></a>
3+
<ul class="dropdown-menu dropdown-menu-right" style="padding: 15px;min-width: 250px;">
4+
<li>
5+
<div class="row">
6+
<div class="col-md-12">
7+
<%= form_for signin_with_act => (class => "form form-signin", id => 'login-nav', role => 'form') => begin %>
8+
<fieldset class="form-group">
9+
<legend>Sign in with ACT</legend>
10+
<div class="form-group">
11+
<label class="sr-only" for="inputUsername">Email address</label>
12+
<input type="text" name="username" id="inputUsername" class="form-control" placeholder="Your username" required="" autofocus="">
13+
</div>
14+
<div class="form-group">
15+
<label class="sr-only" for="inputPassword">Password</label>
16+
<input type="password" name="password" id="inputPassword" class="form-control" placeholder="Password" required="">
17+
</div>
18+
<div class="checkbox">
19+
<label>
20+
<input type="checkbox"> Remember me
21+
</label>
22+
</div>
23+
<div class="form-group">
24+
<button type="submit" class="btn btn-success btn-block">Sign in</button>
25+
</div>
26+
</fieldset>
27+
<% end %>
28+
</div>
29+
</div>
30+
</li>
31+
% if (oauth_providers) {
32+
<li class="divider"></li>
33+
<li>
34+
% for my $provider ( oauth_providers->@* ) {
35+
<%= link_to url_for( oauth_with => { provider => $provider } ),
36+
class => 'col-3 btn btn-primary btn-lg' => begin %><i class="fa fa-<%=$provider%>"></i>
37+
Sign in with <%=$provider%><% end %>
38+
% }
39+
% }
40+
</li>
41+
</ul>
42+
</li>

0 commit comments

Comments
 (0)