Commit 880320fd authored by Jacob Schatz's avatar Jacob Schatz

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

parent dca28c94
......@@ -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.paramsWithRich(url, params));
}
return axios.get(this.url, this.params);
return axios.get(this.url, this.paramsWithRich(this.url, this.params));
},
getBase64Content(url) {
......
......@@ -67,6 +67,13 @@ header {
height: 70vh;
margin-top: -5px;
}
#binary-viewer {
height: 70vh;
overflow: auto;
margin-top: -5px;
margin-left: 10px;
}
}
#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