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
Boxiang Sun
gitlab-ce
Commits
880320fd
Commit
880320fd
authored
Jul 11, 2017
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Readme rendering by checking out the `md` ext.
parent
dca28c94
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
app/assets/javascripts/repo/repo_service.js
app/assets/javascripts/repo/repo_service.js
+11
-2
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+7
-0
No files found.
app/assets/javascripts/repo/repo_service.js
View file @
880320fd
...
...
@@ -12,11 +12,20 @@ let RepoService = {
this
.
url
=
url
;
},
paramsWithRich
(
url
)
{
// copy the obj so we don't modify perm.
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
params
));
if
(
url
.
substr
(
url
.
length
-
2
)
===
'
md
'
)
{
params
.
params
.
viewer
=
'
rich
'
;
}
return
params
;
},
getContent
(
url
)
{
if
(
url
){
return
axios
.
get
(
url
,
this
.
params
);
return
axios
.
get
(
url
,
this
.
params
WithRich
(
url
,
params
));
}
return
axios
.
get
(
this
.
url
,
this
.
params
);
return
axios
.
get
(
this
.
url
,
this
.
params
WithRich
(
this
.
url
,
this
.
params
)
);
},
getBase64Content
(
url
)
{
...
...
app/assets/stylesheets/pages/repo.scss
View file @
880320fd
...
...
@@ -67,6 +67,13 @@ header {
height
:
70vh
;
margin-top
:
-5px
;
}
#binary-viewer
{
height
:
70vh
;
overflow
:
auto
;
margin-top
:
-5px
;
margin-left
:
10px
;
}
}
#view-toggler
{
...
...
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