diff --git a/public/css/channel.css b/public/css/channel.css new file mode 100644 index 0000000..b701d49 --- /dev/null +++ b/public/css/channel.css @@ -0,0 +1,55 @@ +* { + box-sizing: border-box; +} + +html { + background-color: #e6e8e6; +} + +body .channel { + background-color: #b2675e; + padding: 40px; + margin: 15px; + border-style: solid; + border-color: #b2675e; + border-width: 15px; +} + +body .channel h1 { + text-align: center; + font-size: 60; + color: #e6e8e6; +} + +body .channel b { + font-size: 30px; +} + +body .channel p { + font-size: 15px; + text-decoration: underline; +} + +body .channelitem { + float: left; + width: 50%; + padding: 20px; + border-style: solid; + border-color: #e6e8e6; + border-width: 15px; +} + +body .channelitem h2 { + color: #b2675e; +} + +body .channelitem a { + color: #000000; +} + +body .row:after { + content: ""; + display: table; + clear: both; +} + diff --git a/public/css/news.css b/public/css/news.css index c075b72..322075a 100644 --- a/public/css/news.css +++ b/public/css/news.css @@ -1,70 +1,56 @@ -body .index { - background-color: #e6e8e6; - padding: 40px; +* { + box-sizing: border-box; } -body .index h1 { +html { + background-color: #e6e8e6; +} + +body .title { + background-color: #e6e8e6; + padding: 40px; + margin: 15px; + border-style: solid; + border-color: #b2675e; + border-width: 15px; +} + +body .title h1 { + font-size: 60px; text-align: center; - font-size: 60; color: #b2675e; } -body .index h2 { +body .title h2 { + font-size: 20px; + font-style: italic; text-align: center; - font-size: 40px; } -body .index h3 { - text-align: center; - font-size: 20px; +body .index { + float: left; + width: 50%; + padding: 60px; + border-style: solid; + border-color: #e6e8e6; + border-width: 15px; + background-color: #b2675e; +} + +body .index h3 a { + text-align: left; + font-size: 40px; + color: #FFFFFF; + text-decoration: bold; + background-color: none; } body .index a { text-align: center; font-size: 20px; -} - -body .index p { - text-align: center; - text-decoration: bold; - font-size: 20px; -} - -body .channel { - 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 + color: #e6e8e6; + text-decoration: none; + background-color: none; } body .row:after { diff --git a/source/cartastraccia/renderer.d b/source/cartastraccia/renderer.d index c05bd8c..095e8e3 100644 --- a/source/cartastraccia/renderer.d +++ b/source/cartastraccia/renderer.d @@ -15,7 +15,7 @@ auto doc = createDocument(); doc.root.html = ` - + Cartastraccia - `~feedName~` `; diff --git a/views/index.dt b/views/index.dt index bf3bcac..fb89a45 100644 --- a/views/index.dt +++ b/views/index.dt @@ -5,14 +5,19 @@ title CartaStraccia - RSS Feed Reader :css body - #list(class="index") + #title(class="title") h1 Cartastraccia h2 "...fuck ads" - #index(class="index") - - uint cnt = 0; - - foreach(feed; validFeeds) - #chname(class="index") - h2 - a(href="channels/"~feed.name~".html") #{feed.name} - p - a(href=feed.path) external link + - ulong flen = validFeeds.length; + - foreach(feed; validFeeds[0..flen/2]) + #chname1(class="index") + h3 + a(href="channels/"~feed.name~".html") #{feed.name} + p + a(href=feed.path) external link + - foreach(feed; validFeeds[flen/2..$]) + #chname2(class="index") + h3 + a(href="channels/"~feed.name~".html") #{feed.name} + p + a(href=feed.path) external link