Parcourir la Source

Merge pull request #40 from ralph-moeritz/master

New theme based on bootswatch readable.
Brit Butler il y a 12 ans
Parent
commit
d93a529e41

+ 2 - 0
src/coleslaw.lisp

@@ -51,6 +51,8 @@ Additional args to render CONTENT can be passed via RENDER-ARGS."
51 51
   (ensure-directories-exist staging)
52 52
   (with-current-directory staging
53 53
     (dolist (dir (list (app-path "themes/~a/css" (theme *config*))
54
+                       (app-path "themes/~a/img" (theme *config*))
55
+                       (app-path "themes/~a/js" (theme *config*))
54 56
                        (merge-pathnames "static" (repo *config*))))
55 57
       (when (probe-file dir)
56 58
         (run-program "cp -R ~a ." dir)))

+ 67 - 0
themes/readable/base.tmpl

@@ -0,0 +1,67 @@
1
+{namespace coleslaw.theme.readable}
2
+
3
+{template base}
4
+<!DOCTYPE html>{\n}
5
+<html lang="en">
6
+  <head>
7
+    <title>{$config.title}</title>
8
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
9
+    <link href="{$config.domain}/css/bootstrap.min.css" rel="stylesheet" media="screen">
10
+    <link href="{$config.domain}/css/custom.css" rel="stylesheet" media="screen">
11
+    <link rel="alternate" href="{$config.domain}/rss.xml" type="application/rss+xml" />
12
+    {if $injections.head}
13
+      {foreach $injection in $injections.head}
14
+        {$injection |noAutoescape}
15
+      {/foreach}
16
+    {/if}
17
+  </head>
18
+  <body>
19
+    <div class="container-fluid">
20
+      <div class="row-fluid">
21
+        <div class="offset2 span8">
22
+          <div class="row-fluid">
23
+            <div class="navbar navbar-inverse">
24
+              <div class="navbar-inner">
25
+                <a class="brand" href="{$config.domain}">{$config.title}</a>
26
+                <ul class="nav">
27
+                  {foreach $link in $config.sitenav}
28
+                    <li><a href="{$link.url}">{$link.name}</a></li>
29
+                  {/foreach}
30
+                </ul>
31
+              </div>
32
+            </div>
33
+          </div>  
34
+
35
+          <div class="row-fluid">
36
+            {$raw |noAutoescape}
37
+          </div>
38
+
39
+          {if $injections.body}
40
+            {foreach $injection in $injections.body}
41
+              <div class="row-fluid">
42
+                {$injection |noAutoescape}
43
+              </div>
44
+            {/foreach}
45
+          {/if}
46
+
47
+          <div class="row-fluid">
48
+            <hr>
49
+            <p class="fineprint">Unless otherwise credited all material
50
+            {if $config.license}
51
+              {$config.license}
52
+            {else}
53
+              <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/deed.en_US">
54
+               <img alt="Creative Commons License" style="border-width:0" src="{$config.domain}/img/cc-by-sa.png" />
55
+              </a>
56
+            {/if}
57
+            by {$config.author}
58
+            <img align="right" src="{$config.domain}/img/logo_small.jpg" /></p>
59
+          </div>
60
+        </div>
61
+      </div>
62
+    </div>
63
+
64
+    <script src="{$config.domain}/js/bootstrap.min.js"></script>
65
+  </body>
66
+</html>
67
+{/template}

Fichier diff supprimé car celui-ci est trop grand
+ 9 - 0
themes/readable/css/bootstrap.min.css


+ 41 - 0
themes/readable/css/custom.css

@@ -0,0 +1,41 @@
1
+hr {
2
+    border: 0;
3
+    height: 1px;
4
+    background-image: -webkit-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); 
5
+    background-image:    -moz-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); 
6
+    background-image:     -ms-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); 
7
+    background-image:      -o-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0)); 
8
+}
9
+pre { overflow: auto; }
10
+p.date-posted { font-style: italic; }
11
+p.fineprint { font-size: smaller; }
12
+
13
+/* Stolen from lisppaste for the colorize output of 3bmd */
14
+.paste { background-color: #F4F4F4; color: black; }
15
+.paste:hover { background-color: #F4F4F4; color: black; }
16
+.symbol { color : #770055; background-color : transparent; border: 0px; margin: 0px;}
17
+.special { color : #FF5000; background-color : inherit; }
18
+.keyword { color : #770000; background-color : inherit; }
19
+.comment { color : #007777; background-color : inherit; }
20
+.string { color : #777777; background-color : inherit; }
21
+.atom { color : #314F4F; background-color : inherit; }
22
+.macro { color : #FF5000; background-color : inherit; }
23
+.variable { color : #36648B; background-color : inherit; }
24
+.function { color : #8B4789; background-color : inherit; }
25
+.attribute { color : #FF5000; background-color : inherit; }
26
+.character { color : #0055AA; background-color : inherit; }
27
+.syntaxerror { color : #FF0000; background-color : inherit; }
28
+.diff-deleted { color : #5F2121; background-color : inherit; }
29
+.diff-added { color : #215F21; background-color : inherit; }
30
+span.paren1 { background-color : inherit; -webkit-transition: background-color 0.2s linear; }
31
+span.paren1:hover { color : inherit; background-color : #BAFFFF; }
32
+span.paren2 { background-color : inherit; -webkit-transition: background-color 0.2s linear; }
33
+span.paren2:hover { color : inherit; background-color : #FFCACA; }
34
+span.paren3 { background-color : inherit; -webkit-transition: background-color 0.2s linear; }
35
+span.paren3:hover { color : inherit; background-color : #FFFFBA; }
36
+span.paren4 { background-color : inherit; -webkit-transition: background-color 0.2s linear; }
37
+span.paren4:hover { color : inherit; background-color : #CACAFF; }
38
+span.paren5 { background-color : inherit; -webkit-transition: background-color 0.2s linear; }
39
+span.paren5:hover { color : inherit; background-color : #CAFFCA; }
40
+span.paren6 { background-color : inherit; -webkit-transition: background-color 0.2s linear; }
41
+span.paren6:hover { color : inherit; background-color : #FFBAFF; }

BIN
themes/readable/img/cc-by-sa.png


BIN
themes/readable/img/glyphicons-halflings-white.png


BIN
themes/readable/img/glyphicons-halflings.png


BIN
themes/readable/img/logo_small.jpg


+ 32 - 0
themes/readable/index.tmpl

@@ -0,0 +1,32 @@
1
+{namespace coleslaw.theme.readable}
2
+
3
+{template index}
4
+<h1 class="page-header">{$index.title}</h1>
5
+{foreach $post in $index.posts}
6
+  <div class="row-fluid">
7
+    <h1><a href="{$config.domain}/posts/{$post.slug}.html">{$post.title}</a></h1>
8
+    <p class="date-posted">posted on {$post.date}</p>
9
+    {$post.text |noAutoescape}
10
+  </div>
11
+{/foreach}
12
+{if $tags}
13
+<div class="row-fluid">
14
+  <p>This blog covers
15
+    {foreach $tag in $tags}
16
+      <a href="{$config.domain}/tag/{$tag.slug}.html">{$tag.name}</a>{nil}
17
+      {if not isLast($tag)},{sp}{/if}
18
+    {/foreach}
19
+  </p>
20
+</div>
21
+{/if}
22
+{if $months}
23
+<div class="row-fluid">
24
+  <p>View posts from
25
+    {foreach $month in $months}
26
+      <a href="{$config.domain}/date/{$month}.html">{$month}</a>{nil}
27
+      {if not isLast($month)},{sp}{/if}
28
+    {/foreach}
29
+  </p>
30
+</div>
31
+{/if}
32
+{/template}

Fichier diff supprimé car celui-ci est trop grand
+ 6 - 0
themes/readable/js/bootstrap.min.js


+ 21 - 0
themes/readable/post.tmpl

@@ -0,0 +1,21 @@
1
+{namespace coleslaw.theme.readable}
2
+
3
+{template post}
4
+<div class="row-fluid">{\n}
5
+  <h1 class="page-header">{$post.title}</h1>{\n}
6
+  <p>Tagged as 
7
+    {foreach $tag in $post.tags}
8
+      <a href="../tag/{$tag.slug}.html">{$tag.name}</a>{nil}
9
+      {if not isLast($tag)},{sp}{/if}
10
+    {/foreach}
11
+  </p>
12
+  <p class="date-posted">Written on {$post.date}</p>
13
+
14
+  {$post.text |noAutoescape}
15
+  
16
+  <ul class="pager">
17
+    {if $prev}<li class="previous"><a href="{$config.domain}/posts/{$prev.slug}.html">&larr; Previous</a></li>{/if}{\n}
18
+    {if $next}<li class="next"><a href="{$config.domain}/posts/{$next.slug}.html">Next &rarr;</a></li>{/if}{\n}
19
+  </ul>
20
+</div>{\n}
21
+{/template}