biola_frontend_toolkit 0.0.2 → 0.1.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 +4 -4
- data/README.md +17 -0
- data/app/assets/stylesheets/biola/header.css.scss +10 -1
- data/app/views/frontend_toolkit/_google_analytics.html.erb +11 -0
- data/app/views/frontend_toolkit/_head.html.slim +1 -0
- data/app/views/frontend_toolkit/_header.html.slim +8 -8
- data/lib/biola_frontend_toolkit/configuration.rb +11 -1
- data/lib/biola_frontend_toolkit/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f089cf0b9315739c130dc453f1718e4de6f0290c
|
4
|
+
data.tar.gz: 0a4b0b3ffbafce462fa59366390faebf18a8b268
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e445aee231509eefae989d80d43453b6c0984a5c7ebf4ed5615f1c5b570b46aeaac7e4ffafe6e99e8ac9c652b16a68b00a7f3dad3bc8a9a6365d94d9142dcb71
|
7
|
+
data.tar.gz: 541ee459b38fd0541264b99420ca6f55e642605e1711e41c22109476b2bbd38be10d15da2315ea7039098d16dba872c3b274540214008cc9b040fd2d86b961a4
|
data/README.md
CHANGED
@@ -63,7 +63,24 @@ Create a new file called `/config/initializers/biola_frontend_toolkit.rb`
|
|
63
63
|
config.app_version = Version.current # optional
|
64
64
|
config.relative_root = Settings.app.relative_url_root
|
65
65
|
config.release_phase = Settings.release.phase
|
66
|
+
|
67
|
+
# App Links
|
68
|
+
config.app_links = [
|
69
|
+
{title: 'Gmail', url: 'http://mail.biola.edu', icon: 'envelope-square'},
|
70
|
+
{title: 'Forms', url: 'http://forms.biola.edu', icon: 'check-square-o'},
|
71
|
+
]
|
72
|
+
|
73
|
+
# Profile Links
|
74
|
+
config.profile_links = [
|
75
|
+
{title: 'My Account', url: [:my_account, :user], icon: 'user'},
|
76
|
+
]
|
77
|
+
|
78
|
+
# Google Analytics ## Optional ##
|
79
|
+
config.ga_account = 'UA-XXXXXXXX-XX'
|
80
|
+
config.ga_domain = 'biola.edu'
|
81
|
+
config.ga_enabled = true # defaults to false
|
66
82
|
end
|
83
|
+
|
67
84
|
## View Partials
|
68
85
|
### frontend_toolkit/head
|
69
86
|
Use this partial to include default html head tags and csrf_meta_tags
|
@@ -49,6 +49,15 @@ body { margin: 0; }
|
|
49
49
|
|
50
50
|
&#current-user-profile {
|
51
51
|
#profile-img { height: 30px; width: 30px; background-position: center; background-repeat: no-repeat; background-size: cover; border-radius: 20px; display: inline-block; vertical-align: middle; }
|
52
|
+
|
53
|
+
.fa-lg { font-size: 1.1em; }
|
54
|
+
.dropdown-toggle .fa-stack-2x { color: white; }
|
55
|
+
.dropdown-toggle .fa-stack-1x { color: #333; }
|
56
|
+
&.open {
|
57
|
+
.dropdown-toggle .fa-stack-2x { color: #333; }
|
58
|
+
.dropdown-toggle .fa-stack-1x { color: white; }
|
59
|
+
}
|
60
|
+
|
52
61
|
.dropdown-menu {
|
53
62
|
// Adjust where the little carret points so that it is right under the profile picture
|
54
63
|
&::before { right: 19px; }
|
@@ -99,4 +108,4 @@ body { margin: 0; }
|
|
99
108
|
|
100
109
|
@media screen and (min-width:1200px) {
|
101
110
|
#biolaHeader { width:1170px; }
|
102
|
-
}
|
111
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<% if BiolaFrontendToolkit.config.ga_enabled %>
|
2
|
+
<script>
|
3
|
+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
4
|
+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
5
|
+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
6
|
+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
7
|
+
|
8
|
+
ga('create', '<%= BiolaFrontendToolkit.config.ga_account %>', '<%= BiolaFrontendToolkit.config.ga_domain %>');
|
9
|
+
ga('send', 'pageview');
|
10
|
+
</script>
|
11
|
+
<% end %>
|
@@ -9,16 +9,16 @@
|
|
9
9
|
|
10
10
|
#current-user-profile.dropdown
|
11
11
|
a.dropdown-toggle href="#" aria-hidden="true" data-toggle="dropdown"
|
12
|
-
- if @current_user
|
12
|
+
- if @current_user.try(:photo_url).present?
|
13
13
|
#profile-img style="background-image: url('#{@current_user.photo_url}')"
|
14
14
|
- else
|
15
|
-
|
15
|
+
span.fa-stack.fa-lg
|
16
|
+
i.fa.fa-circle.fa-stack-2x
|
17
|
+
i.fa.fa-user.fa-stack-1x.fa-inverse
|
16
18
|
ul.dropdown-menu.pull-right role="menu" aria-labelledby="dLabel"
|
17
19
|
- if @current_user
|
18
|
-
|
19
|
-
=
|
20
|
-
i.fa.fa-user>
|
21
|
-
| My Account
|
20
|
+
- BiolaFrontendToolkit.config.profile_links.each do |link|
|
21
|
+
li = app_link link
|
22
22
|
li
|
23
23
|
= link_to logout_path do
|
24
24
|
i.fa.fa-power-off>
|
@@ -55,8 +55,8 @@
|
|
55
55
|
|
56
56
|
- if BiolaFrontendToolkit.config.app_links.present?
|
57
57
|
ul.dropdown-menu.pull-right role="menu" aria-labelledby="dLabel"
|
58
|
-
- BiolaFrontendToolkit.config.app_links.each do |
|
59
|
-
li = app_link
|
58
|
+
- BiolaFrontendToolkit.config.app_links.each do |link|
|
59
|
+
li = app_link link
|
60
60
|
/ li.divider
|
61
61
|
/ li.text-center = link_to 'More', '#'
|
62
62
|
|
@@ -4,13 +4,23 @@ module BiolaFrontendToolkit
|
|
4
4
|
attr_accessor :app_version
|
5
5
|
attr_accessor :relative_root
|
6
6
|
attr_accessor :app_links
|
7
|
+
attr_accessor :profile_links
|
7
8
|
attr_accessor :release_phase
|
9
|
+
attr_accessor :ga_account
|
10
|
+
attr_accessor :ga_domain
|
11
|
+
attr_accessor :ga_enabled
|
8
12
|
|
9
13
|
def initialize
|
10
14
|
@app_name = 'App Name'
|
11
15
|
@app_version = ''
|
12
16
|
@relative_root = '/'
|
13
17
|
@app_links = []
|
18
|
+
@profile_links = []
|
19
|
+
|
20
|
+
# Google Analytics
|
21
|
+
@ga_account = ''
|
22
|
+
@ga_domain = 'biola.edu'
|
23
|
+
@ga_enabled = false
|
14
24
|
end
|
15
25
|
|
16
26
|
def release_phase_intro
|
@@ -24,4 +34,4 @@ module BiolaFrontendToolkit
|
|
24
34
|
end
|
25
35
|
end
|
26
36
|
end
|
27
|
-
end
|
37
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: biola_frontend_toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Hall
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- app/assets/stylesheets/biola/header.css.scss
|
56
56
|
- app/assets/stylesheets/biola/prerelease.css.scss
|
57
57
|
- app/helpers/biola_frontend/rails/frontend_toolkit_helper.rb
|
58
|
+
- app/views/frontend_toolkit/_google_analytics.html.erb
|
58
59
|
- app/views/frontend_toolkit/_head.html.slim
|
59
60
|
- app/views/frontend_toolkit/_header.html.slim
|
60
61
|
- app/views/frontend_toolkit/_prerelease_banner.html.slim
|