Skip to content

Commit f77932b

Browse files
author
pbmolini
committed
Favicon added
1 parent 716f854 commit f77932b

16 files changed

+153
-0
lines changed

Gemfile

+3
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ group :development, :test do
9191
# Nice error page, with console
9292
gem 'better_errors'
9393
gem 'binding_of_caller'
94+
95+
# Favicon as if were no tomorrow
96+
gem 'rails_real_favicon'
9497
end
9598

9699
group :development do

Gemfile.lock

+18
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ GEM
101101
responders
102102
warden (~> 1.2.3)
103103
devise-i18n (1.2.0)
104+
domain_name (0.5.20170404)
105+
unf (>= 0.0.5, < 1.0.0)
104106
erubi (1.6.1)
105107
execjs (2.7.0)
106108
fast_gettext (1.5.1)
@@ -121,6 +123,8 @@ GEM
121123
globalid (0.4.0)
122124
activesupport (>= 4.2.0)
123125
high_voltage (3.0.0)
126+
http-cookie (1.0.3)
127+
domain_name (~> 0.5)
124128
i18n (0.8.6)
125129
i18n_data (0.8.0)
126130
inline_svg (1.2.3)
@@ -157,6 +161,7 @@ GEM
157161
mini_portile2 (2.2.0)
158162
minitest (5.10.3)
159163
multi_json (1.12.1)
164+
netrc (0.11.0)
160165
nio4r (2.1.0)
161166
nokogiri (1.8.0)
162167
mini_portile2 (~> 2.2.0)
@@ -195,6 +200,11 @@ GEM
195200
nokogiri (>= 1.6)
196201
rails-html-sanitizer (1.0.3)
197202
loofah (~> 2.0)
203+
rails_real_favicon (0.0.7)
204+
json (>= 1.7, < 3)
205+
rails (>= 3.1)
206+
rest-client (~> 2.0)
207+
rubyzip (~> 1)
198208
railties (5.1.3)
199209
actionpack (= 5.1.3)
200210
activesupport (= 5.1.3)
@@ -215,6 +225,10 @@ GEM
215225
responders (2.4.0)
216226
actionpack (>= 4.2.0, < 5.3)
217227
railties (>= 4.2.0, < 5.3)
228+
rest-client (2.0.2)
229+
http-cookie (>= 1.0.2, < 2.0)
230+
mime-types (>= 1.16, < 4.0)
231+
netrc (~> 0.8)
218232
ruby_dep (1.5.0)
219233
rubyzip (1.2.1)
220234
sass (3.5.1)
@@ -266,6 +280,9 @@ GEM
266280
thread_safe (~> 0.1)
267281
uglifier (3.2.0)
268282
execjs (>= 0.3.0, < 3)
283+
unf (0.1.4)
284+
unf_ext
285+
unf_ext (0.0.7.4)
269286
warden (1.2.7)
270287
rack (>= 1.0)
271288
web-console (3.5.1)
@@ -311,6 +328,7 @@ DEPENDENCIES
311328
pry-rails
312329
puma (~> 3.7)
313330
rails (~> 5.1.3)
331+
rails_real_favicon
314332
ransack
315333
sass-rails (~> 5.0)
316334
select2-rails

app/assets/images/cf_icon_red.png

21.1 KB
Loading
Loading
Loading
3.69 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<browserconfig>
3+
<msapplication>
4+
<tile>
5+
<square150x150logo src="<%= asset_path 'favicon/mstile-150x150.png' %>"/>
6+
<TileColor>#00aba9</TileColor>
7+
</tile>
8+
</msapplication>
9+
</browserconfig>
959 Bytes
Loading
1.44 KB
Loading

app/assets/images/favicon/favicon.ico

14.7 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "Commonfare",
3+
"icons": [
4+
{
5+
"src": "<%= asset_path 'favicon/android-chrome-192x192.png' %>",
6+
"sizes": "192x192",
7+
"type": "image/png"
8+
},
9+
{
10+
"src": "<%= asset_path 'favicon/android-chrome-512x512.png' %>",
11+
"sizes": "512x512",
12+
"type": "image/png"
13+
}
14+
],
15+
"theme_color": "#ffffff",
16+
"background_color": "#ffffff",
17+
"display": "standalone"
18+
}
3.58 KB
Loading
Loading
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<link rel="apple-touch-icon" sizes="180x180" href="<%= asset_path 'favicon/apple-touch-icon.png' %>">
2+
<link rel="icon" type="image/png" sizes="32x32" href="<%= asset_path 'favicon/favicon-32x32.png' %>">
3+
<link rel="icon" type="image/png" sizes="16x16" href="<%= asset_path 'favicon/favicon-16x16.png' %>">
4+
<link rel="manifest" href="<%= asset_path 'favicon/manifest.json' %>">
5+
<link rel="mask-icon" href="<%= asset_path 'favicon/safari-pinned-tab.svg' %>" color="#ec6c58">
6+
<link rel="shortcut icon" href="<%= asset_path 'favicon/favicon.ico' %>">
7+
<meta name="msapplication-config" content="<%= asset_path 'favicon/browserconfig.xml' %>">
8+
<meta name="theme-color" content="#ffffff">

app/views/layouts/application.html.erb

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
1111
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
12+
<%= render 'application/favicon' %>
1213
</head>
1314

1415
<body>

config/favicon.json

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"master_picture": "app/assets/images/cf_icon_red.png",
3+
"favicon_design": {
4+
"ios": {
5+
"picture_aspect": "background_and_margin",
6+
"background_color": "#ffffff",
7+
"margin": "14%",
8+
"assets": {
9+
"ios6_and_prior_icons": false,
10+
"ios7_and_later_icons": false,
11+
"precomposed_icons": false,
12+
"declare_only_default_icon": true
13+
}
14+
},
15+
"desktop_browser": [
16+
17+
],
18+
"windows": {
19+
"picture_aspect": "white_silhouette",
20+
"background_color": "#00aba9",
21+
"on_conflict": "override",
22+
"assets": {
23+
"windows_80_ie_10_tile": false,
24+
"windows_10_ie_11_edge_tiles": {
25+
"small": false,
26+
"medium": true,
27+
"big": false,
28+
"rectangle": false
29+
}
30+
}
31+
},
32+
"android_chrome": {
33+
"picture_aspect": "shadow",
34+
"theme_color": "#ffffff",
35+
"manifest": {
36+
"name": "Commonfare",
37+
"display": "standalone",
38+
"orientation": "not_set",
39+
"on_conflict": "override",
40+
"declared": true
41+
},
42+
"assets": {
43+
"legacy_icon": false,
44+
"low_resolution_icons": false
45+
}
46+
},
47+
"safari_pinned_tab": {
48+
"picture_aspect": "silhouette",
49+
"theme_color": "#ec6c58"
50+
}
51+
},
52+
"settings": {
53+
"scaling_algorithm": "Mitchell",
54+
"error_on_image_too_small": false
55+
}
56+
}

0 commit comments

Comments
 (0)