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
Léo-Paul Géneau
gitlab-ce
Commits
8cad1c9f
Commit
8cad1c9f
authored
Mar 15, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add dark solarized theme for code preview
parent
7799b5bd
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
107 additions
and
6 deletions
+107
-6
app/assets/stylesheets/application.scss
app/assets/stylesheets/application.scss
+1
-0
app/assets/stylesheets/highlight/solarized_dark.scss
app/assets/stylesheets/highlight/solarized_dark.scss
+77
-0
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+7
-1
app/models/user.rb
app/models/user.rb
+1
-1
app/views/profiles/design.html.haml
app/views/profiles/design.html.haml
+7
-2
db/migrate/20130315124931_user_color_scheme.rb
db/migrate/20130315124931_user_color_scheme.rb
+12
-0
db/schema.rb
db/schema.rb
+2
-2
No files found.
app/assets/stylesheets/application.scss
View file @
8cad1c9f
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
@import
"highlight/white.scss"
;
@import
"highlight/white.scss"
;
@import
"highlight/dark.scss"
;
@import
"highlight/dark.scss"
;
@import
"highlight/solarized_dark.scss"
;
/**
/**
* UI themes:
* UI themes:
...
...
app/assets/stylesheets/highlight/solarized_dark.scss
0 → 100644
View file @
8cad1c9f
.solarized-dark
.highlight
{
pre
{
background-color
:
#002B36
;
color
:
#eee
;
}
.hll
{
background-color
:
#ffffcc
}
.c
{
color
:
#586E75
}
/* Comment */
.err
{
color
:
#93A1A1
}
/* Error */
.g
{
color
:
#93A1A1
}
/* Generic */
.k
{
color
:
#859900
}
/* Keyword */
.l
{
color
:
#93A1A1
}
/* Literal */
.n
{
color
:
#93A1A1
}
/* Name */
.o
{
color
:
#859900
}
/* Operator */
.x
{
color
:
#CB4B16
}
/* Other */
.p
{
color
:
#93A1A1
}
/* Punctuation */
.cm
{
color
:
#586E75
}
/* Comment.Multiline */
.cp
{
color
:
#859900
}
/* Comment.Preproc */
.c1
{
color
:
#586E75
}
/* Comment.Single */
.cs
{
color
:
#859900
}
/* Comment.Special */
.gd
{
color
:
#2AA198
}
/* Generic.Deleted */
.ge
{
color
:
#93A1A1
;
font-style
:
italic
}
/* Generic.Emph */
.gr
{
color
:
#DC322F
}
/* Generic.Error */
.gh
{
color
:
#CB4B16
}
/* Generic.Heading */
.gi
{
color
:
#859900
}
/* Generic.Inserted */
.go
{
color
:
#93A1A1
}
/* Generic.Output */
.gp
{
color
:
#93A1A1
}
/* Generic.Prompt */
.gs
{
color
:
#93A1A1
;
font-weight
:
bold
}
/* Generic.Strong */
.gu
{
color
:
#CB4B16
}
/* Generic.Subheading */
.gt
{
color
:
#93A1A1
}
/* Generic.Traceback */
.kc
{
color
:
#CB4B16
}
/* Keyword.Constant */
.kd
{
color
:
#268BD2
}
/* Keyword.Declaration */
.kn
{
color
:
#859900
}
/* Keyword.Namespace */
.kp
{
color
:
#859900
}
/* Keyword.Pseudo */
.kr
{
color
:
#268BD2
}
/* Keyword.Reserved */
.kt
{
color
:
#DC322F
}
/* Keyword.Type */
.ld
{
color
:
#93A1A1
}
/* Literal.Date */
.m
{
color
:
#2AA198
}
/* Literal.Number */
.s
{
color
:
#2AA198
}
/* Literal.String */
.na
{
color
:
#93A1A1
}
/* Name.Attribute */
.nb
{
color
:
#B58900
}
/* Name.Builtin */
.nc
{
color
:
#268BD2
}
/* Name.Class */
.no
{
color
:
#CB4B16
}
/* Name.Constant */
.nd
{
color
:
#268BD2
}
/* Name.Decorator */
.ni
{
color
:
#CB4B16
}
/* Name.Entity */
.ne
{
color
:
#CB4B16
}
/* Name.Exception */
.nf
{
color
:
#268BD2
}
/* Name.Function */
.nl
{
color
:
#93A1A1
}
/* Name.Label */
.nn
{
color
:
#93A1A1
}
/* Name.Namespace */
.nx
{
color
:
#93A1A1
}
/* Name.Other */
.py
{
color
:
#93A1A1
}
/* Name.Property */
.nt
{
color
:
#268BD2
}
/* Name.Tag */
.nv
{
color
:
#268BD2
}
/* Name.Variable */
.ow
{
color
:
#859900
}
/* Operator.Word */
.w
{
color
:
#93A1A1
}
/* Text.Whitespace */
.mf
{
color
:
#2AA198
}
/* Literal.Number.Float */
.mh
{
color
:
#2AA198
}
/* Literal.Number.Hex */
.mi
{
color
:
#2AA198
}
/* Literal.Number.Integer */
.mo
{
color
:
#2AA198
}
/* Literal.Number.Oct */
.sb
{
color
:
#586E75
}
/* Literal.String.Backtick */
.sc
{
color
:
#2AA198
}
/* Literal.String.Char */
.sd
{
color
:
#93A1A1
}
/* Literal.String.Doc */
.s2
{
color
:
#2AA198
}
/* Literal.String.Double */
.se
{
color
:
#CB4B16
}
/* Literal.String.Escape */
.sh
{
color
:
#93A1A1
}
/* Literal.String.Heredoc */
.si
{
color
:
#2AA198
}
/* Literal.String.Interpol */
.sx
{
color
:
#2AA198
}
/* Literal.String.Other */
.sr
{
color
:
#DC322F
}
/* Literal.String.Regex */
.s1
{
color
:
#2AA198
}
/* Literal.String.Single */
.ss
{
color
:
#2AA198
}
/* Literal.String.Symbol */
.bp
{
color
:
#268BD2
}
/* Name.Builtin.Pseudo */
.vc
{
color
:
#268BD2
}
/* Name.Variable.Class */
.vg
{
color
:
#268BD2
}
/* Name.Variable.Global */
.vi
{
color
:
#268BD2
}
/* Name.Variable.Instance */
.il
{
color
:
#2AA198
}
/* Literal.Number.Integer.Long */
}
app/helpers/application_helper.rb
View file @
8cad1c9f
...
@@ -128,7 +128,13 @@ module ApplicationHelper
...
@@ -128,7 +128,13 @@ module ApplicationHelper
end
end
def
user_color_scheme_class
def
user_color_scheme_class
current_user
.
dark_scheme
?
:black
:
:white
case
current_user
.
color_scheme_id
when
1
then
'white'
when
2
then
'black'
when
3
then
'solarized-dark'
else
'white'
end
end
end
def
show_last_push_widget?
(
event
)
def
show_last_push_widget?
(
event
)
...
...
app/models/user.rb
View file @
8cad1c9f
...
@@ -40,7 +40,7 @@ class User < ActiveRecord::Base
...
@@ -40,7 +40,7 @@ class User < ActiveRecord::Base
:recoverable
,
:rememberable
,
:trackable
,
:validatable
,
:omniauthable
,
:registerable
:recoverable
,
:rememberable
,
:trackable
,
:validatable
,
:omniauthable
,
:registerable
attr_accessible
:email
,
:password
,
:password_confirmation
,
:remember_me
,
:bio
,
:name
,
:username
,
attr_accessible
:email
,
:password
,
:password_confirmation
,
:remember_me
,
:bio
,
:name
,
:username
,
:skype
,
:linkedin
,
:twitter
,
:
dark_scheme
,
:theme_id
,
:force_random_password
,
:skype
,
:linkedin
,
:twitter
,
:
color_scheme_id
,
:theme_id
,
:force_random_password
,
:extern_uid
,
:provider
,
as:
[
:default
,
:admin
]
:extern_uid
,
:provider
,
as:
[
:default
,
:admin
]
attr_accessible
:projects_limit
,
:can_create_team
,
:can_create_group
,
as: :admin
attr_accessible
:projects_limit
,
:can_create_team
,
:can_create_group
,
as: :admin
...
...
app/views/profiles/design.html.haml
View file @
8cad1c9f
...
@@ -43,10 +43,15 @@
...
@@ -43,10 +43,15 @@
=
label_tag
do
=
label_tag
do
.prev
.prev
=
image_tag
"white.png"
=
image_tag
"white.png"
=
f
.
radio_button
:
dark_scheme
,
false
=
f
.
radio_button
:
color_scheme_id
,
1
White code preview
White code preview
=
label_tag
do
=
label_tag
do
.prev
.prev
=
image_tag
"dark.png"
=
image_tag
"dark.png"
=
f
.
radio_button
:
dark_scheme
,
true
=
f
.
radio_button
:
color_scheme_id
,
2
Dark code preview
Dark code preview
=
label_tag
do
.prev
=
image_tag
"dark.png"
=
f
.
radio_button
:color_scheme_id
,
3
Solarized Dark code preview
db/migrate/20130315124931_user_color_scheme.rb
0 → 100644
View file @
8cad1c9f
class
UserColorScheme
<
ActiveRecord
::
Migration
def
up
add_column
:users
,
:color_scheme_id
,
:integer
,
null:
false
,
default:
1
User
.
where
(
dark_scheme:
true
).
update_all
(
color_scheme_id:
2
)
remove_column
:users
,
:dark_scheme
end
def
down
add_column
:users
,
:dark_scheme
,
:boolean
,
null:
false
,
default:
false
remove_column
:users
,
:color_scheme_id
end
end
db/schema.rb
View file @
8cad1c9f
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#
#
# It's strongly recommended to check this file into your version control system.
# It's strongly recommended to check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
:version
=>
201303
04105317
)
do
ActiveRecord
::
Schema
.
define
(
:version
=>
201303
15124931
)
do
create_table
"events"
,
:force
=>
true
do
|
t
|
create_table
"events"
,
:force
=>
true
do
|
t
|
t
.
string
"target_type"
t
.
string
"target_type"
...
@@ -258,7 +258,6 @@ ActiveRecord::Schema.define(:version => 20130304105317) do
...
@@ -258,7 +258,6 @@ ActiveRecord::Schema.define(:version => 20130304105317) do
t
.
string
"linkedin"
,
:default
=>
""
,
:null
=>
false
t
.
string
"linkedin"
,
:default
=>
""
,
:null
=>
false
t
.
string
"twitter"
,
:default
=>
""
,
:null
=>
false
t
.
string
"twitter"
,
:default
=>
""
,
:null
=>
false
t
.
string
"authentication_token"
t
.
string
"authentication_token"
t
.
boolean
"dark_scheme"
,
:default
=>
false
,
:null
=>
false
t
.
integer
"theme_id"
,
:default
=>
1
,
:null
=>
false
t
.
integer
"theme_id"
,
:default
=>
1
,
:null
=>
false
t
.
string
"bio"
t
.
string
"bio"
t
.
integer
"failed_attempts"
,
:default
=>
0
t
.
integer
"failed_attempts"
,
:default
=>
0
...
@@ -269,6 +268,7 @@ ActiveRecord::Schema.define(:version => 20130304105317) do
...
@@ -269,6 +268,7 @@ ActiveRecord::Schema.define(:version => 20130304105317) do
t
.
boolean
"can_create_group"
,
:default
=>
true
,
:null
=>
false
t
.
boolean
"can_create_group"
,
:default
=>
true
,
:null
=>
false
t
.
boolean
"can_create_team"
,
:default
=>
true
,
:null
=>
false
t
.
boolean
"can_create_team"
,
:default
=>
true
,
:null
=>
false
t
.
string
"state"
t
.
string
"state"
t
.
integer
"color_scheme_id"
,
:default
=>
1
,
:null
=>
false
end
end
add_index
"users"
,
[
"admin"
],
:name
=>
"index_users_on_admin"
add_index
"users"
,
[
"admin"
],
:name
=>
"index_users_on_admin"
...
...
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