diff --git a/css/HtmlFormat.css b/css/HtmlFormat.css new file mode 100644 index 0000000..430e15d --- /dev/null +++ b/css/HtmlFormat.css @@ -0,0 +1,101 @@ +html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video { + + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; + +} +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { + + display: block; + +} + +/* Let's go for the actual style */ + +body { + + background-color: #EEEEEE; + font-family: 'Noto Sans'; + +} + +section { + + background-color: #FFFFFF; + width: 90%; + margin: 30px auto; + padding: 10px 15px; + + box-shadow: 0px 1px 2px rgba(0,0,0, 0.25); + +} + +section > h2 { + + font-size: 200%; + font-weight: bold; + text-align: center; + +} + +h1.pagetitle { + + font-size: 300%; + font-weight: bold; + + text-align: center; + color: #2196F3; + +} +a.backlink, a.backlink:link, a.backlink:visited, a.itemtitle, a.itemtitle:link, a.itemtitle:visited { + + color: #2196F3; + +} + +.buttons { + + text-align: center; + +} + +section > div.content { + + padding: 10px; + +} + +section > time { + + color: #888; + font-size: 80%; + padding: 10px; + +} + +button.backbutton, button.rss-feed { + + line-height: 1em; + color: #FFF; + font-weight: bold; + vertical-align: middle; + padding: 6px 12px; + margin: 12px auto 0px; + box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3); + border-radius: 2px; + border: 1px solid transparent; + width: 200px; + background: #2196F3 none repeat scroll 0% 0%; + cursor: pointer; + + margin: 10px; + + +} + diff --git a/css/style.css b/css/style.css index 4ad2a3e..f830506 100644 --- a/css/style.css +++ b/css/style.css @@ -171,6 +171,7 @@ h5 { .showmore, .showless { color: #888888; + cursor: pointer; } diff --git a/formats/HtmlFormat.php b/formats/HtmlFormat.php index 4bc48ab..9b42694 100644 --- a/formats/HtmlFormat.php +++ b/formats/HtmlFormat.php @@ -18,41 +18,21 @@ class HtmlFormat extends FormatAbstract{ foreach($this->getDatas() as $data){ $entryUri = is_null($data->uri) ? $uri : $data->uri; $entryTitle = is_null($data->title) ? '' : $this->sanitizeHtml(strip_tags($data->title)); - $entryTimestamp = is_null($data->timestamp) ? '' : ''; - $entryAuthor = is_null($data->author) ? '' : '
by: ' . $data->author . ''; - $entryContent = is_null($data->content) ? '' : '

' . $this->sanitizeHtml($data->content). '

'; + $entryTimestamp = is_null($data->timestamp) ? '' : ''; + $entryAuthor = is_null($data->author) ? '' : '

by: ' . $data->author . '

'; + $entryContent = is_null($data->content) ? '' : '
' . $this->sanitizeHtml($data->content). '
'; $entries .= << -

{$entryTitle}

+
+

{$entryTitle}

{$entryTimestamp} {$entryAuthor} {$entryContent} - +
EOD; } - $styleCss = <<<'EOD' -body{ - font-family:"Trebuchet MS",Verdana,Arial,Helvetica,sans-serif; - font-size:10pt; - background-color:#aaa; - background-image:linear-gradient(#eee, #aaa); - background-attachment:fixed; -} -div.feeditem{border:1px solid black;padding:1em;margin:1em;background-color:#fff;} -div.feeditem:hover { background-color:#ebf7ff; } -h1 {border-bottom:dotted #bbb;margin:0 1em 1em 1em;} -h2 {margin:0;} -h2 a {color:black;text-decoration:none;} -h2 a:hover {text-decoration:underline;} -span.menu {margin-left:1em;} -span.menu img {vertical-align:middle;} -span.menu a { color:black; text-decoration:none; padding:0.4em; } -span.menu a:hover { background-color:white; } - -EOD; /* Data are prepared, now let's begin the "MAGIE !!!" */ $toReturn = << {$title} - + -

{$title}

-← back to rss-bridge feed +

{$title}

+ {$entries}