Commits

Steve Losh committed 00791b1

Styling and more sample content.

  • Participants
  • Parent commits ce14334

Comments (0)

Files changed (11)

bookmarkdown/bookmarkdown

 base_context = {
     'title': getattr(config, 'title', ''),
     'author': getattr(config, 'author', ''),
-    'author_url': getattr(config, 'author_url', ''),
-}
+    'author_url': getattr(config, 'author_url', ''),}
 # }}}
 
 # Utilities ------------------------------------------------------------------------

bookmarkdown/static/styles/style.less

         font-size: 28px;
     }
     h2 {
-        font-size: 24px;
+        font-size: 22px;
     }
     h3 {
         font-size: 20px;
         
         h1 {
             font-size: 42px;
+
+            a {
+                text-decoration: none;
+                
+                &:hover {
+                    text-decoration: underline;
+                }
+            }
         }
     }
     footer {
         margin-top: 30px;
         text-align: center;
         font-style: italic;
+        margin-bottom: 100px;
     }
     .toc {
         ol {
             }
         }
     }
+    .nav {
+    }
+    .prevnext {
+        .next {
+            display: block;
+            float: right;
+        }
+    }
+    pre, code {
+        font: normal 14px Menlo, Monaco, Consolas, monospace;
+        background-color: #fafafa;
+        border: 1px solid #aaa;
+    }
+    code {
+        padding: 0px 4px;
+    }
+    pre {
+        margin-bottom: 22px;
+        padding: 6px 4px;
+
+        code {
+            border: none;
+            padding: 0;
+        }
+    }
 }
 
 body.splash {

bookmarkdown/templates/base.html

     <body class="{% block class %}{% endblock %}">
         <div class="container">
             <header class="sixteen columns">
-                <h1>{{ title }}</h1>
+                <h1><a href="/">{{ title }}</a></h1>
             </header>
 
             {% block content_full %}
 
                 <a href="/license.html">License</a>.
 
-                <br/>
-
                 Built with
                 <a href="http://bitbucket.org/sjl/bookmarkdown/">Bookmarkdown</a>.
             </footer>

bookmarkdown/templates/chapter.html

 {% extends "base.html" %}
 
-{% block content %}
-    {{ content }}
+{% block content_full %}
+    <section class="nav three columns">
+        <div class="prevnext">
+            <a class="prev" href="">&laquo; Previous</a>
+            <a class="next" href="">Next &raquo;</a>
+        </div>
+    </section>
+
+    <section class="content twelve columns offset-by-one">
+        {{ content }}
+
+        <div class="prevnext">
+            <a class="prev" href="">&laquo; Previous</a>
+            <a class="next" href="">Next &raquo;</a>
+        </div>
+    </section>
 {% endblock %}

sample/chapters/00.markdown

-Installing Vim
-==============
+Prerequisites
+=============
+
+To use this book you should have the latest version of Vim installed, which is
+version 7.3 at the time of this writing.  New versions of Vim are almost always
+backwards-compatible, so everything in this book should work just fine with newer
+versions.
+
+You should be comfortable editing files in Vim.  You should know basic Vim
+terminology like "buffer", "window", "normal mode", "insert mode" and "text object".
+
+You should have some programming experience.  If you've never programmed before check
+out [Learn Python the Hard Way](http://learnpythonthehardway.org/) first.
+
+Creating a Vimrc File
+---------------------
+
+If you already know what a vimrc file is and have one, go on to the next chapter.
+
+A vimrc file is a file you create that contains some Vimscript code.  Vim will
+automatically run the code inside this file every time you open Vim.
+
+On Linux and Mac OS X this file is located in your home directory and named `.vimrc`.
+
+On Windows this file is located in your home folder and named `_vimrc`.
+
+To easily find the location and name of the file on *any* operating system, run
+`:echo $MYVIMRC` in Vim.  The path will be displayed at the bottom of the screen.

sample/chapters/01.markdown

-Basic Mapping
-=============
+Echoing Messages
+================
 
-What Should Happen
-------------------
+The first piece of Vimscript we'll look at is `echom`.
+
+You can read the full documentation for the command by running `:help echom` in Vim.
+As you go through this book you should try to read the `:help` for every new command
+you encounter to get a better understanding of how to use each one.
+
+Run the following command:
+
+    :echo "Hello, world!"
+
+You should see `Hello, world!` appear at the bottom of the window.
+
+Now run the following command:
+
+    :echom "Hello again, world!"
+
+You should see `Hello again, world!` appear at the bottom of the window.
+
+To see the difference between these two commands, run one more new command:
+
+    :messages
+
+You should see a list of messages.  `Hello, world!` will *not* be in this list, but
+`Hello again, world!` *will* be in it.
+
+When you're writing more complicated Vim scripts later in this book you may find
+yourself wanting to "print some output" to help you debug problems.  Plain old
+`:echo`will print output, but it will often disappear by the time your script is
+done.  Using `:echom` will save the output and let you run `:messages` to view it
+later.
 
 Extra Credit
 ------------
 
+Read `:help echo`.
 
+Read `:help echom`.
+
+Read `:help messages`.
+
+Add a line to your vimrc file that displays a friendly ASCII-art cat (`>^.^<`)
+whenever you open Vim.

sample/chapters/02.markdown

-Modal Mapping
-=============
+Setting Options
+===============
 
 What Should Happen
 ------------------

sample/chapters/03.markdown

-Strict Mapping
-==============
+Basic Mapping
+=============
 
 What Should Happen
 ------------------

sample/chapters/04.markdown

+Modal Mapping
+=============

sample/chapters/05.markdown

+Strict Mapping
+==============

sample/introduction.markdown

-This book is noms.
+[Learn Vimscript the Hard Way][book] is a short book for users of the Vim editor who
+want to learn how to customize Vim.
+
+Before reading this book you should be comfortable using Vim and know what terms like
+"buffer", "window" and "insert mode" mean.
+
+The source code to the book is available [on BitBucket][hg] and [on GitHub][git]
+under an [MIT/X11 license][license].  If you find any mistakes or feel you could
+improve it feel free to send a pull request.
+
+[book]: /
+[hg]: http://bitbucket.org/sjl/learnvimscriptthehardway/
+[git]: http://github.com/sjl/learnvimscriptthehardway/
+[license]: /license.html