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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
20cf7041
Commit
20cf7041
authored
Aug 04, 2020
by
Tim Zallmann
Committed by
Paul Slaughter
Aug 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First test of startup css
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/38052
parent
5188dece
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
4 deletions
+29
-4
.scss-lint.yml
.scss-lint.yml
+1
-0
app/assets/stylesheets/application.scss
app/assets/stylesheets/application.scss
+6
-0
app/assets/stylesheets/startup/startup-general.scss
app/assets/stylesheets/startup/startup-general.scss
+1
-0
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+12
-0
app/views/layouts/_head.html.haml
app/views/layouts/_head.html.haml
+6
-3
config/application.rb
config/application.rb
+2
-0
package.json
package.json
+1
-1
No files found.
.scss-lint.yml
View file @
20cf7041
...
@@ -7,6 +7,7 @@ scss_files:
...
@@ -7,6 +7,7 @@ scss_files:
exclude
:
exclude
:
-
'
app/assets/stylesheets/pages/emojis.scss'
-
'
app/assets/stylesheets/pages/emojis.scss'
-
'
app/assets/stylesheets/startup/startup-general.scss'
linters
:
linters
:
# Reports when you use improper spacing around ! (the "bang") in !default,
# Reports when you use improper spacing around ! (the "bang") in !default,
...
...
app/assets/stylesheets/application.scss
View file @
20cf7041
...
@@ -51,3 +51,9 @@
...
@@ -51,3 +51,9 @@
@media
print
{
@media
print
{
@import
'print'
;
@import
'print'
;
}
}
/* Rules for overriding cloaking in startup-general.scss */
.container-limited
,
.modal-dialog
{
display
:
block
;
}
app/assets/stylesheets/startup/startup-general.scss
0 → 100644
View file @
20cf7041
This diff is collapsed.
Click to expand it.
app/helpers/application_helper.rb
View file @
20cf7041
...
@@ -231,6 +231,18 @@ module ApplicationHelper
...
@@ -231,6 +231,18 @@ module ApplicationHelper
"
#{
request
.
path
}
?
#{
options
.
compact
.
to_param
}
"
"
#{
request
.
path
}
?
#{
options
.
compact
.
to_param
}
"
end
end
def
use_startup_css?
params
[
:startup_css
]
==
'true'
||
cookies
[
'startup_css'
]
==
'true'
end
def
stylesheet_link_tag_defer
(
path
)
if
use_startup_css?
stylesheet_link_tag
(
path
,
media:
"print"
,
onload:
"this.onload=null;this.media='all'"
)
else
stylesheet_link_tag
(
path
,
media:
"all"
)
end
end
def
outdated_browser?
def
outdated_browser?
browser
.
ie?
browser
.
ie?
end
end
...
...
app/views/layouts/_head.html.haml
View file @
20cf7041
...
@@ -49,14 +49,17 @@
...
@@ -49,14 +49,17 @@
=
favicon_link_tag
favicon
,
id:
'favicon'
,
data:
{
original_href:
favicon
},
type:
'image/png'
=
favicon_link_tag
favicon
,
id:
'favicon'
,
data:
{
original_href:
favicon
},
type:
'image/png'
-
if
use_startup_css?
%style
{
type:
"text/css"
}
=
Rails
.
application
.
assets_manifest
.
find_sources
(
'startup/startup-general.css'
).
first
.
to_s
.
html_safe
-
if
user_application_theme
==
'gl-dark'
-
if
user_application_theme
==
'gl-dark'
=
stylesheet_link_tag
"application_dark"
,
media:
"all
"
=
stylesheet_link_tag
_defer
"application_dark
"
-
else
-
else
=
stylesheet_link_tag
"application"
,
media:
"all
"
=
stylesheet_link_tag
_defer
"application
"
=
stylesheet_link_tag
"disable_animations"
,
media:
"all"
if
Rails
.
env
.
test?
||
Gitlab
.
config
.
gitlab
[
'disable_animations'
]
=
stylesheet_link_tag
"disable_animations"
,
media:
"all"
if
Rails
.
env
.
test?
||
Gitlab
.
config
.
gitlab
[
'disable_animations'
]
=
stylesheet_link_tag
'performance_bar'
if
performance_bar_enabled?
=
stylesheet_link_tag
'performance_bar'
if
performance_bar_enabled?
=
stylesheet_link_tag
"highlight/themes/
#{
user_color_scheme
}
"
,
media:
"all
"
=
stylesheet_link_tag
_defer
"highlight/themes/
#{
user_color_scheme
}
"
=
Gon
::
Base
.
render_data
(
nonce:
content_security_policy_nonce
)
=
Gon
::
Base
.
render_data
(
nonce:
content_security_policy_nonce
)
...
...
config/application.rb
View file @
20cf7041
...
@@ -169,6 +169,8 @@ module Gitlab
...
@@ -169,6 +169,8 @@ module Gitlab
config
.
assets
.
precompile
<<
"application_dark.css"
config
.
assets
.
precompile
<<
"application_dark.css"
config
.
assets
.
precompile
<<
"startup/*.css"
config
.
assets
.
precompile
<<
"print.css"
config
.
assets
.
precompile
<<
"print.css"
config
.
assets
.
precompile
<<
"mailer.css"
config
.
assets
.
precompile
<<
"mailer.css"
config
.
assets
.
precompile
<<
"mailer_client_specific.css"
config
.
assets
.
precompile
<<
"mailer_client_specific.css"
...
...
package.json
View file @
20cf7041
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
"prettier-staged-save"
:
"node ./scripts/frontend/prettier.js save"
,
"prettier-staged-save"
:
"node ./scripts/frontend/prettier.js save"
,
"prettier-all"
:
"node ./scripts/frontend/prettier.js check-all"
,
"prettier-all"
:
"node ./scripts/frontend/prettier.js check-all"
,
"prettier-all-save"
:
"node ./scripts/frontend/prettier.js save-all"
,
"prettier-all-save"
:
"node ./scripts/frontend/prettier.js save-all"
,
"stylelint"
:
"yarn stylelint-file 'app/assets/stylesheets/**/*.*' 'ee/app/assets/stylesheets/**/*.*' '!**/vendors/**'"
,
"stylelint"
:
"yarn stylelint-file 'app/assets/stylesheets/**/*.*' 'ee/app/assets/stylesheets/**/*.*' '!
app/assets/stylesheets/startup/startup-general.scss' '!
**/vendors/**'"
,
"stylelint-file"
:
"BROWSERSLIST_IGNORE_OLD_DATA=true node node_modules/stylelint/bin/stylelint.js"
,
"stylelint-file"
:
"BROWSERSLIST_IGNORE_OLD_DATA=true node node_modules/stylelint/bin/stylelint.js"
,
"stylelint-create-utility-map"
:
"node scripts/frontend/stylelint/stylelint-utility-map.js"
,
"stylelint-create-utility-map"
:
"node scripts/frontend/stylelint/stylelint-utility-map.js"
,
"test"
:
"node scripts/frontend/test"
,
"test"
:
"node scripts/frontend/test"
,
...
...
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