meurio_ui 1.4.4 → 1.4.6

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
  SHA1:
3
- metadata.gz: 29ef5c0c4bad17e36faf4a016faac03b3f39a3ad
4
- data.tar.gz: c05bcb8aaeaec47d451edfde07746e15b5bc9c02
3
+ metadata.gz: f6810e1e25c09eadf4cfec26068258c8758c6186
4
+ data.tar.gz: 060c38616c2a722d33b1f44543a1bfcbfc97b387
5
5
  SHA512:
6
- metadata.gz: 41b141277c784f415062c15eb01398f08f173960bffe0a690fccd8131328b26e3c5243e823be195cc08ed8b22f3a872e9db2ca1e200db23f3d542da86d3e47af
7
- data.tar.gz: 4c3ab60ed8873d13b7857414de186870c86afd94b0e2a2eaa219f5027eb8cab12236cd11d08047be8cd08e26b9798273d4694e33304999d73df72f9a5c61fcc5
6
+ metadata.gz: 8065a8beac994cec825f0c07434230dcc31a4ef87d167ea3565d033e578c2156f6d0963be5f3a156df0dda7e15d874181146fa7738765238d65ad6a972a00449
7
+ data.tar.gz: aa61378c25f1de6d691ef186a9ee50920df01d1e28236f76210b5341d2ed48aa6d9adf25e3891b0e778de4d569d65f4e2f2ef3396c4d4d74410c418d0c3d8f2f
Binary file
Binary file
@@ -1,5 +1,12 @@
1
1
  $(function(){
2
+ $(document).foundation();
2
3
  $('.meurio_header .meurio_apps').hover(function(e){ $('.other_apps').toggle(); e.stopPropagation(); return false; });
3
4
  $('.meurio_header .icon-triangle-down').click(function(e){ $('.current_user_links').toggle(); e.stopPropagation(); return false; });
4
- $(document).click(function(){ $('.current_user_links').hide(); });
5
+ $(document).click(function(){ $('.current_user_links').hide(); });
6
+
7
+ // My Cities warning
8
+ if(localStorage.getItem("myCitiesWarning") == undefined){
9
+ $("a.icon-warning").trigger("click");
10
+ localStorage.setItem("myCitiesWarning", true);
11
+ }
5
12
  });
@@ -1,3 +1,7 @@
1
- $orange: #ffa94b
2
- $green: #219548
3
- $dark-green: #007D3D
1
+ $orange: #ffa94b
2
+ $dark-orange: #EF7334
3
+ $green: #219548
4
+ $dark-green: #007D3D
5
+ $blue: #566772
6
+ $light-blue: #73D0F5
7
+ $dark-blue: darken($blue, 10%)
@@ -1,54 +1,51 @@
1
1
  .meurio_header
2
- font-size: 14px
3
- .row
4
- overflow: visible
5
- .meurio_logo_and_user_menu
6
- background: $green
7
- line-height: 35px
8
- padding: 7px 0
9
- .meurio_logo
10
- img
11
- float: left
12
- .user_menu
13
- text-align: right
14
- color: white
15
- position: relative
16
- font-weight: bold
17
- float: right
18
- .current_user
19
- line-height: 35px
2
+ .contain-to-grid, .top-bar
3
+ // TODO: implement Foundation in the gem so we can set
4
+ // $topbar-bg then this and many other lines of css become useless
5
+ background: $blue
6
+ .top-bar
7
+ img
8
+ height: 28px
9
+ display: inherit
10
+ ul.title-area, section.top-bar-section ul.left
11
+ padding: 7px 0
12
+ ul.title-area
13
+ li.name
14
+ height: auto
15
+ border-right: $light-blue 1px solid
16
+ padding-right: 1em
20
17
  a
21
- color: white
18
+ padding-left: 0
19
+ section.top-bar-section
20
+ padding: 0 !important
21
+ ul.left a
22
+ background: none
23
+ ul.left
24
+ background: none
25
+ li:first-child
26
+ padding-left: 1em
27
+ .divider
28
+ border: 0
29
+ background: image-url("mrui_divider.jpg") no-repeat center center
30
+ width: 5px
31
+ height: 28px
32
+ ul.right
33
+ background: none
34
+ li a
35
+ background: none
36
+ &:hover
37
+ background: $dark-blue
38
+ li.has-dropdown
39
+ &:hover
40
+ background: $dark-blue
22
41
  img
23
- width: 30px
24
- +border-radius(30px)
25
- vertical-align: middle
26
- margin-right: .5em
27
- display: inline-block
28
- .icon-triangle-down
29
- font-size: .8em
30
- top: 3px
31
- position: relative
32
- margin-left: 1em
33
- cursor: pointer
34
- .current_user_links
35
- background: $dark-green
36
- position: absolute
37
- text-align: left
38
- padding: .5em
39
- z-index: 1000
40
- width: auto
41
- right: 0
42
- top: 42px
43
- display: none
44
- a, span
45
- display: block
46
- padding: 0 1em
47
- color: white
48
- span
49
- color: rgba(255, 255, 255, .5)
50
- font-weight: normal
51
- padding: 0
42
+ display: inline
43
+ margin-right: .25em
44
+ +border-radius(100%)
45
+ ul.dropdown
46
+ background: $dark-blue
47
+ li a:hover
48
+ background: $blue
52
49
 
53
50
  .meurio_apps_and_application_menu
54
51
  line-height: 59px
@@ -103,6 +100,33 @@
103
100
  &:hover
104
101
  opacity: 0.8
105
102
 
103
+ // TODO: implement Foundation in the gem so we can set
104
+ // dropdown variables instead of overwrite CSS attributes
105
+ .alert
106
+ min-height: 10px
107
+ a.icon-warning
108
+ color: $dark-orange
109
+ display: inline-block
110
+ line-height: 30px
111
+ &:before
112
+ position: relative
113
+ top: 1px
114
+ left: 8px
115
+ .f-dropdown.content.open
116
+ background: $dark-orange
117
+ border: none
118
+ padding: .75em
119
+ color: white
120
+ font-size: .8em
121
+ line-height: normal
122
+ max-width: 250px
123
+ width: 250px
124
+ +border-radius(2px)
125
+ a
126
+ color: yellow
127
+ &:before
128
+ border-bottom-color: $dark-orange
129
+
106
130
  .application_menu
107
131
  text-align: right
108
132
  a
@@ -131,7 +155,7 @@ a.hollow_btn
131
155
  font-size: 14px
132
156
  +border-radius(3px)
133
157
  &:hover
134
- color: $green
158
+ color: $blue
135
159
  background: white
136
160
 
137
161
  .clear
@@ -1,42 +1,47 @@
1
1
  .meurio_header
2
- .meurio_logo_and_user_menu
3
- .row
4
- .meurio_logo= link_to image_tag('mrui_meurio.png'), "http://www.#{ENV['MEURIO_DOMAIN']}"
5
- - if @app == :pdp || @app == :mr20 || @app == :accounts || @app == :multitude
6
- .user_menu
7
- - if current_user.present?
8
- .current_user
9
- = link_to "http://www.#{ENV['MEURIO_DOMAIN']}/users/#{current_user.id}" do
10
- = image_tag(current_user.avatar_url)
11
- = current_user.name
12
- = content_tag(:span, nil, class: 'icon-triangle-down')
13
- .current_user_links
14
- span Minha Conta
15
- = link_to "Ver meu perfil", "http://www.#{ENV['MEURIO_DOMAIN']}/users/#{current_user.id}"
16
- = link_to "Editar meu perfil", "http://accounts.#{ENV["MEURIO_DOMAIN"]}/users/#{current_user.id}/edit"
17
- = link_to "Sair", "http://accounts.#{ENV["MEURIO_DOMAIN"]}/logout?redirect_url=#{request.url}"
18
- - if content_for? :current_user_links
19
- span= application_name(@app)
20
- = yield :current_user_links
21
- - else
22
- = link_to 'Entrar', "http://accounts.#{ENV["MEURIO_DOMAIN"]}/?redirect_url=#{request.url}", class: :hollow_btn
23
- .clear
2
+ .contain-to-grid
3
+ nav.top-bar data={topbar: true}
4
+ ul.title-area
5
+ li.name
6
+ h1= link_to image_tag('mrui_minhascidades.png'), "http://www.#{ENV['MEURIO_DOMAIN']}"
7
+ section.top-bar-section
8
+ ul.left
9
+ li= link_to image_tag('mrui_meurio.png'), "http://www.minhascidades.org.br/organizations/1", target: :blank
10
+ li.divider
11
+ li= link_to image_tag('mrui_minhasampa.png'), "http://www.minhascidades.org.br/organizations/2", target: :blank
12
+ - if @app == :pdp || @app == :minhascidades || @app == :accounts || @app == :multitude
13
+ ul.right
14
+ - if current_user.present?
15
+ li.has-dropdown
16
+ = link_to "http://www.#{ENV['MEURIO_DOMAIN']}/users/#{current_user.id}" do
17
+ = image_tag(current_user.avatar_url)
18
+ = current_user.name
19
+ ul.dropdown
20
+ label Minha Conta
21
+ li= link_to "Ver meu perfil", "http://www.#{ENV['MEURIO_DOMAIN']}/users/#{current_user.id}"
22
+ li= link_to "Editar meu perfil", edit_profile_path
23
+ li= link_to "Sair", sign_out_path
24
+ - if content_for? :current_user_links
25
+ label= application_name(@app)
26
+ = yield :current_user_links
27
+ - else
28
+ li= link_to 'Entrar', sign_in_path
24
29
 
25
30
  .meurio_apps_and_application_menu
26
31
  .row
27
32
  .meurio_apps
28
33
  .current_app
29
34
  = link_to(root_path) do
30
- - if @app == :mr20
31
- span Aplicativos
35
+ - if @app == :minhascidades
36
+ span Ferramentas
32
37
  - else
33
38
  = image_tag("mrui_#{@app}.png")
34
39
  span= application_name(@app)
35
40
  span.icon-arrow-box
36
41
  .other_apps
37
42
  = link_to("http://www.#{ENV["MEURIO_DOMAIN"]}", class: :meurio_app) do
38
- = image_tag('mrui_mr20.png')
39
- span= application_name(:mr20)
43
+ = image_tag('mrui_minhascidades2.png')
44
+ span= application_name(:minhascidades)
40
45
  = link_to("http://paneladepressao.#{ENV["MEURIO_DOMAIN"]}/", class: :meurio_app) do
41
46
  = image_tag('mrui_pdp.png')
42
47
  span= application_name(:pdp)
@@ -49,7 +54,7 @@
49
54
  = link_to("http://imagine.#{ENV["MEURIO_DOMAIN"]}/", class: :meurio_app) do
50
55
  = image_tag('mrui_imagine.png')
51
56
  span= application_name(:imagine)
52
- = link_to("https://apoie.#{ENV["MEURIO_DOMAIN"]}/", class: :meurio_app) do
57
+ = link_to("http://apoie.#{ENV["MEURIO_DOMAIN"]}/", class: :meurio_app) do
53
58
  = image_tag('mrui_apoie.png')
54
59
  span= application_name(:apoie)
55
60
  = link_to("http://deolho.#{ENV["MEURIO_DOMAIN"]}/", class: :meurio_app) do
@@ -58,5 +63,10 @@
58
63
  = link_to("http://deguarda.#{ENV["MEURIO_DOMAIN"]}/", class: :meurio_app) do
59
64
  = image_tag("mrui_deguarda.png")
60
65
  span= application_name(:deguarda)
66
+ .alert
67
+ - unless [:minhascidades, :pdp, :multitude].include?(@app)
68
+ a.icon-warning href="#" data-dropdown="support-alert"
69
+ #support-alert.f-dropdown.content data-dropdown-content=true
70
+ | Esta versão do #{application_name(@app)} está disponível apenas para a cidade do Rio de Janeiro. Em breve disponibilizaremos para toda a #{link_to "Rede Minhas Cidades", "http://www.minhascidades.org.br/"}.
61
71
  .application_menu= yield :application_menu
62
72
  .clear
@@ -1,5 +1,5 @@
1
1
  module MeurioUi
2
2
  module Rails
3
- VERSION = "1.4.4"
3
+ VERSION = "1.4.6"
4
4
  end
5
5
  end
@@ -8,7 +8,7 @@ module MeurioUi
8
8
  end
9
9
 
10
10
  def application_name app
11
- return "Meu Rio" if app == :mr20
11
+ return "Minhas Cidades" if app == :minhascidades
12
12
  return "Panela de Pressão" if app == :pdp
13
13
  return "Verão do Saneamento" if app == :vds
14
14
  return "Imagine" if app == :imagine
@@ -17,10 +17,34 @@ module MeurioUi
17
17
  return "De Guarda" if app == :deguarda
18
18
  return "Multitude" if app == :multitude
19
19
  end
20
-
20
+
21
21
  def meurio_ui_assets
22
22
  return nil if request.protocol == 'https://'
23
23
  content_tag :link, nil, rel: "stylesheet", href: "http://i.icomoon.io/public/b6dafa29d0/MeuRio/style.css"
24
24
  end
25
+
26
+ def sign_in_path
27
+ if [:pdp, :multitude, :minhascidades].include? @app
28
+ "http://accounts.#{ENV["MEURIO_DOMAIN"]}/?service=#{request.url}"
29
+ else
30
+ "http://accounts.#{ENV["MEURIO_DOMAIN"]}/?redirect_url=#{request.url}"
31
+ end
32
+ end
33
+
34
+ def sign_out_path
35
+ if [:pdp, :multitude, :minhascidades].include? @app
36
+ "http://accounts.#{ENV["MEURIO_DOMAIN"]}/logout?service=#{request.url}"
37
+ else
38
+ "http://accounts.#{ENV["MEURIO_DOMAIN"]}/logout?redirect_url=#{request.url}"
39
+ end
40
+ end
41
+
42
+ def edit_profile_path
43
+ if [:pdp, :multitude, :minhascidades].include? @app
44
+ "http://accounts.#{ENV["MEURIO_DOMAIN"]}/users/#{current_user.id}/edit"
45
+ else
46
+ "http://accounts.#{ENV["MEURIO_DOMAIN"]}/users/#{current_user.id}/edit"
47
+ end
48
+ end
25
49
  end
26
50
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meurio_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.4
4
+ version: 1.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nícolas Iensen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-17 00:00:00.000000000 Z
12
+ date: 2014-08-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -71,10 +71,13 @@ files:
71
71
  - app/assets/images/mrui_apoie.png
72
72
  - app/assets/images/mrui_deguarda.png
73
73
  - app/assets/images/mrui_deolho.png
74
+ - app/assets/images/mrui_divider.jpg
74
75
  - app/assets/images/mrui_eventos.png
75
76
  - app/assets/images/mrui_imagine.png
76
77
  - app/assets/images/mrui_meurio.png
77
- - app/assets/images/mrui_mr20.png
78
+ - app/assets/images/mrui_minhasampa.png
79
+ - app/assets/images/mrui_minhascidades.png
80
+ - app/assets/images/mrui_minhascidades2.png
78
81
  - app/assets/images/mrui_multitude.png
79
82
  - app/assets/images/mrui_pdp.png
80
83
  - app/assets/images/mrui_petitions.png
@@ -117,3 +120,4 @@ signing_key:
117
120
  specification_version: 4
118
121
  summary: Default UI elements for Meu Rio projects
119
122
  test_files: []
123
+ has_rdoc:
Binary file