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
76be57fc
Unverified
Commit
76be57fc
authored
Jan 26, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Init highlgiht js and render for blob. Improve css for it
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
b95a56c1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
27 deletions
+25
-27
main.js.coffee
app/assets/javascripts/main.js.coffee
+2
-0
files.scss
app/assets/stylesheets/generic/files.scss
+12
-25
_text.html.haml
app/views/projects/blob/_text.html.haml
+11
-2
No files found.
app/assets/javascripts/main.js.coffee
View file @
76be57fc
...
...
@@ -59,6 +59,8 @@ $ ->
# Click a .one_click_select field, select the contents
$
(
".one_click_select"
).
on
'click'
,
->
$
(
@
).
select
()
hljs
.
initHighlightingOnLoad
()
$
(
'.remove-row'
).
bind
'ajax:success'
,
->
$
(
this
).
closest
(
'li'
).
fadeOut
()
...
...
app/assets/stylesheets/generic/files.scss
View file @
76be57fc
...
...
@@ -144,7 +144,7 @@
&
.code
{
padding
:
0
;
table
.lines
{
.highlighted-data
{
border
:
none
;
box-shadow
:
none
;
margin
:
0px
;
...
...
@@ -158,47 +158,34 @@
font-size
:
12px
!
important
;
line-height
:
16px
!
important
;
margin
:
0
;
padding
:
10px
0
;
}
td
{
border
:
none
;
margin
:
0
;
padding
:
0
;
vertical-align
:
top
;
&
:first-child
{
background
:
#eee
;
width
:
50px
;
}
&
:last-child
{
}
}
tr
:hover
{
background
:
none
;
.hljs
{
padding
:
0
;
}
pre
.line_numbers
{
color
:
#666
;
padding
:
10px
6px
10px
0
;
.line-numbers
{
padding
:
10px
;
text-align
:
right
;
background
:
#EEE
;
float
:
left
;
width
:
60px
;
a
{
color
:
#666
;
display
:
block
;
font-size
:
12px
!
important
;
line-height
:
16px
!
important
;
i
{
display
:
none
;
font-size
:
14px
;
line-height
:
14px
;
}
&
:hover
i
{
display
:
in
herit
;
display
:
in
line
;
}
}
}
.highlight
{
border-left
:
1px
solid
#DEE2E3
;
overflow
:
auto
;
overflow-y
:
hidden
;
...
...
app/views/projects/blob/_text.html.haml
View file @
76be57fc
...
...
@@ -8,7 +8,16 @@
-
else
.file-content.code
-
unless
blob
.
empty?
%div
{
class:
user_color_scheme_class
}
=
raw
blob
.
colorize
(
formatter: :gitlab
)
%div
.highlighted-data
{
class:
user_color_scheme_class
}
.line-numbers
-
blob
.
data
.
lines
.
size
.
times
do
|
index
|
-
i
=
index
+
1
=
link_to
"#L
#{
i
}
"
,
id:
"L
#{
i
}
"
,
rel:
"#L
#{
i
}
"
do
%i
.icon-link
=
i
.highlight
%pre
%code
=
raw
blob
.
data
-
else
%p
.nothing_here_message
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