Skip to content
Permalink
Browse files

Add litterate documentation

  • Loading branch information...
thesephist committed Apr 1, 2019
1 parent 8de4afd commit 5375031a0a69cfa74824d58263bcf97d0a87a0e6
Showing with 1,114 additions and 1 deletion.
  1. +32 −0 docs/index.html
  2. +117 −0 docs/main.css
  3. BIN docs/screenshot.png
  4. +62 −0 docs/src/api.js.html
  5. +144 −0 docs/src/index.js.html
  6. +132 −0 docs/src/models.js.html
  7. +613 −0 docs/static/js/main.js.html
  8. +11 −0 litterate.config.js
  9. +3 −1 package.json
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Codeframe</title>
<link rel="stylesheet" href="/codeframe/main.css">
</head>

<body>
<main>
<div class="line">
<div class="doc">
<h1>Codeframe</h1>
<p>Codeframe is the fastest, easiest way to build and deploy quick static webpages, and it&#39;s designed to be the best place to learn how to create things for the web, on the web. Read more <a href="https://github.com/thesephist/codeframe">on GitHub</a>.</p>


<hr>

<p><strong>Annotated source files</strong></p>
<p class="sourceLink"><a href="/codeframe/src/api.js.html">./src/api.js</a></p>
<p class="sourceLink"><a href="/codeframe/src/index.js.html">./src/index.js</a></p>
<p class="sourceLink"><a href="/codeframe/src/models.js.html">./src/models.js</a></p>
<p class="sourceLink"><a href="/codeframe/static/js/main.js.html">./static/js/main.js</a></p>
</div>
<pre></pre>
</div>
</main>
</body>

</html>
@@ -0,0 +1,117 @@
html,
body {
margin: 0;
padding: 0;
font-family: system-ui, 'Helvetica', 'Arial', sans-serif;
}
body {
background: #f8f8f8;
}
main {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
margin: 0 auto;
min-height: 100vh;
position: relative; /* to size ::before to full height */
}
main::before {
content: '';
display: block;
height: 100%;
width: 440px;
position: absolute;
top: 0;
left: 0;
background: #fff;
z-index: -1;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: normal;
line-height: 1.3em;
}
.line {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: flex-end;
font-size: 16px;
}
.line:first-child .doc {
padding-top: 64px;
}
.line:last-child .doc {
padding-bottom: 64px;
height: 100%;
}
.line:last-child {
align-items: flex-start;
flex-grow: 1;
}
.doc {
min-height: 24px;
box-sizing: border-box;
width: 440px;
line-height: 1.5em;
flex-shrink: 0;
flex-grow: 0;
padding-left: 32px;
padding-right: 32px;
}
.doc p {
margin: 0;
}
pre {
margin: 0;
margin-left: 8px;
line-height: 1.5em;
font-size: 14px;
}
code {
font-size: .9em;
background: #f8f8f8;
box-sizing: border-box;
padding: 2px 4px;
border: 1px solid #aaa;
}
pre,
code {
font-family: 'Menlo', 'Monaco', monospace;
overflow: hidden !important; /* override hljs's scroll style */
}
.source .lineNumber {
font-weight: normal;
opacity: .2;
margin-right: 18px;
width: 36px;
text-align: right;
display: inline-block;
}
.hljs {
padding: 0 !important;
background: transparent !important;
}
.fade {
opacity: .35;
}
a {
opacity: .8;
color: #777;
display: inline-block;
margin-bottom: 18px;
}
p a {
display: inline;
}
a:hover {
opacity: 1;
}
.doc .sourceLink {
margin-top: 8px;
}
BIN +247 KB docs/screenshot.png
Binary file not shown.
@@ -0,0 +1,62 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>./src/api.js annotated source</title>
<link rel="stylesheet" href="/codeframe/main.css">
</head>

<body>
<main>
<div class="line">
<div class="doc">
<h1>./src/api.js <span class="fade">annotated source</span></h1>
<em><a class="back" href="/codeframe/">Back to index</a></em>
</div>
<pre></pre>
</div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">1</strong>const {store} = require('./models.js');</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">2</strong></pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">3</strong>const api = {</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">4</strong> frame: {},</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">5</strong>}</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">6</strong></pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">7</strong>api.frame.get = params =&#62; {</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">8</strong> return store.getFromFS(params.frameHash);</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">9</strong>}</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">10</strong></pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">11</strong>api.frame.post = async (_params, _query, body) =&#62; {</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">12</strong> const frameHash = await store.create(body);</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">13</strong> return frameHash;</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">14</strong>}</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">15</strong></pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">16</strong>api.frame.getPage = async params =&#62; {</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">17</strong> const htmlFrame = await store.getFromFS(params.htmlFrameHash);</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">18</strong> const jsFrame = await store.getFromFS(params.jsFrameHash);</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">19</strong> return `</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">20</strong> &#60;!DOCTYPE html&#62;</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">21</strong> &#60;html&#62;</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">22</strong> &#60;head&#62;&#60;title&#62;Live Frame | CodeFrame&#60;/title&#62;&#60;/head&#62;</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">23</strong> &#60;body&#62;</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">24</strong> ${htmlFrame}</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">25</strong> &#60;script src="https://unpkg.com/torus-dom/dist/index.min.js"&#62;&#60;/script&#62;</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">26</strong> &#60;script&#62;${jsFrame}&#60;/script&#62;</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">27</strong> &#60;/body&#62;</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">28</strong> &#60;/html&#62;`;</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">29</strong>}</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">30</strong></pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">31</strong>module.exports = api;</pre></div>
<div class="line"><div class="doc"></div><pre class="source javascript"><strong class="lineNumber">32</strong></pre></div>
</main>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/github-gist.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script>
<script>
for (const el of document.querySelectorAll('.line pre')) {
hljs.highlightBlock(el);
}
</script>
</body>

</html>

0 comments on commit 5375031

Please sign in to comment.
You can’t perform that action at this time.