meurio_ui 1.2.1 → 1.2.2

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.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,2 @@
1
+ $green: #219548
2
+ $orange: #ffa94b
@@ -6,11 +6,14 @@ header.meurio_header
6
6
  line-height: 35px
7
7
  .meurio_logo
8
8
  padding: 7px 0
9
+ img
10
+ float: left
9
11
  .user_menu
10
12
  text-align: right
11
13
  color: white
12
14
  position: relative
13
15
  padding: 7px 0
16
+ line-height: 44px
14
17
  .current_user
15
18
  img
16
19
  width: 35px
@@ -22,7 +25,6 @@ header.meurio_header
22
25
  position: relative
23
26
  margin-left: 1em
24
27
  cursor: pointer
25
- +user-select(none)
26
28
  .current_user_links
27
29
  position: absolute
28
30
  top: 40px
@@ -37,6 +39,7 @@ header.meurio_header
37
39
 
38
40
  .meurio_apps_and_application_menu
39
41
  line-height: 59px
42
+ background: white
40
43
  .meurio_apps
41
44
  cursor: pointer
42
45
  position: relative
@@ -65,7 +68,7 @@ header.meurio_header
65
68
  background: white
66
69
  top: 79px
67
70
  z-index: 1000
68
- width: 600px
71
+ width: 640px
69
72
  padding: 1em
70
73
  display: none
71
74
  .meurio_app
@@ -1,2 +1,3 @@
1
1
  @import meurio_ui/icomoon
2
+ @import meurio_ui/colors
2
3
  @import meurio_ui/meurio_header
@@ -0,0 +1,50 @@
1
+ header.meurio_header
2
+ .meurio_logo_and_user_menu
3
+ .row
4
+ .meurio_logo= link_to image_tag('meurio.png'), 'http://meurio.org.br/'
5
+ - if @app == :pdp
6
+ .user_menu
7
+ - if current_user.present?
8
+ .current_user
9
+ = image_tag(current_user.avatar_url)
10
+ = current_user.name
11
+ = content_tag(:span, nil, class: 'icon-triangle-down')
12
+ .current_user_links
13
+ = link_to('Minhas campanhas', user_campaigns_path(current_user))
14
+ - if can?(:moderate, Campaign)
15
+ = link_to 'Moderar campanhas', unmoderated_campaigns_path
16
+ - if can?(:export, User)
17
+ = link_to "Exportar todos os usuários", users_path(:format => :csv)
18
+ - else
19
+ = link_to 'Entrar', "http://accounts.meurio.org.br/?redirect_url=#{request.url}", class: :hollow_btn
20
+ .clear
21
+
22
+ .meurio_apps_and_application_menu
23
+ .row
24
+ .meurio_apps
25
+ .current_app
26
+ = link_to(root_path) do
27
+ = image_tag("#{@app}.png")
28
+ span= application_name(@app)
29
+ span.icon-arrow-box
30
+ .other_apps
31
+ = link_to('http://meurio.org.br/', class: :meurio_app) do
32
+ = image_tag('mr20.png')
33
+ span= application_name(:mr20)
34
+ = link_to('http://paneladepressao.meurio.org.br/', class: :meurio_app) do
35
+ = image_tag('pdp.png')
36
+ span= application_name(:pdp)
37
+ = link_to('http://imagine.meurio.org.br/', class: :meurio_app) do
38
+ = image_tag('imagine.png')
39
+ span= application_name(:imagine)
40
+ = link_to('https://apoie.meurio.org.br/', class: :meurio_app) do
41
+ = image_tag('apoie.png')
42
+ span= application_name(:apoie)
43
+ = link_to('http://deolho.meurio.org.br/', class: :meurio_app) do
44
+ = image_tag('deolho.png')
45
+ span= application_name(:deolho)
46
+ = link_to('http://deguarda.meurio.org.br/', class: :meurio_app) do
47
+ = image_tag("deguarda.png")
48
+ span= application_name(:deguarda)
49
+ .application_menu= yield :application_menu
50
+ .clear
@@ -1,5 +1,5 @@
1
1
  module MeurioUi
2
2
  module Rails
3
- VERSION = "1.2.1"
3
+ VERSION = "1.2.2"
4
4
  end
5
5
  end
@@ -3,77 +3,17 @@
3
3
  module MeurioUi
4
4
  module ViewHelpers
5
5
  def meurio_header_for app
6
- content_tag(:header, class: :meurio_header) do
7
- meurio_brand_and_user_panel + application_menu
8
- end
6
+ @app = app
7
+ render file: 'meurio_ui/meurio_header'
9
8
  end
10
9
 
11
- def meurio_brand_and_user_panel
12
- content_tag(:div, class: :meurio_logo_and_user_menu) do
13
- content_tag(:div, class: :row) do
14
- content_tag(:div, class: :meurio_logo) do
15
- link_to image_tag('meurio.png'), 'http://meurio.org.br/'
16
- end +
17
- content_tag(:div, class: :user_menu) do
18
- if current_user.present?
19
- content_tag(:div, class: :current_user) do
20
- image_tag(current_user.avatar_url) + current_user.name + content_tag(:span, nil, class: 'icon-triangle-down')
21
- end +
22
- content_tag(:div, class: :current_user_links) do
23
- link_to('Minhas campanhas', user_campaigns_path(current_user)) +
24
- if can?(:moderate, Campaign)
25
- link_to('Moderar campanhas', unmoderated_campaigns_path)
26
- end +
27
- if can?(:export, User)
28
- link_to("Exportar todos os usuários", users_path(:format => :csv))
29
- end
30
- end
31
- else
32
- link_to 'Entrar', "http://accounts.meurio.org.br/?redirect_url=#{request.url}", class: :hollow_btn
33
- end
34
- end +
35
- content_tag(:div, nil, class: :clear)
36
- end
37
- end
38
- end
39
-
40
- def application_menu
41
- content_tag(:div, class: :meurio_apps_and_application_menu) do
42
- content_tag(:div, class: :row) do
43
- content_tag(:div, class: :meurio_apps) do
44
- content_tag(:div, class: :current_app) do
45
- link_to(root_path) do
46
- image_tag('pdp.png') + content_tag(:span, 'Panela de Pressão')
47
- end +
48
- content_tag(:span, nil, class: 'icon-arrow-box')
49
- end +
50
- content_tag(:div, class: :other_apps) do
51
- link_to('http://meurio.org.br/', class: :meurio_app) do
52
- image_tag('mr.png') + content_tag(:span, 'Ação em Rede')
53
- end +
54
- link_to('http://paneladepressao.meurio.org.br/', class: :meurio_app) do
55
- image_tag('pdp.png') + content_tag(:span, 'Panela de Pressão')
56
- end +
57
- link_to('http://imagine.meurio.org.br/', class: :meurio_app) do
58
- image_tag('imagine.png') + content_tag(:span, 'Imagine')
59
- end +
60
- link_to('https://apoie.meurio.org.br/', class: :meurio_app) do
61
- image_tag('apoie.png') + content_tag(:span, 'Faça Acontecer')
62
- end +
63
- link_to('http://deolho.meurio.org.br/', class: :meurio_app) do
64
- image_tag('deolho.png') + content_tag(:span, 'De Olho')
65
- end +
66
- link_to('http://deguarda.meurio.org.br/', class: :meurio_app) do
67
- image_tag('deguarda.png') + content_tag(:span, 'De Guarda')
68
- end
69
- end
70
- end +
71
- content_tag(:div, class: :application_menu) do
72
- link_to('Como funciona?', about_path) + link_to('Descubra as campanhas', explore_path) + link_to('Crie sua campanha', new_campaign_path, class: :btn)
73
- end +
74
- content_tag(:div, nil, class: :clear)
75
- end
76
- end
10
+ def application_name app
11
+ return "Ação em Rede" if app == :mr20
12
+ return "Panela de Pressão" if app == :pdp
13
+ return "Imagine" if app == :imagine
14
+ return "Faça Acontecer" if app == :apoie
15
+ return "De Olho" if app == :deolho
16
+ return "De Guarda" if app == :deguarda
77
17
  end
78
18
  end
79
19
  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.2.1
4
+ version: 1.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-20 00:00:00.000000000 Z
12
+ date: 2013-11-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -62,10 +62,18 @@ files:
62
62
  - app/assets/fonts/meurio_ui/icomoon.svg
63
63
  - app/assets/fonts/meurio_ui/icomoon.ttf
64
64
  - app/assets/fonts/meurio_ui/icomoon.woff
65
+ - app/assets/images/apoie.png
66
+ - app/assets/images/deguarda.png
67
+ - app/assets/images/deolho.png
68
+ - app/assets/images/imagine.png
69
+ - app/assets/images/mr20.png
70
+ - app/assets/images/pdp.png
65
71
  - app/assets/javascripts/meurio_ui.js
66
72
  - app/assets/stylesheets/meurio_ui.css.sass
73
+ - app/assets/stylesheets/meurio_ui/colors.css.sass
67
74
  - app/assets/stylesheets/meurio_ui/icomoon.css.scss
68
75
  - app/assets/stylesheets/meurio_ui/meurio_header.css.sass
76
+ - app/views/meurio_ui/meurio_header.html.slim
69
77
  - lib/meurio_ui.rb
70
78
  - lib/meurio_ui/engine.rb
71
79
  - lib/meurio_ui/railtie.rb