tmin 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +1 -1
- data/config.ru +1 -1
- data/lib/tmin/server.rb +2 -2
- data/lib/tmin/version.rb +1 -1
- data/public/bootstrap.css +20 -7
- data/views/admin.haml +2 -2
- data/views/layout.haml +6 -2
- data/views/redirect.haml +8 -8
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/config.ru
CHANGED
data/lib/tmin/server.rb
CHANGED
|
@@ -175,9 +175,9 @@ module Firefly
|
|
|
175
175
|
@urls = Firefly::Url.all(:limit => config[:recent_urls], :order => [ sort_column.to_sym.send(sort_order.to_sym) ] )
|
|
176
176
|
|
|
177
177
|
|
|
178
|
-
haml :admin
|
|
178
|
+
haml :admin, :layout => :admin_layout
|
|
179
179
|
else
|
|
180
|
-
haml :index
|
|
180
|
+
haml :index, :layout => :admin_layout
|
|
181
181
|
end
|
|
182
182
|
end
|
|
183
183
|
|
data/lib/tmin/version.rb
CHANGED
data/public/bootstrap.css
CHANGED
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
.well {
|
|
11
11
|
margin-top: 20px;
|
|
12
|
-
background-color: rgba(
|
|
13
|
-
}
|
|
12
|
+
background-color: rgba(0, 0, 0, 0.3);}
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
.spacer {
|
|
@@ -20,18 +19,32 @@
|
|
|
20
19
|
|
|
21
20
|
#bg {
|
|
22
21
|
position: fixed;
|
|
22
|
+
top: -50%;
|
|
23
|
+
left: -50%;
|
|
24
|
+
width: 200%;
|
|
25
|
+
height: 200%;
|
|
26
|
+
}
|
|
27
|
+
#bg img {
|
|
28
|
+
position: absolute;
|
|
23
29
|
top: 0;
|
|
24
30
|
left: 0;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
min-
|
|
31
|
+
right: 0;
|
|
32
|
+
bottom: 0;
|
|
33
|
+
margin: auto;
|
|
34
|
+
min-width: 50%;
|
|
35
|
+
min-height: 50%;
|
|
29
36
|
}
|
|
30
37
|
|
|
31
38
|
h1{
|
|
32
|
-
font-size:
|
|
39
|
+
font-size: 123px;
|
|
40
|
+
color: white;
|
|
33
41
|
}
|
|
34
42
|
|
|
35
43
|
h2 {
|
|
36
44
|
font-size: 68px;
|
|
45
|
+
color: white;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.white {
|
|
49
|
+
color: #FFF;
|
|
37
50
|
}
|
data/views/admin.haml
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
%p
|
|
8
8
|
%a{ :href => "javascript:var%20d=document,w=window,enc=encodeURIComponent,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),s2=((s.toString()=='')?s:('%22'+enc(s)+'%22')),key=enc('#{@config[:api_key]}'),f='http://#{@config[:hostname]}/api/add',l=d.location,p='?visual=1&api_key='+key+'&url='+enc(l.href),u=f+p;try{if(!/^(.*\.)?tumblrzzz[^.]*$/.test(l.host))throw(0);tstbklt();}catch(z){a%20=function(){if(!w.open(u))l.href=u;};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();}void(0)" } Shorten with #{@config[:hostname]}
|
|
9
9
|
%br
|
|
10
|
-
%
|
|
10
|
+
%h3
|
|
11
11
|
Total Events Created:
|
|
12
12
|
= Firefly::Url.count
|
|
13
13
|
|
|
14
|
-
%
|
|
14
|
+
%h3 How about shortening a URL?
|
|
15
15
|
|
|
16
16
|
.the_form
|
|
17
17
|
%form{ :action => '/api/add', :method => 'post' }
|
data/views/layout.haml
CHANGED
|
@@ -23,14 +23,18 @@
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
-unless @time[5].length < 10 == false
|
|
26
|
-
<
|
|
26
|
+
<div id="bg">
|
|
27
|
+
<img src="/images/#{@time[5]}-568h@2x.jpg" alt="">
|
|
28
|
+
</div>
|
|
27
29
|
.container
|
|
28
30
|
.row
|
|
29
31
|
.col-sm-12
|
|
30
32
|
.well.spacer
|
|
31
33
|
= yield
|
|
32
34
|
-unless @time[5].length > 10 == false
|
|
33
|
-
<
|
|
35
|
+
<div id="bg">
|
|
36
|
+
<img src="http://s3.amazonaws.com/medows/images/#{@time[5]}" alt="">
|
|
37
|
+
</div>
|
|
34
38
|
.container
|
|
35
39
|
.row
|
|
36
40
|
.col-sm-12
|
data/views/redirect.haml
CHANGED
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
%h2.text-center
|
|
14
14
|
= URI.unescape(@time[8])
|
|
15
15
|
%hr
|
|
16
|
-
%h3.lead
|
|
17
|
-
%strong
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
%h3.lead.white
|
|
17
|
+
%strong Countdown Details:
|
|
18
|
+
Date: #{@time[4].gsub!('~',' ')}
|
|
19
|
+
Alert: Yes
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
var minutes = Math.floor((distance % _hour) / _minute);
|
|
50
50
|
var seconds = Math.floor((distance % _minute) / _second);
|
|
51
51
|
|
|
52
|
-
document.getElementById('countdown').innerHTML = days + '
|
|
53
|
-
document.getElementById('countdown').innerHTML += hours + '
|
|
54
|
-
document.getElementById('countdown').innerHTML += minutes + '
|
|
55
|
-
document.getElementById('countdown').innerHTML += seconds + '
|
|
52
|
+
document.getElementById('countdown').innerHTML = days + ' Days <br> ';
|
|
53
|
+
document.getElementById('countdown').innerHTML += hours + ' Hours <br>';
|
|
54
|
+
document.getElementById('countdown').innerHTML += minutes + ' Minutes <br>';
|
|
55
|
+
document.getElementById('countdown').innerHTML += seconds + ' Seconds';
|
|
56
56
|
|
|
57
57
|
}
|
|
58
58
|
|
metadata
CHANGED