sinatra-hexacta 0.9.8 → 1.0.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b09731f11bb84a5c0cdf375704854f8221af4551f0b19a2215c2c6501695f1f
4
- data.tar.gz: f303c526ff69d7e2c1d077842807c5c2efe6961262d23d821d34cb020c30024f
3
+ metadata.gz: 235207ce86479d51ab5c1852a286ab92d5b4de8fbd159d584bc79234bcafd5dc
4
+ data.tar.gz: 933097a5eca58c05479cb29e93543c9e9ca292eb45c61b940be4ab9c4cf80f9c
5
5
  SHA512:
6
- metadata.gz: 9ab7ed10ae230ba1ea869c047ff81f49eae1f3b5cc51916848cf40ee97ac3a34d38fe6ee33f90b5f1130a933842022f446bfa835d01be7adf3b8a6a0d872716a
7
- data.tar.gz: 4625603c05c8ec901ff9fd8e183cbf9691a2b6f501902c2cefdbd1ec346000593e26c398aeee49cea683fd866072f23f5c569c3d70dcf0d9d6101696ec088352
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
- result += years > 1 ? "#{years} años" : "#{years} año" unless years == 0
26
- result += ", " if years >= 1 && !(months.modulo(12).eql?(0))
27
- result += months.modulo(12) > 1 ? "#{months.modulo(12)} meses" : "#{months.modulo(12)} mes" unless months.modulo(12) == 0
28
- result += "#{(date - @periods.last.start_date).to_i} dias" if months.modulo(12) == 0 && years == 0 && date > @periods.last.start_date
29
- result += "Hoy!" if months.modulo(12) == 0 && date == @periods.last.start_date
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 'notification'
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 'mailbuilder'
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
- .footer-text
2
- a.text.btn.bgm-white.c-gray onclick='toggle_menu()' Menu
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
- -for item in menu
6
- -idx = menu.index(item) + 1
7
- -if item[:type] == 'link'
8
- 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]}
9
- -if item[:type] == 'modal'
10
- 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]}
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
- a.btn.btn-float.bgm-blue.m-btn.waves-effect.waves-circle.waves-float onclick='toggle_menu()'
14
- i.zmdi.zmdi-menu
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
- -for item in menu
18
- -idx = menu.index(item) + 1
19
- -if item[:type] == 'link'
20
- 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"
21
- i.zmdi class="zmdi-#{item[:icon]}"
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
- -if item[:type] == 'modal'
24
- 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"
25
- i.zmdi class="zmdi-#{item[:icon]}"
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.9.8
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