BigW Consortium Gitlab

Commit 880320fd by Jacob Schatz

Add Readme rendering by checking out the `md` ext.

parent dca28c94
...@@ -12,11 +12,20 @@ let RepoService = { ...@@ -12,11 +12,20 @@ let RepoService = {
this.url = url; 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) { getContent(url) {
if(url){ if(url){
return axios.get(url, this.params); return axios.get(url, this.paramsWithRich(url, params));
} }
return axios.get(this.url, this.params); return axios.get(this.url, this.paramsWithRich(this.url, this.params));
}, },
getBase64Content(url) { getBase64Content(url) {
......
...@@ -67,6 +67,13 @@ header { ...@@ -67,6 +67,13 @@ header {
height: 70vh; height: 70vh;
margin-top: -5px; margin-top: -5px;
} }
#binary-viewer {
height: 70vh;
overflow: auto;
margin-top: -5px;
margin-left: 10px;
}
} }
#view-toggler { #view-toggler {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment