sinatra-hexacta 0.9.8 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sinatra/extensions/antiquity.rb +13 -11
- data/lib/sinatra/extensions/init.rb +5 -4
- data/lib/sinatra/public/css/app.min.1.css +24 -0
- data/lib/sinatra/public/js/app.js +8 -0
- data/lib/sinatra/views/menu/menu.slim +22 -21
- metadata +1 -2
- data/lib/sinatra/public/vendors/material-design-iconic-font/fonts/Material-Design-Iconic-Font.eot +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 235207ce86479d51ab5c1852a286ab92d5b4de8fbd159d584bc79234bcafd5dc
|
4
|
+
data.tar.gz: 933097a5eca58c05479cb29e93543c9e9ca292eb45c61b940be4ab9c4cf80f9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c57ec64f35c7f71a043278ffc15e8e131f53cc8a29dfcb353475baa4763a27b09e323eacb16c0f652b209eb44d22383f8e91096403e42e35cfd73f08c5ec10ef
|
7
|
+
data.tar.gz: 2bfb5b976a50e30124bce1b534953b68e4c95f7398b4d34dace6afee55204b32adaec6bf67ac892f2cd33554a048a4f98be171a0ad17ac72581ef19aa32b8e5e
|
@@ -5,16 +5,16 @@ class Antiquity
|
|
5
5
|
@periods = periods.sort { |a,b| a.start_date <=> b.start_date }
|
6
6
|
end
|
7
7
|
|
8
|
-
def days
|
9
|
-
@periods.inject(0) { |total, period| total + period.days }
|
8
|
+
def days(upto_date=Date.today)
|
9
|
+
@periods.inject(0) { |total, period| total + period.days(upto_date) }
|
10
10
|
end
|
11
11
|
|
12
|
-
def months
|
13
|
-
@periods.inject(0) { |total, period| total + period.months }
|
12
|
+
def months(upto_date=Date.today)
|
13
|
+
@periods.inject(0) { |total, period| total + period.months(upto_date) }
|
14
14
|
end
|
15
15
|
|
16
|
-
def years
|
17
|
-
months.divmod(12).first
|
16
|
+
def years(upto_date=Date.today)
|
17
|
+
months(upto_date).divmod(12).first
|
18
18
|
end
|
19
19
|
|
20
20
|
def to_s(upto_date=Date.today)
|
@@ -22,11 +22,13 @@ class Antiquity
|
|
22
22
|
result = ""
|
23
23
|
return result if @periods.empty?
|
24
24
|
if date >= @periods.first.start_date
|
25
|
-
|
26
|
-
|
27
|
-
result +=
|
28
|
-
result += "
|
29
|
-
result += "
|
25
|
+
years_upto_date = years(date)
|
26
|
+
months_upto_date = months(date)
|
27
|
+
result += years_upto_date > 1 ? "#{years_upto_date} años" : "#{years_upto_date} año" unless years_upto_date == 0
|
28
|
+
result += ", " if years_upto_date >= 1 && !(months_upto_date.modulo(12).eql?(0))
|
29
|
+
result += months_upto_date.modulo(12) > 1 ? "#{months_upto_date.modulo(12)} meses" : "#{months_upto_date.modulo(12)} mes" unless months_upto_date.modulo(12) == 0
|
30
|
+
result += "#{(date - @periods.last.start_date).to_i} dias" if months_upto_date.modulo(12) == 0 && years_upto_date == 0 && date > @periods.last.start_date
|
31
|
+
result += "Hoy!" if months_upto_date.modulo(12) == 0 && date == @periods.last.start_date
|
30
32
|
end
|
31
33
|
result += "En unos días..." if date < @periods.first.start_date
|
32
34
|
result
|
@@ -1,10 +1,11 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
require_relative 'date'
|
3
2
|
require_relative 'antiquity'
|
4
|
-
require_relative '
|
3
|
+
require_relative 'date'
|
4
|
+
require_relative 'mailbuilder'
|
5
5
|
require_relative 'mailsender'
|
6
6
|
require_relative 'mail'
|
7
7
|
require_relative 'generalmail'
|
8
|
-
require_relative '
|
9
|
-
require_relative 'processmanager'
|
8
|
+
require_relative 'generalmailnolink'
|
10
9
|
require_relative 'menu'
|
10
|
+
require_relative 'notification'
|
11
|
+
require_relative 'processmanager'
|
@@ -15859,6 +15859,30 @@ body.login-content:before {
|
|
15859
15859
|
width: 100%;
|
15860
15860
|
}
|
15861
15861
|
|
15862
|
+
#profile-main .pm-overview {
|
15863
|
+
transition: width 300ms ease-in-out;
|
15864
|
+
}
|
15865
|
+
|
15866
|
+
#profile-main .pm-overview .pmo-block, #profile-main .pm-overview .pmop-message {
|
15867
|
+
transition: opacity 300ms ease-in-out;
|
15868
|
+
}
|
15869
|
+
|
15870
|
+
#profile-main .pm-body {
|
15871
|
+
transition: padding 300ms ease-in-out;
|
15872
|
+
}
|
15873
|
+
|
15874
|
+
#profile-main .pm-overview.detail_view {
|
15875
|
+
width:112px !Important;
|
15876
|
+
}
|
15877
|
+
|
15878
|
+
#profile-main .pm-overview.detail_view .pmo-block, #profile-main .pm-overview.detail_view .pmop-message{
|
15879
|
+
opacity: 0;
|
15880
|
+
}
|
15881
|
+
|
15882
|
+
#profile-main .pm-body.detail_view {
|
15883
|
+
padding-left: 112px !Important;
|
15884
|
+
}
|
15885
|
+
|
15862
15886
|
@media (max-width: 767px) {
|
15863
15887
|
.c-timeline {
|
15864
15888
|
background: #edecec;
|
@@ -45,6 +45,14 @@ $(document).ready(function(){
|
|
45
45
|
}
|
46
46
|
});
|
47
47
|
|
48
|
+
// Expand and reduce profile view
|
49
|
+
$(".detail_view").on('click',function() {
|
50
|
+
$('.toggled_view').addClass('detail_view');
|
51
|
+
})
|
52
|
+
$(".regular_view").on('click',function() {
|
53
|
+
$('.toggled_view').removeClass('detail_view');
|
54
|
+
})
|
55
|
+
|
48
56
|
/* --------------------------------------------------------
|
49
57
|
Scrollbar
|
50
58
|
-----------------------------------------------------------*/
|
@@ -1,28 +1,29 @@
|
|
1
|
-
.
|
2
|
-
|
1
|
+
-unless menu.empty?
|
2
|
+
.footer-text
|
3
|
+
a.text.btn.bgm-white.c-gray onclick='toggle_menu()' Menu
|
3
4
|
|
4
|
-
.actions-menu.hidden
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
.actions-menu.hidden
|
6
|
+
-for item in menu
|
7
|
+
-idx = menu.index(item) + 1
|
8
|
+
-if item[:type] == 'link'
|
9
|
+
a.text.btn.bgm-white.c-gray type="button" href="#{item[:link]}" target="#{item[:target]}" style="bottom:#{50+idx*45}px;animation-duration: #{(idx.to_f/10.0).round(2)}s" #{item[:text]}
|
10
|
+
-if item[:type] == 'modal'
|
11
|
+
a.text.btn.bgm-white.c-gray type="button" data-toggle="modal" data-target="#{item[:link]}" style="bottom:#{50+idx*45}px;animation-duration: #{(idx.to_f/10.0).round(2)}s" #{item[:text]}
|
11
12
|
|
12
|
-
.footer-btn
|
13
|
-
|
14
|
-
|
13
|
+
.footer-btn
|
14
|
+
a.btn.btn-float.bgm-blue.m-btn.waves-effect.waves-circle.waves-float onclick='toggle_menu()'
|
15
|
+
i.zmdi.zmdi-menu
|
15
16
|
|
16
|
-
.actions-menu.hidden
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
.actions-menu.hidden
|
18
|
+
-for item in menu
|
19
|
+
-idx = menu.index(item) + 1
|
20
|
+
-if item[:type] == 'link'
|
21
|
+
a.btn.btn-float.bgm-blue.m-btn.waves-effect.waves-circle.waves-float type="button" href="#{item[:link]}" target="#{item[:target]}" style="bottom:#{50+idx*45}px;animation-duration: #{(idx.to_f/10.0).round(2)}s"
|
22
|
+
i.zmdi class="zmdi-#{item[:icon]}"
|
22
23
|
|
23
|
-
|
24
|
-
|
25
|
-
|
24
|
+
-if item[:type] == 'modal'
|
25
|
+
a.btn.btn-float.bgm-blue.m-btn.waves-effect.waves-circle.waves-float type="button" data-toggle="modal" data-target="#{item[:link]}" style="bottom:#{50+idx*45}px;animation-duration: #{(idx.to_f/10.0).round(2)}s"
|
26
|
+
i.zmdi class="zmdi-#{item[:icon]}"
|
26
27
|
|
27
28
|
|
28
29
|
css:
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-hexacta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marco Zanger
|
@@ -163,7 +163,6 @@ files:
|
|
163
163
|
- lib/sinatra/public/vendors/malihu-custom-scrollbar-plugin/mCSB_buttons.png
|
164
164
|
- lib/sinatra/public/vendors/material-design-iconic-font/css/material-design-iconic-font.css
|
165
165
|
- lib/sinatra/public/vendors/material-design-iconic-font/css/material-design-iconic-font.min.css
|
166
|
-
- lib/sinatra/public/vendors/material-design-iconic-font/fonts/Material-Design-Iconic-Font.eot
|
167
166
|
- lib/sinatra/public/vendors/material-design-iconic-font/fonts/Material-Design-Iconic-Font.svg
|
168
167
|
- lib/sinatra/public/vendors/material-design-iconic-font/fonts/Material-Design-Iconic-Font.ttf
|
169
168
|
- lib/sinatra/public/vendors/material-design-iconic-font/fonts/Material-Design-Iconic-Font.woff
|