diff --git a/public/css/news.css b/public/css/news.css index 79bf574..fc1ad83 100644 --- a/public/css/news.css +++ b/public/css/news.css @@ -1,11 +1,69 @@ +body .index { + background-color: #e6e8e6; + padding: 40px; +} + +body .index h1 { + text-align: center; + font-size: 60; + color: #b2675e; +} + +body .index h2 { + text-align: center; + font-size: 60; +} + +body .index a { + text-align: center; + font-size: 30px; +} + +body .index p { + text-align: center; + text-decoration: bold; +} + body .channel { - font-size: 20px; background-color: #e6e8e6; padding: 40px; } body .channel h1 { text-align: center; + font-size: 60; color: #b2675e; } +body .channel b { + font-size: 30px; +} + +body .channel p { + font-size: 15px; + text-decoration: underline; +} + +* { + box-sizing: border-box; +} + +body .channelitem { + float: left; + width: 50%; + padding: 20px; + border-style: solid; + border-color: #e6e8e6; + border-width: 15px; +} + +body .channelitem h2 { + color: #b2675e +} + +body .row:after { + content: ""; + display: table; + clear: both; +} + diff --git a/source/cartastraccia/renderer.d b/source/cartastraccia/renderer.d index 347ea28..c05bd8c 100644 --- a/source/cartastraccia/renderer.d +++ b/source/cartastraccia/renderer.d @@ -13,23 +13,44 @@ void createHTMLPage(ref ValidRSS rss, immutable string feedName, immutable string pageName) { auto doc = createDocument(); - doc.root.html = `
`; + doc.root.html = ` + + +"~item.pubDate~"
" - ~ item.description; + if(i < icnt/2) { + auto itemCont = doc.createElement("div", column1); + itemCont.html = ""~item.pubDate~"
" + ~ item.description; + } else { + auto itemCont = doc.createElement("div", column2); + itemCont.html = ""~item.pubDate~"
" + ~ item.description; + } + i++; } } diff --git a/views/index.dt b/views/index.dt index b6b3025..3ea255a 100644 --- a/views/index.dt +++ b/views/index.dt @@ -5,16 +5,14 @@ title CartaStraccia - RSS Feed Reader :css body - #list(class="channel") - h1 Cartastraccia RSS Channels - p Click channel name to read, click Source for remote source - ul#index + #list(class="index") + h1 Cartastraccia + h2 "...fuck ads" + #index(class="index") - uint cnt = 0; - foreach(feed; validFeeds) - - cnt++; - li - Feed #{cnt}: + #chname(class="index") + p a(href="channels/"~feed.name~".html") #{feed.name} - p - a(href=feed.path) View source - + br + a(href=feed.path) external link