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
Boxiang Sun
gitlab-ce
Commits
8967fc04
Commit
8967fc04
authored
Sep 26, 2017
by
Alexis Reigel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use custom main favicon
parent
40d8d7df
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
app/helpers/appearances_helper.rb
app/helpers/appearances_helper.rb
+4
-0
app/helpers/page_layout_helper.rb
app/helpers/page_layout_helper.rb
+1
-0
spec/helpers/page_layout_helper_spec.rb
spec/helpers/page_layout_helper_spec.rb
+5
-0
No files found.
app/helpers/appearances_helper.rb
View file @
8967fc04
...
...
@@ -33,4 +33,8 @@ module AppearancesHelper
render
'shared/logo_type.svg'
end
end
def
brand_favicon
brand_item
&
.
favicon
end
end
app/helpers/page_layout_helper.rb
View file @
8967fc04
...
...
@@ -39,6 +39,7 @@ module PageLayoutHelper
end
def
favicon
return
brand_favicon
.
default
.
url
if
brand_favicon
return
'favicon-yellow.ico'
if
Gitlab
::
Utils
.
to_boolean
(
ENV
[
'CANARY'
])
return
'favicon-blue.ico'
if
Rails
.
env
.
development?
...
...
spec/helpers/page_layout_helper_spec.rb
View file @
8967fc04
...
...
@@ -55,6 +55,11 @@ describe PageLayoutHelper do
stub_env
(
'CANARY'
,
'true'
)
expect
(
helper
.
favicon
).
to
eq
'favicon-yellow.ico'
end
it
'uses the custom favicon if an favicon appearance is present'
do
create
:appearance
,
favicon:
fixture_file_upload
(
Rails
.
root
.
join
(
'spec/fixtures/dk.png'
))
expect
(
helper
.
favicon
).
to
match
%r{/uploads/-/system/appearance/favicon/
\d
+/default_dk.ico}
end
end
describe
'page_image'
do
...
...
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