فهرست منبع

added new harlanji.com cryogen site

Harlan Iverson 7 سال پیش
والد
کامیت
938535e1c8
25فایلهای تغییر یافته به همراه486 افزوده شده و 0 حذف شده
  1. 13 0
      harlanji.com/app/.gitignore
  2. 15 0
      harlanji.com/app/project.clj
  3. 8 0
      harlanji.com/app/resources/templates/asc/pages/adoc-page.asc
  4. 44 0
      harlanji.com/app/resources/templates/asc/posts/2014-10-10-adoc-post.asc
  5. 32 0
      harlanji.com/app/resources/templates/config.edn
  6. 3 0
      harlanji.com/app/resources/templates/css/example.css
  7. 5 0
      harlanji.com/app/resources/templates/css/sassexample.scss
  8. BIN
      harlanji.com/app/resources/templates/img/cryogen.png
  9. 14 0
      harlanji.com/app/resources/templates/md/pages/index.md
  10. 8 0
      harlanji.com/app/resources/templates/md/pages/recent.md
  11. 0 0
      harlanji.com/app/resources/templates/themes/harlanji/css/screen.css
  12. 40 0
      harlanji.com/app/resources/templates/themes/harlanji/html/404.html
  13. 20 0
      harlanji.com/app/resources/templates/themes/harlanji/html/archives.html
  14. 19 0
      harlanji.com/app/resources/templates/themes/harlanji/html/author.html
  15. 21 0
      harlanji.com/app/resources/templates/themes/harlanji/html/base.html
  16. 25 0
      harlanji.com/app/resources/templates/themes/harlanji/html/home.html
  17. 23 0
      harlanji.com/app/resources/templates/themes/harlanji/html/page.html
  18. 21 0
      harlanji.com/app/resources/templates/themes/harlanji/html/post-content.html
  19. 32 0
      harlanji.com/app/resources/templates/themes/harlanji/html/post.html
  20. 28 0
      harlanji.com/app/resources/templates/themes/harlanji/html/previews.html
  21. 44 0
      harlanji.com/app/resources/templates/themes/harlanji/html/recent.html
  22. 16 0
      harlanji.com/app/resources/templates/themes/harlanji/html/tag.html
  23. 15 0
      harlanji.com/app/resources/templates/themes/harlanji/html/tags.html
  24. 8 0
      harlanji.com/app/src/cryogen/core.clj
  25. 32 0
      harlanji.com/app/src/cryogen/server.clj

+ 13 - 0
harlanji.com/app/.gitignore

@@ -0,0 +1,13 @@
+pom.xml
+pom.xml.asc
+*jar
+/lib/
+/classes/
+/target/
+/checkouts/
+.lein-deps-sum
+.lein-repl-history
+.lein-plugins/
+.lein-failures
+/resources/public/
+*~

+ 15 - 0
harlanji.com/app/project.clj

@@ -0,0 +1,15 @@
+(defproject cryogen "0.1.0"
+            :description "Simple static site generator"
+            :url "https://github.com/lacarmen/cryogen"
+            :license {:name "Eclipse Public License"
+                      :url "http://www.eclipse.org/legal/epl-v10.html"}
+            :dependencies [[org.clojure/clojure "1.8.0"]
+                           [ring/ring-devel "1.6.3"]
+                           [compojure "1.6.0"]
+                           [ring-server "0.5.0"]
+                           [cryogen-markdown "0.1.7"]
+                           [cryogen-core "0.1.61"]]
+            :plugins [[lein-ring "0.9.7"]]
+            :main cryogen.core
+            :ring {:init cryogen.server/init
+                   :handler cryogen.server/handler})

+ 8 - 0
harlanji.com/app/resources/templates/asc/pages/adoc-page.asc

@@ -0,0 +1,8 @@
+{:title "Adoc Page"
+ :layout :page
+ :page-index 0
+ :navbar? true}
+
+== Adoc Page ==
+
+We support http://asciidoc.org/[asciidoc] too!

+ 44 - 0
harlanji.com/app/resources/templates/asc/posts/2014-10-10-adoc-post.asc

@@ -0,0 +1,44 @@
+{:title "Adoc Post"
+ :layout :post
+ :tags  ["cryogen" "asciidoc"]
+ :toc false
+}
+
+:toc: macro
+
+== Example Asciidoc Post ==
+This is an example asciidoc post.
+
+You can use a manually placed table of contents by setting `:toc false` in the front matter, but use `:toc: macro` at the top of the post, and `toc::[]` where the table of contents is supposed to be, like here:
+
+toc::[]
+
+=== Section 1 ===
+
+.Heading
+
+With some text and maybe even a bulleted list:  
+
+- Thing 1  
+- Thing 2  
+
+Or how about some *bold* or _italicized_ text?
+
+=== Section 2 ===
+
+Will a code snippet work?  
+
+.bash
+[source,bash]
+----
+$ echo "foo"
+----
+
+.clojure
+[source,clojure]
+----
+(defn echo [s]
+  (println s))
+----
+
+

+ 32 - 0
harlanji.com/app/resources/templates/config.edn

@@ -0,0 +1,32 @@
+{:site-title           "hi"
+ :author               "Harlan Iverson"
+ :description          "This blog is awesome"
+ :site-url             "https://harlanji.com/"
+ :post-root            "posts"
+ :page-root            "pages"
+ :post-root-uri        ""
+ :page-root-uri        ""
+ :tag-root-uri         "tag"
+ :author-root-uri      "author"
+ :blog-prefix          ""
+ :rss-name             "feed.xml"
+ :rss-filters          ["career"]
+ :recent-posts         3
+ :post-date-format     "yyyy-MM-dd"
+ :archive-group-format "yyyy MMMM"
+ :sass-src             []
+ :sass-path            "sass"
+ :compass-path         "compass"
+ :theme                "harlanji"
+ :resources            ["img" "assets"]
+ :keep-files           [".git"]
+ :disqus?              false
+ :disqus-shortname     ""
+ :ignored-files        [#"\.#.*" #".*\.swp$"]
+ :posts-per-page       5
+ :blocks-per-preview   2
+ :previews?            false
+ :clean-urls?          false
+ :hide-future-posts?   false
+ :klipse               {}
+ :debug?               false}

+ 3 - 0
harlanji.com/app/resources/templates/css/example.css

@@ -0,0 +1,3 @@
+a {
+    text-decoration-style: dashed;
+}

+ 5 - 0
harlanji.com/app/resources/templates/css/sassexample.scss

@@ -0,0 +1,5 @@
+body {
+    a {
+        text-decoration-style: dashed;
+    }
+}

BIN
harlanji.com/app/resources/templates/img/cryogen.png


+ 14 - 0
harlanji.com/app/resources/templates/md/pages/index.md

@@ -0,0 +1,14 @@
+{:title "Home"
+ :layout :home
+ :page-index 0
+ :home? true
+ :tao-yt-uri "https://www.youtube.com/embed/i_LoYQAjjuw?start=642"
+ :contact {:first-name "Harlan"
+               :name "Harlan J. Iverson"
+               :phone-number "(four one f1ve).93 seven.7four67"
+               :email "social @ this domain d0t com"}
+ :navbar? true}
+
+## Write something about something
+
+wow wow wow

+ 8 - 0
harlanji.com/app/resources/templates/md/pages/recent.md

@@ -0,0 +1,8 @@
+{:title "Recent"
+ :layout :recent
+ :page-index 0
+ :navbar? false}
+
+## Write something about something
+
+wow wow wow

+ 0 - 0
harlanji.com/app/resources/templates/themes/harlanji/css/screen.css


+ 40 - 0
harlanji.com/app/resources/templates/themes/harlanji/html/404.html

@@ -0,0 +1,40 @@
+<html>
+    <head>
+        <style>        
+        #message{
+               display:block;
+               width:100%;
+               padding:150px 0;
+               line-height:1.6em;
+               text-align:center;
+            }
+        h1, h2 {            
+               color: rgb(151, 151, 151);                
+               float: left;
+               margin:0 0 0 40px;
+               padding:0;
+               float:left;
+               font-family: Georgia, 'Times New Roman', Times, serif;               
+               font-weight: normal;               
+               line-height: normal;                                
+               text-transform: uppercase;
+        }
+        #message .aside{display:block; width:80%; margin:0 auto; padding:0;}        
+        #message .aside h2 span{display:block; font-size:30px;}        
+        #message p:first-child{margin-top:0;}
+        h1 {margin-top:-90px; font-size:200px;}
+        h2 {font-size: 60px;}
+        </style>    
+    </head>
+    <body>
+        <div class="content">          
+            <section id="message">
+              <div class="aside">
+                <h1>404</h1>
+                <h2>Error ! <span>Page Not Found</span></h2>
+              </div>
+            </section>
+        </div>
+    </body>
+</html>
+

+ 20 - 0
harlanji.com/app/resources/templates/themes/harlanji/html/archives.html

@@ -0,0 +1,20 @@
+{% extends "/html/base.html" %}
+{%block subtitle %}: Archives{% endblock %}
+{% block content %}
+<div id="posts">
+    <div id="page-header">
+        <h2>Archives</h2>
+    </div>
+    {% for group in groups %}
+        <h4>{{group.group}}</h4>
+        <ul>
+        {% for post in group.posts %}
+        <li>
+            {{post.date|date:"MMM dd"}} - <a href="{{post.uri}}">{{post.title}}</a>
+        </li>
+        {% endfor %}
+        </ul>
+    {% endfor %}
+
+</div>
+{% endblock %}

+ 19 - 0
harlanji.com/app/resources/templates/themes/harlanji/html/author.html

@@ -0,0 +1,19 @@
+{% extends "/html/base.html" %}
+{%block subtitle %}: Posts by {{author}} {% endblock %}
+{% block content %}
+<div id="posts">
+  <div id="page-header" class="post-header">
+    <h2>Posts by {{author}}</h2>
+  </div>
+  {% for group in groups %}
+  <h4>{{group.group}}</h4>
+  <ul>
+    {% for post in group.posts %}
+    <li>
+      {{post.date|date:"MMM dd"}} - <a href="{{post.uri}}">{{post.title}}</a>
+    </li>
+    {% endfor %}
+  </ul>
+  {% endfor %}
+</div>
+{% endblock %}

+ 21 - 0
harlanji.com/app/resources/templates/themes/harlanji/html/base.html

@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+    <meta charset="utf-8"/>
+    <title>{{title}}{% block subtitle %}{% endblock %}</title>
+    <link rel="canonical" href="{{site-url}}{{uri}}">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    {% style "css/screen.css" %}
+</head>
+<body>
+
+ 
+                {% block content %}
+                {% endblock %}
+
+
+</body>
+</html>
+
+
+ 

+ 25 - 0
harlanji.com/app/resources/templates/themes/harlanji/html/home.html

@@ -0,0 +1,25 @@
+{% extends "/html/base.html" %}
+{% block content %}
+
+
+<h1>{{ post.contact.name }}</h1>
+
+<p>Welcome to {{post.contact.first-name}}'s official public profile.</p>
+
+<hr>
+
+<p>Take at least once daily:</p>
+
+<iframe width="560" height="315" src="{{ post.tao-yt-uri }}" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe>
+
+<p>Contact: {{post.contact.email}} or {{post.contact.phone-number}}.</p>
+
+<p>I prefer to meet up; Facetime is next best; email is next best; texting for quick messages is aiight.</p>
+
+<p><small>If I "unfriended" you on Facebook it's because I'm closing it down!</small></p>
+
+<p>Hosted in a <a href="https://tinydatacenter.com">Tiny DataCenter</a></p>
+
+
+
+{% endblock %}

+ 23 - 0
harlanji.com/app/resources/templates/themes/harlanji/html/page.html

@@ -0,0 +1,23 @@
+{% extends "/html/base.html" %}
+{%block subtitle %}: {{page.title}}{% endblock %}
+{% block content %}
+<div id="custom-page">
+    <div id="page-header">
+        <h2>{{page.title}}</h2>
+    </div>
+    {% if page.toc %}{{page.toc|safe}}{% endif %}
+    {{page.content|safe}}
+
+    <div id="prev-next">
+        {% if page.prev %}
+        <a href="{{page.prev.uri}}">&laquo; {{page.prev.title}}</a>
+        {% endif %}
+        {% if all page.prev page.next %}
+        ||
+        {% endif %}
+        {% if page.next %}
+        <a href="{{page.next.uri}}">{{page.next.title}} &raquo;</a>
+        {% endif %}
+    </div>
+</div>
+{% endblock %}

+ 21 - 0
harlanji.com/app/resources/templates/themes/harlanji/html/post-content.html

@@ -0,0 +1,21 @@
+<div class="post-header">
+    <div id="post-meta" class="row">
+        <div class="col-lg-6">{{post.date|date:longDate}}</div>
+        {% if post.author %}
+        <span class="col-lg-6 right">By: {{post.author}}</span>
+        {% endif %}
+    </div>
+    <h2>{{post.title}}</h2>
+</div>
+<div>
+    {% if post.toc %}{{post.toc|safe}}{% endif %}
+    {{post.content|safe}}
+</div>
+{% if post.tags|not-empty %}
+<div id="post-tags">
+    <b>Tags: </b>
+    {% for tag in post.tags %}
+    <a href="{{tag.uri}}">{{tag.name}}</a>
+    {% endfor %}
+</div>
+{% endif %}

+ 32 - 0
harlanji.com/app/resources/templates/themes/harlanji/html/post.html

@@ -0,0 +1,32 @@
+{% extends "/html/base.html" %}
+{%block subtitle %}: {{post.title}}{% endblock %}
+{% block content %}
+<div id="post">
+    {% include "/html/post-content.html" %}
+    <div id="prev-next">
+        {% if post.prev %}
+        <a href="{{post.prev.uri}}">&laquo; {{post.prev.title}}</a>
+        {% endif %}
+        {% if post.next %}
+        <a class="right" href="{{post.next.uri}}">{{post.next.title}} &raquo;</a>
+        {% endif %}
+    </div>
+
+    {% if disqus-shortname %}
+    <div id="disqus_thread"></div>
+    <script type="text/javascript">
+        var disqus_config = function () {
+            this.page.url = "{{site-url}}{{uri}}";
+            this.page.identifier = "{{post.title}}";
+        };
+        (function() {
+            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+            dsq.src = '//{{disqus-shortname}}.disqus.com/embed.js';
+            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+        })();
+    </script>
+    {% endif %}
+
+
+</div>
+{% endblock %}

+ 28 - 0
harlanji.com/app/resources/templates/themes/harlanji/html/previews.html

@@ -0,0 +1,28 @@
+{% extends "/html/base.html" %}
+{% block content %}
+<div id="post">
+    {% for post in posts %}
+    <div class="post-header">
+        <h2>{{post.title}}</h2>
+        <div id="post-meta">
+            {% if post.author %}
+            <div class="author">{{post.author}}</div>
+            {% endif %}
+            <div class="date">{{post.date|date:longDate}}</div>
+        </div>
+    </div>
+    {{post.content|safe}}
+    <a href="{{post.uri}}">Continue reading &#8594;</a>
+    <hr>
+    {% endfor %}
+
+    <div id="prev-next">
+        {% if prev-uri %}
+        <a class="left" href="{{prev-uri}}">&laquo; Prev</a>
+        {% endif %}
+        {% if next-uri %}
+        <a class="right" href="{{next-uri}}">Next &raquo;</a>
+        {% endif %}
+    </div>
+</div>
+{% endblock %}

+ 44 - 0
harlanji.com/app/resources/templates/themes/harlanji/html/recent.html

@@ -0,0 +1,44 @@
+{% extends "/html/base.html" %}
+{% block content %}
+<ul>
+               <li class="dropdown-header">Links</li>
+               <li><a href="http://cryogenweb.org/docs/home.html">Cryogen Docs</a></li>
+               <li><a href="http://carmenla.me/blog/archives">Carmen's Blog</a></li>
+               {% for page in sidebar-pages %}
+               <li><a href="{{page.uri}}">{{page.title}}</a></li>
+               {% endfor %}
+
+               {% if latest-posts|not-empty %}
+               <li class="divider"></li>
+               <li class="dropdown-header">Recent Posts</li>
+               {% for post in latest-posts %}
+               <li><a href="{{post.uri}}">{{post.title}}</a></li>
+               {% endfor %}
+               {% endif %}
+
+               {% if tags|not-empty %}
+               <li class="divider"></li>
+               <li class="dropdown-header">Tags</li>
+               {% for tag in tags %}
+               <li><a href="{{tag.uri}}">{{tag.name}}</a></li>
+               {% endfor %}
+               {% endif %}
+               </ul>
+               
+               
+               
+            <ul>
+                <li {% if home %} class="active" {% endif %}><a href="{{index-uri}}">Home</a></li>
+                <li
+                {% if archives %} class="active" {% endif %}><a href="{{archives-uri}}">Archives</a></li>
+                {% for nav-page in navbar-pages %}
+                <li
+                {%ifequal page.uri nav-page.uri %} class="active" {% endifequal %}>
+                <a href="{{nav-page.uri}}">{{nav-page.title}}</a>
+                </li>
+                {% endfor %}
+                <li><a href="{{rss-uri}}">RSS</a></li>
+
+
+            </ul>
+{% endblock %}

+ 16 - 0
harlanji.com/app/resources/templates/themes/harlanji/html/tag.html

@@ -0,0 +1,16 @@
+{% extends "/html/base.html" %}
+{%block subtitle %}: Posts Tagged &quot;{{name}}&quot;{% endblock %}
+{% block content %}
+<div id="posts-by-tag">
+    <div id="page-header">
+        <h2>Posts Tagged &quot;{{name}}&quot;</h2>
+    </div>
+    <ul>
+    {% for post in posts %}
+        <li>
+            <a href="{{post.uri}}">{{post.title}}</a>
+        </li>
+    {% endfor %}
+    </ul>
+</div>
+{% endblock %}

+ 15 - 0
harlanji.com/app/resources/templates/themes/harlanji/html/tags.html

@@ -0,0 +1,15 @@
+{% extends "/html/base.html" %}
+{%block subtitle %}: Tags{% endblock %}
+{% block content %}
+<div id="tags-page">
+    <div id="page-header">
+        <h2>Tags</h2>
+    </div>
+
+    <ul>
+        {% for tag in tags %}
+        <li><a href="{{tag.uri}}">{{tag.name}}</a></li>
+        {% endfor %}
+    </ul>
+</div>
+{% endblock %}

+ 8 - 0
harlanji.com/app/src/cryogen/core.clj

@@ -0,0 +1,8 @@
+(ns cryogen.core
+  (:require [cryogen-core.compiler :refer [compile-assets-timed]]
+            [cryogen-core.plugins :refer [load-plugins]]))
+
+(defn -main []
+  (load-plugins)
+  (compile-assets-timed)
+  (System/exit 0))

+ 32 - 0
harlanji.com/app/src/cryogen/server.clj

@@ -0,0 +1,32 @@
+(ns cryogen.server
+  (:require [compojure.core :refer [GET defroutes]]
+            [compojure.route :as route]
+            [ring.util.response :refer [redirect resource-response]]
+            [ring.util.codec :refer [url-decode]]
+            [cryogen-core.watcher :refer [start-watcher!]]
+            [cryogen-core.plugins :refer [load-plugins]]
+            [cryogen-core.compiler :refer [compile-assets-timed read-config]]
+            [cryogen-core.io :refer [path]]))
+
+(defn init []
+  (load-plugins)
+  (compile-assets-timed)
+  (let [ignored-files (-> (read-config) :ignored-files)]
+    (start-watcher! "resources/templates" ignored-files compile-assets-timed)))
+
+(defn wrap-subdirectories
+  [handler]
+  (fn [request]
+    (let [req-uri (.substring (url-decode (:uri request)) 1)
+          res-path (path req-uri (when (:clean-urls? (read-config)) "index.html"))]
+      (or (resource-response res-path {:root "public"})
+          (handler request)))))
+
+(defroutes routes
+  (GET "/" [] (redirect (let [config (read-config)]
+                          (path (:blog-prefix config) "/"
+                                (when-not (:clean-urls? config) "index.html")))))
+  (route/resources "/")
+  (route/not-found "Page not found"))
+
+(def handler (wrap-subdirectories routes))