Commits

Andrey Vlasovskikh committed 6b03dcf

Scaffold site design based on Jekyll's one

Comments (0)

Files changed (6)

scaffold/_config.yml

+name: Your New Obraz Site

scaffold/_layouts/default.html

 <!DOCTYPE html>
 <html>
   <head>
-    <title>My Blog - {{ page.title }}</title>
+    <title>{{ page.title }}</title>
+    <link rel="stylesheet" href="/css/main.css">
+    <link rel="stylesheet" href="http://yandex.st/highlightjs/8.0/styles/github.min.css">
+    <script src="http://yandex.st/highlightjs/8.0/highlight.min.js"></script>
+    <script>hljs.initHighlightingOnLoad();</script>
   </head>
   <body>
-    {{ content }}
+    <div class="site">
+      <div class="header">
+        <h1 class="title"><a href="/">{{ site.name }}</a></h1>
+        <a class="extra" href="/">home</a>
+      </div>
+
+      {{ content }}
+
+      <div class="footer">
+        <div class="contact">
+          <p>
+            Your Name<br/>
+            What You Are<br/>
+            you@example.com
+          </p>
+        </div>
+        <div class="contact">
+          <p>
+            <a href="https://bitbucket.org/yourusername">bitbucket.org/yourusername</a><br/>
+            <a href="https://twitter.com/yourusername">twitter.com/yourusername</a><br/>
+          </p>
+        </div>
+      </div>
+    </div>
   </body>
 </html>

scaffold/_layouts/post.html

+---
+layout: default
+---
+
+<h2>{{ page.title }}</h2>
+<p class="meta">{{ page.date.strftime('%Y-%m-%d') }}</p>
+
+<div class="post">
+  {{ content }}
+</div>

scaffold/_posts/2014-01-01-welcome-to-obraz.md

+---
+layout: post
+title: Welcome to Obraz!
+---
+
+You'll find this post in your `_posts` directory — edit this post and re-build
+(or run with the `-w` switch) to see your changes! To add new posts, simply add
+a file in the `_posts` directory that follows the convention:
+YYYY-MM-DD-name-of-post.ext.
+
+Obraz also offers powerful support for code snippets via highlight.js:
+
+    def print_hi(name):
+        print('Hi, {}'.format(name))
+
+    # Prints 'Hi, Andrey' to sys.stdout
+    print_hi('Andrey')
+
+Check out the [Obraz docs][obraz] for more info on how to get the most out of
+Obraz. File all bugs/feature requests at [Obraz's Bitbucket repo][obraz-bb].
+
+[obraz]: http://obraz.pirx.ru/
+[obraz-bb]: https://bitbucket.org/vlasovskikh/obraz

scaffold/css/main.css

+/* Based on https://github.com/jekyll/jekyll/blob/master/lib/site_template */
+
+* {
+    margin: 0;
+    padding: 0;
+}
+
+html, body {
+    height: 100%;
+}
+
+body {
+    background-color: #fff;
+    font-family: Helvetica, Arial, sans-serif;
+    font-size: small;
+    text-align: center;
+}
+
+h1, h2, h3, h4, h5, h6 {
+    font-size: 100%;
+}
+
+h1 {
+    margin-bottom: 1em;
+}
+
+p {
+    margin: 1em 0;
+}
+
+a {
+    color: #00a;
+}
+
+a:hover {
+    color: #000;
+}
+
+a:visited {
+    color: #a0a;
+}
+
+.posts {
+    list-style-type: none;
+    margin-bottom: 2em;
+}
+
+.posts li {
+    line-height: 1.75em;
+}
+
+.posts span {
+    color: #aaa;
+    font-family: Monaco, "Courier New", monospace;
+    font-size: 80%;
+}
+
+.site {
+    font-size: 115%;
+    text-align: justify;
+    width: 42em;
+    margin: 0 auto 2em;
+    padding-top: 3em;
+    line-height: 1.5em;
+}
+
+@media screen and (max-width: 44em) {
+    .site {
+        width: 90%;
+    }
+}
+
+.header a {
+    font-weight: bold;
+    text-decoration: none;
+}
+
+.title {
+    display: inline-block;
+    margin-bottom: 2em;
+}
+
+.title a {
+    color: #a00;
+}
+
+.title a:hover {
+    color: #000;
+}
+
+.header a.extra {
+    color: #aaa;
+    margin-left: 1em;
+}
+
+.header a.extra:hover {
+    color: #000;
+}
+
+.meta {
+    color: #aaa;
+}
+
+.footer {
+    font-size: 80%;
+    color: #666;
+    border-top: 4px solid #eee;
+    margin-top: 2em;
+    overflow: hidden;
+}
+
+.footer .contact {
+    float: left;
+    margin-right: 3em;
+}
+
+.footer .contact a {
+    color: #8085c1;
+}
+
+.footer .rss {
+    margin-top: 1.1em;
+    margin-right: -0.2em;
+    float: right;
+}
+
+.footer .rss img {
+    border: 0;
+}
+
+.post pre {
+    border: 1px solid #ddd;
+    background-color: #eef;
+    padding: 0 0.4em;
+}
+
+.post ul, .post ol {
+    margin-left: 1.35em;
+}
+
+.post code {
+    border: 1px solid #ddd;
+    background-color: #eef;
+    padding: 0 0.2em;
+}
+
+.post pre code {
+    border: none;
+}

scaffold/index.html

 ---
 layout: default
+title: Your New Obraz Site
 ---
 
-<div>
-  <h1>My Blog</h1>
-  <p>Welcome to my blog!</p>
-  <ul>
-  {% for post in site.posts %}
-    <li class="entry">
-      <span class="date">{{ post.date }}</span>
-      <a href="{{ post.url }}">{{ post.title }}</a>
-    </li>
-  {% endfor %}
+<div id="home">
+  <h1>Blog Posts</h1>
+  <ul class="posts">
+    {% for post in site.posts %}
+      <li><span>{{ post.date.strftime('%Y-%m-%d') }}</span> &raquo; <a href="{{ post.url }}">{{ post.title }}</a></li>
+    {% endfor %}
   </ul>
 </div>