shopapp 0.2.19 → 0.2.20

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.
@@ -0,0 +1,205 @@
1
+ @font-face {
2
+ font-family: 'Aktiv Grotesk';
3
+ src: url('<%= font_path('aktivgrotesk-bold-webfont.woff2')%>') format('woff2'),
4
+ url('<%= font_path('aktivgrotesk-bold-webfont.woff')%>') format('woff');
5
+ font-weight: 600;
6
+ font-style: normal;
7
+ }
8
+ @font-face {
9
+ font-family: 'Aktiv Grotesk';
10
+ src: url('<%= font_path('aktivgrotesk-light-webfont.woff2')%>') format('woff2'),
11
+ url('<%= font_path('aktivgrotesk-light-webfont.woff')%>') format('woff');
12
+ font-weight: 300;
13
+ font-style: normal;
14
+ }
15
+ @font-face {
16
+ font-family: 'Aktiv Grotesk';
17
+ src: url('<%= font_path('aktivgrotesk-medium-webfont.woff2')%>') format('woff2'),
18
+ url('<%= font_path('aktivgrotesk-medium-webfont.woff')%>') format('woff');
19
+ font-weight: 500;
20
+ font-style: normal;
21
+ }
22
+ @font-face {
23
+ font-family: 'Aktiv Grotesk';
24
+ src: url('<%= font_path('aktivgrotesk-regular-webfont.woff2')%>') format('woff2'),
25
+ url('<%= font_path('aktivgrotesk-regular-webfont.woff')%>') format('woff');
26
+ font-weight: 400;
27
+ font-style: normal;
28
+ }
29
+ html, body {
30
+ font-family: 'Aktiv Grotesk', Roboto, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
31
+ background: #F4F5FA;
32
+ color: #595B62;
33
+ height: 100%;
34
+ -webkit-font-smoothing: antialiased;
35
+ -moz-osx-font-smoothing: grayscale;
36
+ }
37
+ .text-thin {
38
+ font-weight: 300;
39
+ }
40
+ .text-regular {
41
+ font-weight: 400;
42
+ }
43
+ .text-confirmed {
44
+ color: #37B899;
45
+ }
46
+ .shadow-sm {
47
+ box-shadow: 0 1px 5px 0 rgba(0, 0, 0, .08)!important;
48
+ }
49
+ .btn {
50
+ text-transform: none;
51
+ }
52
+ .btn-outline-primary {
53
+ color: #A042F4;
54
+ border: 1px solid #A042F4;
55
+ }
56
+ .btn-outline-primary:hover {
57
+ color: #A042F4;
58
+ background: #fff;
59
+ box-shadow: 0 2px 8px rgba(0, 0, 0, .15)!important;
60
+ }
61
+ .divider {
62
+ background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIxcHgiIGhlaWdodD0iMXB4IiB2aWV3Qm94PSIwIDAgMSAxIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4gICAgICAgIDxnIGlkPSJTaG9wbGlmdC1zZWxlY3QiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yOTAuMDAwMDAwLCAtODAyLjAwMDAwMCkiIGZpbGw9IiM5RkEyQTkiIGZpbGwtcnVsZT0ibm9uemVybyI+ICAgICAgICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZSIgeD0iMjkwIiB5PSI4MDIiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiPjwvcmVjdD4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==);
63
+ background-repeat: repeat-x;
64
+ background-position: left 58%;
65
+ text-align: left;
66
+ margin-right: 1.5rem;
67
+ }
68
+ .divider p {
69
+ background-color: #F4F5FA;
70
+ color: #9FA2A9;
71
+ margin: 0 auto;
72
+ padding: 0 10px;
73
+ display: inline-block;
74
+ }
75
+ .navbar .form-control {
76
+ opacity: 1;
77
+ background: #F4F5FA;
78
+ font-weight: 300;
79
+ }
80
+ .navbar .form-control::placeholder {
81
+ color: #444;
82
+ }
83
+ .sidebar {
84
+ position: fixed;
85
+ top: 0;
86
+ bottom: 0;
87
+ left: 0;
88
+ z-index: 100;
89
+ padding: 25px 0 0;
90
+ }
91
+ .sidebar-sticky {
92
+ position: relative;
93
+ top: 0;
94
+ height: calc(100vh - 48px);
95
+ padding-top: .5rem;
96
+ overflow-x: hidden;
97
+ overflow-y: auto;
98
+ }
99
+ .sidebar .nav-link, .topbar .nav-link {
100
+ font-size: .87rem;
101
+ color: #595B62;
102
+ padding-left: 1.5rem;
103
+ padding-top: .7rem;
104
+ padding-bottom: .7rem;
105
+ }
106
+ .topbar .nav-link {
107
+ font-size: 1rem;
108
+ color: #595B62;
109
+ padding-left: .5rem;
110
+ }
111
+ .sidebar .nav-link{
112
+ margin-right: 3rem;
113
+ }
114
+ .sidebar .nav-link.active{
115
+ background: rgba(134, 147, 201, 0.2);
116
+ border-top-right-radius: 40px;
117
+ border-bottom-right-radius: 40px;
118
+ }
119
+ .sidebar .nav-link:hover {
120
+ background: rgba(0, 0, 0, 0.04);
121
+ border-top-right-radius: 40px;
122
+ border-bottom-right-radius: 40px;
123
+ }
124
+ .sidebar .nav-link .material-icons, .topbar .nav-link .material-icons {
125
+ font-size: 1.2rem;
126
+ vertical-align: text-bottom;
127
+ margin-right: .35rem;
128
+ }
129
+ .sidebar .nav-link.active .material-icons, .topbar .nav-link.active .material-icons {
130
+ color: #A042F4;
131
+ }
132
+ .navbar-expand-lg .navbar-nav .nav-item {
133
+ width: 100%;
134
+ padding: .5rem 0;
135
+ }
136
+ .info-box {
137
+ background: #A042F4;
138
+ border-top-left-radius: 5px;
139
+ border-bottom-left-radius: 5px;
140
+ }
141
+ .table-box {
142
+ background: #FFFFFF;
143
+ border-radius: 5px;
144
+ }
145
+ .chip {
146
+ background: transparent;
147
+ }
148
+ .chip-action:active, .chip-action:focus, .chip-action:hover {
149
+ box-shadow: none;
150
+ color: rgba(0, 0, 0, .87);
151
+ text-decoration: none;
152
+ }
153
+ .list-group-item {
154
+ border-top: 1px solid rgba(0, 0, 0, 0.1);
155
+ box-shadow: none;
156
+ }
157
+ .list-group-item:last-child {
158
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
159
+ }
160
+ .expansion-panel.show:not(:last-child) {
161
+ margin-bottom: 0;
162
+ }
163
+ .expansion-panel.show:not(:first-child) {
164
+ margin-top: 0;
165
+ }
166
+ .list-group-flush .expansion-panel-toggler{
167
+ font-size: .85rem;
168
+ }
169
+ .list-group .expansion-panel-toggler:active, .list-group .expansion-panel-toggler:focus, .list-group .expansion-panel-toggler:hover {
170
+ background-color: rgba(111,26,157, 0.05);
171
+ }
172
+ .list-group-flush .expansion-panel-toggler:active, .list-group-flush .expansion-panel-toggler:focus, .list-group-flush .expansion-panel-toggler:hover {
173
+ background-color: #fff;
174
+ }
175
+ .list-group-flush .expansion-panel-toggler:hover{
176
+ text-decoration: underline;
177
+ color: #9c27b0;
178
+ }
179
+ .table thead td, .table thead th {
180
+ font-size: .85rem;
181
+ font-weight: 500;
182
+ }
183
+ .table {
184
+ table-layout: fixed;
185
+ }
186
+ .table-actions a {
187
+ font-size: .62rem;
188
+ color: #444;
189
+ padding: 0 1rem;
190
+ }
191
+ @media screen and (max-width: 992px) {
192
+ .table {
193
+ table-layout: auto;
194
+ }
195
+ .table-actions {
196
+ display: flex;
197
+ }
198
+ .table-actions a {
199
+ padding: 0 .5rem;
200
+ }
201
+ }
202
+
203
+ .shopliftviewport {
204
+ height: 75vh;
205
+ }
@@ -0,0 +1,2 @@
1
+ @import "material.min";
2
+ @import "project";
@@ -55,4 +55,15 @@ module ShopappHelper
55
55
  "#{controller.class.search_path || '/'}"
56
56
  end
57
57
  end
58
+
59
+ def sidebar_item(url, text, dropdown, icon)
60
+ <<~HTML.html_safe
61
+ <li class="nav-item">
62
+ <a class="nav-link #{'active' if request.path.starts_with? url}" href="#{url}">
63
+ <i class="material-icons">#{icon}</i>
64
+ #{text}
65
+ </a>
66
+ </li>
67
+ HTML
68
+ end
58
69
  end
@@ -0,0 +1,110 @@
1
+ .container-fluid
2
+ .row
3
+ %nav.col-lg-2.d-none.d-lg-block.sidebar
4
+ .sidebar-sticky
5
+ %ul.nav.flex-column
6
+ %a.navbar-brand.pl-3.mb-3{:href => "/"}
7
+ = image_tag company_logo_path_defined, alt: "#{@current_company.name}_logo", height: '30'
8
+ = render 'layouts/sidebar', dropdown: true
9
+ - if @current_user_json_hash['company']['apps'].present?
10
+ .divider.mt-3.py-3
11
+ %p.ml-3.small My Apps
12
+ %ul.nav.flex-column
13
+ -(@current_user_json_hash['company']['apps'] || []).each do |app|
14
+ - if app['home'].present?
15
+ %li.nav-item
16
+ %a.nav-link{:href => "#"}
17
+ -# %i.material-icons fingerprint
18
+ = image_tag "https://media.shoplift.fi/application_logos/#{app['name'].downcase}.svg", style: "padding-bottom: 3px; height: 24px;"
19
+ %span.ml-2
20
+ = app['name'].capitalize
21
+ .divider.py-3{:style => "margin-top: 5rem;"}
22
+ %p.ml-3.small Help &amp; Feedback
23
+ %ul.nav.flex-column
24
+ %li.nav-item
25
+ %a.nav-link{:href => "#"}
26
+ %i.material-icons help
27
+ Help
28
+ %li.nav-item
29
+ %a.nav-link{:href => "#"}
30
+ %i.material-icons feedback
31
+ Feedback
32
+ %main.col-lg-10.ml-lg-auto{:role => "main"}
33
+ .row.justify-content-center
34
+ .col-lg-8.px-lg-0.pt-lg-3
35
+ %nav.navbar.navbar-light.justify-content-start.flex-nowrap
36
+ %span.material-icons.d-inline-block.text-muted.mr-1 search
37
+ %form.w-100(action=search_path)
38
+ .form-group.mb-0
39
+ %input.form-control{"aria-describedby" => "basic-addon1", "aria-label" => "Search", :placeholder => "Search here for names, dates and ID's", :type => "search"}/
40
+ .col-lg-4.px-lg-0.pt-lg-3.d-none.d-lg-flex.align-items-center.justify-content-end
41
+ .dropdown
42
+ %a#dropdownMenuButton.chip.chip-action.dropdown-toggle.mr-lg-4{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :href => "#"}
43
+ %img.chip-img(alt="#{@current_user['email']}" src="#{gravatar_image_url(@current_user['email'])}")/
44
+ = @current_user['email']
45
+ .dropdown-menu.dropdown-menu-right.mt-2{"aria-labelledby" => "dropdownMenuButton"}
46
+ .dropdown-header=@current_user_json_hash['email']
47
+ .dropdown-header
48
+ %strong Company:
49
+ =@current_user_json_hash['company']['name']
50
+ - if (@current_user_json_hash['memberships'] || []).reject { |c| @current_user_json_hash['company']['code'] == c['code'] }.present?
51
+ .dropdown-divider
52
+ .dropdown-header Change company
53
+ - (@current_user_json_hash['memberships'] || []).reject { |c| @current_user_json_hash['company']['code'] == c['code'] }.each do |c|
54
+ = link_to(change_company_path(c['code']), method: :post, :class => 'dropdown-item') do
55
+ %span(display="block" clear="none" style="width: 32px; margin-right: 6px;")
56
+ = image_tag "https://media.shoplift.fi/company_logos/#{c['logo_code']}_company_logo_24.png", style: "height: 16; width: 32px;"
57
+ = c['name']
58
+ .dropdown-divider
59
+ = link_to(logout_path, method: :delete, :class => 'dropdown-item') do
60
+ Logout
61
+ .row.justify-content-end
62
+ .col
63
+ - flash.keys.each do |flash_key|
64
+ .alert.alert-dismissible.container.fade.show(role="alert" class="alert-#{flash_key}")
65
+ = flash[flash_key].html_safe
66
+ %button.close{"aria-label" => "Close", "data-dismiss" => "alert", :type => "button"}
67
+ %span{"aria-hidden" => "true"} ×
68
+ %nav.navbar.navbar-expand-lg.navbar-light.d-lg-none.d-xl-none.topbar
69
+ %button.navbar-toggler{"aria-controls" => "navbarNavDropdown", "aria-expanded" => "false", "aria-label" => "Toggle navigation", "data-target" => "#navbarNavDropdown", "data-toggle" => "collapse", :type => "button"}
70
+ %span.navbar-toggler-icon
71
+ #navbarNavDropdown.collapse.navbar-collapse
72
+ %ul.navbar-nav
73
+ = render 'layouts/sidebar', dropdown: false
74
+ -# .row.justify-content-end.d-none.d-lg-block
75
+ -# .col-lg-12.mt-3.pr-lg-0
76
+ -# .info-box.shadow-sm.py-4
77
+ -# %p.text-white{:style => "padding-left: 7.5rem;"}
78
+ -# %strong Sales statistics
79
+ -# .d-flex.justify-content-around.align-items-center
80
+ -# %div
81
+ -# %h3.mb-0
82
+ -# %span.material-icons.text-success.mr-2 trending_up
83
+ -# %h3.text-white
84
+ -# %span.text-thin Total orders
85
+ -# %span.h2 2938
86
+ -# %p.text-white
87
+ -# + 8.2%
88
+ -# %span.text-white-secondary Compared to all time average
89
+ -# %div
90
+ -# %h3.mb-0
91
+ -# %span.material-icons.text-warning.mr-2 trending_flat
92
+ -# %h3.text-white
93
+ -# %span.text-thin Monthly orders
94
+ -# %span.h2 120
95
+ -# %p.text-white
96
+ -# + 0.2%
97
+ -# %span.text-white-secondary Compared to last month
98
+ -# %div
99
+ -# %h3.mb-0
100
+ -# %span.material-icons.text-danger.mr-2 trending_down
101
+ -# %h3.text-white
102
+ -# %span.text-thin Weekly
103
+ -# %span.h2 38
104
+ -# %p.text-white
105
+ -# \- 3.2%
106
+ -# %span.text-white-secondary Compared to last week
107
+ .row.justify-content-start
108
+ .col-lg-12.my-3
109
+ .table-box.shadow-sm.pt-3.shopliftviewport
110
+ = yield
@@ -22,4 +22,14 @@ Rails.configuration.generators do |g|
22
22
  # you can also specify a different test framework or ORM here
23
23
  # g.test_framework :rspec
24
24
  # g.orm :mongoid
25
- end
25
+ end
26
+
27
+ GravatarImageTag.configure do |config|
28
+ config.default_image = :wavatar # Set this to use your own default gravatar image rather then serving up Gravatar's default image [ 'http://example.com/images/default_gravitar.jpg', :identicon, :monsterid, :wavatar, 404 ].
29
+ # config.filetype = nil # Set this if you require a specific image file format ['gif', 'jpg' or 'png']. Gravatar's default is png
30
+ # config.include_size_attributes = true # The height and width attributes of the generated img will be set to avoid page jitter as the gravatars load. Set to false to leave these attributes off.
31
+ # config.rating = nil # Set this if you change the rating of the images that will be returned ['G', 'PG', 'R', 'X']. Gravatar's default is G
32
+ # config.size = nil # Set this to globally set the size of the gravatar image returned (1..512). Gravatar's default is 80
33
+ config.secure = true # Set this to true if you require secure images on your pages.
34
+ end
35
+
@@ -1,3 +1,5 @@
1
+ require 'gravatar_image_tag'
2
+
1
3
  module Shopapp
2
4
  class Engine < ::Rails::Engine
3
5
  rake_tasks do
data/shopapp.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'shopapp'
3
- s.version = '0.2.19'
3
+ s.version = '0.2.20'
4
4
  s.date = '2019-01-17'
5
5
  s.summary = 'Do a shoplift.'
6
6
  s.description = 'Ha! Art thou Bedlam? Dost thou thirst base Trojan, to have me fold up Parca\'s fatal web? Hence!\
@@ -14,6 +14,8 @@ Gem::Specification.new do |s|
14
14
  s.executables = 'shopitapp'
15
15
  s.homepage = 'http://rubygems.org/gems/shopapp'
16
16
  s.license = 'MIT'
17
+ s.require_paths = ["lib"]
18
+
17
19
 
18
20
  # Dependences
19
21
  s.add_dependency 'railties', '~> 5.2', '>= 5.2'
@@ -25,6 +27,7 @@ Gem::Specification.new do |s|
25
27
  s.add_dependency 'pry-rails', '~> 0.3'
26
28
  s.add_dependency 'oauth2', '~> 1.4'
27
29
  s.add_dependency 'rest-client', '~> 2.0'
30
+ s.add_dependency 'gravatar_image_tag', '~> 1.2'
28
31
 
29
32
  s.add_dependency 'capistrano', '~> 3.11'
30
33
  s.add_dependency 'capistrano-rvm', '~> 0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.19
4
+ version: 0.2.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zeljko
@@ -142,6 +142,20 @@ dependencies:
142
142
  - - "~>"
143
143
  - !ruby/object:Gem::Version
144
144
  version: '2.0'
145
+ - !ruby/object:Gem::Dependency
146
+ name: gravatar_image_tag
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - "~>"
150
+ - !ruby/object:Gem::Version
151
+ version: '1.2'
152
+ type: :runtime
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - "~>"
157
+ - !ruby/object:Gem::Version
158
+ version: '1.2'
145
159
  - !ruby/object:Gem::Dependency
146
160
  name: capistrano
147
161
  requirement: !ruby/object:Gem::Requirement
@@ -209,8 +223,28 @@ extra_rdoc_files: []
209
223
  files:
210
224
  - Gemfile
211
225
  - README.md
226
+ - app/assets/fonts/aktivgrotesk-bold-webfont.woff
227
+ - app/assets/fonts/aktivgrotesk-bold-webfont.woff2
228
+ - app/assets/fonts/aktivgrotesk-light-webfont.woff
229
+ - app/assets/fonts/aktivgrotesk-light-webfont.woff2
230
+ - app/assets/fonts/aktivgrotesk-medium-webfont.woff
231
+ - app/assets/fonts/aktivgrotesk-medium-webfont.woff2
232
+ - app/assets/fonts/aktivgrotesk-regular-webfont.woff
233
+ - app/assets/fonts/aktivgrotesk-regular-webfont.woff2
234
+ - app/assets/images/avatar.jpg
235
+ - app/assets/images/blue_icon.svg
236
+ - app/assets/images/dot.svg
237
+ - app/assets/images/empty.svg
238
+ - app/assets/images/lamppu.jpg
239
+ - app/assets/images/logo.png
240
+ - app/assets/images/purple_icon.svg
241
+ - app/assets/javascripts/material.min.js
212
242
  - app/assets/javascripts/shopapp.js
243
+ - app/assets/javascripts/shopapp2.js
244
+ - app/assets/stylesheets/material.min.css
245
+ - app/assets/stylesheets/project.css.erb
213
246
  - app/assets/stylesheets/shopapp.scss
247
+ - app/assets/stylesheets/shopapp2.scss
214
248
  - app/assets/stylesheets/variables.scss
215
249
  - app/controllers/api_controller.rb
216
250
  - app/controllers/auth_controller.rb
@@ -222,6 +256,7 @@ files:
222
256
  - app/views/layouts/_header_menu.html.haml
223
257
  - app/views/shopapp/403.html.haml
224
258
  - app/views/shopapp/_shopapp.html.haml
259
+ - app/views/shopapp/_shopapp2.html.haml
225
260
  - app/views/shopapp/_shopapp_alerts.html.haml
226
261
  - bin/shopitapp
227
262
  - config/initializers/active_settings.rb