From 08a48dc525f2d2627bb4836059b0aebfec3f0d4f Mon Sep 17 00:00:00 2001 From: Xuan Sang LE Date: Sun, 25 Feb 2018 15:19:31 +0100 Subject: [PATCH] minor fix --- blog/assets/style.css | 4 ++++ blog/view/entries.ls | 18 ++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/blog/assets/style.css b/blog/assets/style.css index eee56db..67ba75c 100644 --- a/blog/assets/style.css +++ b/blog/assets/style.css @@ -246,6 +246,9 @@ button{ padding-bottom: 5px; text-align: left; } +#container .blogentry .title_link { + color:#2c2c2c; +} #container .blogentry h2{ font-size: 18px; text-align: left; @@ -389,6 +392,7 @@ div.commentform .inputbox{ } div.commentform .inputbox input{ margin-top:3px; + flex:1; } div.commentform .inputbox .label{ padding-right: 5px; diff --git a/blog/view/entries.ls b/blog/view/entries.ls index e198dc4..cfd6734 100644 --- a/blog/view/entries.ls +++ b/blog/view/entries.ls @@ -47,12 +47,26 @@
)") + local title = nil if r then content = content:sub(0,r-1) end - echo(content) + local a,b = content:find("<[Hh]1[^>]*>") + local c,d + if a then + c,d = content:find("") + if c then + title = content:sub(b+1, c-1) + end + end + if title then + echo(content:sub(0, b)) + echo(""..title.."") + echo(content:sub(c)) + else + echo(content) + end ?>