Skip to content

TagSpaces is an offline, open source, document manager with tagging support

Added custom css for MD-files rendering

uggrockf6a327aad1d1
diff --git a/data/ext/viewerMD/bootstrapLite.css b/data/ext/viewerMD/bootstrapLite.css
new file mode 100644
index 000000000..662ae4852
--- /dev/null
+++ b/data/ext/viewerMD/bootstrapLite.css
@@ -0,0 +1,6 @@
+/*
+ * Modified and lightened version of Twitter Bootstrap, by Thiht
+ * Originally licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+*/
+body{background-color:#fff;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;margin:0 auto;padding-top:30px;width:940px}h1,h2,h3,h4,h5,h6{color:inherit;font-family:inherit;font-weight:700;line-height:1;margin:10px 0;text-rendering:optimizelegibility}h1,h2,h3{line-height:40px}h4,h5,h6{line-height:20px}h1{font-size:36px}h2{font-size:30px}h3{font-size:24px}h4{font-size:18px}h5{font-size:14px}h6{font-size:12px}p{margin:0 0 10px}strong{font-weight:700}em{font-style:italic}a{color:#08c;text-decoration:none}a:hover{color:#005580;text-decoration:underline}blockquote{border-left:5px solid #ddd;margin:0 0 20px;padding:0 0 0 15px}blockquote p{font-size:16px;font-weight:300;line-height:25px;margin-bottom:0}blockquote:before,blockquote:after{content:""}cite{font-style:normal}li{line-height:20px}ul,ol{margin:0 0 10px 25px;padding:0}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}code,pre{border-radius:3px;color:#333;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;padding:0 3px 2px}code{background-color:#f7f7f9;border:1px solid #e1e1e8;color:#d14;padding:2px 4px}pre{background-color:#f5f5f5;border:1px solid rgba(0,0,0,0.15);border-radius:4px;display:block;font-size:13px;line-height:20px;margin:0 0 10px;padding:9.5px;white-space:pre-wrap;word-break:break-all;word-wrap:break-word}pre code{background-color:transparent;border:0;color:inherit;padding:0}hr{border:0;border-bottom:1px solid #eee;border-top:1px solid #ddd;margin:20px 0}abbr[title]{border-bottom:1px dotted #999;cursor:help}
\ No newline at end of file
diff --git a/data/ext/viewerMD/extension.js b/data/ext/viewerMD/extension.js
index 5984f5c1a..d806599a3 100644
--- a/data/ext/viewerMD/extension.js
+++ b/data/ext/viewerMD/extension.js
@@ -16,6 +16,7 @@ var containerElID = undefined;
exports.init = function(filePath, containerElementID) {
console.debug("Initalization MD Viewer...");
containerElID = containerElementID;
+// require(['css!./bootstrapLite.css']);
require(['./showdown/showdown'], function() {
md2htmlConverter = new Showdown.converter();
IOAPI.loadTextFile(filePath);