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
iv
gitlab-ce
Commits
3aee5535
Commit
3aee5535
authored
Nov 26, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
colorscheme for code view
parent
139a3322
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
3 deletions
+80
-3
app/assets/stylesheets/highlight.black.css.scss
app/assets/stylesheets/highlight.black.css.scss
+67
-0
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+8
-0
app/views/refs/_tree.html.haml
app/views/refs/_tree.html.haml
+1
-1
app/views/refs/_tree_file.html.haml
app/views/refs/_tree_file.html.haml
+4
-2
No files found.
app/assets/stylesheets/highlight.black.css.scss
0 → 100644
View file @
3aee5535
.black
.highlighttable
{
background
:
#111
;
pre
{
color
:
#eee
}
.highlight
{
background
:
#111
;
border-left
:
1px
solid
#555
;
}
.hll
{
background-color
:
#ffffff
}
.c
{
color
:
#888888
;
font-style
:
italic
}
/* Comment */
.err
{
color
:
#a61717
;
background-color
:
#e3d2d2
}
/* Error */
.k
{
color
:
#CDA869
;
font-weight
:
bold
}
/* Keyword */
.kp
{
color
:
#CDA869
;
font-weight
:
bold
}
/* Keyword */
.cm
{
color
:
#888888
}
/* Comment.Multiline */
.cp
{
color
:
#cc0000
;
font-weight
:
bold
}
/* Comment.Preproc */
.c1
{
color
:
#888888
}
/* Comment.Single */
.cs
{
color
:
#cc0000
;
font-weight
:
bold
;
background-color
:
#fff0f0
}
/* Comment.Special */
.gd
{
color
:
#000000
;
background-color
:
#ffdddd
}
/* Generic.Deleted */
.ge
{
font-style
:
italic
}
/* Generic.Emph */
.gr
{
color
:
#aa0000
}
/* Generic.Error */
.gh
{
color
:
#303030
}
/* Generic.Heading */
.gi
{
color
:
#000000
;
background-color
:
#ddffdd
}
/* Generic.Inserted */
.go
{
color
:
#888888
}
/* Generic.Output */
.gp
{
color
:
#555555
}
/* Generic.Prompt */
.gs
{
font-weight
:
bold
}
/* Generic.Strong */
.gu
{
color
:
#606060
}
/* Generic.Subheading */
.gt
{
color
:
#aa0000
}
/* Generic.Traceback */
.highlight
.kc
{
font-weight
:bold
;}
/* Keyword.Constant */
.highlight
.kd
{
font-weight
:bold
;}
/* Keyword.Declaration */
.highlight
.kn
{
font-weight
:bold
;}
/* Keyword.Namespace */
.highlight
.kp
{
font-weight
:bold
;}
/* Keyword.Pseudo */
.highlight
.kr
{
font-weight
:bold
;}
/* Keyword.Reserved */
.highlight
.kt
{
color
:
#458
;
font-weight
:bold
;}
/* Keyword.Type */
.m
{
color
:
#0000DD
;
font-weight
:
bold
}
/* Literal.Number */
.p
{
color
:
#eee
;
}
.s
{
color
:
#dd2200
;
background-color
:
#fff0f0
}
/* Literal.String */
.highlight
.na
{
color
:
#008080
;}
/* Name.Attribute */
.highlight
.nb
{
color
:
#0086B3
;}
/* Name.Builtin */
.highlight
.nc
{
color
:
#4d3
;
font-weight
:bold
;}
/* Name.Class */
.highlight
.no
{
color
:turquoise
;}
/* Name.Constant */
.highlight
.ni
{
color
:
#800080
;}
.highlight
.ne
{
color
:
#900
;
font-weight
:bold
;}
/* Name.Exception */
.highlight
.nf
{
color
:aqua
;
font-weight
:bold
;}
/* Name.Function */
.highlight
.nn
{
color
:
#79C3E0
;
font-weight
:bold
;}
/* Name.Namespace */
.highlight
.nt
{
color
:
#fc5
;}
/* Name.Tag */
.highlight
.nv
{
color
:
#008080
;}
/* Name.Variable */
.py
{
color
:
#336699
;
font-weight
:
bold
}
/* Name.Property */
.ow
{
color
:
#008800
}
/* Operator.Word */
.w
{
color
:
#bbbbbb
}
/* Text.Whitespace */
.mf
{
color
:
#0000DD
;
font-weight
:
bold
}
/* Literal.Number.Float */
.mh
{
color
:
#0000DD
;
font-weight
:
bold
}
/* Literal.Number.Hex */
.highlight
.mi
{
color
:
#099
;}
/* Literal.Number.Integer */
.mo
{
color
:
#0000DD
;
font-weight
:
bold
}
/* Literal.Number.Oct */
.sb
{
color
:
#dd2200
;
background-color
:
#fff0f0
}
/* Literal.String.Backtick */
.highlight
.sc
{
color
:
#d14
;}
/* Literal.String.Char */
.sd
{
color
:
#dd2200
;
background-color
:
#fff0f0
}
/* Literal.String.Doc */
.highlight
.s2
{
color
:orange
;}
/* Literal.String.Double */
.highlight
.se
{
color
:orange
;}
/* Literal.String.Escape */
.highlight
.sh
{
color
:orange
;}
/* Literal.String.Heredoc */
.highlight
.si
{
color
:orange
;}
/* Literal.String.Interpol */
.highlight
.sx
{
color
:orange
;}
/* Literal.String.Other */
.highlight
.sr
{
color
:orange
;}
/* Literal.String.Regex */
.highlight
.s1
{
color
:orange
;}
/* Literal.String.Single */
.highlight
.ss
{
color
:orange
;}
/* Literal.String.Symbol */
.bp
{
color
:
#003388
}
/* Name.Builtin.Pseudo */
.vc
{
color
:
#336699
}
/* Name.Variable.Class */
.vg
{
color
:
#dd7700
}
/* Name.Variable.Global */
.vi
{
color
:
cyan
}
}
app/helpers/projects_helper.rb
View file @
3aee5535
...
...
@@ -15,4 +15,12 @@ module ProjectsHelper
rescue
nil
end
def
switch_colorscheme_link
(
opts
)
if
cookies
[
:colorschema
].
blank?
link_to_function
"paint it black!"
,
"$.cookie('colorschema','black'); window.location.reload()"
,
opts
else
link_to_function
"paint it white!"
,
"$.cookie('colorschema',''); window.location.reload()"
,
opts
end
end
end
app/views/refs/_tree.html.haml
View file @
3aee5535
...
...
@@ -3,7 +3,7 @@
%span
%d
=
link_to
tree_project_ref_path
(
@project
,
@ref
,
:path
=>
nil
),
:remote
=>
true
do
=
@project
.
nam
e
=
@project
.
cod
e
-
tree
.
breadcrumbs
(
2
)
do
|
link
|
\/
=
link
...
...
app/views/refs/_tree_file.html.haml
View file @
3aee5535
...
...
@@ -5,12 +5,14 @@
=
name
=
link_to
"raw"
,
blob_project_ref_path
(
@project
,
@ref
,
:path
=>
params
[
:path
]
),
:class
=>
"right"
,
:target
=>
"_blank"
=
link_to
"history"
,
project_commits_path
(
@project
,
:path
=>
params
[
:path
],
:ref
=>
@ref
),
:class
=>
"right"
,
:style
=>
"margin-right:10px;"
=
switch_colorscheme_link
(
:class
=>
"right"
,
:style
=>
"margin-right:10px;color:orange"
)
%br
/
-
if
file
.
text?
.view_file_content
-
unless
file
.
empty?
:erb
<%=
raw
file
.
colorize
%>
%div
{
:class
=>
cookies
[
:colorschema
]}
:erb
<%=
raw
file
.
colorize
%>
-
else
%h3
%center
Empty file
...
...
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