From 208aa9c6d89b12321bd14ad7ee8322af5e4f3ce9 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sat, 15 Feb 2014 17:32:41 +0100 Subject: Creation of a basic template It is not supposed to be used... but it could. This is a minimalistic theme (about 725 lines). In the future, it could be great to based all official themes on this one. See #320 --- p/themes/template/loader.gif | Bin 0 -> 4167 bytes p/themes/template/metadata.json | 7 + p/themes/template/template.css | 725 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 732 insertions(+) create mode 100644 p/themes/template/loader.gif create mode 100644 p/themes/template/metadata.json create mode 100644 p/themes/template/template.css diff --git a/p/themes/template/loader.gif b/p/themes/template/loader.gif new file mode 100644 index 000000000..5ff26f0e3 Binary files /dev/null and b/p/themes/template/loader.gif differ diff --git a/p/themes/template/metadata.json b/p/themes/template/metadata.json new file mode 100644 index 000000000..d29c2b8e8 --- /dev/null +++ b/p/themes/template/metadata.json @@ -0,0 +1,7 @@ +{ + "name": "Template", + "author": "Marien Fressinaud", + "description": "A basic template for FreshRSS", + "version": 0.1, + "files": ["template.css"] +} diff --git a/p/themes/template/template.css b/p/themes/template/template.css new file mode 100644 index 000000000..22d59685b --- /dev/null +++ b/p/themes/template/template.css @@ -0,0 +1,725 @@ +@charset "UTF-8"; + +/*=== Links */ +a { + text-decoration: none; +} +a:hover { + text-decoration: underline; +} + +/*=== Lists */ +ul, ol, dd { + margin: 0; + padding: 0; +} + +/* TITRES */ +h1, h2, h3 { + min-height: 40px; + line-height: 40px; +} + +/* IMG */ +figcaption { + display: inline-block; +} +img { + height: auto; + max-width: 100%; +} + +/* VIDEOS */ +iframe, embed, object, video { + max-width: 100%; +} + +/* FORMULAIRES */ +legend { + display: block; + width: 100%; + clear: both; +} +label { + display: block; + min-height: 25px; + line-height: 25px; +} +input { + width: 180px; +} +textarea { + width: 360px; + height: 100px; +} +input, select, textarea { + display: inline-block; + max-width: 100%; + min-height: 25px; +} +input[type="radio"], +input[type="checkbox"] { + width: 15px !important; + min-height: 15px !important; +} +input:focus.extend { + width: 300px; +} + +.form-group { + margin: 0; +} +.form-group:after { + content: ""; + display: block; + clear: both; +} +.form-group.form-actions { + min-width: 250px; +} +.form-group .group-name { + display: block; + float: left; + width: 200px; +} +.form-group .group-controls { + min-width: 250px; + min-height: 25px; + margin: 0 0 0 220px; +} +.form-group .group-controls .control { + display: block; + min-height: 30px; + line-height: 25px; +} + +.stick { + display: inline-block; + white-space: nowrap; +} + +.btn { + display: inline-block; + min-height: 37px; + min-width: 15px; + line-height: 20px; + cursor: pointer; + overflow: hidden; +} +a.btn { + min-height: 25px; + line-height: 25px; +} +.btn-important { + background: #aaa; +} + +/* NAVIGATION */ +.nav-list .nav-header, +.nav-list .item { + display: block; + height: 35px; + line-height: 35px; +} +.nav-list .item > * { + display: block; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +.nav-head { + display: block; +} +.nav-head .item { + display: inline-block; +} + +/* HORIZONTAL-LIST */ +.horizontal-list { + display: table; + table-layout: fixed; + width: 100%; +} +.horizontal-list .item { + display: table-cell; +} + +/* DROPDOWN */ +.dropdown { + position: relative; + display: inline-block; +} +.dropdown-target { + display: none; +} + +.dropdown-menu { + display: none; + min-width: 200px; + margin: 5px 0 0; + position: absolute; + right: 0px; + background: #fff; + border: 1px solid #aaa; +} +.dropdown-header { + display: block; +} +.dropdown-menu > .item { + display: block; + min-height: 30px; + line-height: 30px; +} +.dropdown-menu > .item > a { + display: block; + line-height: 30px; +} +.dropdown-menu > .item.share > a { + display: list-item; + list-style-position: inside; + list-style-type: decimal; +} +.dropdown-menu > .item[aria-checked="true"] > a:before { + content: '✓ '; +} +.dropdown-menu .input { + display: block; + height: 40px; + line-height: 30px; +} +.dropdown-menu .input select, +.dropdown-menu .input input { + display: block; + height: 20px; + width: 95%; +} +.dropdown-menu .input select { + width: 70%; + height: auto; +} +.dropdown-target:target ~ .dropdown-menu { + display: block; + z-index: 10; +} +.dropdown-close { + display: inline; +} +.dropdown-close a { + font-size: 0; + position: fixed; + top: 0; bottom: 0; + left: 0; right: 0; + display: block; + z-index: -10; +} + +.separator { + display: block; + height: 0; + border-bottom: 1px solid #aaa; +} + +/* ALERTS */ +.alert { + display: block; + width: 90%; +} +.alert-head { + margin: 0; +} + +/* ICÔNES */ +.icon { + display: inline-block; + width: 16px; + height: 16px; + vertical-align: middle; + line-height: 16px; +} + +/* Prompt (centré) */ +.prompt form { + width: 10em; +} +.prompt input { + width: 100%; +} + + + +/* STRUCTURE */ +.header { + display: table; + width: 100%; + table-layout: fixed; +} +.header > .item { + display: table-cell; +} +.header > .item.title { + width: 250px; + white-space: nowrap; +} +.logo { + display: inline-block; + height: 32px; + width: 32px; +} +.header > .item.title h1 { + display: inline-block; +} +.header > .item.configure { + width: 100px; +} + +#global { + display: table; + width: 100%; + height: 100%; + table-layout: fixed; +} +.aside { + display: table-cell; + height: 100%; + width: 250px; +} + +.nav-login { + display: none; +} + +.nav_menu { + width: 100%; +} +.nav_menu .search { + display: none; +} + +.favicon { + height: 16px; + width: 16px; +} + +.categories { + padding: 0; + list-style: none; +} +.category { + display: block; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} +.category .btn:first-child { + position: relative; +} +.category.stick .btn:first-child { + width: 160px; +} +.category .btn:first-child:not([data-unread="0"]):after { + content: attr(data-unread); + position: absolute; +} +.category + .feeds:not(.active) { + display: none; +} +.categories .feeds { + width: 100%; + padding: 0; + list-style: none; +} +.categories .feeds .item .feed { + display: inline-block; + margin: 0; + width: 165px; + line-height: 35px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + vertical-align: middle; +} +.feed:not([data-unread="0"]):before { + content: "(" attr(data-unread) ") "; +} +.categories .feeds .dropdown-menu { + left: 0; +} +.categories .feeds .item .dropdown-toggle > .icon { + visibility: hidden; + cursor: pointer; +} +.categories .feeds .item .dropdown-target:target ~ .dropdown-toggle > .icon, +.categories .feeds .item:hover .dropdown-toggle > .icon, +.categories .feeds .item.active .dropdown-toggle > .icon { + visibility: visible; +} + +.day { + min-height: 50px; + line-height: 50px; +} +.day .name { + position: absolute; + right: 0; + width: 50%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +#new-article { + display: none; + min-height: 40px; +} +#new-article > a { + display: block; + line-height: 40px; +} + +.horizontal-list > .item:not(.title):not(.website) > a { + display: block; +} + +.flux_header { + position: relative; + height: 25px; +} +.flux .item { + line-height: 40px; + white-space: nowrap; +} +.flux_header > .item { + overflow: hidden; + text-overflow: ellipsis; +} +.flux .item.manage { + width: 40px; +} +.flux .item.website { + width: 200px; +} +.flux .item.title a { + color: #000; +} +.flux.not_read .item.title, +.flux.current .item.title { + font-weight: bold; +} +.flux:not(.current):hover .item.title { + position: absolute; + top: 0; + max-width: calc(100% - 325px); + background: #fff; +} +.flux .item.date { + width: 145px; +} +.link { + width: 40px; +} + +#stream.global .box-category { + display: inline-block; + width: 280px; + border: 1px solid #aaa; + vertical-align: top; +} +#stream.global .category { + width: 100%; +} +#stream.global .btn { + display: block; + width: auto; + height: 35px; + line-height: 35px; +} +#stream.global .box-category .feeds { + display: block; + max-height: 250px; + overflow: auto; +} +#stream.global .box-category .feed { + width: 220px; +} + +.content { + min-height: 150px; + max-width: 550px; + line-height: 170%; + word-wrap: break-word; +} + +img.big { + display: block; +} +.content hr { + height: 1px; +} +.content pre { + overflow: auto; +} +.content q, .content blockquote { + display: block; +} + +#panel { + display: none; + position: fixed; + top: 10px; bottom: 10px; + left: 100px; right: 100px; + overflow: auto; + background: #fff; +} +#panel .close { + position: fixed; + top: 0; bottom: 0; + left: 0; right: 0; + display: block; +} +#panel .close img { + display: none; +} + +#overlay { + display: none; + position: fixed; + top: 0; bottom: 0; + left: 0; right: 0; + background: rgba(0, 0, 0, 0.9); +} + +.hide_posts > :not(.active) > .flux_content { + display: none; +} + +/*** PAGINATION ***/ +.pagination { + display: table; + width: 100%; + line-height: 200%; + table-layout: fixed; +} +.pagination .item { + display: table-cell; + line-height: 40px; +} +.pagination .pager-first, +.pagination .pager-previous, +.pagination .pager-next, +.pagination .pager-last { + width: 100px; +} +.pagination .item a { + display: block; +} + +#nav_entries { + display: table; + width: 250px; + height: 40px; + position: fixed; + bottom: 0; + left: 0; + line-height: 40px; + table-layout: fixed; +} +#nav_entries .item { + display: table-cell; + width: 30%; +} +#nav_entries a { + display: block; +} +#nav_entries .i_up { + vertical-align: top; +} + +.loading { + background: url("loader.gif") center center no-repeat; + font-size: 0; +} + +#bigMarkAsRead { + display: block; + text-align: center; +} +.bigTick { + font-size: 72pt; + line-height: 1.6em; +} + +/*** NOTIFICATION ***/ +#notification { + position: absolute; + top: 10px; + left: 25%; right: 25%; + min-height: 30px; + line-height: 30px; + z-index: 10; + border: 1px solid #aaa; +} +#notification.closed { + display: none; +} +#notification a.close { + display: inline-block; + width: 16px; + height: 16px; + float: right; + line-height: 16px; +} + +.toggle_aside, .btn.toggle_aside { + display: none; +} + +.actualizeProgress { + position: fixed; + top: 10px; + left: 25%; right: 25%; + border: 1px solid #aaa; +} +.actualizeProgress progress { + max-width: 100%; +} + +.log { + overflow: auto; +} +.log .date { + display: block; +} + +@media(max-width: 840px) { + .header, + .aside .btn-important, + .aside .feeds .dropdown, + .flux_header .item.website span, + .item.date { + display: none; + } + .flux_header .item.website { + width: 40px; + } + + .nav-login { + display: block; + } + + .pagination .pager-previous, .pagination .pager-next { + width: 100px; + } + + .toggle_aside, .btn.toggle_aside { + display: inline-block; + } + .aside { + position: fixed; + top: 0; left: 0; + width: 0; + overflow: hidden; + z-index: 10; + } + .aside:target { + width: 80%; + overflow: auto; + } + .aside .toggle_aside { + position: absolute; + right: 0; + display: inline-block; + width: 26px; + height: 26px; + line-height: 26px; + } + + #nav_entries { + width: 100%; + } + + .nav_menu .search { + display: inline-block; + max-width: 97%; + } + .nav_menu .search input { + max-width: 97%; + width: 90px; + } + .nav_menu .search input:focus { + width: 400px; + } + + #panel { + left: 5px; right: 5px; + } + #panel .close { + top: 10px; right: 0; + left: auto; bottom: auto; + display: inline-block; + width: 26px; + height: 26px; + } + #panel .close img { + display: block; + } + + .day .date { + display: none; + } + .day .name { + height: 2.6em; + } + + .flux:not(.current):hover .item.title { + position: relative; + width: auto; + } + + .notification, + .actualizeProgress { + left: 10px; + right: 10px; + } +} + +@media print { + .header, + .aside, + .nav_menu, + .day, + .flux_header, + .flux_content .bottom, + .pagination { + display: none; + } + + html, body { + background: #fff; + color: #000; + font-family: Serif; + font-size: 12pt; + } + + #global, + .flux_content { + display: block !important; + } + + .flux_content .content { + width: 100% !important; + text-align: justify; + } + + .flux_content .content a { + color: #000; + } + .flux_content .content a:after { + content: " (" attr(href) ") "; + text-decoration: underline; + } +} + +.stat > table { + width: 100%; +} \ No newline at end of file -- cgit v1.2.3 From d0f058307fd3e74cf2c83b104236798dcedfe68f Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Mon, 17 Feb 2014 01:02:16 +0100 Subject: Update template - Logical structure - Add Comments - Delete some rules See #320 --- p/themes/template/template.css | 480 ++++++++++++++++++----------------------- 1 file changed, 205 insertions(+), 275 deletions(-) diff --git a/p/themes/template/template.css b/p/themes/template/template.css index 22d59685b..e3567ea61 100644 --- a/p/themes/template/template.css +++ b/p/themes/template/template.css @@ -1,5 +1,7 @@ @charset "UTF-8"; +/*=== GENERAL */ +/*============*/ /*=== Links */ a { text-decoration: none; @@ -14,27 +16,28 @@ ul, ol, dd { padding: 0; } -/* TITRES */ +/*=== Titles */ h1, h2, h3 { min-height: 40px; line-height: 40px; } -/* IMG */ -figcaption { - display: inline-block; -} +/*=== Images */ img { height: auto; max-width: 100%; } +img.favicon { + height: 16px; + width: 16px; +} -/* VIDEOS */ +/*=== Videos */ iframe, embed, object, video { max-width: 100%; } -/* FORMULAIRES */ +/*=== Forms */ legend { display: block; width: 100%; @@ -62,13 +65,13 @@ input[type="checkbox"] { width: 15px !important; min-height: 15px !important; } -input:focus.extend { +input.extend:focus { width: 300px; } -.form-group { - margin: 0; -} +/*=== COMPONENTS */ +/*===============*/ +/*=== Forms */ .form-group:after { content: ""; display: block; @@ -90,14 +93,14 @@ input:focus.extend { .form-group .group-controls .control { display: block; min-height: 30px; - line-height: 25px; + line-height: 30px; } +/*=== Buttons */ .stick { display: inline-block; white-space: nowrap; } - .btn { display: inline-block; min-height: 37px; @@ -114,20 +117,20 @@ a.btn { background: #aaa; } -/* NAVIGATION */ +/*=== Navigation */ .nav-list .nav-header, .nav-list .item { display: block; height: 35px; line-height: 35px; } -.nav-list .item > * { +.nav-list .item, +.nav-list .item > a { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } - .nav-head { display: block; } @@ -135,7 +138,7 @@ a.btn { display: inline-block; } -/* HORIZONTAL-LIST */ +/*=== Horizontal-list */ .horizontal-list { display: table; table-layout: fixed; @@ -145,7 +148,7 @@ a.btn { display: table-cell; } -/* DROPDOWN */ +/*=== Dropdown */ .dropdown { position: relative; display: inline-block; @@ -153,7 +156,6 @@ a.btn { .dropdown-target { display: none; } - .dropdown-menu { display: none; min-width: 200px; @@ -175,11 +177,6 @@ a.btn { display: block; line-height: 30px; } -.dropdown-menu > .item.share > a { - display: list-item; - list-style-position: inside; - list-style-type: decimal; -} .dropdown-menu > .item[aria-checked="true"] > a:before { content: '✓ '; } @@ -213,23 +210,23 @@ a.btn { display: block; z-index: -10; } - .separator { display: block; height: 0; border-bottom: 1px solid #aaa; } -/* ALERTS */ +/*=== Alerts */ .alert { display: block; width: 90%; } .alert-head { margin: 0; + font-weight: bold; } -/* ICÔNES */ +/*=== Icons */ .icon { display: inline-block; width: 16px; @@ -238,17 +235,25 @@ a.btn { line-height: 16px; } -/* Prompt (centré) */ -.prompt form { - width: 10em; -} -.prompt input { +/*=== Pagination */ +.pagination { + display: table; width: 100%; + table-layout: fixed; +} +.pagination .item { + display: table-cell; +} +.pagination .pager-first, +.pagination .pager-previous, +.pagination .pager-next, +.pagination .pager-last { + width: 100px; } - - -/* STRUCTURE */ +/*=== STRUCTURE */ +/*===============*/ +/*=== Header */ .header { display: table; width: 100%; @@ -261,18 +266,20 @@ a.btn { width: 250px; white-space: nowrap; } -.logo { +.header > .item.title h1 { display: inline-block; - height: 32px; - width: 32px; } -.header > .item.title h1 { +.header > .item.title .logo { display: inline-block; + height: 32px; + width: 32px; + vertical-align: middle; } .header > .item.configure { width: 100px; } +/*=== Body */ #global { display: table; width: 100%; @@ -284,54 +291,31 @@ a.btn { height: 100%; width: 250px; } - -.nav-login { - display: none; -} - -.nav_menu { - width: 100%; -} -.nav_menu .search { - display: none; -} - -.favicon { - height: 16px; - width: 16px; +.aside.aside_flux { + background: #fff; } -.categories { - padding: 0; - list-style: none; -} +/*=== Aside main page (categories) */ .category { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } -.category .btn:first-child { - position: relative; -} -.category.stick .btn:first-child { - width: 160px; -} -.category .btn:first-child:not([data-unread="0"]):after { +.category .btn:not([data-unread="0"]):after { content: attr(data-unread); - position: absolute; -} -.category + .feeds:not(.active) { - display: none; } + +/*=== Aside main page (feeds) */ .categories .feeds { width: 100%; - padding: 0; list-style: none; } -.categories .feeds .item .feed { +.categories .feeds:not(.active) { + display: none; +} +.categories .feeds .feed { display: inline-block; - margin: 0; width: 165px; line-height: 35px; overflow: hidden; @@ -339,7 +323,7 @@ a.btn { text-overflow: ellipsis; vertical-align: middle; } -.feed:not([data-unread="0"]):before { +.categories .feeds .feed:not([data-unread="0"]):before { content: "(" attr(data-unread) ") "; } .categories .feeds .dropdown-menu { @@ -348,6 +332,7 @@ a.btn { .categories .feeds .item .dropdown-toggle > .icon { visibility: hidden; cursor: pointer; + vertical-align: top; } .categories .feeds .item .dropdown-target:target ~ .dropdown-toggle > .icon, .categories .feeds .item:hover .dropdown-toggle > .icon, @@ -355,19 +340,7 @@ a.btn { visibility: visible; } -.day { - min-height: 50px; - line-height: 50px; -} -.day .name { - position: absolute; - right: 0; - width: 50%; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} - +/*=== New article notification */ #new-article { display: none; min-height: 40px; @@ -377,10 +350,17 @@ a.btn { line-height: 40px; } -.horizontal-list > .item:not(.title):not(.website) > a { - display: block; +/*=== Day indication */ +.day .name { + position: absolute; + right: 0; + width: 50%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } +/*=== Feed article header and footer */ .flux_header { position: relative; height: 25px; @@ -388,20 +368,16 @@ a.btn { .flux .item { line-height: 40px; white-space: nowrap; -} -.flux_header > .item { - overflow: hidden; text-overflow: ellipsis; } -.flux .item.manage { +.flux .item.manage, +.flux .item.link { width: 40px; + text-align: center; } .flux .item.website { width: 200px; } -.flux .item.title a { - color: #000; -} .flux.not_read .item.title, .flux.current .item.title { font-weight: bold; @@ -412,116 +388,79 @@ a.btn { max-width: calc(100% - 325px); background: #fff; } +.flux .item.title a { + color: #000; + text-decoration: none; +} .flux .item.date { width: 145px; } -.link { - width: 40px; -} - -#stream.global .box-category { - display: inline-block; - width: 280px; - border: 1px solid #aaa; - vertical-align: top; -} -#stream.global .category { - width: 100%; -} -#stream.global .btn { +.flux .item:not(.title) > a { display: block; - width: auto; - height: 35px; - line-height: 35px; } -#stream.global .box-category .feeds { - display: block; - max-height: 250px; - overflow: auto; +.flux .flux_header .item, +.flux .bottom .item.date { + overflow: hidden; } -#stream.global .box-category .feed { - width: 220px; +.flux .item.share > a { + display: list-item; + list-style-position: inside; + list-style-type: decimal; } +/*=== Feed article content */ +.hide_posts > .flux:not(.active) > .flux_content { + display: none; +} .content { min-height: 150px; max-width: 550px; + margin: auto; line-height: 170%; word-wrap: break-word; } - -img.big { - display: block; -} -.content hr { - height: 1px; -} .content pre { overflow: auto; } -.content q, .content blockquote { - display: block; -} -#panel { - display: none; - position: fixed; - top: 10px; bottom: 10px; - left: 100px; right: 100px; - overflow: auto; +/*=== Notification and actualize notification */ +#notification { + position: absolute; + top: 10px; + left: 25%; right: 25%; + z-index: 10; background: #fff; + border: 1px solid #aaa; } -#panel .close { - position: fixed; - top: 0; bottom: 0; - left: 0; right: 0; - display: block; -} -#panel .close img { - display: none; -} - -#overlay { +#notification.closed { display: none; - position: fixed; - top: 0; bottom: 0; - left: 0; right: 0; - background: rgba(0, 0, 0, 0.9); } - -.hide_posts > :not(.active) > .flux_content { - display: none; +#notification a.close { + display: inline-block; + width: 16px; + height: 16px; + float: right; + line-height: 16px; } -/*** PAGINATION ***/ -.pagination { - display: table; - width: 100%; - line-height: 200%; - table-layout: fixed; -} -.pagination .item { - display: table-cell; - line-height: 40px; -} -.pagination .pager-first, -.pagination .pager-previous, -.pagination .pager-next, -.pagination .pager-last { - width: 100px; +.actualizeProgress { + position: fixed; + top: 10px; + left: 25%; right: 25%; + background: #fff; + border: 1px solid #aaa; } -.pagination .item a { - display: block; +.actualizeProgress progress { + max-width: 100%; } +/*=== Navigation menu (for articles) */ #nav_entries { + position: fixed; + bottom: 0; left: 0; display: table; width: 250px; - height: 40px; - position: fixed; - bottom: 0; - left: 0; - line-height: 40px; + background: #fff; table-layout: fixed; } #nav_entries .item { @@ -531,89 +470,114 @@ img.big { #nav_entries a { display: block; } -#nav_entries .i_up { - vertical-align: top; -} +/*=== "Load more" part */ .loading { background: url("loader.gif") center center no-repeat; font-size: 0; } - #bigMarkAsRead { display: block; + padding: 40px 0; text-align: center; } .bigTick { - font-size: 72pt; + font-size: 7em; line-height: 1.6em; } -/*** NOTIFICATION ***/ -#notification { - position: absolute; - top: 10px; - left: 25%; right: 25%; - min-height: 30px; - line-height: 30px; - z-index: 10; +/*=== Statistiques */ +.stat table { + width: 100%; +} + +/*=== GLOBAL VIEW */ +/*================*/ +/*=== Category boxes */ +#stream.global .box-category { + display: inline-block; + width: 280px; border: 1px solid #aaa; + vertical-align: top; } -#notification.closed { - display: none; +#stream.global .category { + width: 100%; } -#notification a.close { - display: inline-block; - width: 16px; - height: 16px; - float: right; - line-height: 16px; +#stream.global .btn { + display: block; +} +#stream.global .box-category .feeds { + display: block; + overflow: auto; +} +#stream.global .box-category .feed { + width: 220px; } -.toggle_aside, .btn.toggle_aside { +/*=== Panel */ +#overlay { display: none; + position: fixed; + top: 0; bottom: 0; + left: 0; right: 0; + background: rgba(0, 0, 0, 0.9); } - -.actualizeProgress { +#panel { + display: none; position: fixed; - top: 10px; - left: 25%; right: 25%; - border: 1px solid #aaa; + top: 10px; bottom: 10px; + left: 100px; right: 100px; + overflow: auto; + background: #fff; } -.actualizeProgress progress { - max-width: 100%; +#panel .close { + position: fixed; + top: 0; bottom: 0; + left: 0; right: 0; + display: block; +} +#panel .close img { + display: none; } -.log { - overflow: auto; +/*=== DIVERS */ +/*===========*/ +.nav-login, +.nav_menu .search, +.nav_menu .toggle_aside { + display: none; } -.log .date { - display: block; + +.aside .toggle_aside { + position: absolute; + right: 0; + display: none; + width: 26px; + height: 26px; + line-height: 26px; + text-align: center; } +/*=== MOBILE */ +/*===========*/ @media(max-width: 840px) { .header, .aside .btn-important, .aside .feeds .dropdown, .flux_header .item.website span, - .item.date { + .item.date, .day .date { display: none; } - .flux_header .item.website { - width: 40px; - } - - .nav-login { + .nav-login, + #panel .close img { display: block; } - - .pagination .pager-previous, .pagination .pager-next { - width: 100px; - } - - .toggle_aside, .btn.toggle_aside { + .nav_menu .toggle_aside, + .aside .toggle_aside, + .nav_menu .search { display: inline-block; } + .aside { position: fixed; top: 0; left: 0; @@ -625,29 +589,24 @@ img.big { width: 80%; overflow: auto; } - .aside .toggle_aside { - position: absolute; - right: 0; - display: inline-block; - width: 26px; - height: 26px; - line-height: 26px; - } - #nav_entries { - width: 100%; + .flux_header .item.website { + width: 40px; } - .nav_menu .search { - display: inline-block; - max-width: 97%; + .flux:not(.current):hover .item.title { + position: relative; + width: auto; } - .nav_menu .search input { - max-width: 97%; - width: 90px; + + #notification, + .actualizeProgress { + left: 10px; + right: 10px; } - .nav_menu .search input:focus { - width: 400px; + + #nav_entries { + width: 100%; } #panel { @@ -660,66 +619,37 @@ img.big { width: 26px; height: 26px; } - #panel .close img { - display: block; - } - - .day .date { - display: none; - } - .day .name { - height: 2.6em; - } - - .flux:not(.current):hover .item.title { - position: relative; - width: auto; - } - - .notification, - .actualizeProgress { - left: 10px; - right: 10px; - } } +/*=== PRINTER */ +/*============*/ @media print { - .header, - .aside, - .nav_menu, - .day, + .header, .aside, + .nav_menu, .day, .flux_header, .flux_content .bottom, - .pagination { + .pagination, + #nav_entries { display: none; } - html, body { background: #fff; color: #000; font-family: Serif; font-size: 12pt; } - #global, .flux_content { display: block !important; } - .flux_content .content { width: 100% !important; - text-align: justify; } - .flux_content .content a { color: #000; } .flux_content .content a:after { - content: " (" attr(href) ") "; - text-decoration: underline; + content: " [" attr(href) "] "; + font-style: italic; } } - -.stat > table { - width: 100%; -} \ No newline at end of file -- cgit v1.2.3 From 3dd6677421c9ba776f4734a890b4e7241c2faafb Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 21 Feb 2014 10:01:40 +0100 Subject: CHANGELOG 0.7.1 + TMP_PATH 0.8 --- CHANGELOG | 27 +++++++++++++++++++++++++++ constants.php | 3 +-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 138f7be21..73a8a16c6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,8 +2,35 @@ ## 2014-0x-xx FreshRSS 0.8 + +## 2014-02-19 FreshRSS 0.7.1 + * Mise à jour des flux plus rapide grâce à une meilleure utilisation du cache * Utilisation d’une signature MD5 du contenu intéressant pour les flux n’implémentant pas les requêtes conditionnelles +* Modification des raccourcis + * "s" partage directement si un seul moyen de partage + * Moyens de partage accessibles par "1", "2", "3", etc. + * Premier article : Home ; Dernier article : End + * Ajout du déplacement au sein des catégories / flux (via modificateurs shift et alt) +* UI + * Séparation des descriptions des raccourcis par groupes + * Revue rapide de la page de connexion + * Amélioration de l'affichage des notifications sur mobile +* Revue du système de rafraîchissement des flux + * Meilleure gestion de la file de flux à rafraîchir en JSON + * Rafraîchissement uniquement pour les flux non rafraîchis récemment + * Possibilité donnée aux anonymes de rafraîchir les flux +* SimplePie + * Mise à jour de la lib + * Corrige fuite de mémoire + * Meilleure tolérance aux flux invalides +* Corrections divers + * Ne déplie plus l'article lors du clic sur l'icône lien externe + * Ne boucle plus à la fin de la navigation dans les articles + * Suppression du champ category.color inutile + * Corrige bug redirection infinie (Persona) + * Amélioration vérification de la requête POST + * Ajout d'un verrou lorsqu'une action mark_read ou mark_favorite est en cours ## 2014-01-29 FreshRSS 0.7 diff --git a/constants.php b/constants.php index a140d0e74..4818f1565 100644 --- a/constants.php +++ b/constants.php @@ -16,5 +16,4 @@ define('FRESHRSS_PATH', dirname(__FILE__)); define('LIB_PATH', FRESHRSS_PATH . '/lib'); define('APP_PATH', FRESHRSS_PATH . '/app'); -//define('TMP_PATH', sys_get_temp_dir()); // need more tests so... -define('TMP_PATH', DATA_PATH); // ... we use DATA_PATH for the 0.7.1 +define('TMP_PATH', sys_get_temp_dir()); -- cgit v1.2.3 From d7083803c371c1668c92e086b3bff6e8a7610bc5 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 21 Feb 2014 10:02:43 +0100 Subject: Bug "mark all as read" when using DESC order Solves https://github.com/marienfressinaud/FreshRSS/issues/431 --- app/layout/nav_menu.phtml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 98064a6f7..24c0e38e9 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -61,7 +61,12 @@ break; } } - $p = isset($this->entries[0]) ? $this->entries[0] : null; + if ($this->order === 'ASC') { + $nb = count($this->entries) - 1; + $p = ($nb >= 0 && isset($this->entries[$nb])) ? $this->entries[$nb] : null; + } else { + $p = isset($this->entries[0]) ? $this->entries[0] : null; + } $idMax = $p === null ? '0' : $p->id(); $arUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('get' => $get, 'nextGet' => $nextGet, 'idMax' => $idMax)); -- cgit v1.2.3 From 7afd9e398a505aebf540ab32c3c6a29bb94a9514 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 21 Feb 2014 20:48:43 +0100 Subject: Bug "mark all as read" when using DESC and pagination https://github.com/marienfressinaud/FreshRSS/issues/431#issuecomment-35710258 --- app/views/helpers/javascript_vars.phtml | 1 + p/scripts/main.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index 3d7c8a98f..afe0ab258 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -5,6 +5,7 @@ echo '"use strict";', "\n"; $mark = $this->conf->mark_when; echo 'var ', 'hide_posts=', ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'false' : 'true', + ',display_order="', Minz_Request::param('order', $this->conf->sort_order), '"', ',auto_mark_article=', $mark['article'] ? 'true' : 'false', ',auto_mark_site=', $mark['site'] ? 'true' : 'false', ',auto_mark_scroll=', $mark['scroll'] ? 'true' : 'false', diff --git a/p/scripts/main.js b/p/scripts/main.js index 34042c945..beb77a19c 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -774,7 +774,11 @@ function load_more_posts() { $.get(url_load_more, function (data) { box_load_more.children('.flux:last').after($('#stream', data).children('.flux, .day')); $('.pagination').replaceWith($('.pagination', data)); - $('#bigMarkAsRead').attr('href', $('#nav_menu_read_all>a').attr('href')); + if (display_order === 'ASC') { + $('#nav_menu_read_all>a').attr('href', $('#bigMarkAsRead').attr('href')); + } else { + $('#bigMarkAsRead').attr('href', $('#nav_menu_read_all>a').attr('href')); + } $('[id^=day_]').each(function (i) { var ids = $('[id="' + this.id + '"]'); -- cgit v1.2.3 From 7313f9f3a306d16fac78ab587e3055482398ceac Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 21 Feb 2014 22:32:29 +0100 Subject: Bug "mark all as read" when using DESC and pagination and no scroll https://github.com/marienfressinaud/FreshRSS/issues/431#issuecomment-35774488 --- app/Models/EntryDAO.php | 6 +++--- app/layout/nav_menu.phtml | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index aaf4dcf6a..f41d6c560 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -65,7 +65,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo { } } public function markReadEntries ($idMax = 0, $favorites = false) { - if ($idMax === 0) { + if ($idMax == 0) { $sql = 'UPDATE `' . $this->prefix . 'entry` e INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed = f.id ' . 'SET e.is_read = 1, f.cache_nbUnreads=0 ' . 'WHERE e.is_read = 0 AND '; @@ -127,7 +127,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo { } } public function markReadCat ($id, $idMax = 0) { - if ($idMax === 0) { + if ($idMax == 0) { $sql = 'UPDATE `' . $this->prefix . 'entry` e INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed = f.id ' . 'SET e.is_read = 1, f.cache_nbUnreads=0 ' . 'WHERE f.category = ? AND e.is_read = 0'; @@ -182,7 +182,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo { } } public function markReadFeed ($id, $idMax = 0) { - if ($idMax === 0) { + if ($idMax == 0) { $sql = 'UPDATE `' . $this->prefix . 'entry` e INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed = f.id ' . 'SET e.is_read = 1, f.cache_nbUnreads=0 ' . 'WHERE f.id=? AND e.is_read = 0'; diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 24c0e38e9..097809e08 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -62,12 +62,11 @@ } } if ($this->order === 'ASC') { - $nb = count($this->entries) - 1; - $p = ($nb >= 0 && isset($this->entries[$nb])) ? $this->entries[$nb] : null; + $idMax = 0; } else { $p = isset($this->entries[0]) ? $this->entries[0] : null; + $idMax = $p === null ? '0' : $p->id(); } - $idMax = $p === null ? '0' : $p->id(); $arUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('get' => $get, 'nextGet' => $nextGet, 'idMax' => $idMax)); $output = Minz_Request::param('output', ''); -- cgit v1.2.3 From 27764b36353b3066a9e92da2a96ac17b546295be Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sat, 22 Feb 2014 16:53:51 -0500 Subject: Improve sharing Previously, the share page can handle only a limited number of shares and only one of each type. Now the configuration has been change to be more flexible and allows an unlimited number of shares. The share description is located in an array and the share configuration is stored along with the user configuration. Note: I tried to include the specific javascript code in a separate file but I did not succeded to import it. --- app/Controllers/configureController.php | 12 +---- app/Models/Configuration.php | 56 ++++++++++------------- app/Models/Share.php | 44 ++++++++++++++++++ app/i18n/en.php | 3 ++ app/i18n/fr.php | 3 ++ app/views/configure/sharing.phtml | 77 +++++++++++++------------------- app/views/helpers/view/normal_view.phtml | 73 +++++------------------------- data/shares.php | 75 +++++++++++++++++++++++++++++++ p/scripts/main.js | 28 +++++++++++- 9 files changed, 219 insertions(+), 152 deletions(-) create mode 100644 app/Models/Share.php create mode 100644 data/shares.php diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index ad8bc546a..104fa8900 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -192,16 +192,8 @@ class FreshRSS_configure_Controller extends Minz_ActionController { public function sharingAction () { if (Minz_Request::isPost ()) { - $this->view->conf->_sharing (array( - 'shaarli' => Minz_Request::param ('shaarli', false), - 'wallabag' => Minz_Request::param ('wallabag', false), - 'diaspora' => Minz_Request::param ('diaspora', false), - 'twitter' => Minz_Request::param ('twitter', false), - 'g+' => Minz_Request::param ('g+', false), - 'facebook' => Minz_Request::param ('facebook', false), - 'email' => Minz_Request::param ('email', false), - 'print' => Minz_Request::param ('print', false), - )); + $params = Minz_Request::params(); + $this->view->conf->_sharing ($params['share']); $this->view->conf->save(); invalidateHttpCache(); diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index 2b719c370..052e28ba8 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -48,16 +48,7 @@ class FreshRSS_Configuration { 'bottomline_tags' => true, 'bottomline_date' => true, 'bottomline_link' => true, - 'sharing' => array( - 'shaarli' => '', - 'wallabag' => '', - 'diaspora' => '', - 'twitter' => true, - 'g+' => true, - 'facebook' => true, - 'email' => true, - 'print' => true, - ), + 'sharing' => array(), ); private $available_languages = array( @@ -65,8 +56,10 @@ class FreshRSS_Configuration { 'fr' => 'Français', ); - public function __construct ($user) { - $this->filename = DATA_PATH . '/' . $user . '_user.php'; + private $shares; + + public function __construct($user) { + $this->filename = DATA_PATH . DIRECTORY_SEPARATOR . $user . '_user.php'; $data = @include($this->filename); if (!is_array($data)) { @@ -80,10 +73,20 @@ class FreshRSS_Configuration { } } $this->data['user'] = $user; + + $this->shares = DATA_PATH . DIRECTORY_SEPARATOR . 'shares.php'; + + $shares = @include($this->shares); + if (!is_array($shares)) { + throw new Minz_PermissionDeniedException($this->shares); + } + + $this->data['shares'] = $shares; } public function save() { @rename($this->filename, $this->filename . '.bak.php'); + unset($this->data['shares']); // Remove shares because it is not intended to be stored in user configuration if (file_put_contents($this->filename, "data, true) . ';', LOCK_EX) === false) { throw new Minz_PermissionDeniedException($this->filename); } @@ -104,16 +107,6 @@ class FreshRSS_Configuration { } } - public function sharing($key = false) { - if ($key === false) { - return $this->data['sharing']; - } - if (isset($this->data['sharing'][$key])) { - return $this->data['sharing'][$key]; - } - return false; - } - public function availableLanguages() { return $this->available_languages; } @@ -187,24 +180,23 @@ class FreshRSS_Configuration { } } public function _sharing ($values) { - $are_url = array ('shaarli', 'wallabag', 'diaspora'); - foreach ($values as $key => $value) { - if (in_array($key, $are_url)) { + $this->data['sharing'] = array(); + foreach ($values as $value) { + if (array_key_exists('url', $value)) { $is_url = ( - filter_var ($value, FILTER_VALIDATE_URL) || + filter_var ($value['url'], FILTER_VALIDATE_URL) || (version_compare(PHP_VERSION, '5.3.3', '<') && (strpos($value, '-') > 0) && ($value === filter_var($value, FILTER_SANITIZE_URL))) ); //PHP bug #51192 - if (!$is_url) { - $value = ''; + continue; + } + if (!array_key_exists('name', $value) || strcmp($value['name'], '') === 0) { + $value['name'] = $value['type']; } - } elseif (!is_bool($value)) { - $value = true; } - - $this->data['sharing'][$key] = $value; + $this->data['sharing'][] = $value; } } public function _theme($value) { diff --git a/app/Models/Share.php b/app/Models/Share.php new file mode 100644 index 000000000..b146db722 --- /dev/null +++ b/app/Models/Share.php @@ -0,0 +1,44 @@ + 'HTTP username', 'http_password' => 'HTTP password', 'blank_to_disable' => 'Leave blank to disable', + 'share_name' => 'Share name to display', + 'share_url' => 'Share URL to use', 'not_yet_implemented' => 'Not yet implemented', 'access_protected_feeds' => 'Connection allows to access HTTP protected RSS feeds', 'no_selected_feed' => 'No feed selected.', @@ -230,6 +232,7 @@ return array ( 'more_information' => 'More information', 'activate_sharing' => 'Activate sharing', 'shaarli' => 'Shaarli', + 'blogotext' => 'Blogotext', 'wallabag' => 'wallabag', 'diaspora' => 'Diaspora*', 'twitter' => 'Twitter', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index ab7843d12..7420e2fdd 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -166,6 +166,8 @@ return array ( 'http_username' => 'Identifiant HTTP', 'http_password' => 'Mot de passe HTTP', 'blank_to_disable' => 'Laissez vide pour désactiver', + 'share_name' => 'Nom du partage à afficher', + 'share_url' => 'URL du partage à utiliser', 'not_yet_implemented' => 'Pas encore implémenté', 'access_protected_feeds' => 'La connexion permet d’accéder aux flux protégés par une authentification HTTP', 'no_selected_feed' => 'Aucun flux sélectionné.', @@ -230,6 +232,7 @@ return array ( 'more_information' => 'Plus d’informations', 'activate_sharing' => 'Activer le partage', 'shaarli' => 'Shaarli', + 'blogotext' => 'Blogotext', 'wallabag' => 'wallabag', 'diaspora' => 'Diaspora*', 'twitter' => 'Twitter', diff --git a/app/views/configure/sharing.phtml b/app/views/configure/sharing.phtml index e3ea11665..e46284955 100644 --- a/app/views/configure/sharing.phtml +++ b/app/views/configure/sharing.phtml @@ -3,54 +3,41 @@
-
+ +
' + data-advanced='
+ + + +
'> -
- -
- - - -
-
- -
- -
- - - -
-
- -
- -
- - - + conf->sharing as $key => $sharing): ?> + conf->shares[$sharing['type']]; ?> +
+ +
+ + ' /> + + + + + +
-
+ -
- +
- - - + +
@@ -61,4 +48,4 @@
- + \ No newline at end of file diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml index ae93b627c..f27984025 100644 --- a/app/views/helpers/view/normal_view.phtml +++ b/app/views/helpers/view/normal_view.phtml @@ -8,19 +8,10 @@ if (!empty($this->entries)) { $display_yesterday = true; $display_others = true; if ($this->loginOk) { - $shaarli = $this->conf->sharing ('shaarli'); - $wallabag = $this->conf->sharing ('wallabag'); - $diaspora = $this->conf->sharing ('diaspora'); + $sharing = $this->conf->sharing; } else { - $shaarli = ''; - $wallabag = ''; - $diaspora = ''; + $sharing = array(); } - $twitter = $this->conf->sharing ('twitter'); - $google_plus = $this->conf->sharing ('g+'); - $facebook = $this->conf->sharing ('facebook'); - $email = $this->conf->sharing ('email'); - $print = $this->conf->sharing ('print'); $hidePosts = !$this->conf->display_posts; $lazyload = $this->conf->lazyload; $topline_read = $this->conf->topline_read; @@ -29,9 +20,7 @@ if (!empty($this->entries)) { $topline_link = $this->conf->topline_link; $bottomline_read = $this->conf->bottomline_read; $bottomline_favorite = $this->conf->bottomline_favorite; - $bottomline_sharing = $this->conf->bottomline_sharing && ( - $shaarli || $wallabag || $diaspora || $twitter || - $google_plus || $facebook || $email || $print); + $bottomline_sharing = $this->conf->bottomline_sharing && (count($sharing)); $bottomline_tags = $this->conf->bottomline_tags; $bottomline_date = $this->conf->bottomline_date; $bottomline_link = $this->conf->bottomline_link; @@ -146,55 +135,13 @@ if (!empty($this->entries)) { diff --git a/data/shares.php b/data/shares.php new file mode 100644 index 000000000..44176f1bf --- /dev/null +++ b/data/shares.php @@ -0,0 +1,75 @@ + array( + 'url' => '~URL~?post=~LINK~&title=~TITLE~&source=FreshRSS', + 'transform' => array('urlencode'), + 'help' => 'http://sebsauvage.net/wiki/doku.php?id=php:shaarli', + 'form' => 'advanced', + ), + 'blogotext' => array( + 'url' => '~URL~/admin/links.php?url=~LINK~', + 'transform' => array(), + 'help' => 'http://lehollandaisvolant.net/blogotext/fr/', + 'form' => 'advanced', + ), + 'wallabag' => array( + 'url' => '~URL~?action=add&url=~LINK~', + 'transform' => array( + 'link' => array('base64_encode'), + 'title' => array(), + ), + 'help' => 'http://www.wallabag.org/', + 'form' => 'advanced', + ), + 'diaspora' => array( + 'url' => '~URL~/bookmarklet?url=~LINK~&title=~TITLE~', + 'transform' => array('urlencode'), + 'help' => 'https://diasporafoundation.org/', + 'form' => 'advanced', + ), + 'twitter' => array( + 'url' => 'https://twitter.com/share?url=~LINK~&text=~TITLE~', + 'transform' => array('urlencode'), + 'form' => 'simple', + ), + 'g+' => array( + 'url' => 'https://plus.google.com/share?url=~LINK~', + 'transform' => array('urlencode'), + 'form' => 'simple', + ), + 'facebook' => array( + 'url' => 'https://www.facebook.com/sharer.php?u=~LINK~&t=~TITLE~', + 'transform' => array('urlencode'), + 'form' => 'simple', + ), + 'email' => array( + 'url' => 'mailto:?subject=~TITLE~&body=~LINK~', + 'transform' => array( + 'link' => array('urlencode'), + 'title' => array(), + ), + 'form' => 'simple', + ), + 'print' => array( + 'url' => '#', + 'transform' => array(), + 'form' => 'simple', + ), +); diff --git a/p/scripts/main.js b/p/scripts/main.js index beb77a19c..ec27bd50c 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -1,6 +1,7 @@ "use strict"; var $stream = null, - isCollapsed = true; + isCollapsed = true, + shares = 0; function is_normal_mode() { return $stream.hasClass('normal'); @@ -945,7 +946,7 @@ function init_confirm_action() { } function init_print_action() { - $('.print-article').click(function () { + $('.item.share > a[href="#"]').click(function () { var content = "