View substance-hub-thinking.txt
DB OPERATIONS
=================================
{}
Substance Storage API
========================
View ams-contributor.js
var _ = require('underscore');
var Document = require('lens/substance/document');
var AMSContributor = function(node, doc) {
Document.Node.call(this, node, doc);
};
AMSContributor.type = {
"id": "contributor",
"parent": "content",
View style.scss
.sc-bib-items-panel {
.se-bib-item {
position: relative;
font-size: $small-font-size;
padding: $default-padding;
border-bottom: 1px solid $border-color;
border-left: 3px solid transparent;
View api-cache.js
// Slow function that we want to cache
getResourcesMap = function(cb) {
...
cb(null, res);
}
// Making a new cache by passing slow function to
// the constructor and the refresh interval
var resourceMapCache = new APICache(getResourceMap, 5000);
View api-cache.js
// Slow function that we want to cache
getResourcesMap = function(cb) {
...
cb(null, res);
}
// Making a new cache by passing slow function to
// the constructor and the refresh interval
var resourceMapCache = new APICache(getResourceMap, 5000);
View index.html
<html>
<head>
<meta charset="UTF-8">
<style>
body {
line-height: 20px;
font-size: 15px;
color: #555;
View htm-editor.js
class Toolbar extends React.Component {
render() {
return $$("div", { className: "toolbar"},
$$(TextToolComponent, { tool: 'text', title: 'Switch text'}),
$$(ToolComponent, { tool: 'emphasis', classNames: ['button', 'tool']}, "Emphasis"),
$$(ToolComponent, { tool: 'strong', classNames: ['button', 'tool']}, "Strong")
);
}
}
View gist:cdc8e99c9547aab0066c
/* Variables
-------------------------------------------------- */
$border-color: #ddd;
$fill-light-color: #f8f8f8;
$fill-white-color: #fff;
$fill-dark-color: #404040;
/* Mixins
-------------------------------------------------- */
View tahi-data-spec.html
<html>
<head>
<!-- no title annotations possible with meta tags so moved into html body -->
<!-- no abstract annotations possible with meta tags so moved into html body -->
<meta name="doi" content="10.1234/myJournal.00001"/>
<meta name="status" content="in-review"/>
<meta name="creator" content="userx"/>
<meta name="created-at" content="2015-05-12T08:20:19.657Z"/>
<meta name="updated-at" content="2015-05-13T04:18:42.657Z"/>
</head>
View tahi-spec.md

The Tahi Article Format

Note: The following spec is considered a draft and open for discussion.

Tahi Source XML

Content in Tahi is considered data. That data lives in several places: Figures and references are considered external resources that live in separate DB tables. The main content however is expressed in XML using a strict schema. By choosing XML, we can utilize toolchains for automated data processing (e.g XSLT for normalizing content, server side maintenance scripts, etc.).

Goals: