diff options
-rw-r--r-- | layouts/base.lua | 21 | ||||
-rw-r--r-- | layouts/blog.lua | 4 |
2 files changed, 21 insertions, 4 deletions
diff --git a/layouts/base.lua b/layouts/base.lua index def4183..1c585d7 100644 --- a/layouts/base.lua +++ b/layouts/base.lua @@ -19,21 +19,38 @@ return function(html, page_tbl) local html = string.gsub( html, '<h1>(.-)</h1>', - '<p class="centered">%1<br>================================</p>' + function(s) + return string.format( + '<h1>%s</h1>%s</br>', + s, string.rep('=', string.len(s)) + ) + end + ) + + html = string.gsub( + html, + '<h2>(.-)</h2>', + function(s) + return string.format( + '<h2>%s</h2>%s</br>', + s, string.rep('-', string.len(s)) + ) + end ) local fmt = [[ <!doctype html> <html> <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" type="image/svg+xml" href="/favicon.svg"> <title>%s</title> <link rel="stylesheet" href="/style.css"> </html> <body> - %s <div id="content"> %s + %s </div> </body> </html> diff --git a/layouts/blog.lua b/layouts/blog.lua index 94dc685..eaed8a2 100644 --- a/layouts/blog.lua +++ b/layouts/blog.lua @@ -2,7 +2,7 @@ local base = require('layouts.base') return function(html, page_tbl) local html = string.format( - '<h1>%s</h1>\n<p class="centered">%s</p>\n\n%s', - page_tbl.title, page_tbl.date, html) + '<h1>%s</h1>\n\n%s', + page_tbl.title, html) return base(html, page_tbl) end |