Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
e15032ed
Commit
e15032ed
authored
Feb 16, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
override favicon for development to find tabs more easily
parent
35b31ba8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
1 deletion
+17
-1
app/assets/images/favicon-purple.ico
app/assets/images/favicon-purple.ico
+0
-0
app/helpers/page_layout_helper.rb
app/helpers/page_layout_helper.rb
+4
-0
app/views/layouts/_head.html.haml
app/views/layouts/_head.html.haml
+1
-1
spec/helpers/page_layout_helper_spec.rb
spec/helpers/page_layout_helper_spec.rb
+12
-0
No files found.
app/assets/images/favicon-purple.ico
0 → 100644
View file @
e15032ed
5.3 KB
app/helpers/page_layout_helper.rb
View file @
e15032ed
...
...
@@ -34,6 +34,10 @@ module PageLayoutHelper
end
end
def
favicon
Rails
.
env
.
development?
?
'favicon-purple.ico'
:
'favicon.ico'
end
def
page_image
default
=
image_url
(
'gitlab_logo.png'
)
...
...
app/views/layouts/_head.html.haml
View file @
e15032ed
...
...
@@ -23,7 +23,7 @@
%title
=
page_title
(
site_name
)
%meta
{
name:
"description"
,
content:
page_description
}
=
favicon_link_tag
'favicon.ico'
=
favicon_link_tag
favicon
=
stylesheet_link_tag
"application"
,
media:
"all"
=
stylesheet_link_tag
"print"
,
media:
"print"
...
...
spec/helpers/page_layout_helper_spec.rb
View file @
e15032ed
...
...
@@ -40,6 +40,18 @@ describe PageLayoutHelper do
end
end
describe
'favicon'
do
it
'defaults to favicon.ico'
do
allow
(
Rails
).
to
receive
(
:env
).
and_return
(
ActiveSupport
::
StringInquirer
.
new
(
'production'
))
expect
(
helper
.
favicon
).
to
eq
'favicon.ico'
end
it
'has purple favicon for development'
do
allow
(
Rails
).
to
receive
(
:env
).
and_return
(
ActiveSupport
::
StringInquirer
.
new
(
'development'
))
expect
(
helper
.
favicon
).
to
eq
'favicon-purple.ico'
end
end
describe
'page_image'
do
it
'defaults to the GitLab logo'
do
expect
(
helper
.
page_image
).
to
end_with
'assets/gitlab_logo.png'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment