Changed body weight to 300 and headers to 700. Now uses Roboto Mono instead of Ubuntu Mono since Roboto Slab was being used for the body. Added CSS styling to code tags. Fixed bug with markdown source being fed a Buffer when it needed a String (why did this work before..?). Added a TODO.md file.

master
kts of kettek 2016-01-21 11:44:26 -08:00
parent 89fd896337
commit aed7fdfb66
4 changed files with 30 additions and 6 deletions

6
TODO.md 100644
View File

@ -0,0 +1,6 @@
# TODO
* Create a universal, or perhaps section-specific, link reference dictionary. e.g., [Celestial] MD in any page will properly resolve to [/universes/Celestial] if that is defined as a link reference.
* Create a wiki tree hierarchy view mode
* Create actual login restrictions and credentials
* Allow file uploading
* Make searching a thing

View File

@ -4,7 +4,7 @@
<link rel="icon" type="image/png" href="favicon.png">
<title>qwiki @@PAGE@@</title>
<meta charset="UTF-8" />
<link href='https://fonts.googleapis.com/css?family=Oswald|Roboto+Slab|Ubuntu+Mono' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Oswald|Roboto+Slab:300,700|Roboto+Mono' rel='stylesheet' type='text/css'>
<link href='/style.css' rel='stylesheet' type='text/css'>
</head>
<body>
@ -19,7 +19,6 @@
<ul id="controls">
@@CONTROLS@@
</ul>
<div id="index">
</div>

View File

@ -260,7 +260,7 @@ QWiki.prototype.convertAndSave = function(path, name, source, cb) {
if (!(name in this.formats)) {
name = 'raw';
}
console.log('converting to ' + name);
console.log('converting to ' + name + ' with path ' + path);
var converted = this.formats[name].convert(source);
r_mkdir(m_path.dirname('cache'+path+'.html'), 0777, function() {
fs.writeFile('cache'+path+'.html', converted, function(err) {
@ -336,7 +336,8 @@ m_markdownit.use(require('markdown-it-deflist'));
m_markdownit.use(require('markdown-it-header-sections'));
m_markdownit.use(require('markdown-it-sup'));
qwiki.addFormat('md', 'Markdown', function(source) {
return m_markdownit.render(source);
// source is a Buffer, but render seems to need a String
return m_markdownit.render(source.toString());
});
qwiki.setDefault('format', 'md');

View File

@ -13,6 +13,7 @@ html,body {
overflow: auto;
font-family: 'Roboto Slab', serif;
font-size: 100%;
font-weight: 300;
position: relative;
padding-left: 2em;
padding-right: 2em;
@ -25,12 +26,28 @@ html,body {
-moz-box-shadow: inset 0px 0px 3px 0px rgba(0,0,0,0.75);
box-shadow: inset 0px 0px 3px 0px rgba(0,0,0,0.75);*/
}
#content h1, #content h2, #content h3, #content h4, #content h5, #content h6 {
font-weight: 700;
}
#content textarea {
font-family: 'Ubuntu Mono', monospace;
font-family: 'Roboto Mono', monospace;
min-height: 256px;
height: 75%;
width: 100%;
}
#content code {
background-color: #3c3c57;
color: #f3f3d8;
font-family: 'Roboto Mono', courier, monospace;
padding: 0 0.3em 0.1em 0.3em;
font-size: 90%;
}
#content pre code {
display: block;
width: 100%;
padding: 1em;
box-shadow: inset 2px 2px 8px #0c0c27;
}
#footer {
font-size: 50%;
text-align: center;
@ -196,7 +213,7 @@ input {
padding: 0.75em;
border: solid 1px #d5d5d5;
outline: 0;
font-family: 'Ubuntu Mono', monospace;
font-family: 'Roboto Mono', monospace;
width: 200px;
background: #FFFFFF;
}
@ -332,6 +349,7 @@ dt {
}
dd {
text-align: left;
padding: 0 0 0.5em 0;
}
/* content table styling */
table {