BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
15d54b29
Commit
15d54b29
authored
Jun 03, 2013
by
Christian Höltje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
design pages now uses the COLOR_SCHEMES
This unifies the code color-scheme code and makes adding new schemes a little easier.
parent
336750c9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
20 additions
and
23 deletions
+20
-23
dark-scheme-preview.png
app/assets/images/dark-scheme-preview.png
+0
-0
monokai-scheme-preview.png
app/assets/images/monokai-scheme-preview.png
+0
-0
solarized-dark-scheme-preview.png
app/assets/images/solarized-dark-scheme-preview.png
+0
-0
white-scheme-preview.png
app/assets/images/white-scheme-preview.png
+0
-0
dark.scss
app/assets/stylesheets/highlight/dark.scss
+1
-1
application_helper.rb
app/helpers/application_helper.rb
+12
-1
design.html.haml
app/views/profiles/design.html.haml
+6
-20
profile.rb
features/steps/profile/profile.rb
+1
-1
No files found.
app/assets/images/dark.png
→
app/assets/images/dark
-scheme-preview
.png
View file @
15d54b29
File moved
app/assets/images/monokai.png
→
app/assets/images/monokai
-scheme-preview
.png
View file @
15d54b29
File moved
app/assets/images/solarized
_dark
.png
→
app/assets/images/solarized
-dark-scheme-preview
.png
View file @
15d54b29
File moved
app/assets/images/white.png
→
app/assets/images/white
-scheme-preview
.png
View file @
15d54b29
File moved
app/assets/stylesheets/highlight/dark.scss
View file @
15d54b29
.
blac
k
.highlight
{
.
dar
k
.highlight
{
background-color
:
#333
;
...
...
app/helpers/application_helper.rb
View file @
15d54b29
...
...
@@ -4,12 +4,23 @@ require 'uri'
module
ApplicationHelper
COLOR_SCHEMES
=
{
1
=>
'white'
,
2
=>
'
blac
k'
,
2
=>
'
dar
k'
,
3
=>
'solarized-dark'
,
4
=>
'monokai'
,
}
COLOR_SCHEMES
.
default
=
'white'
# Helper method to access the COLOR_SCHEMES
#
# The keys are the `color_scheme_ids`
# The values are the `name` of the scheme.
#
# The preview images are `name-scheme-preview.png`
# The stylesheets should use the css class `.name`
def
color_schemes
COLOR_SCHEMES
.
freeze
end
# Check if a particular controller is the current one
#
# args - One or more controller names to check
...
...
app/views/profiles/design.html.haml
View file @
15d54b29
...
...
@@ -40,23 +40,9 @@
%i
.icon-ok
Saved
.code_highlight_opts
=
label_tag
do
.prev
=
image_tag
"white.png"
=
f
.
radio_button
:color_scheme_id
,
1
White
=
label_tag
do
.prev
=
image_tag
"dark.png"
=
f
.
radio_button
:color_scheme_id
,
2
Dark
=
label_tag
do
.prev
=
image_tag
"solarized_dark.png"
=
f
.
radio_button
:color_scheme_id
,
3
Solarized Dark
=
label_tag
do
.prev
=
image_tag
"monokai.png"
=
f
.
radio_button
:color_scheme_id
,
4
Monokai
-
color_schemes
.
each
do
|
color_scheme_id
,
color_scheme
|
=
label_tag
do
.prev
=
image_tag
"
#{
color_scheme
}
-scheme-preview.png"
=
f
.
radio_button
:color_scheme_id
,
color_scheme_id
=
color_scheme
.
gsub
(
/[-_]+/
,
' '
).
humanize
features/steps/profile/profile.rb
View file @
15d54b29
...
...
@@ -74,7 +74,7 @@ class Profile < Spinach::FeatureSteps
When
"I change my code preview theme"
do
within
'.code-preview-theme'
do
choose
"Solarized
D
ark"
choose
"Solarized
d
ark"
end
end
...
...
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