Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Commit

Permalink
Minor refinement
Browse files Browse the repository at this point in the history
  • Loading branch information
gzip committed Apr 26, 2012
1 parent a409846 commit bacae08
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
11 changes: 7 additions & 4 deletions mojits/Preso/assets/preso.css
Expand Up @@ -4,7 +4,7 @@ div { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: b
html { height:100%; background: #d7d7d7; }
body { padding:20px; margin:0; height:100%; }
body > div {
position:relative; width:100%; min-height:89%; padding:30px 40px;
position:relative; width:100%; height:100%; padding:30px 40px; overflow-y:auto;
border:1px solid #bbb; border-radius:7px; background: #fff;
-webkit-border-radius: 10px; border-radius: 10px;
-webkit-box-shadow: 2px 2px 8px 2px #aaa; -moz-box-shadow: 2px 2px 8px 2px #aaa; box-shadow: 2px 2px 8px 2px #aaa;
Expand All @@ -15,16 +15,17 @@ h1,
h2 { margin:0 0 30px; padding:0; font-family: UltraRegular,Georgia,serif; text-shadow: 1px 1px 3px #888; }
h2 { margin-top:30px; }
ul { margin:0 12px; padding:0; }
li { margin:7px 0; }
li { margin:5px 0; }
p,
li,
dt,
dd { font-size:125%; font-family:'Open Sans',Arial,sans-serif; padding: 3px 0; text-shadow: 1px 1px 2px #bbb; }
p { margin:15px 0 0; }
pre {
padding:3px 20px 0px; line-height:1.5; border:1px solid #bbb; border-radius:5px; background: #fff;
padding:3px 20px 0px; line-height:1.3; border:1px solid #bbb; border-radius:5px; background: #fff;
-webkit-box-shadow: inset 0px 1px 3px 0px #aaa; -moz-box-shadow: inset 0px 1px 3px 0px #aaa; box-shadow: inset 0px 1px 3px 0px #aaa;
}
pre > code { font-size:125%; display:block; margin:-1.5ex 0; }
pre > code { font-size:125%; display:block; margin:-1ex 0; }
code { font-family:courier; }
dt,
dd { border:1px solid #bbb; background: #fff; }
Expand All @@ -34,3 +35,5 @@ nav { position:absolute; bottom:20px; right:40px; }
nav a { color:#888; font-weight:bold; text-decoration:none; }
nav a:hover { text-decoration:underline; }
.subtext { color:#888; font-size:85%; padding-left:.5ex; }
.centered { display:table; width:100%; height:100%; }
.centered h1 { display:table-cell; vertical-align:middle; width:100%; height:100%; font-size:500%; text-align:center; }
2 changes: 1 addition & 1 deletion mojits/Preso/views/slide15.mu.html
Expand Up @@ -6,6 +6,6 @@ <h1>Configuration</h1>
<li>Each configuration file resolves based on the current <em>configuration context</em>.</li>
<li>The configuration context must be matched in <code>dimensions.json</code> (both the key and value).</li>
</ul>
<p><a href="/conf">Example</a> <span class="subtext">(<a href="/src/mojits/Config">Source</a>)</span></p>
<p><a href="/conf">Example mojit</a> <span class="subtext">(<a href="/src/mojits/Config">Source</a>)</span></p>
{{{nav}}}
</div>
2 changes: 1 addition & 1 deletion mojits/Preso/views/slide5.mu.html
Expand Up @@ -15,6 +15,6 @@ <h1>Mojito Request Flow</h1>
<li>Assets <span class="subtext">(CSS, images, and non-YUI libs)</span></li>
</ul>
</ol>
<p><a href="/">Example App</a></p>
<p><a href="/">Example mojit</a></p>
{{{nav}}}
</div>
7 changes: 6 additions & 1 deletion mojits/Preso/views/slide6.mu.html
@@ -1,18 +1,23 @@
<div id="{{mojit_view_id}}">
<h1>Middleware</h1>

<ul>
<li>Middleware is built on <a href="http://expressjs.com/">Express</a> and only executes on the server. This is the only place where you'll recognize that Node.js is being used.</li>
</ul>

<pre><code>
module.exports = function (req, res, next) {
// do something
next();
};
</code></pre>
</ul>

<ul>
<li>Middleware has limited access to the rest of Mojito.</li>
<li>Mojito ships with several pieces of middleware including <a href="https://github.com/yahoo/mojito/blob/master/source/lib/app/middleware/mojito-contextualizer.js">contextualizer</a>, static asset handler, request tunnel, body parser, cookie parser, and router.</li>
<li>Custom middleware can be configured in <code>application.json</code>.</li>
</ul>

<pre><code>
"middleware": [
"./middleware/src-handler.js"
Expand Down
2 changes: 1 addition & 1 deletion mojits/Preso/views/slide8.mu.html
Expand Up @@ -8,6 +8,6 @@ <h1>Application Configuration</h1>
<li>Configures mojits for routing in <code>specs</code>.</li>
<li>May contain arbitrary configuration used by your app.</li>
</ul>
<p><a href="/src/application.json">Example</a></p>
<p><a href="/src/application.json">Example configuration</a></p>
{{{nav}}}
</div>

0 comments on commit bacae08

Please sign in to comment.