From 7533676ae75b3c09178d4e99bbbf6bee30d13100 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 31 Jul 2019 13:49:29 +0200 Subject: Add support for images to the ext.php endpoint (#2465) --- p/ext.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'p') diff --git a/p/ext.php b/p/ext.php index 1b123f47d..3035aae7d 100644 --- a/p/ext.php +++ b/p/ext.php @@ -59,6 +59,23 @@ case 'js': header('Content-Type: application/javascript; charset=UTF-8'); header('Content-Disposition: inline; filename="' . $file_name . '"'); break; +case 'png': + header('Content-Type: image/png'); + header('Content-Disposition: inline; filename="' . $file_name . '"'); + break; +case 'jpeg': +case 'jpg': + header('Content-Type: image/jpeg'); + header('Content-Disposition: inline; filename="' . $file_name . '"'); + break; +case 'gif': + header('Content-Type: image/gif'); + header('Content-Disposition: inline; filename="' . $file_name . '"'); + break; +case 'svg': + header('Content-Type: image/svg+xml'); + header('Content-Disposition: inline; filename="' . $file_name . '"'); + break; default: header('HTTP/1.1 400 Bad Request'); die(); -- cgit v1.2.3 From cb318740851672292227b7376434451684ae0360 Mon Sep 17 00:00:00 2001 From: Joris Kinable Date: Wed, 14 Aug 2019 15:16:06 +0200 Subject: Added option to display authors under article titles (#2487) This feature is particularly useful to display authors underneath scientific articles. --- app/Controllers/configureController.php | 1 + app/Models/ConfigurationSetter.php | 3 +++ app/i18n/cz/conf.php | 1 + app/i18n/de/conf.php | 1 + app/i18n/en/conf.php | 1 + app/i18n/es/conf.php | 1 + app/i18n/fr/conf.php | 1 + app/i18n/he/conf.php | 1 + app/i18n/it/conf.php | 1 + app/i18n/kr/conf.php | 1 + app/i18n/nl/conf.php | 1 + app/i18n/oc/conf.php | 1 + app/i18n/pt-br/conf.php | 1 + app/i18n/ru/conf.php | 1 + app/i18n/tr/conf.php | 1 + app/i18n/zh-cn/conf.php | 1 + app/views/configure/display.phtml | 3 +++ app/views/helpers/index/normal/entry_header.phtml | 17 ++++++++++++++++- config-user.default.php | 1 + p/themes/base-theme/template.css | 6 ++++++ 20 files changed, 44 insertions(+), 1 deletion(-) (limited to 'p') diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index 6d3c4dcce..a839f0005 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -48,6 +48,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController { FreshRSS_Context::$user_conf->topline_favorite = Minz_Request::param('topline_favorite', false); FreshRSS_Context::$user_conf->topline_date = Minz_Request::param('topline_date', false); FreshRSS_Context::$user_conf->topline_link = Minz_Request::param('topline_link', false); + FreshRSS_Context::$user_conf->topline_display_authors = Minz_Request::param('topline_display_authors', false); FreshRSS_Context::$user_conf->bottomline_read = Minz_Request::param('bottomline_read', false); FreshRSS_Context::$user_conf->bottomline_favorite = Minz_Request::param('bottomline_favorite', false); FreshRSS_Context::$user_conf->bottomline_sharing = Minz_Request::param('bottomline_sharing', false); diff --git a/app/Models/ConfigurationSetter.php b/app/Models/ConfigurationSetter.php index ec6380df4..778513f17 100644 --- a/app/Models/ConfigurationSetter.php +++ b/app/Models/ConfigurationSetter.php @@ -257,6 +257,9 @@ class FreshRSS_ConfigurationSetter { private function _topline_read(&$data, $value) { $data['topline_read'] = $this->handleBool($value); } + private function _topline_display_authors(&$data, $value) { + $data['topline_display_authors'] = $this->handleBool($value); + } /** * The (not so long) list of setters for system configuration. diff --git a/app/i18n/cz/conf.php b/app/i18n/cz/conf.php index ce3a4e418..8a21067ee 100644 --- a/app/i18n/cz/conf.php +++ b/app/i18n/cz/conf.php @@ -21,6 +21,7 @@ return array( 'publication_date' => 'Datum vydání', 'related_tags' => 'Související tagy', //TODO - Translation 'sharing' => 'Sdílení', + 'display_authors' => 'Authors', //TODO - Translation 'top_line' => 'Horní řádek', ), 'language' => 'Jazyk', diff --git a/app/i18n/de/conf.php b/app/i18n/de/conf.php index b73d76f72..37a67eb15 100644 --- a/app/i18n/de/conf.php +++ b/app/i18n/de/conf.php @@ -21,6 +21,7 @@ return array( 'publication_date' => 'Datum der Veröffentlichung', 'related_tags' => 'Verwandte Tags', 'sharing' => 'Teilen', + 'display_authors' => 'Authors', //TODO - Translation 'top_line' => 'Kopfzeile', ), 'language' => 'Sprache', diff --git a/app/i18n/en/conf.php b/app/i18n/en/conf.php index b21061513..8193233ce 100644 --- a/app/i18n/en/conf.php +++ b/app/i18n/en/conf.php @@ -21,6 +21,7 @@ return array( 'publication_date' => 'Date of publication', 'related_tags' => 'Article tags', 'sharing' => 'Sharing', + 'display_authors' => 'Authors', 'top_line' => 'Top line', ), 'language' => 'Language', diff --git a/app/i18n/es/conf.php b/app/i18n/es/conf.php index 612d81a1b..2eeeee052 100755 --- a/app/i18n/es/conf.php +++ b/app/i18n/es/conf.php @@ -21,6 +21,7 @@ return array( 'publication_date' => 'Fecha de publicación', 'related_tags' => 'Etiquetas relacionadas', 'sharing' => 'Compartir', + 'display_authors' => 'Authors', //TODO - Translation 'top_line' => 'Línea superior', ), 'language' => 'Idioma', diff --git a/app/i18n/fr/conf.php b/app/i18n/fr/conf.php index 5d1bb1a90..5f6730b53 100644 --- a/app/i18n/fr/conf.php +++ b/app/i18n/fr/conf.php @@ -21,6 +21,7 @@ return array( 'publication_date' => 'Date de publication', 'related_tags' => 'Tags de l’article', 'sharing' => 'Partage', + 'display_authors' => 'Authors', //TODO - Translation 'top_line' => 'Ligne du haut', ), 'language' => 'Langue', diff --git a/app/i18n/he/conf.php b/app/i18n/he/conf.php index 08769aeb0..1da5c292c 100644 --- a/app/i18n/he/conf.php +++ b/app/i18n/he/conf.php @@ -21,6 +21,7 @@ return array( 'publication_date' => 'תאריך הפרסום', 'related_tags' => 'תגיות קשורות', //TODO - Translation 'sharing' => 'שיתוף', + 'display_authors' => 'Authors', //TODO - Translation 'top_line' => 'שורה עליונה', ), 'language' => 'שפה', diff --git a/app/i18n/it/conf.php b/app/i18n/it/conf.php index c66644446..f3c59ed8c 100644 --- a/app/i18n/it/conf.php +++ b/app/i18n/it/conf.php @@ -21,6 +21,7 @@ return array( 'publication_date' => 'Data di pubblicazione', 'related_tags' => 'Tags correlati', //TODO - Translation 'sharing' => 'Condivisione', + 'display_authors' => 'Authors', //TODO - Translation 'top_line' => 'Barra in alto', ), 'language' => 'Lingua', diff --git a/app/i18n/kr/conf.php b/app/i18n/kr/conf.php index 0307ac455..1efaee88b 100644 --- a/app/i18n/kr/conf.php +++ b/app/i18n/kr/conf.php @@ -21,6 +21,7 @@ return array( 'publication_date' => '발행일', 'related_tags' => '관련 태그', 'sharing' => '공유', + 'display_authors' => 'Authors', //TODO - Translation 'top_line' => '상단', ), 'language' => '언어', diff --git a/app/i18n/nl/conf.php b/app/i18n/nl/conf.php index aed4e352e..b7ba7bbeb 100644 --- a/app/i18n/nl/conf.php +++ b/app/i18n/nl/conf.php @@ -21,6 +21,7 @@ return array( 'publication_date' => 'Publicatie datum', 'related_tags' => 'Gerelateerde labels', 'sharing' => 'Delen', + 'display_authors' => 'Auteurs', 'top_line' => 'Bovenaan', ), 'language' => 'Taal', diff --git a/app/i18n/oc/conf.php b/app/i18n/oc/conf.php index 2f08bfc1c..b37785a7e 100644 --- a/app/i18n/oc/conf.php +++ b/app/i18n/oc/conf.php @@ -21,6 +21,7 @@ return array( 'publication_date' => 'Data de publicacion', 'related_tags' => 'Etiquetas ligadas', 'sharing' => 'Partatge', + 'display_authors' => 'Authors', //TODO - Translation 'top_line' => 'Linha amont', ), 'language' => 'Lenga', diff --git a/app/i18n/pt-br/conf.php b/app/i18n/pt-br/conf.php index e4da7a729..082027328 100644 --- a/app/i18n/pt-br/conf.php +++ b/app/i18n/pt-br/conf.php @@ -21,6 +21,7 @@ return array( 'publication_date' => 'Data da publicação', 'related_tags' => 'Tags relacionadas', //TODO - Translation 'sharing' => 'Compartilhar', + 'display_authors' => 'Authors', //TODO - Translation 'top_line' => 'Linha superior', ), 'language' => 'Ídioma', diff --git a/app/i18n/ru/conf.php b/app/i18n/ru/conf.php index cea7c2f63..48ce4b9f3 100644 --- a/app/i18n/ru/conf.php +++ b/app/i18n/ru/conf.php @@ -21,6 +21,7 @@ return array( 'publication_date' => 'Date of publication', //TODO - Translation 'related_tags' => 'Related tags', //TODO - Translation 'sharing' => 'Sharing', //TODO - Translation + 'display_authors' => 'Authors', //TODO - Translation 'top_line' => 'Top line', //TODO - Translation ), 'language' => 'Язык', diff --git a/app/i18n/tr/conf.php b/app/i18n/tr/conf.php index 16ff8b7d5..855bca6c8 100644 --- a/app/i18n/tr/conf.php +++ b/app/i18n/tr/conf.php @@ -21,6 +21,7 @@ return array( 'publication_date' => 'Yayınlama Tarihi', 'related_tags' => 'İlgili etiketler', //TODO - Translation 'sharing' => 'Paylaşım', + 'display_authors' => 'Authors', //TODO - Translation 'top_line' => 'Üst çizgi', ), 'language' => 'Dil', diff --git a/app/i18n/zh-cn/conf.php b/app/i18n/zh-cn/conf.php index 21f9a920c..ebe069c2c 100644 --- a/app/i18n/zh-cn/conf.php +++ b/app/i18n/zh-cn/conf.php @@ -21,6 +21,7 @@ return array( 'publication_date' => '更新日期', 'related_tags' => '相关标签', 'sharing' => '分享', + 'display_authors' => 'Authors', //TODO - Translation 'top_line' => '顶栏', ), 'language' => '语言', diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml index 58c4e219a..60b7748c5 100644 --- a/app/views/configure/display.phtml +++ b/app/views/configure/display.phtml @@ -81,6 +81,7 @@ + @@ -92,6 +93,7 @@ topline_favorite ? ' checked="checked"' : ''; ?> data-leave-validation="topline_favorite; ?>"/> + topline_display_authors ? ' checked="checked"' : ''; ?> data-leave-validation="topline_display_authors; ?>"/> topline_date ? ' checked="checked"' : ''; ?> data-leave-validation="topline_date; ?>"/> topline_link ? ' checked="checked"' : ''; ?> data-leave-validation="topline_link; ?>"/> @@ -100,6 +102,7 @@ bottomline_favorite ? ' checked="checked"' : ''; ?> data-leave-validation="bottomline_favorite; ?>"/> bottomline_tags ? ' checked="checked"' : ''; ?> data-leave-validation="bottomline_tags; ?>"/> bottomline_sharing ? ' checked="checked"' : ''; ?> data-leave-validation="bottomline_sharing; ?>"/> + bottomline_date ? ' checked="checked"' : ''; ?> data-leave-validation="bottomline_date; ?>"/> bottomline_link ? ' checked="checked"' : ''; ?> data-leave-validation="bottomline_link; ?>"/> diff --git a/app/views/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml index 86298e59f..7873b16e4 100644 --- a/app/views/helpers/index/normal/entry_header.phtml +++ b/app/views/helpers/index/normal/entry_header.phtml @@ -1,6 +1,7 @@ topline_read; $topline_favorite = FreshRSS_Context::$user_conf->topline_favorite; + $topline_display_authors = FreshRSS_Context::$user_conf->topline_display_authors; $topline_date = FreshRSS_Context::$user_conf->topline_date; $topline_link = FreshRSS_Context::$user_conf->topline_link; ?> diff --git a/config-user.default.php b/config-user.default.php index 08f3af720..077ea70d9 100644 --- a/config-user.default.php +++ b/config-user.default.php @@ -67,6 +67,7 @@ return array ( ), 'topline_read' => true, 'topline_favorite' => true, + 'topline_display_authors' => false, 'topline_date' => true, 'topline_link' => true, 'bottomline_read' => true, diff --git a/p/themes/base-theme/template.css b/p/themes/base-theme/template.css index 226d06f59..42e08be65 100644 --- a/p/themes/base-theme/template.css +++ b/p/themes/base-theme/template.css @@ -569,6 +569,12 @@ a.btn { color: #000; text-decoration: none; } +.flux .item.author { + color: #555; + font-size: .7rem; + font-weight: normal; + white-space: normal; +} .flux .item.date { width: 155px; text-align: right; -- cgit v1.2.3 From 20c38d7083b188a70ac78362cc6af4c521a479c3 Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Wed, 14 Aug 2019 22:29:28 +0200 Subject: [CI] Run stylelint (#2477) * [CI] Run stylelint Perform some basic CSS sanity checking and style enforcement. I removed vendor prefixed linear-gradient and transform because those are from the IE9 era. With IE11 as a minimum and soon obsolete requirement it doesn't make much sense anymore. * Remove as-link override * Don't require newline after comment * Also apply those newline rules to SCSS * refine opening/closing braces, allow for single-line --- .stylelintignore | 4 + .stylelintrc | 74 ++ .travis.yml | 5 +- docs/assets/css/style.scss | 13 +- p/themes/Ansum/_components.scss | 617 ++++----- p/themes/Ansum/_configuration.scss | 151 ++- p/themes/Ansum/_divers.scss | 2 + p/themes/Ansum/_fonts.scss | 115 +- p/themes/Ansum/_forms.scss | 234 ++-- p/themes/Ansum/_global-view.scss | 133 +- p/themes/Ansum/_layout.scss | 741 +++++------ p/themes/Ansum/_list-view.scss | 144 +-- p/themes/Ansum/_logs.scss | 9 +- p/themes/Ansum/_mixins.scss | 88 +- p/themes/Ansum/_mobile.scss | 290 +++-- p/themes/Ansum/_reader-view.scss | 3 +- p/themes/Ansum/_sidebar.scss | 480 +++---- p/themes/Ansum/_stats.scss | 3 + p/themes/Ansum/_tables.scss | 2 + p/themes/Ansum/_variables.scss | 14 +- p/themes/Ansum/ansum.css | 392 +++--- p/themes/Ansum/ansum.css.map | 7 - p/themes/Ansum/ansum.scss | 31 +- p/themes/BlueLagoon/BlueLagoon.css | 585 +++++---- p/themes/Dark/dark.css | 348 ++++-- p/themes/Flat/flat.css | 298 +++-- p/themes/Mapco/_components.scss | 616 ++++----- p/themes/Mapco/_configuration.scss | 151 ++- p/themes/Mapco/_divers.scss | 2 + p/themes/Mapco/_fonts.scss | 115 +- p/themes/Mapco/_forms.scss | 234 ++-- p/themes/Mapco/_global-view.scss | 133 +- p/themes/Mapco/_layout.scss | 741 +++++------ p/themes/Mapco/_list-view.scss | 145 +-- p/themes/Mapco/_logs.scss | 9 +- p/themes/Mapco/_mixins.scss | 92 +- p/themes/Mapco/_mobile.scss | 288 +++-- p/themes/Mapco/_reader-view.scss | 3 +- p/themes/Mapco/_sidebar.scss | 466 +++---- p/themes/Mapco/_stats.scss | 3 + p/themes/Mapco/_tables.scss | 2 + p/themes/Mapco/_variables.scss | 20 +- p/themes/Mapco/mapco.css | 444 ++++--- p/themes/Mapco/mapco.css.map | 7 - p/themes/Mapco/mapco.scss | 31 +- p/themes/Origine-compact/origine-compact.css | 384 ++++-- p/themes/Origine/origine.css | 365 ++++-- p/themes/Pafat/pafat.css | 330 +++-- p/themes/Screwdriver/screwdriver.css | 581 +++++---- p/themes/Swage/swage.css | 1730 +++++++++++--------------- p/themes/Swage/swage.scss | 336 +++-- p/themes/base-theme/base.css | 177 ++- p/themes/base-theme/template.css | 239 +++- p/themes/p.css | 7 +- 54 files changed, 6894 insertions(+), 5540 deletions(-) create mode 100644 .stylelintignore create mode 100644 .stylelintrc delete mode 100644 p/themes/Ansum/ansum.css.map delete mode 100644 p/themes/Mapco/mapco.css.map (limited to 'p') diff --git a/.stylelintignore b/.stylelintignore new file mode 100644 index 000000000..83aaae275 --- /dev/null +++ b/.stylelintignore @@ -0,0 +1,4 @@ +# ignore SASS-generated CSS +p/themes/Ansum/*.css +p/themes/Mapco/*.css +p/themes/Swage/*.css diff --git a/.stylelintrc b/.stylelintrc new file mode 100644 index 000000000..c8efe2ca9 --- /dev/null +++ b/.stylelintrc @@ -0,0 +1,74 @@ +{ + "extends": "stylelint-config-recommended-scss", + "plugins": [ + "stylelint-order", + "stylelint-scss" + ], + "rules": { + "at-rule-empty-line-before": [ + "always", { + "ignoreAtRules": [ "after-comment", "else" ] + } + ], + "at-rule-name-space-after": [ + "always", { + "ignoreAtRules": [ "after-comment" ] + } + ], + "block-closing-brace-newline-after": [ + "always", { + "ignoreAtRules": [ "if", "else" ] + } + ], + "block-closing-brace-newline-before": "always-multi-line", + "block-opening-brace-newline-after": "always-multi-line", + "block-opening-brace-space-before": "always", + "color-hex-case": "lower", + "color-hex-length": "short", + "color-no-invalid-hex": true, + "declaration-colon-space-after": "always", + "declaration-colon-space-before": "never", + "indentation": "tab", + "no-descending-specificity": null, + "no-eol-whitespace": true, + "property-no-vendor-prefix": true, + "rule-empty-line-before": [ + "always", + "except": [ + "after-single-line-comment", + "first-nested" + ] + ], + "order/properties-order": [ + "margin", + "padding", + "background", + "display", + "float", + "max-width", + "width", + "max-height", + "height", + "color", + "font", + "font-family", + "font-size", + "border", + "border-top", + "border-top-color", + "border-right", + "border-right-color", + "border-bottom", + "border-bottom-color", + "border-left", + "border-left-color", + "border-radius", + "box-shadow" + ], + "scss/at-else-closing-brace-newline-after": "always-last-in-chain", + "scss/at-else-closing-brace-space-after": "always-intermediate", + "scss/at-else-empty-line-before": "never", + "scss/at-if-closing-brace-newline-after": "always-last-in-chain", + "scss/at-if-closing-brace-space-after": "always-intermediate" + } +} diff --git a/.travis.yml b/.travis.yml index 76e890bba..b24a0c176 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,10 +48,13 @@ matrix: env: - HADOLINT="$HOME/hadolint" install: - - npm install jshint + - npm install --save-dev jshint stylelint stylelint-order stylelint-scss stylelint-config-recommended-scss - curl -sLo "$HADOLINT" $(curl -s https://api.github.com/repos/hadolint/hadolint/releases/latest?access_token="$GITHUB_TOKEN" | jq -r '.assets | .[] | select(.name=="hadolint-Linux-x86_64") | .browser_download_url') && chmod 700 ${HADOLINT} script: - node_modules/jshint/bin/jshint . + # check SCSS separately + - stylelint --syntax scss "**/*.scss" + - stylelint "**/*.css" - bash tests/shellchecks.sh - git ls-files --exclude='*Dockerfile*' --ignored | xargs --max-lines=1 "$HADOLINT" allow_failures: diff --git a/docs/assets/css/style.scss b/docs/assets/css/style.scss index f7fff902b..17ced012f 100644 --- a/docs/assets/css/style.scss +++ b/docs/assets/css/style.scss @@ -1,13 +1,10 @@ ---- ---- - @import "{{ site.theme }}"; .page-header .project-name a { - color: #fff; + color: #fff; - &:hover { - text-decoration: none; - opacity: .7; - } + &:hover { + text-decoration: none; + opacity: .7; + } } diff --git a/p/themes/Ansum/_components.scss b/p/themes/Ansum/_components.scss index be27fcd92..d7b6d4ed6 100644 --- a/p/themes/Ansum/_components.scss +++ b/p/themes/Ansum/_components.scss @@ -5,119 +5,119 @@ /*=== Horizontal-list */ .horizontal-list { - margin: 0; - padding: 0.1rem 0; + margin: 0; + padding: 0.1rem 0; - .item{ - vertical-align: middle; + .item { + vertical-align: middle; - &:first-child{ - padding-left: 0.5rem; - } + &:first-child { + padding-left: 0.5rem; + } - } + } } /*=== Dropdown */ .dropdown-menu { - background: $grey-lighter; - margin: 0; - font-size: 1rem; - text-align: left; - padding: 0.5rem 0 1rem 0; - border: none; - border-radius: 3px; - - -webkit-box-shadow: 0px 6px 8px 0px rgba(0,0,0,0.35); - -moz-box-shadow: 0px 6px 8px 0px rgba(0,0,0,0.35); - box-shadow: 0px 6px 8px 0px rgba(0,0,0,0.35); - - &::after { - content: ""; - position: absolute; - top: -4px; - right: 13px; - width: 10px; - height: 10px; - z-index: -10; - transform: rotate(45deg); - -moz-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); - background: white; - // border-top: 1px solid #95a5a6; - // border-left: 1px solid #95a5a6; - } - - .dropdown-header { - // padding: 0 5px 5px; - margin: 1.75rem 0 0.5rem 2rem; - font-weight: bold; + margin: 0; + padding: 0.5rem 0 1rem 0; + background: $grey-lighter; + font-size: 1rem; + border: none; + border-radius: 3px; + box-shadow: 0px 6px 8px 0px rgba(0,0,0,0.35); text-align: left; - color: $grey-dark; - text-transform: uppercase; - letter-spacing: 1px; - - - } - - .item{ - @include transition(all, 0.075s, ease-in-out); - a, span, .as-link{ - padding: 0 2rem; - line-height: 2.5em; - font-size: 1rem; - color: $main-font-color; - } - &:hover{ - background: $main-first; - color: $white; - a, button{ - text-decoration: none; - color: $white; - } + &::after { + background: white; + width: 10px; + height: 10px; + content: ""; + position: absolute; + top: -4px; + right: 13px; + z-index: -10; + transform: rotate(45deg); + // border-top: 1px solid #95a5a6; + // border-left: 1px solid #95a5a6; } - &[aria-checked="true"]{ - a::before{ + + .dropdown-header { + // padding: 0 5px 5px; + margin: 1.75rem 0 0.5rem 2rem; font-weight: bold; - margin: 0 0 0 -14px; - } + text-align: left; + color: $grey-dark; + text-transform: uppercase; + letter-spacing: 1px; + + } - } - .input{ - select, input{ - margin: 0 auto 5px; - padding: 2px 5px; - border-radius: 3px; + + .item { + + @include transition(all, 0.075s, ease-in-out); + + a, span, .as-link { + padding: 0 2rem; + color: $main-font-color; + font-size: 1rem; + line-height: 2.5em; + } + + &:hover { + background: $main-first; + color: $white; + + a, button { + text-decoration: none; + color: $white; + } + } + + &[aria-checked="true"] { + a::before { + margin: 0 0 0 -14px; + font-weight: bold; + } + } } - } - .separator { - margin: 0.75rem 0; - border-bottom: 1px solid $grey-light; - // display: none; - } -} -.tree .tree-folder .tree-folder-items .dropdown-menu, -.tree .tree-folder .tree-folder-items .dropdown-menu{ - // tout ça sert à restaurer l'apparence du dropdown dans un contexte de sidebar sombre - - .item{ - padding: 0; - - a, - button{ - color: $main-font-color; - - &:hover{ - color: $white; - } + .input { + select, input { + margin: 0 auto 5px; + padding: 2px 5px; + border-radius: 3px; + } + } + + .separator { + margin: 0.75rem 0; + border-bottom: 1px solid $grey-light; + // display: none; } - &:hover{ - background: $main-first; + +} + +.tree .tree-folder .tree-folder-items .dropdown-menu { + // tout ça sert à restaurer l'apparence du dropdown dans un contexte de sidebar sombre + .item { + padding: 0; + + a, + button { + color: $main-font-color; + + &:hover { + color: $white; + } + } + + &:hover { + background: $main-first; + } } - } } @@ -125,256 +125,273 @@ /*=== Alerts */ .alert { - margin: 1rem 0; - // width: 100%; - padding: 1rem; - font-size: 1rem; - background: $grey-lighter; - border: 1px solid $grey-medium; - border-radius: 3px; - color: $grey-dark; - text-shadow: 0 0 1px $grey-light; + margin: 1rem 0; + // width: 100%; + padding: 1rem; + background: $grey-lighter; + color: $grey-dark; + font-size: 1rem; + border: 1px solid $grey-medium; + border-radius: 3px; + text-shadow: 0 0 1px $grey-light; } + .alert-head { - font-size: 1.15em; + font-size: 1.15em; } + .alert > a { - text-decoration: underline; - color: inherit; + text-decoration: underline; + color: inherit; } + .alert-warn { - background: $warning-light; - border: 1px solid unquote($warning-text+'33'); // on ajoute l'opacité à la fin - color: $warning-text; + background: $warning-light; + color: $warning-text; + border: 1px solid unquote($warning-text+'33'); // on ajoute l'opacité à la fin } + .alert-success { - background: $success-light; - border: 1px solid unquote($success-text+'33'); - color: $success-text; + background: $success-light; + color: $success-text; + border: 1px solid unquote($success-text+'33'); } + .alert-error { - background: $alert-light; - border: 1px solid unquote($alert-text+'33'); - color: $alert-text; + background: $alert-light; + color: $alert-text; + border: 1px solid unquote($alert-text+'33'); } /*=== Pagination */ .pagination { - text-align: center; - font-size: 0.8em; - background: $grey-light; - color: $main-font-color; - - .item{ - &.pager-current { - font-weight: bold; - font-size: 1.5em; - background: $sid-bg; - color: $grey-light; - } - a { - display: block; - font-style: italic; - line-height: 3em; - text-decoration: none; - color: $main-font-color; - - &:hover{ - background: $main-font-color; - color: $grey-light; - } + background: $grey-light; + color: $main-font-color; + font-size: 0.8em; + text-align: center; + + .item { + &.pager-current { + background: $sid-bg; + color: $grey-light; + font-size: 1.5em; + font-weight: bold; + } + + a { + display: block; + color: $main-font-color; + font-style: italic; + line-height: 3em; + text-decoration: none; + + &:hover { + background: $main-font-color; + color: $grey-light; + } + } } - } - .loading, - a:hover.loading { - font-size: 0; - background: url("loader.gif") center center no-repeat #34495e; - } + .loading, + a:hover.loading { + background: url("loader.gif") center center no-repeat #34495e; + font-size: 0; + } } + .content .pagination { - margin: 0; - padding: 0; + margin: 0; + padding: 0; } /*=== Boxes */ .box { - // border: 1px solid #ddd; - border: none; - border-radius: 3px; - background: $white; - - -webkit-box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.25); - -moz-box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.25); - box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.25); - - .box-title { - margin: 0; - padding: 0.5rem 0.75rem; - background: $grey-light; - color: $main-font-color; - // border-bottom: 1px solid #ddd; - border-radius: 2px 2px 0 0; + background: $white; + // border: 1px solid #ddd; + border: none; + border-radius: 3px; + box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.25); + + .box-title { + margin: 0; + padding: 0.5rem 0.75rem; + background: $grey-light; + color: $main-font-color; + // border-bottom: 1px solid #ddd; + border-radius: 2px 2px 0 0; + + img { + margin-right: 0.75rem; + } - img{ - margin-right: 0.75rem; - } + &:hover { + .configure { + background: url("icons/cog.svg") no-repeat 4px 4px; + display: block; + float: left; + width: 1.75rem; + height: 1.75rem; + border-radius: 2px; + visibility: visible; + margin-right: 0.5rem; + + .icon { + display: none; + border-radius: 3px; + vertical-align: middle; + } + + &:hover { + background: url("icons/cog-white.svg") no-repeat 4px 4px $main-first; + } + } + } - &:hover{ .configure { - visibility: visible; - background: url("icons/cog.svg") no-repeat 4px 4px; - width: 1.75rem; - height: 1.75rem; - display: block; - border-radius: 2px; - float: left; - margin-right: 0.5rem; - .icon { - vertical-align: middle; - border-radius: 3px; - display: none; + visibility: hidden; + } + + form { + input { + width: 85%; } - &:hover { - background: url("icons/cog-white.svg") no-repeat 4px 4px $main-first; + + .dropdown { + float: right; + + a.dropdown-toggle { + padding: 0; + // float: right; + border-radius: 0; + background-image: url(icons/more.svg); + background-repeat: no-repeat; + background-position: right 8px; + + img { + display: none; + } + } } } } - .configure { - visibility: hidden; - } - form{ - input{ - width: 85%; - } - .dropdown{ - float: right; - a.dropdown-toggle{ - padding: 0; - background-image: url(icons/more.svg); - background-repeat: no-repeat; - background-position: right 8px; - // float: right; - border-radius: 0; - img{ - display: none; - } - } - } - } - } - .box-content { - // max-height: 260px; + .box-content { + // max-height: 260px; + .item { + padding: 0.5rem 0.75rem; + color: $main-font-color; + font-size: 1rem; + border-bottom: 1px solid $grey-light; + line-height: 1.7em; + + img { + margin-right: 0.75rem; + } - .item { - padding: 0.5rem 0.75rem; - font-size: 1rem; - color: $main-font-color; - line-height: 1.7em; - border-bottom: 1px solid $grey-light; - - img{ - margin-right: 0.75rem; - } - - .configure { - visibility: hidden; - width: 1.75rem; - height: 1.75rem; - display: block; - border-radius: 2px; - float: left; - margin-right: 0.5rem; - background: url("icons/cog.svg") no-repeat 4px 4px; - - .icon { - vertical-align: middle; - border-radius: 3px; - display: none; + .configure { + background: url("icons/cog.svg") no-repeat 4px 4px; + display: block; + float: left; + width: 1.75rem; + height: 1.75rem; + border-radius: 2px; + visibility: hidden; + margin-right: 0.5rem; + + .icon { + display: none; + border-radius: 3px; + vertical-align: middle; + } + + &:hover { + // background: $main-first; + background: url("icons/cog-white.svg") no-repeat 4px 4px $main-first; + } + } + + &:hover .configure { + visibility: visible; + } } - &:hover{ - // background: $main-first; - background: url("icons/cog-white.svg") no-repeat 4px 4px $main-first; + + .item:last-child { + border-bottom: none; } - } - &:hover .configure { - visibility: visible; - } - } - .item:last-child{ - border-bottom: none; } - } } /*=== "Load more" part */ #bigMarkAsRead { - text-align: center; - text-decoration: none; - background: $main-first-light; - color: $main-first; + text-align: center; + text-decoration: none; + background: $main-first-light; + color: $main-first; + + @include transition(all, 0.15s, ease-in-out); - @include transition(all, 0.15s, ease-in-out); + &:hover { + background: $main-first; + color: #fff; - &:hover { - background: $main-first; - color: #fff; + .bigTick { + background: url(icons/tick-white.svg) center no-repeat; + } + } - .bigTick{ - background: url(icons/tick-white.svg) center no-repeat; + .bigTick { + margin: 0.5rem 0; + background: url(icons/tick-color.svg) center no-repeat; + display: inline-block; + width: 64px; + height: 64px; + text-indent: -9999px; + white-space: nowrap; } - } - .bigTick{ - margin: 0.5rem 0; - display: inline-block; - text-indent: -9999px; - background: url(icons/tick-color.svg) center no-repeat; - height: 64px; - width: 64px; - white-space: nowrap; - } } // page de login -.formLogin{ - background: $sid-bg; - - .header{ - .configure{ - padding-right: 1rem; - img{ - margin-right: 0.5rem; - } - - a.signin{ +.formLogin { + background: $sid-bg; + + .header { + .configure { + padding-right: 1rem; + + img { + margin-right: 0.5rem; + } + + a.signin { + color: $white; + } + } + } + + h1 { color: $white; - } } - } - - h1{ - color: $white; - } - form#crypto-form{ - div{ - margin-bottom: 1rem; - - label{ - font-size: 1rem; - color: $grey-medium; - - - } - input{ - background: $main-first-darker; - - &:focus{ - background: $grey-lighter; - color: $main-font-color; + + form#crypto-form { + div { + margin-bottom: 1rem; + + label { + color: $grey-medium; + font-size: 1rem; + + + } + + input { + background: $main-first-darker; + + &:focus { + background: $grey-lighter; + color: $main-font-color; + } + } } - } - } - } + } } diff --git a/p/themes/Ansum/_configuration.scss b/p/themes/Ansum/_configuration.scss index c3c6fd417..78e471f19 100644 --- a/p/themes/Ansum/_configuration.scss +++ b/p/themes/Ansum/_configuration.scss @@ -1,90 +1,89 @@ /*=== Configuration pages */ .post { - padding: 1rem 2rem; - font-size: 1rem; - - form { - margin: 1rem 0; - - // Gestion des extensions - .horizontal-list{ - margin-bottom: 0.5rem; - - .item{ - .stick{ - // width: 65%; - // margin-right: 1rem; - // display:flex; - - } - .btn{ - // width: 8rem; - // flex-grow: 1; + padding: 1rem 2rem; + font-size: 1rem; + + form { + margin: 1rem 0; + + // Gestion des extensions + .horizontal-list { + margin-bottom: 0.5rem; + + .item { + .stick { + // width: 65%; + // margin-right: 1rem; + // display:flex; + + } + + .btn { + // width: 8rem; + // flex-grow: 1; + } + } + } - } - } - } - &.content { - max-width: 550px; - } - - h1, h2{ // pages titles - font-size: 3rem; - margin-top: 1.75rem; - font-weight: 300; - line-height: 1.2em; - // font-family: "spectral"; - color: $main-font-color; - } - - a[href="./"]{ // C'est le bouton "Retour à vos flux" - display: inline-block; - // min-height: 38px; - min-width: 15px; - line-height: 25px; - margin: 0; - padding: 0.75rem 1.5rem; - font-size: 1rem; - vertical-align: middle; - cursor: pointer; - overflow: hidden; - background: $grey-lighter; - border: 1px solid $grey-medium-light; - border-radius: 5px; - // border: none; - color: $grey-dark; - - &:hover{ - text-decoration: none; - background: $main-first; - color: white; - border: 1px solid $main-first; + + &.content { + max-width: 550px; + } + + h1, h2 { // pages titles + // font-family: "spectral"; + color: $main-font-color; + font-size: 3rem; + margin-top: 1.75rem; + font-weight: 300; + line-height: 1.2em; } - } - + + a[href="./"] { // C'est le bouton "Retour à vos flux" + margin: 0; + padding: 0.75rem 1.5rem; + background: $grey-lighter; + display: inline-block; + // border: none; + color: $grey-dark; + font-size: 1rem; + border: 1px solid $grey-medium-light; + border-radius: 5px; + // min-height: 38px; + min-width: 15px; + line-height: 25px; + vertical-align: middle; + cursor: pointer; + overflow: hidden; + + &:hover { + background: $main-first; + color: white; + border: 1px solid $main-first; + text-decoration: none; + } + } + } -#slider{ - border-left: none; - - -webkit-box-shadow: 0px 6px 8px 0px rgba(0,0,0,0.35); - -moz-box-shadow: 0px 6px 8px 0px rgba(0,0,0,0.35); - box-shadow: 0px 6px 8px 0px rgba(0,0,0,0.35); +#slider { + border-left: none; + box-shadow: 0px 6px 8px 0px rgba(0,0,0,0.35); } -.slide-container{ - .properties{ - background: rgba(0, 0, 0, 0.75); - border: 0; - padding: 1rem; - color: white; +.slide-container { + .properties { + padding: 1rem; + background: rgba(0, 0, 0, 0.75); + color: white; + border: 0; - .page-number{ - right: 1rem; - top: 1rem; + .page-number { + right: 1rem; + top: 1rem; + } } - } } diff --git a/p/themes/Ansum/_divers.scss b/p/themes/Ansum/_divers.scss index 7d122f1b4..c6fb1f283 100644 --- a/p/themes/Ansum/_divers.scss +++ b/p/themes/Ansum/_divers.scss @@ -4,9 +4,11 @@ .aside.aside_feed .nav-form select { width: 140px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu { right: -20px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu::after { right: 33px; } diff --git a/p/themes/Ansum/_fonts.scss b/p/themes/Ansum/_fonts.scss index 5891be834..da1cf4ac7 100644 --- a/p/themes/Ansum/_fonts.scss +++ b/p/themes/Ansum/_fonts.scss @@ -1,56 +1,63 @@ @font-face { - font-family: "lato"; - font-style: normal; - font-stretch: normal; - font-weight: 400; - src: local("Lato"), url("../fonts/LatoLatin-Regular.woff") format("woff"); -} -@font-face { - font-family: "lato"; - font-style: italic; - font-stretch: normal; - font-weight: 400; - src: local("Lato"), url("../fonts/LatoLatin-Italic.woff") format("woff"); -} -@font-face { - font-family: "lato"; - font-style: normal; - font-stretch: normal; - font-weight: 700; - src: local("Lato"), url("../fonts/LatoLatin-Bold.woff") format("woff"); -} -@font-face { - font-family: "lato"; - font-style: italic; - font-stretch: normal; - font-weight: 700; - src: local("Lato"), url("../fonts/LatoLatin-BoldItalic.woff") format("woff"); -} -@font-face { - font-family: "spectral"; - font-style: normal; - font-stretch: normal; - font-weight: 400; - src: local("Spectral"), url("../fonts/Spectral-Regular.woff") format("woff"); -} -@font-face { - font-family: "spectral"; - font-style: italic; - font-stretch: normal; - font-weight: 400; - src: local("Spectral"), url("../fonts/Spectral-Italic.woff") format("woff"); -} -@font-face { - font-family: "spectral"; - font-style: normal; - font-stretch: normal; - font-weight: 700; - src: local("Spectral"), url("../fonts/Spectral-Bold.woff") format("woff"); -} -@font-face { - font-family: "spectral"; - font-style: italic; - font-stretch: normal; - font-weight: 700; - src: local("Spectral"), url("../fonts/Spectral-BoldItalic.woff") format("woff"); + font-family: "lato"; + font-style: normal; + font-stretch: normal; + font-weight: 400; + src: local("Lato"), url("../fonts/LatoLatin-Regular.woff") format("woff"); +} + +@font-face { + font-family: "lato"; + font-style: italic; + font-stretch: normal; + font-weight: 400; + src: local("Lato"), url("../fonts/LatoLatin-Italic.woff") format("woff"); +} + +@font-face { + font-family: "lato"; + font-style: normal; + font-stretch: normal; + font-weight: 700; + src: local("Lato"), url("../fonts/LatoLatin-Bold.woff") format("woff"); +} + +@font-face { + font-family: "lato"; + font-style: italic; + font-stretch: normal; + font-weight: 700; + src: local("Lato"), url("../fonts/LatoLatin-BoldItalic.woff") format("woff"); +} + +@font-face { + font-family: "spectral"; + font-style: normal; + font-stretch: normal; + font-weight: 400; + src: local("Spectral"), url("../fonts/Spectral-Regular.woff") format("woff"); +} + +@font-face { + font-family: "spectral"; + font-style: italic; + font-stretch: normal; + font-weight: 400; + src: local("Spectral"), url("../fonts/Spectral-Italic.woff") format("woff"); +} + +@font-face { + font-family: "spectral"; + font-style: normal; + font-stretch: normal; + font-weight: 700; + src: local("Spectral"), url("../fonts/Spectral-Bold.woff") format("woff"); +} + +@font-face { + font-family: "spectral"; + font-style: italic; + font-stretch: normal; + font-weight: 700; + src: local("Spectral"), url("../fonts/Spectral-BoldItalic.woff") format("woff"); } diff --git a/p/themes/Ansum/_forms.scss b/p/themes/Ansum/_forms.scss index 8a388aa8a..ff1691894 100644 --- a/p/themes/Ansum/_forms.scss +++ b/p/themes/Ansum/_forms.scss @@ -1,152 +1,160 @@ /* btns */ - .btn { - display: inline-block; - min-height: 38px; - min-width: 15px; - line-height: 25px; - margin: 0; - padding: 0.5rem 1.5rem; - font-size: 1rem; - vertical-align: middle; - cursor: pointer; - overflow: hidden; - background: $grey-lighter; - border-radius: 5px; - border: none; - color: $grey-dark; - - @include transition(all, 0.15s, ease-in-out); - - &.btn-important { - background: $main-first; - color: $white; - - // @include transition(all, 0.15s, ease-in-out); - - &:hover, - &:active { - background: $main-first-alt; + margin: 0; + padding: 0.5rem 1.5rem; + background: $grey-lighter; + display: inline-block; + color: $grey-dark; + font-size: 1rem; + border: none; + border-radius: 5px; + min-height: 38px; + min-width: 15px; + line-height: 25px; + vertical-align: middle; + cursor: pointer; + overflow: hidden; + + @include transition(all, 0.15s, ease-in-out); + + &.btn-important { + background: $main-first; + color: $white; + + // @include transition(all, 0.15s, ease-in-out); + &:hover, + &:active { + background: $main-first-alt; + } } - } - &.btn-attention { - background: $alert-bg; - color: #fff; + &.btn-attention { + background: $alert-bg; + color: #fff; - &:hover, - &:active { - background: $alert-text; + &:hover, + &:active { + background: $alert-text; + } } - } - &:hover { - text-decoration: none; - } + &:hover { + text-decoration: none; + } } a.btn { - min-height: 25px; - line-height: 25px; + min-height: 25px; + line-height: 25px; } /*=== Forms */ legend { - display: inline-block; - width: auto; - margin: 2rem 0 1rem 0; - padding: 0; - font-size: 1rem; - clear: both; - text-transform: uppercase; - letter-spacing: 1px; - font-weight: 700; + margin: 2rem 0 1rem 0; + padding: 0; + display: inline-block; + width: auto; + font-size: 1rem; + clear: both; + text-transform: uppercase; + letter-spacing: 1px; + font-weight: 700; } + label { - min-height: 25px; - padding: 5px 0; - cursor: pointer; - color: $grey-dark; + min-height: 25px; + padding: 5px 0; + cursor: pointer; + color: $grey-dark; } + textarea { - width: 360px; - height: 100px; + width: 360px; + height: 100px; } + input, select, textarea, button { - font-family: "lato", "Helvetica", "Arial", sans-serif; - min-height: 25px; - padding: 5px 10px; - line-height: 25px; - vertical-align: middle; - background: $white; - border: 1px solid $grey-light; - font-size: 1rem; - color: $grey-dark; - border-radius: 2px; + padding: 5px 10px; + background: $white; + color: $grey-dark; + font-family: "lato", "Helvetica", "Arial", sans-serif; + font-size: 1rem; + border: 1px solid $grey-light; + border-radius: 2px; + min-height: 25px; + line-height: 25px; + vertical-align: middle; } + option { - padding: 0 .5em; + padding: 0 .5em; } + input:focus, select:focus, textarea:focus { - color: $main-font-color; - border-color: $main-first; + color: $main-font-color; + border-color: $main-first; } + input:invalid, select:invalid { - color: $alert-bg; - border-color: $alert-bg; - box-shadow: none; + color: $alert-bg; + border-color: $alert-bg; + box-shadow: none; } + input:disabled, select:disabled { - background: $grey-light; + background: $grey-light; } + input.extend { - transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; + transition: width 200ms linear; } .form-group { - padding: 5px; - border-radius: 3px; + padding: 5px; + border-radius: 3px; - &::after { - content: ""; - display: block; - clear: both; - } - &:hover { - // background: #fff; - // border: 1px solid #eee; - // border-radius: 3px; - // border: 1px solid #eee; - } - .group-name { - padding: 10px 0; - text-align: right; - } - .group-controls { - min-height: 25px; - padding: 5px 0; - } - .group-controls .control { - line-height: 2.0em; - } - table { - margin: 10px 0 0 220px; - } - - &.form-actions { - margin: 15px 0 25px; - padding: 5px 0; - // background: #333; - } - &.form-actions .btn { - margin: 0 0.5rem 0 0; - } + &::after { + content: ""; + display: block; + clear: both; + } + + &:hover { + // background: #fff; + // border: 1px solid #eee; + // border-radius: 3px; + // border: 1px solid #eee; + } + + .group-name { + padding: 10px 0; + text-align: right; + } + + .group-controls { + min-height: 25px; + padding: 5px 0; + } + + .group-controls .control { + line-height: 2.0em; + } + + table { + margin: 10px 0 0 220px; + } + + &.form-actions { + margin: 15px 0 25px; + padding: 5px 0; + // background: #333; + } + + &.form-actions .btn { + margin: 0 0.5rem 0 0; + } } diff --git a/p/themes/Ansum/_global-view.scss b/p/themes/Ansum/_global-view.scss index 30979bd6c..7d24a9109 100644 --- a/p/themes/Ansum/_global-view.scss +++ b/p/themes/Ansum/_global-view.scss @@ -1,80 +1,83 @@ /*=== GLOBAL VIEW */ /*================*/ +#stream { + .box.category { + &:not([data-unread="0"]) .box-title { + // background: #3498db; + } -#stream{ - .box.category{ - - &:not([data-unread="0"]) .box-title { - // background: #3498db; - } - &:not([data-unread="0"]) .box-title:active { - // background: #2980b9; - } - &:not([data-unread="0"]) .box-title .title { - font-weight: bold; - // color: #fff; - } - - .box-title{ - background: none; - padding: 1.5rem; - - a.title{ - font-weight: normal; - text-decoration: none; - text-align: left; - font-size: 1rem; - text-transform: uppercase; - letter-spacing: 1px; - color: $grey-dark; + &:not([data-unread="0"]) .box-title:active { + // background: #2980b9; + } - &:not([data-unread="0"])::after { - position: absolute; - top: 1.75rem; - right: 0; - line-height: 1.5rem; - background: $grey-light; - border-radius: 12px; - padding: 0 0.75rem; - margin: -0.5rem 1rem 0 0; - text-align: center; + &:not([data-unread="0"]) .box-title .title { + font-weight: bold; + // color: #fff; } - &:hover{ - color: $main-first; + + .box-title { + padding: 1.5rem; + background: none; + + a.title { + color: $grey-dark; + font-size: 1rem; + font-weight: normal; + text-decoration: none; + text-align: left; + text-transform: uppercase; + letter-spacing: 1px; + + &:not([data-unread="0"])::after { + margin: -0.5rem 1rem 0 0; + padding: 0 0.75rem; + background: $grey-light; + border-radius: 12px; + position: absolute; + top: 1.75rem; + right: 0; + line-height: 1.5rem; + text-align: center; + } + + &:hover { + color: $main-first; + } + } } - } - } - .box-content{ - padding-bottom: 0.5rem; - .item.feed { - // padding: 2px 10px; - font-size: 1rem; - padding: 0.5rem 1.5rem; - - a{ - color: $main-font-color; - font-weight: 400; + .box-content { + padding-bottom: 0.5rem; + + .item.feed { + padding: 0.5rem 1.5rem; + // padding: 2px 10px; + font-size: 1rem; - &:hover{ - color: $main-first; - text-decoration: none; - } + a { + color: $main-font-color; + font-weight: 400; + + &:hover { + color: $main-first; + text-decoration: none; + } + } + } } - } - } - } + } } // le panel qui apparait en overlay pour afficher les flux -#overlay{ - background: rgba(0, 0, 0, 0.65); +#overlay { + background: rgba(0, 0, 0, 0.65); } -#panel{ - top: 3rem; - right: 3rem; - bottom: 3rem; - left: 3rem; - border-radius: 3px; + +#panel { + top: 3rem; + right: 3rem; + bottom: 3rem; + left: 3rem; + border-radius: 3px; } diff --git a/p/themes/Ansum/_layout.scss b/p/themes/Ansum/_layout.scss index de684504a..a75601d06 100644 --- a/p/themes/Ansum/_layout.scss +++ b/p/themes/Ansum/_layout.scss @@ -2,118 +2,117 @@ /*===============*/ /*=== Header */ .header { - background: $sid-bg; - padding: 0.5rem 1.35rem; - display: block; - table-layout: none; - width: auto; - - .item{ - vertical-align: middle; - // text-align: center; - // display: flex; - // justify-content: space-between; - // flex-direction: row; - - &.title{ - - font-weight: 400; - width: 280px; - - h1{ - a{ - text-decoration: none; - color: $sid-font-color; - font-size: 1rem; - text-transform: uppercase; - letter-spacing: 1px; - - img{ - margin-right: 0.5rem; - - } + padding: 0.5rem 1.35rem; + background: $sid-bg; + display: block; + width: auto; + table-layout: none; + + .item { + vertical-align: middle; + // text-align: center; + // display: flex; + // justify-content: space-between; + // flex-direction: row; + &.title { + width: 280px; + + font-weight: 400; + + h1 { + a { + text-decoration: none; + color: $sid-font-color; + font-size: 1rem; + text-transform: uppercase; + letter-spacing: 1px; + + img { + margin-right: 0.5rem; + + } + } + } } - } - } - &.search{ - // text-align: center; - // width: 50%; - input{ - width: 230px; - border-radius: 2px 0 0 2px; - background-color: $sid-bg-alt; - color: $sid-font-color; - border: none; + &.search { + // text-align: center; + // width: 50%; + input { + width: 230px; + color: $sid-font-color; + border: none; + border-radius: 2px 0 0 2px; + background-color: $sid-bg-alt; - @include transition(all, 0.15s, ease-in-out); + @include transition(all, 0.15s, ease-in-out); - &:hover{ - background-color: $sid-bg-dark; - } - - &:focus{ - width: 350px; + &:hover { + background-color: $sid-bg-dark; + } - background-color: $white; - color: $grey-dark; - } - } - .btn{ - img{display: none;} - border-radius: 0 2px 2px 0; + &:focus { + width: 350px; + color: $grey-dark; - background-color: $main-first; - background-position: center; - background-repeat: no-repeat; - background-image: url(icons/magnifier.svg); - - border-left-width: 0; + background-color: $white; + } + } - width: 3rem; - min-height: 35px; + .btn { + img {display: none;} - &:hover{ - background-color: $main-first-alt; - } - } - } - &.configure{ - width: 2rem; - position: absolute; - right: 1rem; - top: 1.25rem; - text-align: center; - // float: right; - - .btn{ - img{display: none;} - // border-radius: 0 2px 2px 0; - - background-color: transparent; - background-position: center; - background-repeat: no-repeat; - background-image: url(icons/cog.svg); + width: 3rem; + border-radius: 0 2px 2px 0; + + background-color: $main-first; + background-position: center; + background-repeat: no-repeat; + background-image: url(icons/magnifier.svg); - padding: 0 0.5rem; - - // border-left-width: 0; + border-left-width: 0; + min-height: 35px; - // width: 3rem; + &:hover { + background-color: $main-first-alt; + } + } + } - &:hover{ - // background-color: $main-first-alt; + &.configure { + width: 2rem; + position: absolute; + right: 1rem; + top: 1.25rem; + text-align: center; + // float: right; + .btn { + img {display: none;} + + padding: 0 0.5rem; + // border-radius: 0 2px 2px 0; + + background-color: transparent; + background-position: center; + background-repeat: no-repeat; + background-image: url(icons/cog.svg); + + // border-left-width: 0; + + // width: 3rem; + &:hover { + // background-color: $main-first-alt; + } + } } - } } - } - + } /*=== Body */ #global { - height: calc(100% - 85px); + height: calc(100% - 85px); } @@ -121,342 +120,352 @@ /*=== Prompt (centered) */ .prompt { - text-align: center; + text-align: center; } + .prompt label { - text-align: left; + text-align: left; } + .prompt form { - margin: 10px auto 20px auto; - width: 200px; + margin: 10px auto 20px auto; + width: 200px; } + .prompt input { - margin: 5px auto; - width: 100%; + margin: 5px auto; + width: 100%; } + .prompt p { - margin: 20px 0; + margin: 20px 0; } /*=== New article notification */ #new-article { - text-align: center; - font-size: 1rem; - background: $main-first; + background: $main-first; + font-size: 1rem; + text-align: center; } + #new-article:hover { - background: $main-first-alt; + background: $main-first-alt; } + #new-article > a { - line-height: 3em; - font-weight: bold; - color: $white; + line-height: 3em; + font-weight: bold; + color: $white; } + #new-article > a:hover { - text-decoration: none; + text-decoration: none; } /*=== Day indication */ .day { - padding: 1rem 0 0 1.25rem; - font-weight: 700; - line-height: 3em; - letter-spacing: 1px; - text-transform: uppercase; - font-size: 0.875rem; - color: $light-font-color; - // border-left: 2px solid #ecf0f1; - - .name{ - padding: 0 1rem 0 1rem; + padding: 1rem 0 0 1.25rem; + color: $light-font-color; font-size: 0.875rem; - // font-weight: 700; - color: $main-font-color; - position: relative; - left: 0; - - // letter-spacing: 1px; + font-weight: 700; + line-height: 3em; + letter-spacing: 1px; text-transform: uppercase; - } + // border-left: 2px solid #ecf0f1; + .name { + padding: 0 1rem 0 1rem; + // font-weight: 700; + color: $main-font-color; + font-size: 0.875rem; + position: relative; + left: 0; + + // letter-spacing: 1px; + text-transform: uppercase; + } } /*=== Index menu */ .nav_menu { - text-align: center; - padding: 5px 0; - - .btn{ - border-left-width: 0; - padding: 0.5rem 1rem; - background-color: $grey-lighter; - background-position: center; - background-repeat: no-repeat; - - &:hover{ - background-color: $grey-light; - } - } - - .stick{ - background: $grey-lighter; - - .btn{ - border-left-width: 0; - padding: 0.5rem 1rem; - background-color: $grey-lighter; - background-position: center; - background-repeat: no-repeat; - @include transition(all, 0.15s, ease-in-out); - - &:hover{ - background-color: $grey-medium-light; - } - - &.active{ - background-color: $main-first; - } - - img.icon{display: none;} // on efface pour afficher nos icones, mouhahaha !! - - - // actions - &#toggle-read{ - background-image: url(icons/read.svg); - } - &#toggle-read.active{ - background-image: url(icons/read-white.svg); - } - - &#toggle-unread{ - background-image: url(icons/unread.svg); - } - &#toggle-unread.active{ - background-image: url(icons/unread-white.svg); - } - - &#toggle-starred{ - background-image: url(icons/starred.svg); - } - &#toggle-starred.active{ - background-image: url(icons/starred-white.svg); - } - - &#toggle-non-starred{ - background-image: url(icons/non-starred.svg); - } - &#toggle-non-starred.active{ - background-image: url(icons/non-starred-white.svg); - } - - // read all - &.read_all{ + text-align: center; + padding: 5px 0; + + .btn { + border-left-width: 0; + padding: 0.5rem 1rem; background-color: $grey-lighter; - // min-height: 0; - color:$main-font-color; - padding: 5px 16px; - @include transition(all, 0.15s, ease-in-out); + background-position: center; + background-repeat: no-repeat; - &:hover{ - background-color: $grey-medium-light; + &:hover { + background-color: $grey-light; } - } - - // views - &.view-normal{ - background-image: url(icons/view-list.svg); - } - &.view-normal.active{ - background-image: url(icons/view-list-white.svg); - } - - &.view-global{ - background-image: url(icons/view-global.svg); - } - &.view-global.active{ - background-image: url(icons/view-global-white.svg); - } - - &.view-reader{ - background-image: url(icons/view-reader.svg); - } - &.view-reader.active{ - background-image: url(icons/view-reader-white.svg); - } - - &.view-rss{ - background-image: url(icons/rss.svg); - } - - } - .dropdown { - a.dropdown-toggle{ - border-left-width: 0; - background-image: url(icons/more.svg); - } - } - - &#nav_menu_action{ - } - &#nav_menu_read_all{ - - } - &#nav_menu_views{ - + + .stick { + background: $grey-lighter; + + .btn { + border-left-width: 0; + padding: 0.5rem 1rem; + background-color: $grey-lighter; + background-position: center; + background-repeat: no-repeat; + + @include transition(all, 0.15s, ease-in-out); + + &:hover { + background-color: $grey-medium-light; + } + + &.active { + background-color: $main-first; + } + + img.icon {display: none;} // on efface pour afficher nos icones, mouhahaha !! + + + // actions + &#toggle-read { + background-image: url(icons/read.svg); + } + + &#toggle-read.active { + background-image: url(icons/read-white.svg); + } + + &#toggle-unread { + background-image: url(icons/unread.svg); + } + + &#toggle-unread.active { + background-image: url(icons/unread-white.svg); + } + + &#toggle-starred { + background-image: url(icons/starred.svg); + } + + &#toggle-starred.active { + background-image: url(icons/starred-white.svg); + } + + &#toggle-non-starred { + background-image: url(icons/non-starred.svg); + } + + &#toggle-non-starred.active { + background-image: url(icons/non-starred-white.svg); + } + + // read all + &.read_all { + padding: 5px 16px; + // min-height: 0; + color: $main-font-color; + background-color: $grey-lighter; + + @include transition(all, 0.15s, ease-in-out); + + &:hover { + background-color: $grey-medium-light; + } + } + + // views + &.view-normal { + background-image: url(icons/view-list.svg); + } + + &.view-normal.active { + background-image: url(icons/view-list-white.svg); + } + + &.view-global { + background-image: url(icons/view-global.svg); + } + + &.view-global.active { + background-image: url(icons/view-global-white.svg); + } + + &.view-reader { + background-image: url(icons/view-reader.svg); + } + + &.view-reader.active { + background-image: url(icons/view-reader-white.svg); + } + + &.view-rss { + background-image: url(icons/rss.svg); + } + + } + + .dropdown { + a.dropdown-toggle { + border-left-width: 0; + background-image: url(icons/more.svg); + } + } } - } } #dropdown-query ~ .dropdown-menu .dropdown-header .icon { - vertical-align: middle; - background-color: $grey-medium-dark; - border-radius: 3px; + vertical-align: middle; + background-color: $grey-medium-dark; + border-radius: 3px; } /*=== Content of feed articles */ .content, .content.thin { - padding: 20px 10px; + padding: 20px 10px; - font-size: 1.125rem; - line-height: 1.8rem; + font-size: 1.125rem; + line-height: 1.8rem; - h1.title, h1{ + h1.title, h1 { + a { + color: $main-font-color; + font-family: "spectral", serif; + font-size: 2rem; - a{ - color: $main-font-color; - font-family: "spectral"; - font-size: 2rem; + &:hover { + color: $main-first; + text-decoration: none; + } + } + } - &:hover{ - color: $main-first; - text-decoration: none; - } + .author { + color: $light-font-color; + font-size: 1.125rem; + } + + p, ul { + font-size: 1.125rem; + line-height: 1.8rem; + } + + .content hr { + margin: 30px 10px; + background: $grey-medium-light; + height: 1px; + border: 0; + box-shadow: 0 2px 5px #ccc; + } + + pre { + margin: 10px auto; + padding: 10px 20px; + overflow: auto; + background: $main-first-darker; + color: $white; + font-size: 0.9rem; + border-radius: 3px; + + code { + background: transparent; + color: $white; + border: none; + } } - } - .author{ - font-size: 1.125rem; - color: $light-font-color; - } - p, ul{ - font-size: 1.125rem; - line-height: 1.8rem; - } - hr{ - } - .content hr { - margin: 30px 10px; - height: 1px; - background: $grey-medium-light; - border: 0; - box-shadow: 0 2px 5px #ccc; - } - - pre { - margin: 10px auto; - padding: 10px 20px; - overflow: auto; - background: $main-first-darker; - color: $white; - font-size: 0.9rem; - border-radius: 3px; code { - background: transparent; - color: $white; - border: none; + padding: 2px 5px; + background: $grey-lighter; + color: $grey-light; + border: 1px solid $grey-light; + border-radius: 3px; } - } - code { - padding: 2px 5px; - color: $grey-light; - background: $grey-lighter; - border: 1px solid $grey-light; - border-radius: 3px; - } - blockquote { - display: block; - margin: 0; - padding: 5px 20px; - border-top: 1px solid $grey-medium-light; - border-bottom: 1px solid $grey-medium-light; - background: $grey-lighter; - color: $main-font-color; - - p { - margin: 0; + blockquote { + margin: 0; + padding: 5px 20px; + background: $grey-lighter; + display: block; + color: $main-font-color; + border-top: 1px solid $grey-medium-light; + border-bottom: 1px solid $grey-medium-light; + + p { + margin: 0; + } } - } } /*=== Notification and actualize notification */ .notification { - position: fixed; - top: auto; - bottom: 0; - left: 0; - right: 0; - width: 100%; - height: 3rem; - - padding: 1rem 0; - text-align: center; - // font-weight: bold; - font-size: 1em; - line-height: 3em; - z-index: 10; - vertical-align: middle; - background: $grey-medium-light; - color: $grey-dark; - // border-radius: 3px; - border: none; - - .msg{ - font-size: 1rem; - display: inline-block; - } - - &.good { - background: $success-bg; - color: $white; - } - &.bad { - background: $alert-bg; - color: $white; - } - a.close { - padding: 0 15px; + + padding: 1rem 0; + background: $grey-medium-light; + width: 100%; + height: 3rem; + color: $grey-dark; + // font-weight: bold; + font-size: 1em; + // border-radius: 3px; + border: none; + position: fixed; + top: auto; + bottom: 0; + left: 0; + right: 0; + text-align: center; line-height: 3em; - border-radius: 0 3px 3px 0; - } - - &.good a.close:hover { - background: $success-text; - } - &.bad a.close:hover { - background: $alert-text; - } - - &#actualizeProgress { - line-height: 2em; - - br{ - display: none; + z-index: 10; + vertical-align: middle; + + .msg { + display: inline-block; + font-size: 1rem; + } + + &.good { + background: $success-bg; + color: $white; + } + + &.bad { + background: $alert-bg; + color: $white; + } + + a.close { + padding: 0 15px; + border-radius: 0 3px 3px 0; + line-height: 3em; + } + + &.good a.close:hover { + background: $success-text; + } + + &.bad a.close:hover { + background: $alert-text; + } + + &#actualizeProgress { + line-height: 2em; + + br { + display: none; + } } - } } /*=== Navigation menu (for articles) */ #nav_entries { - margin: 0; - text-align: center; - line-height: 3em; - table-layout: fixed; - background: $sid-bg; + margin: 0; + text-align: center; + line-height: 3em; + table-layout: fixed; + background: $sid-bg; } diff --git a/p/themes/Ansum/_list-view.scss b/p/themes/Ansum/_list-view.scss index 78f100203..8b8398c6f 100644 --- a/p/themes/Ansum/_list-view.scss +++ b/p/themes/Ansum/_list-view.scss @@ -1,92 +1,96 @@ /*=== Feed articles */ .flux { - // border-left: 2px solid #ecf0f1; - background: $white; + // border-left: 2px solid #ecf0f1; + background: $white; - @include transition(all, 0.15s, ease-in-out); - - &:hover{ - background: $grey-lighter; + @include transition(all, 0.15s, ease-in-out); - &:not(.current):hover .item.title { - background: $grey-lighter; + &:hover { + background: $grey-lighter; - - } - } - &.current{ - border-left-color: $main-first; - background: $white; - } - &.not_read{ - background: $unread-bg; //-------------------- - // border-left-color: #FF5300; + &:not(.current):hover .item.title { + background: $grey-lighter; - &:hover{ - background: $unread-bg-light; //-------------------- - } - - &:not(.current):hover .item.title { - background: $unread-bg-light; - + } } - .item.title{ - a{ - color: $unread-font-color; //-------------------- - } - + + &.current { + background: $white; + border-left-color: $main-first; } - .item.website{ - a{ - color: $unread-font-color; //-------------------- - } + + &.not_read { + background: $unread-bg; //-------------------- + // border-left-color: #FF5300; + &:hover { + background: $unread-bg-light; //-------------------- + } + + &:not(.current):hover .item.title { + background: $unread-bg-light; + + + } + + .item.title { + a { + color: $unread-font-color; //-------------------- + } + + } + + .item.website { + a { + color: $unread-font-color; //-------------------- + } + } + + .item.date { + color: unquote($unread-font-color+"99"); //-------------------- + } } - .item.date{ - color: unquote($unread-font-color+"99"); //-------------------- + + &.favorite { + background: $fav-light; + border-left-color: $fav-bg; + + @include transition(all, 0.15s, ease-in-out); + + &:not(.current):hover .item.title { + background: $fav-light; + } } -} - - &.favorite { - background: $fav-light; - border-left-color: $fav-bg; - @include transition(all, 0.15s, ease-in-out); + .website { + a { + color: $main-font-color; + opacity: 0.75; + } - &:not(.current):hover .item.title { - background: $fav-light; + .favicon { + padding: 5px; + } } - } - .website{ - a{ - color: $main-font-color; - opacity: 0.75; + .date { + color: $main-font-color; + font-size: 0.85rem; + opacity: 0.75; } - - .favicon { - padding: 5px; + + .bottom { + font-size: 1rem; + text-align: center; } - } - .date { - font-size: 0.85rem; - color: $main-font-color; - opacity: 0.75; - } - - .bottom { - font-size: 1rem; - text-align: center; - } } .flux_header { - font-size: 1rem; - cursor: pointer; - border-top: 1px solid $grey-light; - - .title { font-size: 1rem; - } -} + cursor: pointer; + border-top: 1px solid $grey-light; + .title { + font-size: 1rem; + } +} diff --git a/p/themes/Ansum/_logs.scss b/p/themes/Ansum/_logs.scss index ae1e24c6c..82eead3c9 100644 --- a/p/themes/Ansum/_logs.scss +++ b/p/themes/Ansum/_logs.scss @@ -4,13 +4,14 @@ overflow: hidden; border: 1px solid $grey-medium-dark; } + .log { margin: 10px 0; padding: 5px 2%; - overflow: auto; - font-size: 0.8rem; background: $grey-lighter; color: $grey-dark; + font-size: 0.8rem; + overflow: auto; } .log > .date { @@ -18,16 +19,20 @@ padding: 5px 10px; border-radius: 20px; } + .log.error > .date { background: $alert-bg; color: #fff; } + .log.warning > .date { background: $warning-bg; } + .log.notice > .date { background: $grey-light; } + .log.debug > .date { background: $main-first-darker; color: $white; diff --git a/p/themes/Ansum/_mixins.scss b/p/themes/Ansum/_mixins.scss index 4c82c438a..84ef1d492 100644 --- a/p/themes/Ansum/_mixins.scss +++ b/p/themes/Ansum/_mixins.scss @@ -1,57 +1,69 @@ +/* stylelint-disable property-no-vendor-prefix */ + /* FUNCTIONS */ //animation + @mixin transition($target, $duration, $ease) { - -webkit-transition: $target $duration $ease; - -moz-transition: $target $duration $ease; - -o-transition: $target $duration $ease; - transition: $target $duration $ease; + -webkit-transition: $target $duration $ease; + -moz-transition: $target $duration $ease; + -o-transition: $target $duration $ease; + transition: $target $duration $ease; } //animation + @mixin animation-delay($delay) { - -webkit-animation-delay: $delay; - /* Safari 4.0 - 8.0 */ - animation-delay: $delay; + -webkit-animation-delay: $delay; + /* Safari 4.0 - 8.0 */ + animation-delay: $delay; } //animation + @mixin animation($animate...) { - $max: length($animate); - $animations: ''; - @for $i from 1 through $max { - $animations: #{$animations + nth($animate, $i)}; - @if $i < $max { - $animations: #{$animations + ", "}; - } - } - -webkit-animation: $animations; - -moz-animation: $animations; - -o-animation: $animations; - animation: $animations; + $max: length($animate); + $animations: ''; + + @for $i from 1 through $max { + $animations: #{$animations + nth($animate, $i)}; + + @if $i < $max { + $animations: #{$animations + ", "}; + } + } + -webkit-animation: $animations; + -moz-animation: $animations; + -o-animation: $animations; + animation: $animations; } //keyframes + @mixin keyframes($animationName) { - @-webkit-keyframes #{$animationName} { - @content; - } - @-moz-keyframes #{$animationName} { - @content; - } - @-o-keyframes #{$animationName} { - @content; - } - @keyframes #{$animationName} { - @content; - } + + @-webkit-keyframes #{$animationName} { + @content; + } + + @-moz-keyframes #{$animationName} { + @content; + } + + @-o-keyframes #{$animationName} { + @content; + } + + @keyframes #{$animationName} { + @content; + } } -@mixin border-radius($radius: 4px){ - -moz-border-radius: $radius; - -webkit-border-radius: $radius; - -ms-border-radius: $radius; - -o-border-radius: $radius; - -khtml-border-radius: $radius; - border-radius: $radius; +@mixin border-radius($radius: 4px) { + -moz-border-radius: $radius; + -webkit-border-radius: $radius; + -ms-border-radius: $radius; + -o-border-radius: $radius; + -khtml-border-radius: $radius; + border-radius: $radius; } diff --git a/p/themes/Ansum/_mobile.scss b/p/themes/Ansum/_mobile.scss index 10b432241..8922ea370 100644 --- a/p/themes/Ansum/_mobile.scss +++ b/p/themes/Ansum/_mobile.scss @@ -1,170 +1,186 @@ /*=== MOBILE */ /*===========*/ -@media(max-width: 840px) { - html, body{ - // font-size: 1rem; - } - ul.nav{ - .item{ - width: 100%; - - img{ - display: none; - } - a{ - display: inline-block; - padding: 1rem 1rem 1rem 2.5rem; - color: $sid-font-color; - width: 100%; - - background: url("../../themes/icons/logout.svg") no-repeat $sid-bg-dark 3% center; + +@media (max-width: 840px) { + html, body { + // font-size: 1rem; + } + + ul.nav { + .item { + width: 100%; + + img { + display: none; + } + + a { + padding: 1rem 1rem 1rem 2.5rem; + + background: url("../../themes/icons/logout.svg") no-repeat $sid-bg-dark 3% center; + display: inline-block; + width: 100%; + color: $sid-font-color; + + @include transition(all, 0.2s, ease-in-out); + + &:hover, + &:active { + background: url("../../themes/icons/logout.svg") no-repeat $alert-bg 3% center; + text-decoration: none; + color: $white; + } + } + + } + + } + + .aside { @include transition(all, 0.2s, ease-in-out); - &:hover, - &:active{ - background: url("../../themes/icons/logout.svg") no-repeat $alert-bg 3% center; - text-decoration: none; - color: $white; + &.aside_feed { + padding: 0; } - } + .tree .tree-folder .tree-folder-items .item a { + padding: 0.5rem 1rem; + } } - - } - .aside { - @include transition(all, 0.2s, ease-in-out); - - &.aside_feed { - padding: 0; + + .aside .toggle_aside, + #panel .close { + background: $main-first-alt; + display: block; + width: 100%; + height: 50px; + line-height: 50px; + text-align: center; } - .tree .tree-folder .tree-folder-items .item a{ - padding: 0.5rem 1rem; + .header { + padding: 0.5rem; + + .item { + &.title { + display: none; + } + + &.search { + input { + width: 90%; + height: 3.5rem; + + &:focus { + width: 100%; + + } + } + + .btn { + min-height: 49px; + padding: 0.5rem 2rem; + } + } + + &.configure { + width: 2.75rem; + top: 3.125rem; + + .dropdown { + .btn { + padding: 1.125rem; + } + } + } + } } - } - .aside .toggle_aside, - #panel .close { - display: block; - width: 100%; - height: 50px; - line-height: 50px; - text-align: center; - background: $main-first-alt; - } - - .header{ - padding: 0.5rem; - .item{ - &.title{ - display: none; - } - - &.search{ - input{ - width: 90%; - height: 3.5rem; - - &:focus{ - width: 100%; - } + .nav_menu { + .btn { + margin: 0; + padding: 0.85rem 1.25rem; } - .btn{ - min-height: 49px; - padding: 0.5rem 2rem; + + .stick { + margin: 0.5rem 0.5rem; + + .btn { + margin: 0; + padding: 0.85rem 1.25rem; + + &.read_all { + padding: 0.85rem 1.25rem; + } + } } - } - &.configure{ - width: 2.75rem; - top: 3.125rem; - .dropdown{ - .btn{ - padding: 1.125rem; - } + + .search { + display: none; + max-width: 97%; + + .input { + + max-width: 97%; + width: 90px; + + &:focus { + width: 400px; + } + } } - } - } - } - - .nav_menu{ - .btn { - margin: 0; - padding: 0.85rem 1.25rem; } - .stick { - margin: 0.5rem 0.5rem; - .btn{ - margin: 0; - padding: 0.85rem 1.25rem; - - &.read_all{ - padding: 0.85rem 1.25rem; + #stream { + .flux { + .flux_header { + padding: 0.5rem 0; + } } - } } - .search { - display: none; - max-width: 97%; - .input{ - max-width: 97%; - width: 90px; - &::focus{ - width: 400px; + .day { + text-align: center; + padding: 1rem 0; + + .name { + padding: 0; + // font-size: 1.1rem; + display: block; + width: 100%; + line-height: 1.5rem; + margin-bottom: 1rem; } - } + } - } - #stream{ - .flux{ - .flux_header{ - padding: 0.5rem 0; - } + + .pagination { + margin: 0 0 3.5em; } - } - - - - .day{ - text-align: center; - padding: 1rem 0; - .name { - // font-size: 1.1rem; - display: block; - padding: 0; - width: 100%; - line-height: 1.5rem; - margin-bottom: 1rem; + + #nav_entries { + line-height: 4.5rem; } - } + .notification { + border-radius: 0; - .pagination { - margin: 0 0 3.5em; - } + a.close { + background: transparent; + display: block; + left: 0; + } - #nav_entries{ - line-height: 4.5rem; - } + a.close:hover { + opacity: 0.5; + } - .notification { - border-radius: 0; + a.close .icon { + display: none; - a.close { - display: block; - left: 0; - background: transparent; - } - a.close:hover { - opacity: 0.5; - } - a.close .icon { - display: none; - + } } - } } diff --git a/p/themes/Ansum/_reader-view.scss b/p/themes/Ansum/_reader-view.scss index 4368908d6..e75e43d00 100644 --- a/p/themes/Ansum/_reader-view.scss +++ b/p/themes/Ansum/_reader-view.scss @@ -6,8 +6,9 @@ color: $main-font-color; border: none; } + #stream.reader .flux .author { margin: 0 0 10px; - font-size: 90%; color: $grey-medium-dark; + font-size: 90%; } diff --git a/p/themes/Ansum/_sidebar.scss b/p/themes/Ansum/_sidebar.scss index 87d5bd1a9..86f3e346d 100644 --- a/p/themes/Ansum/_sidebar.scss +++ b/p/themes/Ansum/_sidebar.scss @@ -1,142 +1,141 @@ /*=== Tree */ .tree { - margin: 10px 0; - - &#sidebar{ - scrollbar-color: rgba(255,255, 0, 0.1) rgba(0, 0, 0, 0.05); - scrollbar-color: unquote($sid-font-color+"33") unquote($sid-font-color+"22"); - - - } - - - .tree-folder{ - border-bottom: 1px solid $sid-sep; - - -moz-box-shadow: inset -1px -11px 8px #00000033; - -webkit-box-shadow: inset -1px -11px 8px #00000033; - box-shadow: inset -1px -11px 8px #00000033; - - .tree-folder-title { - position: relative; - background: $sid-bg; - font-size: 0.85rem; - letter-spacing: 1px; - padding: 12px 16px; - font-weight: 700; - text-transform: uppercase; - - .title { - background: inherit; - color: $sid-font-color; - &:hover{ - text-decoration: none; - } - } - } - &.active { - .tree-folder-title { - background: $sid-bg; - font-weight: bold; - } + margin: 10px 0; + + &#sidebar { + scrollbar-color: rgba(255,255, 0, 0.1) rgba(0, 0, 0, 0.05); + scrollbar-color: unquote($sid-font-color+"33") unquote($sid-font-color+"22"); } - .tree-folder-items { - background: $sid-bg-alt; - .item{ - padding: 0 1rem; - line-height: 2.5rem; - font-size: 1rem; - font-weight: 400; - @include transition(all, 0.15s, ease-in-out); + .tree-folder { + border-bottom: 1px solid $sid-sep; + box-shadow: inset -1px -11px 8px #0003; + + .tree-folder-title { + padding: 12px 16px; + background: $sid-bg; + position: relative; + font-size: 0.85rem; + letter-spacing: 1px; + font-weight: 700; + text-transform: uppercase; + + .title { + background: inherit; + color: $sid-font-color; + + &:hover { + text-decoration: none; + } + } + } - &.active{ - background: $sid-active; + &.active { + .tree-folder-title { + background: $sid-bg; + font-weight: bold; + } + } - .dropdown li a{ - color: $main-font-color; + .tree-folder-items { + background: $sid-bg-alt; - &:hover{ - color: $sid-font-color; - } - } + .item { + padding: 0 1rem; + line-height: 2.5rem; + font-size: 1rem; + font-weight: 400; - a{ - color: $sid-active-font; - } - } + @include transition(all, 0.15s, ease-in-out); - &:hover{ - background: $sid-bg-dark; - } + &.active { + background: $sid-active; + + .dropdown li a { + color: $main-font-color; + + &:hover { + color: $sid-font-color; + } + } + + a { + color: $sid-active-font; + } + } + + &:hover { + background: $sid-bg-dark; + } - a{ - text-decoration: none; - color: $sid-font-color; + a { + text-decoration: none; + color: $sid-font-color; + } + } + + .feed .item-title:not([data-unread="0"])::before { + margin: 11px 6px 0 4px; + padding: 3px 4px; + background: $sid-pills; + display: block; + float: left; + font-size: 0.75rem; + border-radius: 12px; + content: attr(data-unread); + text-align: center; + line-height: 0.75rem; + } } - } - - .feed .item-title:not([data-unread="0"])::before { - content: attr(data-unread); - background: $sid-pills; - font-size: 0.75rem; - display: block; - float: left; - padding: 3px 4px; - text-align:center; - border-radius: 12px; - margin: 11px 6px 0 4px; - line-height: 0.75rem; - } - .feed .item-title:not([data-unread="0"]) { - - } } - } } /*=== Buttons */ .stick { - vertical-align: middle; - font-size: 0; - - input, .btn { - border-radius: 0; - } - .btn:first-child, - input:first-child { - border-radius: 5px 0 0 5px; - } - .btn:last-child, input:last-child, .btn + .dropdown > .btn { - border-radius: 0 5px 5px 0; - } - .btn + .btn, - .btn + input, - .btn + .dropdown > .btn, - input + .btn, - input + input, - input + .dropdown > .btn, - .dropdown + .btn, - .dropdown + input, - .dropdown + .dropdown > .btn { - border-left: 1px solid $grey-medium-light; - } + vertical-align: middle; + font-size: 0; + + input, .btn { + border-radius: 0; + } + + .btn:first-child, + input:first-child { + border-radius: 5px 0 0 5px; + } + + .btn:last-child, input:last-child, .btn + .dropdown > .btn { + border-radius: 0 5px 5px 0; + } + + .btn + .btn, + .btn + input, + .btn + .dropdown > .btn, + input + .btn, + input + input, + input + .dropdown > .btn, + .dropdown + .btn, + .dropdown + input, + .dropdown + .dropdown > .btn { + border-left: 1px solid $grey-medium-light; + } } .aside { - background: $sid-bg; - - - &.aside_feed { - padding: 10px 0; - text-align: center; background: $sid-bg; - border-right: 1px solid $sid-sep; - } - &.aside_feed .tree { - margin: 10px 0 50px; - } + + + &.aside_feed { + padding: 10px 0; + text-align: center; + background: $sid-bg; + border-right: 1px solid $sid-sep; + } + + &.aside_feed .tree { + margin: 10px 0 50px; + } } @@ -146,154 +145,171 @@ /*=== Navigation */ - -.nav-list{ - .nav-header, - .item{ - height: 2.5em; - line-height: 2.5em; - font-size: 1rem; - } - .item{ - background: $sid-bg; - @include transition(all, 0.15s, ease-in-out); - a{ - padding: 0 1rem; - color: $sid-font-color; - } - .error{ - a{ - color: $alert-bg; - } +.nav-list { + .nav-header, + .item { + height: 2.5em; + line-height: 2.5em; + font-size: 1rem; } - &:hover{ - background: $sid-bg-dark; - color: $sid-font-color; - - .error{ - a{ - color: $sid-font-color; - background: $main-first; + + .item { + background: $sid-bg; + + @include transition(all, 0.15s, ease-in-out); + + a { + padding: 0 1rem; + color: $sid-font-color; } - } - .empty{ - a{ - color: $sid-font-color; - background: $warning-bg; + + .error { + a { + color: $alert-bg; + } } - } - - a{ - color: $sid-font-color; - text-decoration: none; - } - } - &.active{ - background: $main-first; - color: $white; - - .error{ - a{ - color: $white; - background: $main-first; + + &:hover { + background: $sid-bg-dark; + color: $sid-font-color; + + .error { + a { + background: $main-first; + color: $sid-font-color; + } + } + + .empty { + a { + background: $warning-bg; + color: $sid-font-color; + } + } + + a { + color: $sid-font-color; + text-decoration: none; + } } - } - .empty{ - a{ - color: $white; - background: $warning-bg; + &.active { + background: $main-first; + color: $white; + + .error { + a { + background: $main-first; + color: $white; + } + } + + .empty { + a { + background: $warning-bg; + color: $white; + } + } + + a { + color: $white; + text-decoration: none; + } } - } - - a{ - color: $white; - text-decoration: none; - } + } - - } - &.empty{ - a{ - color: $warning-bg; + + &.empty { + a { + color: $warning-bg; + } } - } - .disable{ - text-align: center; - background: $grey-lighter; - color: $grey-medium-dark; - } - .nav-header { - padding: 0 10px; - font-weight: bold; - color: $grey-dark; - text-transform: uppercase; - letter-spacing: 1px; - margin-top: 1rem; - } - - .nav-form { - padding: 3px; - text-align: center; - } - - .nav-head { - margin: 0; - text-align: right; - // background: #34495e; - color: $white; - a { - color: $white; - } - .item { - padding: 5px 10px; - font-size: 0.9rem; - line-height: 1.5rem; - } - } + .disable { + text-align: center; + background: $grey-lighter; + color: $grey-medium-dark; + } + + .nav-header { + padding: 0 10px; + font-weight: bold; + color: $grey-dark; + text-transform: uppercase; + letter-spacing: 1px; + margin-top: 1rem; + } + + .nav-form { + padding: 3px; + text-align: center; + } + + .nav-head { + margin: 0; + text-align: right; + // background: #34495e; + color: $white; + + a { + color: $white; + } + + .item { + padding: 5px 10px; + font-size: 0.9rem; + line-height: 1.5rem; + } + } } /*=== Aside main page (categories) */ .aside_feed .tree-folder-title > .title:not([data-unread="0"])::after { - position: absolute; - right: 0; - line-height: 1.5rem; - background: $sid-pills; - border-radius: 12px; - padding: 0 0.75rem; - margin: -0.5rem 1rem 0 0; - text-align: center; + margin: -0.5rem 1rem 0 0; + padding: 0 0.75rem; + background: $sid-pills; + border-radius: 12px; + position: absolute; + right: 0; + line-height: 1.5rem; + text-align: center; } .feed.item.empty.active { - background: $grey-dark; + background: $grey-dark; } + .feed.item.error.active { - background: $grey-dark; + background: $grey-dark; } + .feed.item.empty, .feed.item.empty > a { - color: $grey-dark; + color: $grey-dark; } + .feed.item.error, .feed.item.error > a { - color: $grey-dark; + color: $grey-dark; } + .feed.item.empty.active, .feed.item.error.active, .feed.item.empty.active > a, .feed.item.error.active > a { - color: $white; + color: $white; } + .aside_feed .tree-folder-items .dropdown-menu::after { - left: 2px; + left: 2px; } + .aside_feed .tree-folder-items .item .dropdown-target:target ~ .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item:hover .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item.active .dropdown-toggle > .icon { - border-radius: 3px; + border-radius: 3px; } -.aside_feed .stick #btn-importExport{ - border-left-color: $sid-bg; + +.aside_feed .stick #btn-importExport { + border-left-color: $sid-bg; } diff --git a/p/themes/Ansum/_stats.scss b/p/themes/Ansum/_stats.scss index f287efa08..592419166 100644 --- a/p/themes/Ansum/_stats.scss +++ b/p/themes/Ansum/_stats.scss @@ -9,6 +9,7 @@ .stat tr { border: none; } + .stat > table td, .stat > table th { border-bottom: 1px solid $grey-medium-light; @@ -17,11 +18,13 @@ .stat > .horizontal-list { margin: 0 0 5px; } + .stat > .horizontal-list .item { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } + .stat > .horizontal-list .item:first-child { width: 270px; } diff --git a/p/themes/Ansum/_tables.scss b/p/themes/Ansum/_tables.scss index 608e19aca..2d0311608 100644 --- a/p/themes/Ansum/_tables.scss +++ b/p/themes/Ansum/_tables.scss @@ -7,9 +7,11 @@ tr, th, td { padding: 0.5em; border: 1px solid $grey-medium-light; } + th { background: $grey-lighter; } + form td, form th { font-weight: normal; diff --git a/p/themes/Ansum/_variables.scss b/p/themes/Ansum/_variables.scss index 9fc4238ab..60472019d 100644 --- a/p/themes/Ansum/_variables.scss +++ b/p/themes/Ansum/_variables.scss @@ -15,11 +15,11 @@ $white: #fff; // le blanc (des fois qu'on aurait envie de le teinter un peu) // on essaiera de teinter ces gris suivant la couleur principale $grey-darker: #524236; $grey-dark: #766556; -$grey-medium-dark: #bbaa99; +$grey-medium-dark: #ba9; $grey-medium: #d9ccbf; -$grey-medium-light: #e4d8cc; -$grey-light: #f5f0ec; -$grey-lighter: #fcfaf8; +$grey-medium-light: #e4d8cc; +$grey-light: #f5f0ec; +$grey-lighter: #fcfaf8; $unread-font-color: #161a38; $unread-bg: #f2f6f8; @@ -39,8 +39,8 @@ $success-light: #cffdef; $success-text: #0c7556; // les favoris -$fav-bg: #FFC300; -$fav-light: #FFF6DA; +$fav-bg: #ffc300; +$fav-light: #fff6da; // la couleur de sidebar, utile si on a envie d'un thème qui aurait une sidebar foncé, e.g. $sid-font-color: #363330; // la couleur de fond de la barre de gauche et du header @@ -49,5 +49,5 @@ $sid-bg-alt: #f7f2ea; // le background de l'intérieur des groupes $sid-bg-dark: #efe3d3; // les hovers $sid-sep: #f0e7da; // les séparateurs $sid-active: $main-first; // la couleur active -$sid-active-font: #FFFFFF; // la couleur active +$sid-active-font: #fff; // la couleur active $sid-pills: rgba(35,35,0, 0.15); // les gélules diff --git a/p/themes/Ansum/ansum.css b/p/themes/Ansum/ansum.css index 026ce875b..525e7e079 100644 --- a/p/themes/Ansum/ansum.css +++ b/p/themes/Ansum/ansum.css @@ -46,23 +46,24 @@ font-stretch: normal; font-weight: 700; src: local("Spectral"), url("../fonts/Spectral-BoldItalic.woff") format("woff"); } +/* stylelint-disable property-no-vendor-prefix */ /* FUNCTIONS */ /* btns */ .btn { + margin: 0; + padding: 0.5rem 1.5rem; + background: #fcfaf8; display: inline-block; + color: #766556; + font-size: 1rem; + border: none; + border-radius: 5px; min-height: 38px; min-width: 15px; line-height: 25px; - margin: 0; - padding: 0.5rem 1.5rem; - font-size: 1rem; vertical-align: middle; cursor: pointer; overflow: hidden; - background: #fcfaf8; - border-radius: 5px; - border: none; - color: #766556; -webkit-transition: all 0.15s ease-in-out; -moz-transition: all 0.15s ease-in-out; -o-transition: all 0.15s ease-in-out; @@ -86,10 +87,10 @@ a.btn { /*=== Forms */ legend { - display: inline-block; - width: auto; margin: 2rem 0 1rem 0; padding: 0; + display: inline-block; + width: auto; font-size: 1rem; clear: both; text-transform: uppercase; @@ -107,16 +108,16 @@ textarea { height: 100px; } input, select, textarea, button { - font-family: "lato", "Helvetica", "Arial", sans-serif; - min-height: 25px; padding: 5px 10px; - line-height: 25px; - vertical-align: middle; background: #fff; - border: 1px solid #f5f0ec; - font-size: 1rem; color: #766556; - border-radius: 2px; } + font-family: "lato", "Helvetica", "Arial", sans-serif; + font-size: 1rem; + border: 1px solid #f5f0ec; + border-radius: 2px; + min-height: 25px; + line-height: 25px; + vertical-align: middle; } option { padding: 0 .5em; } @@ -134,11 +135,7 @@ input:disabled, select:disabled { background: #f5f0ec; } input.extend { - transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; } + transition: width 200ms linear; } .form-group { padding: 5px; @@ -193,29 +190,24 @@ form th { /*=== Dropdown */ .dropdown-menu { - background: #fcfaf8; margin: 0; - font-size: 1rem; - text-align: left; padding: 0.5rem 0 1rem 0; + background: #fcfaf8; + font-size: 1rem; border: none; border-radius: 3px; - -webkit-box-shadow: 0px 6px 8px 0px rgba(0, 0, 0, 0.35); - -moz-box-shadow: 0px 6px 8px 0px rgba(0, 0, 0, 0.35); - box-shadow: 0px 6px 8px 0px rgba(0, 0, 0, 0.35); } + box-shadow: 0px 6px 8px 0px rgba(0, 0, 0, 0.35); + text-align: left; } .dropdown-menu::after { + background: white; + width: 10px; + height: 10px; content: ""; position: absolute; top: -4px; right: 13px; - width: 10px; - height: 10px; z-index: -10; - transform: rotate(45deg); - -moz-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); - background: white; } + transform: rotate(45deg); } .dropdown-menu .dropdown-header { margin: 1.75rem 0 0.5rem 2rem; font-weight: bold; @@ -230,9 +222,9 @@ form th { transition: all 0.075s ease-in-out; } .dropdown-menu .item a, .dropdown-menu .item span, .dropdown-menu .item .as-link { padding: 0 2rem; - line-height: 2.5em; + color: #363330; font-size: 1rem; - color: #363330; } + line-height: 2.5em; } .dropdown-menu .item:hover { background: #ca7227; color: #fff; } @@ -240,8 +232,8 @@ form th { text-decoration: none; color: #fff; } .dropdown-menu .item[aria-checked="true"] a::before { - font-weight: bold; - margin: 0 0 0 -14px; } + margin: 0 0 0 -14px; + font-weight: bold; } .dropdown-menu .input select, .dropdown-menu .input input { margin: 0 auto 5px; padding: 2px 5px; @@ -250,20 +242,14 @@ form th { margin: 0.75rem 0; border-bottom: 1px solid #f5f0ec; } -.tree .tree-folder .tree-folder-items .dropdown-menu .item, .tree .tree-folder .tree-folder-items .dropdown-menu .item { padding: 0; } .tree .tree-folder .tree-folder-items .dropdown-menu .item a, - .tree .tree-folder .tree-folder-items .dropdown-menu .item button, - .tree .tree-folder .tree-folder-items .dropdown-menu .item a, .tree .tree-folder .tree-folder-items .dropdown-menu .item button { color: #363330; } .tree .tree-folder .tree-folder-items .dropdown-menu .item a:hover, - .tree .tree-folder .tree-folder-items .dropdown-menu .item button:hover, - .tree .tree-folder .tree-folder-items .dropdown-menu .item a:hover, .tree .tree-folder .tree-folder-items .dropdown-menu .item button:hover { color: #fff; } - .tree .tree-folder .tree-folder-items .dropdown-menu .item:hover, .tree .tree-folder .tree-folder-items .dropdown-menu .item:hover { background: #ca7227; } @@ -271,11 +257,11 @@ form th { .alert { margin: 1rem 0; padding: 1rem; - font-size: 1rem; background: #fcfaf8; + color: #766556; + font-size: 1rem; border: 1px solid #d9ccbf; border-radius: 3px; - color: #766556; text-shadow: 0 0 1px #f5f0ec; } .alert-head { @@ -287,43 +273,43 @@ form th { .alert-warn { background: #fdfde0; - border: 1px solid #73762f33; - color: #73762f; } + color: #73762f; + border: 1px solid #73762f33; } .alert-success { background: #cffdef; - border: 1px solid #0c755633; - color: #0c7556; } + color: #0c7556; + border: 1px solid #0c755633; } .alert-error { background: #fde0d8; - border: 1px solid #73341f33; - color: #73341f; } + color: #73341f; + border: 1px solid #73341f33; } /*=== Pagination */ .pagination { - text-align: center; - font-size: 0.8em; background: #f5f0ec; - color: #363330; } + color: #363330; + font-size: 0.8em; + text-align: center; } .pagination .item.pager-current { - font-weight: bold; - font-size: 1.5em; background: #fbf9f6; - color: #f5f0ec; } + color: #f5f0ec; + font-size: 1.5em; + font-weight: bold; } .pagination .item a { display: block; + color: #363330; font-style: italic; line-height: 3em; - text-decoration: none; - color: #363330; } + text-decoration: none; } .pagination .item a:hover { background: #363330; color: #f5f0ec; } .pagination .loading, .pagination a:hover.loading { - font-size: 0; - background: url("loader.gif") center center no-repeat #34495e; } + background: url("loader.gif") center center no-repeat #34495e; + font-size: 0; } .content .pagination { margin: 0; @@ -331,11 +317,9 @@ form th { /*=== Boxes */ .box { + background: #fff; border: none; border-radius: 3px; - background: #fff; - -webkit-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25); - -moz-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25); box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25); } .box .box-title { margin: 0; @@ -346,18 +330,18 @@ form th { .box .box-title img { margin-right: 0.75rem; } .box .box-title:hover .configure { - visibility: visible; background: url("icons/cog.svg") no-repeat 4px 4px; + display: block; + float: left; width: 1.75rem; height: 1.75rem; - display: block; border-radius: 2px; - float: left; + visibility: visible; margin-right: 0.5rem; } .box .box-title:hover .configure .icon { - vertical-align: middle; + display: none; border-radius: 3px; - display: none; } + vertical-align: middle; } .box .box-title:hover .configure:hover { background: url("icons/cog-white.svg") no-repeat 4px 4px #ca7227; } .box .box-title .configure { @@ -368,33 +352,33 @@ form th { float: right; } .box .box-title form .dropdown a.dropdown-toggle { padding: 0; + border-radius: 0; background-image: url(icons/more.svg); background-repeat: no-repeat; - background-position: right 8px; - border-radius: 0; } + background-position: right 8px; } .box .box-title form .dropdown a.dropdown-toggle img { display: none; } .box .box-content .item { padding: 0.5rem 0.75rem; - font-size: 1rem; color: #363330; - line-height: 1.7em; - border-bottom: 1px solid #f5f0ec; } + font-size: 1rem; + border-bottom: 1px solid #f5f0ec; + line-height: 1.7em; } .box .box-content .item img { margin-right: 0.75rem; } .box .box-content .item .configure { - visibility: hidden; + background: url("icons/cog.svg") no-repeat 4px 4px; + display: block; + float: left; width: 1.75rem; height: 1.75rem; - display: block; border-radius: 2px; - float: left; - margin-right: 0.5rem; - background: url("icons/cog.svg") no-repeat 4px 4px; } + visibility: hidden; + margin-right: 0.5rem; } .box .box-content .item .configure .icon { - vertical-align: middle; + display: none; border-radius: 3px; - display: none; } + vertical-align: middle; } .box .box-content .item .configure:hover { background: url("icons/cog-white.svg") no-repeat 4px 4px #ca7227; } .box .box-content .item:hover .configure { @@ -419,11 +403,11 @@ form th { background: url(icons/tick-white.svg) center no-repeat; } #bigMarkAsRead .bigTick { margin: 0.5rem 0; - display: inline-block; - text-indent: -9999px; background: url(icons/tick-color.svg) center no-repeat; - height: 64px; + display: inline-block; width: 64px; + height: 64px; + text-indent: -9999px; white-space: nowrap; } .formLogin { @@ -439,8 +423,8 @@ form th { .formLogin form#crypto-form div { margin-bottom: 1rem; } .formLogin form#crypto-form div label { - font-size: 1rem; - color: #d9ccbf; } + color: #d9ccbf; + font-size: 1rem; } .formLogin form#crypto-form div input { background: #221f1d; } .formLogin form#crypto-form div input:focus { @@ -467,15 +451,13 @@ form th { scrollbar-color: #36333033 #36333022; } .tree .tree-folder { border-bottom: 1px solid #f0e7da; - -moz-box-shadow: inset -1px -11px 8px #00000033; - -webkit-box-shadow: inset -1px -11px 8px #00000033; - box-shadow: inset -1px -11px 8px #00000033; } + box-shadow: inset -1px -11px 8px #0003; } .tree .tree-folder .tree-folder-title { - position: relative; + padding: 12px 16px; background: #fbf9f6; + position: relative; font-size: 0.85rem; letter-spacing: 1px; - padding: 12px 16px; font-weight: 700; text-transform: uppercase; } .tree .tree-folder .tree-folder-title .title { @@ -504,22 +486,22 @@ form th { .tree .tree-folder .tree-folder-items .item.active .dropdown li a:hover { color: #363330; } .tree .tree-folder .tree-folder-items .item.active a { - color: #FFFFFF; } + color: #fff; } .tree .tree-folder .tree-folder-items .item:hover { background: #efe3d3; } .tree .tree-folder .tree-folder-items .item a { text-decoration: none; color: #363330; } .tree .tree-folder .tree-folder-items .feed .item-title:not([data-unread="0"])::before { - content: attr(data-unread); + margin: 11px 6px 0 4px; + padding: 3px 4px; background: rgba(35, 35, 0, 0.15); - font-size: 0.75rem; display: block; float: left; - padding: 3px 4px; - text-align: center; + font-size: 0.75rem; border-radius: 12px; - margin: 11px 6px 0 4px; + content: attr(data-unread); + text-align: center; line-height: 0.75rem; } /*=== Buttons */ @@ -576,11 +558,11 @@ form th { background: #efe3d3; color: #363330; } .nav-list .item:hover .error a { - color: #363330; - background: #ca7227; } + background: #ca7227; + color: #363330; } .nav-list .item:hover .empty a { - color: #363330; - background: #f4f762; } + background: #f4f762; + color: #363330; } .nav-list .item:hover a { color: #363330; text-decoration: none; } @@ -588,11 +570,11 @@ form th { background: #ca7227; color: #fff; } .nav-list .item.active .error a { - color: #fff; - background: #ca7227; } + background: #ca7227; + color: #fff; } .nav-list .item.active .empty a { - color: #fff; - background: #f4f762; } + background: #f4f762; + color: #fff; } .nav-list .item.active a { color: #fff; text-decoration: none; } @@ -601,7 +583,7 @@ form th { .nav-list .disable { text-align: center; background: #fcfaf8; - color: #bbaa99; } + color: #ba9; } .nav-list .nav-header { padding: 0 10px; font-weight: bold; @@ -625,13 +607,13 @@ form th { /*=== Aside main page (categories) */ .aside_feed .tree-folder-title > .title:not([data-unread="0"])::after { + margin: -0.5rem 1rem 0 0; + padding: 0 0.75rem; + background: rgba(35, 35, 0, 0.15); + border-radius: 12px; position: absolute; right: 0; line-height: 1.5rem; - background: rgba(35, 35, 0, 0.15); - border-radius: 12px; - padding: 0 0.75rem; - margin: -0.5rem 1rem 0 0; text-align: center; } .feed.item.empty.active { @@ -669,16 +651,16 @@ form th { /*===============*/ /*=== Header */ .header { - background: #fbf9f6; padding: 0.5rem 1.35rem; + background: #fbf9f6; display: block; - table-layout: none; - width: auto; } + width: auto; + table-layout: none; } .header .item { vertical-align: middle; } .header .item.title { - font-weight: 400; - width: 280px; } + width: 280px; + font-weight: 400; } .header .item.title h1 a { text-decoration: none; color: #363330; @@ -689,10 +671,10 @@ form th { margin-right: 0.5rem; } .header .item.search input { width: 230px; - border-radius: 2px 0 0 2px; - background-color: #f7f2ea; color: #363330; border: none; + border-radius: 2px 0 0 2px; + background-color: #f7f2ea; -webkit-transition: all 0.15s ease-in-out; -moz-transition: all 0.15s ease-in-out; -o-transition: all 0.15s ease-in-out; @@ -701,16 +683,16 @@ form th { background-color: #efe3d3; } .header .item.search input:focus { width: 350px; - background-color: #fff; - color: #766556; } + color: #766556; + background-color: #fff; } .header .item.search .btn { + width: 3rem; border-radius: 0 2px 2px 0; background-color: #ca7227; background-position: center; background-repeat: no-repeat; background-image: url(icons/magnifier.svg); border-left-width: 0; - width: 3rem; min-height: 35px; } .header .item.search .btn img { display: none; } @@ -723,11 +705,11 @@ form th { top: 1.25rem; text-align: center; } .header .item.configure .btn { + padding: 0 0.5rem; background-color: transparent; background-position: center; background-repeat: no-repeat; - background-image: url(icons/cog.svg); - padding: 0 0.5rem; } + background-image: url(icons/cog.svg); } .header .item.configure .btn img { display: none; } @@ -755,9 +737,9 @@ form th { /*=== New article notification */ #new-article { - text-align: center; + background: #ca7227; font-size: 1rem; - background: #ca7227; } + text-align: center; } #new-article:hover { background: #b7641d; } @@ -773,16 +755,16 @@ form th { /*=== Day indication */ .day { padding: 1rem 0 0 1.25rem; + color: #6d655f; + font-size: 0.875rem; font-weight: 700; line-height: 3em; letter-spacing: 1px; - text-transform: uppercase; - font-size: 0.875rem; - color: #6d655f; } + text-transform: uppercase; } .day .name { padding: 0 1rem 0 1rem; - font-size: 0.875rem; color: #363330; + font-size: 0.875rem; position: relative; left: 0; text-transform: uppercase; } @@ -834,9 +816,9 @@ form th { .nav_menu .stick .btn#toggle-non-starred.active { background-image: url(icons/non-starred-white.svg); } .nav_menu .stick .btn.read_all { - background-color: #fcfaf8; - color: #363330; padding: 5px 16px; + color: #363330; + background-color: #fcfaf8; -webkit-transition: all 0.15s ease-in-out; -moz-transition: all 0.15s ease-in-out; -o-transition: all 0.15s ease-in-out; @@ -863,7 +845,7 @@ form th { #dropdown-query ~ .dropdown-menu .dropdown-header .icon { vertical-align: middle; - background-color: #bbaa99; + background-color: #ba9; border-radius: 3px; } /*=== Content of feed articles */ @@ -873,21 +855,21 @@ form th { line-height: 1.8rem; } .content h1.title a, .content h1 a, .content.thin h1.title a, .content.thin h1 a { color: #363330; - font-family: "spectral"; + font-family: "spectral", serif; font-size: 2rem; } .content h1.title a:hover, .content h1 a:hover, .content.thin h1.title a:hover, .content.thin h1 a:hover { color: #ca7227; text-decoration: none; } .content .author, .content.thin .author { - font-size: 1.125rem; - color: #6d655f; } + color: #6d655f; + font-size: 1.125rem; } .content p, .content ul, .content.thin p, .content.thin ul { font-size: 1.125rem; line-height: 1.8rem; } .content .content hr, .content.thin .content hr { margin: 30px 10px; - height: 1px; background: #e4d8cc; + height: 1px; border: 0; box-shadow: 0 2px 5px #ccc; } .content pre, .content.thin pre { @@ -904,42 +886,42 @@ form th { border: none; } .content code, .content.thin code { padding: 2px 5px; - color: #f5f0ec; background: #fcfaf8; + color: #f5f0ec; border: 1px solid #f5f0ec; border-radius: 3px; } .content blockquote, .content.thin blockquote { - display: block; margin: 0; padding: 5px 20px; - border-top: 1px solid #e4d8cc; - border-bottom: 1px solid #e4d8cc; background: #fcfaf8; - color: #363330; } + display: block; + color: #363330; + border-top: 1px solid #e4d8cc; + border-bottom: 1px solid #e4d8cc; } .content blockquote p, .content.thin blockquote p { margin: 0; } /*=== Notification and actualize notification */ .notification { + padding: 1rem 0; + background: #e4d8cc; + width: 100%; + height: 3rem; + color: #766556; + font-size: 1em; + border: none; position: fixed; top: auto; bottom: 0; left: 0; right: 0; - width: 100%; - height: 3rem; - padding: 1rem 0; text-align: center; - font-size: 1em; line-height: 3em; z-index: 10; - vertical-align: middle; - background: #e4d8cc; - color: #766556; - border: none; } + vertical-align: middle; } .notification .msg { - font-size: 1rem; - display: inline-block; } + display: inline-block; + font-size: 1rem; } .notification.good { background: #10f5b2; color: #fff; } @@ -948,8 +930,8 @@ form th { color: #fff; } .notification a.close { padding: 0 15px; - line-height: 3em; - border-radius: 0 3px 3px 0; } + border-radius: 0 3px 3px 0; + line-height: 3em; } .notification.good a.close:hover { background: #0c7556; } .notification.bad a.close:hover { @@ -979,8 +961,8 @@ form th { .flux:hover:not(.current):hover .item.title { background: #fcfaf8; } .flux.current { - border-left-color: #ca7227; - background: #fff; } + background: #fff; + border-left-color: #ca7227; } .flux.not_read { background: #f2f6f8; } .flux.not_read:hover { @@ -994,22 +976,22 @@ form th { .flux.not_read .item.date { color: #161a3899; } .flux.favorite { - background: #FFF6DA; - border-left-color: #FFC300; + background: #fff6da; + border-left-color: #ffc300; -webkit-transition: all 0.15s ease-in-out; -moz-transition: all 0.15s ease-in-out; -o-transition: all 0.15s ease-in-out; transition: all 0.15s ease-in-out; } .flux.favorite:not(.current):hover .item.title { - background: #FFF6DA; } + background: #fff6da; } .flux .website a { color: #363330; opacity: 0.75; } .flux .website .favicon { padding: 5px; } .flux .date { - font-size: 0.85rem; color: #363330; + font-size: 0.85rem; opacity: 0.75; } .flux .bottom { font-size: 1rem; @@ -1027,33 +1009,33 @@ form th { #stream .box.category:not([data-unread="0"]) .box-title .title { font-weight: bold; } #stream .box.category .box-title { - background: none; - padding: 1.5rem; } + padding: 1.5rem; + background: none; } #stream .box.category .box-title a.title { + color: #766556; + font-size: 1rem; font-weight: normal; text-decoration: none; text-align: left; - font-size: 1rem; text-transform: uppercase; - letter-spacing: 1px; - color: #766556; } + letter-spacing: 1px; } #stream .box.category .box-title a.title:not([data-unread="0"])::after { + margin: -0.5rem 1rem 0 0; + padding: 0 0.75rem; + background: #f5f0ec; + border-radius: 12px; position: absolute; top: 1.75rem; right: 0; line-height: 1.5rem; - background: #f5f0ec; - border-radius: 12px; - padding: 0 0.75rem; - margin: -0.5rem 1rem 0 0; text-align: center; } #stream .box.category .box-title a.title:hover { color: #ca7227; } #stream .box.category .box-content { padding-bottom: 0.5rem; } #stream .box.category .box-content .item.feed { - font-size: 1rem; - padding: 0.5rem 1.5rem; } + padding: 0.5rem 1.5rem; + font-size: 1rem; } #stream .box.category .box-content .item.feed a { color: #363330; font-weight: 400; } @@ -1081,8 +1063,8 @@ form th { #stream.reader .flux .author { margin: 0 0 10px; - font-size: 90%; - color: #bbaa99; } + color: #ba9; + font-size: 90%; } /*=== Configuration pages */ .post { @@ -1095,42 +1077,40 @@ form th { .post.content { max-width: 550px; } .post h1, .post h2 { + color: #363330; font-size: 3rem; margin-top: 1.75rem; font-weight: 300; - line-height: 1.2em; - color: #363330; } + line-height: 1.2em; } .post a[href="./"] { - display: inline-block; - min-width: 15px; - line-height: 25px; margin: 0; padding: 0.75rem 1.5rem; - font-size: 1rem; - vertical-align: middle; - cursor: pointer; - overflow: hidden; background: #fcfaf8; + display: inline-block; + color: #766556; + font-size: 1rem; border: 1px solid #e4d8cc; border-radius: 5px; - color: #766556; } + min-width: 15px; + line-height: 25px; + vertical-align: middle; + cursor: pointer; + overflow: hidden; } .post a[href="./"]:hover { - text-decoration: none; background: #ca7227; color: white; - border: 1px solid #ca7227; } + border: 1px solid #ca7227; + text-decoration: none; } #slider { border-left: none; - -webkit-box-shadow: 0px 6px 8px 0px rgba(0, 0, 0, 0.35); - -moz-box-shadow: 0px 6px 8px 0px rgba(0, 0, 0, 0.35); box-shadow: 0px 6px 8px 0px rgba(0, 0, 0, 0.35); } .slide-container .properties { - background: rgba(0, 0, 0, 0.75); - border: 0; padding: 1rem; - color: white; } + background: rgba(0, 0, 0, 0.75); + color: white; + border: 0; } .slide-container .properties .page-number { right: 1rem; top: 1rem; } @@ -1139,15 +1119,15 @@ form th { /*=========*/ .loglist { overflow: hidden; - border: 1px solid #bbaa99; } + border: 1px solid #ba9; } .log { margin: 10px 0; padding: 5px 2%; - overflow: auto; - font-size: 0.8rem; background: #fcfaf8; - color: #766556; } + color: #766556; + font-size: 0.8rem; + overflow: auto; } .log > .date { margin: 0 10px 0 0; @@ -1201,11 +1181,11 @@ form th { ul.nav .item img { display: none; } ul.nav .item a { - display: inline-block; padding: 1rem 1rem 1rem 2.5rem; - color: #363330; - width: 100%; background: url("../../themes/icons/logout.svg") no-repeat #efe3d3 3% center; + display: inline-block; + width: 100%; + color: #363330; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; @@ -1227,12 +1207,12 @@ form th { .aside .toggle_aside, #panel .close { + background: #b7641d; display: block; width: 100%; height: 50px; line-height: 50px; - text-align: center; - background: #b7641d; } + text-align: center; } .header { padding: 0.5rem; } @@ -1268,7 +1248,7 @@ form th { .nav_menu .search .input { max-width: 97%; width: 90px; } - .nav_menu .search .input::focus { + .nav_menu .search .input:focus { width: 400px; } #stream .flux .flux_header { @@ -1278,8 +1258,8 @@ form th { text-align: center; padding: 1rem 0; } .day .name { - display: block; padding: 0; + display: block; width: 100%; line-height: 1.5rem; margin-bottom: 1rem; } @@ -1293,22 +1273,20 @@ form th { .notification { border-radius: 0; } .notification a.close { + background: transparent; display: block; - left: 0; - background: transparent; } + left: 0; } .notification a.close:hover { opacity: 0.5; } .notification a.close .icon { display: none; } } -html, body { - font-family: "lato", "Helvetica", "Arial", sans-serif; - font-size: 0.875rem; } - /*=== GENERAL */ /*============*/ html, body { + background: #f5f0ec; height: 100%; - background: #f5f0ec; } + font-family: "lato", "Helvetica", "Arial", sans-serif; + font-size: 0.875rem; } /*=== Links */ a, button.as-link { diff --git a/p/themes/Ansum/ansum.css.map b/p/themes/Ansum/ansum.css.map deleted file mode 100644 index 40e796955..000000000 --- a/p/themes/Ansum/ansum.css.map +++ /dev/null @@ -1,7 +0,0 @@ -{ -"version": 3, -"mappings": "AAAA,UAMC;EALG,WAAW,EAAE,MAAM;EACnB,UAAU,EAAE,MAAM;EAClB,YAAY,EAAE,MAAM;EACpB,WAAW,EAAE,GAAG;EAChB,GAAG,EAAE,oEAAoE;AAE7E,UAMC;EALG,WAAW,EAAE,MAAM;EACnB,UAAU,EAAE,MAAM;EAClB,YAAY,EAAE,MAAM;EACpB,WAAW,EAAE,GAAG;EAChB,GAAG,EAAE,mEAAmE;AAE5E,UAMC;EALG,WAAW,EAAE,MAAM;EACnB,UAAU,EAAE,MAAM;EAClB,YAAY,EAAE,MAAM;EACpB,WAA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AAI;MAEX,+BAAQ;QACL,KAAK,EAAE,KAAK;;EAOZ,0BAAY;IACf,OAAO,EAAE,QAAQ;;EAOf,IAAI;IACP,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAM;IACf,UAAM;MAEF,OAAO,EAAE,KAAK;MACd,OAAO,EAAE,CAAC;MACV,KAAK,EAAE,IAAI;MACX,WAAW,EAAE,MAAM;MACnB,aAAa,EAAE,IAAI;;EAKpB,WAAY;IACf,MAAM,EAAE,SAAS;;EAGd,YAAY;IACf,WAAW,EAAE,MAAM;;EAGhB,aAAc;IACjB,aAAa,EAAE,CAAC;IAEhB,qBAAQ;MACJ,OAAO,EAAE,KAAK;MACd,IAAI,EAAE,CAAC;MACP,UAAU,EAAE,WAAW;IAE3B,2BAAc;MACV,OAAO,EAAE,GAAG;IAEhB,2BAAc;MACV,OAAO,EAAE,IAAI;AC9IlB,UAAU;EACN,WAAW,EAAE,wCAAwC;EACrD,SAAS,EAAE,QAAQ;;AAKvB,gBAAgB;AAChB,gBAAgB;AAChB,UAAW;EACV,MAAM,EAAE,IAAI;EACZ,UAAU,EbdE,OAAO;;AaiBpB,cAAc;AACd,iBAAkB;EACd,OAAO,EAAE,IAAI;EACb,KAAK,EbUI,OAAW", -"sources": ["_fonts.scss","_mixins.scss","_forms.scss","_variables.scss","_tables.scss","_components.scss","_divers.scss","_sidebar.scss","_layout.scss","_list-view.scss","_global-view.scss","_reader-view.scss","_configuration.scss","_logs.scss","_stats.scss","_mobile.scss","ansum.scss"], -"names": [], -"file": "ansum.css" -} diff --git a/p/themes/Ansum/ansum.scss b/p/themes/Ansum/ansum.scss index 1a538b50a..337cc5f97 100644 --- a/p/themes/Ansum/ansum.scss +++ b/p/themes/Ansum/ansum.scss @@ -1,51 +1,48 @@ @import "fonts"; + @import "mixins"; + @import "variables"; @import "forms"; + @import "tables"; + @import "components"; @import "divers"; @import "sidebar"; + @import "layout"; + @import "list-view"; + @import "global-view"; + @import "reader-view"; @import "configuration"; @import "logs"; + @import "stats"; @import "mobile"; -html, body{ - font-family: "lato", "Helvetica", "Arial", sans-serif; - font-size: 0.875rem; -} - @charset "UTF-8"; /*=== GENERAL */ /*============*/ html, body { - height: 100%; background: $grey-light; + height: 100%; + font-family: "lato", "Helvetica", "Arial", sans-serif; + font-size: 0.875rem; } /*=== Links */ a, button.as-link { - outline: none; - color: $main-first; + outline: none; + color: $main-first; } - - - - - - - - - diff --git a/p/themes/BlueLagoon/BlueLagoon.css b/p/themes/BlueLagoon/BlueLagoon.css index 93c0ba213..7e9fdf40a 100644 --- a/p/themes/BlueLagoon/BlueLagoon.css +++ b/p/themes/BlueLagoon/BlueLagoon.css @@ -3,72 +3,77 @@ /*=== GENERAL */ /*============*/ html, body { + background: #fafafa; height: 100%; font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", "PingFang SC", "Microsoft YaHei", sans-serif; - background: #fafafa; font-size: 92%; } /*=== Links */ a, button.as-link { - color: #0062BE; + color: #0062be; outline: none; } /*=== Forms */ -.form-group{ - width: 100%; +.form-group { + display: inline-block; float: left; + width: 100%; height: auto; - display: inline-block; } + legend { margin: 20px 0 5px; padding: 5px 0; - border-bottom: 1px solid #ddd; font-size: 1.4em; + border-bottom: 1px solid #ddd; } + label { min-height: 25px; padding: 5px 0; cursor: pointer; } + textarea { width: 360px; height: 100px; } + input, select, textarea { - min-height: 25px; padding: 5px; background: #fff; + color: #222; border: 1px solid #ccc; border-radius: 3px; - color: #222; + box-shadow: 0 1px 2px #ccc inset, 0 1px #fff; + min-height: 25px; line-height: 25px; vertical-align: middle; - box-shadow: 0 1px 2px #ccc inset, 0 1px #fff; } + option { padding: 0 .5em; } + input:focus, select:focus, textarea:focus { - color: #0F0F0F; - box-shadow: 0 0 3px #0062BF; - border: solid 1px #0062BF; + color: #0f0f0f; + border: solid 1px #0062bf; + box-shadow: 0 0 3px #0062bf; } + input:invalid, select:invalid { border-color: #f00; box-shadow: 0 0 2px 2px #fdd inset; } + input:disabled, select:disabled { background: #eee; } + input.extend { transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; } /*=== Tables */ @@ -80,9 +85,11 @@ tr, th, td { padding: 0.5em; border: 1px solid #ddd; } + th { background: #f6f6f6; } + form td, form th { font-weight: normal; @@ -97,49 +104,60 @@ form th { background: #f4f4f4; border-top: 1px solid #ddd; } + .form-group.form-actions .btn { margin: 0 10px; border-radius: 4px; - box-shadow:0 1px rgba(255,255,255,0.08) inset; + box-shadow: 0 1px rgba(255,255,255,0.08) inset; } + .form-group .group-name { padding: 10px 0; text-align: right; } + .form-group .group-controls { min-height: 25px; padding: 5px 0; } + .form-group table { margin: 10px 0 0 220px; } /*=== Buttons */ button.as-link[disabled] { - color:#555 !important; + color: #555 !important; } .dropdown-menu .input select, .dropdown-menu .input input { - background:#444; - color:#fff; - box-shadow:0 2px 2px #222 inset, 0px 1px rgba(255, 255, 255, 0.08); - border:solid 1px #171717; + margin: 0 auto 5px; + padding: 2px 5px; + background: #444; + color: #fff; + border: solid 1px #171717; + border-radius: 3px; + box-shadow: 0 2px 2px #222 inset, 0px 1px rgba(255, 255, 255, 0.08); } .stick { vertical-align: middle; font-size: 0; } + .stick input, .stick .btn { border-radius: 0; } + .stick .btn:first-child,.stick input:first-child { border-radius: 6px 0 0 6px; } + .stick .btn:last-child, .stick input:last-child { border-radius: 0 6px 6px 0; } + .stick .btn + .btn, .stick .btn + input, .stick .btn + .dropdown > .btn, @@ -151,103 +169,113 @@ button.as-link[disabled] { .stick .dropdown + .dropdown > .btn { border-left: none; } + .stick .btn + .dropdown > .btn { border-left: none; border-radius: 0 3px 3px 0; } .btn { - display: inline-block; - min-height: 37px; - min-width: 15px; margin: 0; padding: 5px 10px; - color:#222; + background: linear-gradient(0deg, #ede7de 0%, #fff 100%) #ede7de; + background: -webkit-linear-gradient(bottom, #ede7de 0%, #fff 100%); + display: inline-block; + color: #222; + font-size: 0.9rem; border: solid 1px #ccc; border-radius: 4px; - background: linear-gradient(0deg, #EDE7DE 0%, #FFF 100%) #EDE7DE; - background: -webkit-linear-gradient(bottom, #EDE7DE 0%, #FFF 100%); + min-height: 37px; + min-width: 15px; text-shadow: 0px -1px rgba(255,255,255,0.08); - font-size: 0.9rem; vertical-align: middle; cursor: pointer; overflow: hidden; } + a.btn { min-height: 25px; line-height: 25px; } + .btn:hover { text-shadow: 0 0 2px #fff; - text-decoration:none; + text-decoration: none; } + .btn.active,.btn:active,.dropdown-target:target ~ .btn.dropdown-toggle { - background: linear-gradient(180deg, #EDE7DE 0%, #FFF 100%) #EDE7DE; - background: -webkit-linear-gradient(top, #EDE7DE 0%, #FFF 100%); + background: linear-gradient(180deg, #ede7de 0%, #fff 100%) #ede7de; + background: -webkit-linear-gradient(top, #ede7de 0%, #fff 100%); } -.nav_menu .btn.active, .nav_menu .btn:active, .nav_menu .dropdown-target:target ~ .btn.dropdown-toggle{ - box-shadow: 0 1px #fff; - border-radius: 4px; - background: linear-gradient(180deg, #EDE7DE 0%, #F6F6F6 100%) #EDE7DE; - background: -webkit-linear-gradient(top, #EDE7DE 0%, #F6F6F6 100%); +.nav_menu .btn.active, .nav_menu .btn:active, .nav_menu .dropdown-target:target ~ .btn.dropdown-toggle { + background: linear-gradient(180deg, #ede7de 0%, #f6f6f6 100%) #ede7de; + background: -webkit-linear-gradient(top, #ede7de 0%, #f6f6f6 100%); border: solid 1px #ccc; + border-radius: 4px; + box-shadow: 0 1px #fff; } + .nav_menu .btn { + background: transparent; border: 0; - background:transparent; } .read_all { - color:#222; + color: #222; } -.btn.dropdown-toggle[href="#dropdown-configure"]{ - background: linear-gradient(0deg, #EDE7DE 0%, #FFF 100%) #EDE7DE; - background: -webkit-linear-gradient(bottom, #EDE7DE 0%, #FFF 100%); - border-radius: 4px; + +.btn.dropdown-toggle[href="#dropdown-configure"] { + background: linear-gradient(0deg, #ede7de 0%, #fff 100%) #ede7de; + background: -webkit-linear-gradient(bottom, #ede7de 0%, #fff 100%); border: solid 1px #ccc; + border-radius: 4px; box-shadow: 0 1px #fff; } + .btn.dropdown-toggle:active { - background:transparent; + background: transparent; } + .btn-important { - background: linear-gradient(180deg, #0090FF 0%, #0062BE 100%) #E4992C; - background: -webkit-linear-gradient(top, #0090FF 0%, #0062BE 100%); - color: #FFF; - box-shadow: 0 1px rgba(255,255,255,0.08) inset; + background: linear-gradient(180deg, #0090ff 0%, #0062be 100%) #e4992c; + background: -webkit-linear-gradient(top, #0090ff 0%, #0062be 100%); + color: #fff; border-radius: 4px; + box-shadow: 0 1px rgba(255,255,255,0.08) inset; text-shadow: 0px -1px rgba(255,255,255,0.08); font-weight: normal; } -.btn-important:hover { -} + .btn-important:active { - background: linear-gradient(0deg, #E4992C 0%, #D18114 100%) #E4992C; - background: -webkit-linear-gradient(bottom, #E4992C 0%, #D18114 100%); + background: linear-gradient(0deg, #e4992c 0%, #d18114 100%) #e4992c; + background: -webkit-linear-gradient(bottom, #e4992c 0%, #d18114 100%); } .btn-attention { - background: #E95B57; - background: linear-gradient(to bottom, #E95B57, #BD362F); - background: -webkit-linear-gradient(top, #E95B57 0%, #BD362F 100%); + background: #e95b57; + background: linear-gradient(to bottom, #e95b57, #bd362f); + background: -webkit-linear-gradient(top, #e95b57 0%, #bd362f 100%); color: #fff; - border: 1px solid #C44742; + border: 1px solid #c44742; text-shadow: 0px -1px 0px #666; } + .btn-attention:hover { - background: linear-gradient(to bottom, #D14641, #BD362F); - background: -webkit-linear-gradient(top, #D14641 0%, #BD362F 100%); + background: linear-gradient(to bottom, #d14641, #bd362f); + background: -webkit-linear-gradient(top, #d14641 0%, #bd362f 100%); } + .btn-attention:active { - background: #BD362F; + background: #bd362f; box-shadow: none; } -.btn[type="reset"]{ + +.btn[type="reset"] { + background: linear-gradient(180deg, #222 0%, #171717 100%) #171717; + background: -webkit-linear-gradient(top, #222 0%, #171717 100%); color: #fff; - background:linear-gradient(180deg, #222 0%, #171717 100%) #171717; - background: -webkit-linear-gradient(top, #222 0%, #171717 100%); - box-shadow:0 -1px rgba(255,255,255,0.08) inset; + box-shadow: 0 -1px rgba(255,255,255,0.08) inset; } /*=== Navigation */ .nav-list .nav-header, @@ -256,55 +284,64 @@ a.btn { line-height: 2.5em; font-size: 0.9rem; } + .nav-list .item:hover { text-shadow: 0 0 2px rgba(255,255,255,0.28); - color:#fff; + color: #fff; } .nav-list .item.active { - background: linear-gradient(180deg, #0090FF 0%, #0062BE 100%) #E4992C; - background: -webkit-linear-gradient(top, #0090FF 0%, #0062BE 100%); + margin: 0; + background: linear-gradient(180deg, #0090ff 0%, #0062be 100%) #e4992c; + background: -webkit-linear-gradient(top, #0090ff 0%, #0062be 100%); + box-shadow: -1px 2px 2px #171717, 0px 1px rgba(255, 255, 255, 0.08) inset; border-width: medium medium 1px; border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color #171717; - box-shadow: -1px 2px 2px #171717, 0px 1px rgba(255, 255, 255, 0.08) inset; - margin: 0; } + .nav-list .item.active a { color: #fff; } + .nav-list .disable { - color: #aaa; background: #fafafa; + color: #aaa; text-align: center; } + .nav-list .item > a { padding: 0 10px; - color:#ccc; + color: #ccc; } + .nav-list a:hover { text-decoration: none; } + .nav-list .item.empty a { color: #f39c12; } + .nav-list .item.active.empty a { + background: linear-gradient(180deg, #e4992c 0%, #d18114 100%) #e4992c; + background: -webkit-linear-gradient(180deg, #e4992c 0%, #d18114 100%); color: #fff; - background: linear-gradient(180deg, #E4992C 0%, #D18114 100%) #E4992C; - background: -webkit-linear-gradient(180deg, #E4992C 0%, #D18114 100%); } + .nav-list .item.error a { - color: #BD362F; + color: #bd362f; } + .nav-list .item.active.error a { + background: #bd362f; color: #fff; - background: #BD362F; } .nav-list .nav-header { padding: 0 10px; - color: #222; background: transparent; + color: #222; } .nav-list .nav-form { @@ -314,10 +351,11 @@ a.btn { .nav-head { margin: 0; - background: linear-gradient(0deg, #EDE7DE 0%, #FFF 100%) #EDE7DE; - background: -webkit-linear-gradient(bottom, #EDE7DE 0%, #FFF 100%); + background: linear-gradient(0deg, #ede7de 0%, #fff 100%) #ede7de; + background: -webkit-linear-gradient(bottom, #ede7de 0%, #fff 100%); text-align: right; } + .nav-head .item { padding: 5px 10px; font-size: 0.9rem; @@ -329,6 +367,7 @@ a.btn { margin: 0; padding: 0; } + .horizontal-list .item { vertical-align: middle; } @@ -337,32 +376,32 @@ a.btn { .dropdown-menu { margin: 5px 0 0; padding: 5px 0; + background: #222; + font-size: 0.8rem; border: 1px solid #171717; border-radius: 4px; box-shadow: 0 0 3px #000; - font-size: 0.8rem; text-align: left; - background: #222; } + .dropdown-menu::after { - content: ""; - position: absolute; - top: -6px; - right: 13px; + background: #222; width: 10px; height: 10px; - background: #222; border-top: 1px solid #171717; border-left: 1px solid #171717; + content: ""; + position: absolute; + top: -6px; + right: 13px; z-index: -10; transform: rotate(45deg); - -moz-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); } + .dropdown-header { - display:none; + display: none; } + .dropdown-menu > .item > a, .dropdown-menu > .item > span, .dropdown-menu > .item > .as-link { @@ -371,28 +410,26 @@ a.btn { color: #ccc; font-size: 0.8rem; } + .dropdown-menu > .item > label { color: #ccc; } + .dropdown-menu > .item:hover { - background: linear-gradient(180deg, #0090FF 0%, #0062BE 100%) #E4992C; - background: -webkit-linear-gradient(top, #0090FF 0%, #0062BE 100%); + background: linear-gradient(180deg, #0090ff 0%, #0062be 100%) #e4992c; + background: -webkit-linear-gradient(top, #0090ff 0%, #0062be 100%); color: #fff; } + .dropdown-menu > .item[aria-checked="true"] > a::before { font-weight: bold; margin: 0 0 0 -14px; } + .dropdown-menu > .item:hover > a { color: #fff; text-decoration: none; } -.dropdown-menu .input select, -.dropdown-menu .input input { - margin: 0 auto 5px; - padding: 2px 5px; - border-radius: 3px; -} .separator { margin: 5px 0; @@ -405,35 +442,40 @@ a.btn { margin: 15px auto; padding: 10px 15px; background: #f4f4f4; + color: #aaa; + font-size: 0.9em; border: 1px solid #ccc; border-right: 1px solid #aaa; border-bottom: 1px solid #aaa; border-radius: 5px; - color: #aaa; text-shadow: 0 0 1px #eee; - font-size: 0.9em; } + .alert-head { font-size: 1.15em; } + .alert > a { color: inherit; text-decoration: underline; } + .alert-warn { background: #ffe; - border: 1px solid #eeb; color: #c95; + border: 1px solid #eeb; } + .alert-success { background: #dfd; - border: 1px solid #cec; color: #484; + border: 1px solid #cec; } + .alert-error { background: #fdd; - border: 1px solid #ecc; color: #844; + border: 1px solid #ecc; } /*=== Pagination */ @@ -443,14 +485,17 @@ a.btn { color: #333; font-size: 0.8em; } + .content .pagination { margin: 0; padding: 0; } + .pagination .item.pager-current { font-weight: bold; font-size: 1.5em; } + .pagination .item a { display: block; color: #333; @@ -458,12 +503,15 @@ a.btn { line-height: 3em; text-decoration: none; } + .pagination .item a:hover { background: #ddd; } + .pagination:first-child .item { border-bottom: 1px solid #aaa; } + .pagination:last-child .item { border-top: 1px solid #ddd; } @@ -471,28 +519,30 @@ a.btn { .pagination .loading, .pagination a:hover.loading { background: url("loader.gif") center center no-repeat #fff; - font-size: 0; - height:55px + height: 55px; + font-size: 0 } /*=== Boxes */ .box { - background: #F9F7F4; + background: #f9f7f4; border-radius: 4px; box-shadow: 0 1px #fff; } + .box .box-title { margin: 0; padding: 5px 10px; - background: linear-gradient(0deg, #EDE7DE 0%, #fff 100%) #171717; - background: -webkit-linear-gradient(bottom, #EDE7DE 0%, #fff 100%); - box-shadow: 0px -1px #fff inset,0 -2px #ccc inset; + background: linear-gradient(0deg, #ede7de 0%, #fff 100%) #171717; + background: -webkit-linear-gradient(bottom, #ede7de 0%, #fff 100%); color: #888; - text-shadow: 0 1px #ccc; - border-radius: 4px 4px 0 0; font-size: 1.1rem; + border-radius: 4px 4px 0 0; + box-shadow: 0px -1px #fff inset,0 -2px #ccc inset; + text-shadow: 0 1px #ccc; font-weight: normal; } + .box .box-content { max-height: 260px; } @@ -507,6 +557,7 @@ a.btn { .box .box-content .item .configure { visibility: hidden; } + .box .box-title:hover .configure, .box .box-content .item:hover .configure { visibility: visible; @@ -516,54 +567,64 @@ a.btn { .tree { margin: 10px 0; } + .tree-folder-title { position: relative; padding: 0 10px; line-height: 2.5rem; font-size: 0.9rem; } + .tree-folder-title .title { background: inherit; color: #fff; } + .tree-folder-title .title:hover { text-decoration: none; } + .tree-folder.active .tree-folder-title { background: linear-gradient(180deg, #222 0%, #171717 100%) #171717; background: -webkit-linear-gradient(top, #222 0%, #171717 100%); + color: #fff; box-shadow: 0px 1px #171717, 0px 1px rgba(255, 255, 255, 0.08) inset; text-shadow: 0 0 2px rgba(255,255,255,0.28); - color: #fff; } -.tree-folder.active > .tree-folder-title > a.title{ - color: #0090FF; + +.tree-folder.active > .tree-folder-title > a.title { + color: #0090ff; text-shadow: 0 1px rgba(255,255,255,0.08); } + .tree-folder-items { - background: #171717; - padding: 8px 0; + padding: 8px 0; + background: #171717; box-shadow: 0 4px 4px #171717 inset, 0 1px rgba(255,255,255,0.08),0 -1px rgba(255,255,255,0.08); } + .tree-folder-items > .item { padding: 0 10px; line-height: 2.5rem; font-size: 0.8rem; } + .tree-folder-items > .item.active { + margin: 0px 8px; background: linear-gradient(180deg, #222 0%, #171717 100%) #171717; background: -webkit-linear-gradient(top, #222 0%, #171717 100%); border-radius: 4px; - margin: 0px 8px; box-shadow: 0px 1px #171717, 0px 1px rgba(255, 255, 255, 0.08) inset, 0 2px 2px #111; } + .tree-folder-items > .item > a { text-decoration: none; color: #fff; font-size: 0.92em; } + .tree-folder-items > .item.active > a { - color: #0090FF + color: #0090ff } /*=== Scrollbar */ @@ -572,14 +633,17 @@ a.btn { #sidebar { scrollbar-color: rgba(255, 255, 255, 0.05) rgba(0, 0, 0, 0.0); } + #sidebar:hover { scrollbar-color: rgba(255, 255, 255, 0.3) rgba(0, 0, 0, 0.0); } } + @supports not (scrollbar-width: thin) { #sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); } + #sidebar:hover::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); } @@ -589,54 +653,64 @@ a.btn { /*===============*/ /*=== Header */ .header { - background: linear-gradient(0deg, #EDE7DE 0%, #FFF 100%) #EDE7DE; - background: -webkit-linear-gradient(bottom, #EDE7DE 0%, #FFF 100%); - border-bottom: solid 1px #BDB7AE; + background: linear-gradient(0deg, #ede7de 0%, #fff 100%) #ede7de; + background: -webkit-linear-gradient(bottom, #ede7de 0%, #fff 100%); + border-bottom: solid 1px #bdb7ae; box-shadow: 0 -1px rgba(255,255,255,0.28) inset; } + .header > .item { padding: 0; vertical-align: middle; text-align: center; } + .header > .item.title .logo { - height: 40px; width: 40px; + height: 40px; } -.header > .item.title{ + +.header > .item.title { width: 250px; } + .header > .item.title h1 { margin: 10px 0; } + .header > .item.title h1 a { - text-decoration: none; + color: #222; font-size: 28px; - color:#222; + text-decoration: none; text-shadow: 0 1px #fff; } + .header > .item.search input { width: 230px; } + .header .item.search input:focus { width: 350px; } /*=== Body */ #global { - background:#F9F7F4; + background: #f9f7f4; /* Header : 60px + 1px border bottom */ height: calc(100% - 61px); } + .aside { - box-shadow: 0 2px 2px #171717 inset; background: #222; width: 235px; + box-shadow: 0 2px 2px #171717 inset; } + .aside.aside_feed { padding: 10px 0; text-align: center; } + .aside.aside_feed .tree { margin: 10px 0 50px; } @@ -649,6 +723,7 @@ a.btn { color: #fff; text-shadow: 0 1px rgba(255,255,255,0.08); } + .aside_feed .btn-important { border: none; } @@ -658,13 +733,16 @@ a.btn { .feed.item.empty > a { color: #e67e22; } + .feed.item.error, .feed.item.error > a { - color: #BD362F; + color: #bd362f; } + .aside_feed .tree-folder-items .dropdown-menu::after { left: 2px; } + .aside_feed .tree-folder-items .item .dropdown-target:target ~ .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item:hover .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item.active .dropdown-toggle > .icon { @@ -676,9 +754,11 @@ a.btn { padding: 10px 50px; font-size: 0.9em; } + .post form { margin: 10px 0; } + .post.content { max-width: 550px; } @@ -689,44 +769,53 @@ a.btn { padding: 14px 0px; text-shadow: 0 1px rgba(255,255,255,0.08); } + .prompt label { text-align: left; } + .prompt form { margin: 10px auto 20px auto; width: 180px; } + .prompt input { margin: 5px auto; width: 100%; } + .prompt p { margin: 20px 0; } -.prompt input#username,.prompt input#passwordPlain{ - border:solid 1px #ccc; + +.prompt input#username,.prompt input#passwordPlain { + background: #fff; + border: solid 1px #ccc; box-shadow: 0 4px -4px #ccc inset,0px 1px rgba(255, 255, 255, 0.08); - background:#fff; } -.prompt input#username:focus,.prompt input#passwordPlain:focus{ - border: solid 1px #0062BE; - box-shadow: 0 0 3px #0062BE; + +.prompt input#username:focus,.prompt input#passwordPlain:focus { + border: solid 1px #0062be; + box-shadow: 0 0 3px #0062be; } /*=== New article notification */ #new-article { - background: #0084CC; + background: #0084cc; text-align: center; font-size: 0.9em; } + #new-article:hover { - background: #0066CC; + background: #06c; } + #new-article > a { line-height: 3em; color: #fff; font-weight: bold; } + #new-article > a:hover { text-decoration: none; } @@ -734,110 +823,131 @@ a.btn { /*=== Day indication */ .day { padding: 0 10px; - font-style:italic; - line-height: 3em; - box-shadow: 0 -1px #ccc, 0 -1px rgba(255,255,255,0.28) inset; - background: #F9F7F4; + background: #f9f7f4; color: #666; + box-shadow: 0 -1px #ccc, 0 -1px rgba(255,255,255,0.28) inset; + font-style: italic; + line-height: 3em; text-shadow: 0 1px rgba(255,255,255,0.28); text-align: center; } + #new-article + .day { border-top: none; } + .day .name { display: none; } /*=== Index menu */ .nav_menu { - background: linear-gradient(0deg, #EDE7DE 0%, #C2BCB3 100%) #EDE7DE; - background: -webkit-linear-gradient(bottom, #EDE7DE 0%, #C2BCB3 100%); + padding: 5px 0; + background: linear-gradient(0deg, #ede7de 0%, #c2bcb3 100%) #ede7de; + background: -webkit-linear-gradient(bottom, #ede7de 0%, #c2bcb3 100%); border-bottom: 1px solid #ccc; - box-shadow:0 -1px rgba(255, 255, 255, 0.28) inset; + box-shadow: 0 -1px rgba(255, 255, 255, 0.28) inset; text-align: center; - padding: 5px 0; } -#panel >.nav_menu{ - background: linear-gradient(0deg, #EDE7DE 0%, #FFF 100%) #EDE7DE; - background: -webkit-linear-gradient(bottom, #EDE7DE 0%, #FFF 100%); + +#panel >.nav_menu { + background: linear-gradient(0deg, #ede7de 0%, #fff 100%) #ede7de; + background: -webkit-linear-gradient(bottom, #ede7de 0%, #fff 100%); } -#panel > .nav_menu > #nav_menu_read_all{ - background: linear-gradient(0deg, #EDE7DE 0%, #FFF 100%) #EDE7DE; - background: -webkit-linear-gradient(bottom, #EDE7DE 0%, #FFF 100%); + +#panel > .nav_menu > #nav_menu_read_all { + background: linear-gradient(0deg, #ede7de 0%, #fff 100%) #ede7de; + background: -webkit-linear-gradient(bottom, #ede7de 0%, #fff 100%); + border: 1px solid #ccc; border-radius: 4px; - border: 1px solid #CCC; - box-shadow: 0px 1px #FFF; + box-shadow: 0px 1px #fff; } + #panel > .nav_menu > #nav_menu_read_all .dropdown > .btn.dropdown-toggle { - border-radius: 0 4px 4px 0; - border:none; + border: none; border-left: solid 1px #ccc; + border-radius: 0 4px 4px 0; } /*=== Feed articles */ .flux_content { - background: #FFF; + background: #fff; } + .flux { - background: #F9F7F4; + background: #f9f7f4; } + .flux:hover { - background: #F9F7F4; + background: #f9f7f4; } + .flux:not(.current):hover .item.title { - background: #F9F7F4; + background: #f9f7f4; } + .flux.current .flux .item.title a { - text-shadow:0 0 2px #ccc; + text-shadow: 0 0 2px #ccc; } + .flux.not_read:not(.current):hover .item.title { - opacity:0.85; + opacity: 0.85; } + .flux.favorite { - background: #FFF6DA; + background: #fff6da; } -.flux.favorite:not(.current):hover{ - background: #F9F7F4; + +.flux.favorite:not(.current):hover { + background: #f9f7f4; } + .flux.favorite:not(.current):hover .item.title { - background: #F9F7F4; + background: #f9f7f4; } + .flux.current { - background: linear-gradient(0deg, #DAD4CB 0%, #FFF 100%) #DAD4CB; - background: -webkit-linear-gradient(bottom, #DAD4CB 0%, #FFF 100%); + background: linear-gradient(0deg, #dad4cb 0%, #fff 100%) #dad4cb; + background: -webkit-linear-gradient(bottom, #dad4cb 0%, #fff 100%); + border-left: solid 4px #0062bf; box-shadow: 0 -1px #fff inset, 0 2px #ccc; - border-left: solid 4px #0062BF; } .flux .item.title { -opacity: 0.35; + opacity: 0.35; } + .flux.favorite .item.title { -opacity: 1; + opacity: 1; } + .flux.not_read .item.title { -opacity: 1; + opacity: 1; } + .flux.current .item.title a { color: #0f0f0f; } + .flux .item.title a { color: #333; } .flux_header { - border-top: 1px solid #ddd; font-size: 0.8rem; - cursor: pointer; + border-top: 1px solid #ddd; box-shadow: 0 -1px rgba(255,255,255,0.28) inset; + cursor: pointer; } + .flux_header .title { font-size: 0.9rem; } + .flux .website .favicon { padding: 5px; } + .flux .date { color: #666; font-size: 0.7rem; @@ -852,14 +962,15 @@ opacity: 1; .content { padding: 20px 10px; } + .content > h1.title > a { color: #000; } .content hr { margin: 30px 10px; - height: 1px; background: #ddd; + height: 1px; border: 0; box-shadow: 0 2px 5px #ccc; } @@ -873,13 +984,15 @@ opacity: 1; font-size: 0.9rem; border-radius: 3px; } + .content code { padding: 2px 5px; - color: #dd1144; background: #fafafa; + color: #d14; border: 1px solid #eee; border-radius: 3px; } + .content pre code { background: transparent; color: #fff; @@ -887,14 +1000,15 @@ opacity: 1; } .content blockquote { - display: block; margin: 0; padding: 5px 20px; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; background: #fafafa; + display: block; color: #333; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; } + .content blockquote p { margin: 0; } @@ -902,49 +1016,55 @@ opacity: 1; /*=== Notification and actualize notification */ .notification { padding: 0 0 0 5px; - text-align: center; - background:#222; + background: #222; + color: #fff; + font-size: 0.9em; border: none; border-radius: 0 0 6px 6px; box-shadow: 0px 0px 4px rgba(0,0,0,0.45), 0 -1px rgba(255,255,255,0.08) inset, 0 2px 2px #171717 inset; - color:#fff; + text-align: center; font-weight: bold; - font-size: 0.9em; line-height: 3em; - position:absolute; - top:0; + position: absolute; + top: 0; z-index: 10; vertical-align: middle; } + .notification.good { color: #fff; } + .notification.bad { - background: #222222; - color: #EB2901; + background: #222; + color: #eb2901; } + .notification a.close { padding: 0 15px; line-height: 3em; } + .notification#actualizeProgress { line-height: 2em; } /*=== "Load more" part */ #bigMarkAsRead { + background: #f9f7f4; + color: #666; + box-shadow: 0 1px rgba(255,255,255,0.28)inset; text-align: center; text-decoration: none; text-shadow: 0 -1px 0 #aaa; - color: #666; - background: #F9F7F4; - box-shadow: 0 1px rgba(255,255,255,0.28)inset; } + #bigMarkAsRead:hover { + background: #f9f7f4; + background: radial-gradient(circle at 50% -25% , #ccc 0%, #f9f7f4 50%); color: #000; - background: #F9F7F4; - background: radial-gradient(circle at 50% -25% , #ccc 0%, #F9F7F4 50%); } + #bigMarkAsRead:hover .bigTick { text-shadow: 0 0 10px #666; } @@ -953,26 +1073,27 @@ opacity: 1; #nav_entries { background: linear-gradient(180deg, #222 0%, #171717 100%) #222; background: -webkit-linear-gradient(top, #222 0%, #171717 100%); + width: 235px; border-top: 1px solid #171717; + box-shadow: 0 1px rgba(255,255,255,0.08) inset, 0 -2px 2px #171717; text-align: center; line-height: 3em; table-layout: fixed; - box-shadow: 0 1px rgba(255,255,255,0.08) inset, 0 -2px 2px #171717; - width:235px; } /*=== READER VIEW */ /*================*/ #stream.reader .flux { padding: 0 0 50px; - border: none; background: #f0f0f0; color: #333; + border: none; } + #stream.reader .flux .author { margin: 0 0 10px; - font-size: 90%; color: #666; + font-size: 90%; } /*=== GLOBAL VIEW */ @@ -982,39 +1103,39 @@ opacity: 1; } .box.category .box-title { - background: linear-gradient(0deg, #EDE7DE 0%, #fff 100%) #171717; - background: -webkit-linear-gradient(bottom, #EDE7DE 0%, #fff 100%); - box-shadow: 0px -1px #fff inset,0 -2px #ccc inset; + background: linear-gradient(0deg, #ede7de 0%, #fff 100%) #171717; + font-size: 1.2rem; border-radius: none; + box-shadow: 0px -1px #fff inset,0 -2px #ccc inset; line-height: 2em; - font-size: 1.2rem; - text-shadow:0 1px #ccc; + text-shadow: 0 1px #ccc; } + .box.category .box-title .title { font-weight: normal; text-decoration: none; text-align: left; color: #888; } -.box.category:not([data-unread="0"]) .box-title { -} -.box.category:not([data-unread="0"]) .box-title:active { -} + .box.category:not([data-unread="0"]) .box-title .title { color: #222; font-weight: bold; } + .box.category .title:not([data-unread="0"])::after { + background: none; + border: 0; position: absolute; top: 5px; right: 10px; - border: 0; - background: none; font-weight: bold; } + .box.category .item.feed { padding: 2px 10px; font-size: 0.8rem; } + .box.category .item.feed:not(.empty):not(.error) .item-title { color: #222; } @@ -1022,18 +1143,20 @@ opacity: 1; /*=== PANEL */ /*===========*/ #panel { - box-shadow: 0px 0px 4px #000; + background: #f9f7f4; border-radius: 8px; - background:#F9F7F4; + box-shadow: 0px 0px 4px #000; } /*=== DIVERS */ /*===========*/ .aside.aside_feed .nav-form input,.aside.aside_feed .nav-form select { width: 130px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu { right: -20px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu::after { right: 33px; } @@ -1049,21 +1172,24 @@ opacity: 1; .stat tr { border: none; } + .stat > table td, .stat > table th { - border-bottom: 1px solid #ccc; background: rgba(255,255,255,0.38); + border-bottom: 1px solid #ccc; box-shadow: 0 1px #fff; } .stat > .horizontal-list { margin: 0 0 5px; } + .stat > .horizontal-list .item { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } + .stat > .horizontal-list .item:first-child { width: 250px; } @@ -1075,50 +1201,60 @@ opacity: 1; border-radius: 5px; overflow: hidden; } + .log { padding: 5px 10px; background: #fafafa; color: #333; font-size: 0.8rem; } + .log+.log { border-top: 1px solid #aaa; } + .log .date { display: block; font-weight: bold; } + .log.error { background: #fdd; color: #844; } + .log.warning { background: #ffe; color: #c95; } + .log.notice { background: #f4f4f4; color: #aaa; } + .log.debug { background: #333; color: #eee; } #slider.active { - box-shadow: -4px 0 4px rgba(15, 15, 15, 0.55); - background: #F8F8F8; + background: #f8f8f8; + box-shadow: -4px 0 4px rgba(15, 15, 15, 0.55); } + #close-slider.active { - background: rgba(15, 15, 15, 0.35); + background: rgba(15, 15, 15, 0.35); } /*=== MOBILE */ /*===========*/ + @media screen and (max-width: 840px) { .header { display: table; } + .nav-login { display: none; } @@ -1128,27 +1264,26 @@ opacity: 1; border-top: none; box-shadow: 3px 0 3px #000; transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; } + .aside:target { width: 235px; } + .aside .toggle_aside, #panel .close { + background: #171717; display: block; width: 100%; height: 40px; line-height: 40px; text-align: center; - background: #171717; box-shadow: 0 1px rgba(255,255,255,0.08); } + .aside .btn-important { - display: inline-block; margin: 20px 0 0; + display: inline-block; } .aside.aside_feed { @@ -1158,20 +1293,24 @@ opacity: 1; .nav_menu .btn { margin: 5px 10px; } + .nav_menu .stick { margin: 0 10px; } + .nav_menu .stick .btn { margin: 5px 0; } + .nav_menu .search { - display: inline-block; - max-width: 97%; + display: none; } + .nav_menu .search input { max-width: 97%; width: 90px; } + .nav_menu .search input:focus { width: 400px; } @@ -1185,19 +1324,18 @@ opacity: 1; } .notification a.close { + background: transparent; display: block; left: 0; - background: transparent; } + .notification a.close:hover { opacity: 0.5; } + .notification a.close .icon { display: none; } - .nav_menu .search { - display: none; - } #nav_entries { width: 100%; @@ -1205,16 +1343,19 @@ opacity: 1; } @media (max-width: 700px) { - .header{ + .header { display: none; } + .nav-login { display: inline-block; width: 100%; } + .nav_menu .search { display: inline-block; } + .aside .btn-important { display: none; } diff --git a/p/themes/Dark/dark.css b/p/themes/Dark/dark.css index c82c36644..8322179f4 100644 --- a/p/themes/Dark/dark.css +++ b/p/themes/Dark/dark.css @@ -3,15 +3,15 @@ /*=== GENERAL */ /*============*/ html, body { - height: 100%; - font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", "PingFang SC", "Microsoft YaHei", sans-serif; background: #1c1c1c; + height: 100%; color: #888; + font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", "PingFang SC", "Microsoft YaHei", sans-serif; } /*=== Links */ a, button.as-link { - color: #6986B2; + color: #6986b2; outline: none; } @@ -28,47 +28,51 @@ legend { font-size: 1.4em; border-bottom: 1px solid #2f2f2f; } + label { min-height: 25px; padding: 5px 0; cursor: pointer; } + textarea { width: 360px; height: 100px; } + input, select, textarea { - min-height: 25px; padding: 5px; - line-height: 25px; - vertical-align: middle; background: #333; + color: #999; border: 1px solid #000; border-radius: 3px; - color: #999; box-shadow: 0 2px 2px #1d1d1d inset; + min-height: 25px; + line-height: 25px; + vertical-align: middle; } + option { padding: 0 .5em; } + input:focus, select:focus, textarea:focus { color: #6986b2; border-color: #2f2f2f; } + input:invalid, select:invalid { border-color: #f00; box-shadow: 0 0 2px 1px #f00; } + input:disabled, select:disabled { background: #666; color: #aaa; } + input.extend { transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; } /*=== Tables */ @@ -80,9 +84,11 @@ tr, th, td { padding: 0.5em; border: 1px solid #333; } + th { background: #222; } + form td, form th { font-weight: normal; @@ -97,44 +103,54 @@ form th { background: #1a1a1a; border-top: 1px solid #2f2f2f; } + .form-group.form-actions .btn { margin: 0 10px; } + .form-group .group-name { padding: 10px 0; text-align: right; } + .form-group .group-controls { min-height: 25px; padding: 5px 0; } + .form-group table { margin: 10px 0 0 220px; } /*=== Buttons */ button.as-link[disabled] { - color:#445 !important; + color: #445 !important; } + .stick { vertical-align: middle; font-size: 0; } + .stick input, .stick .btn { border-radius: 0; } + .stick .btn:first-child, .stick input:first-child { border-radius: 3px 0 0 3px; } + .stick .btn-important:first-child { border-right: 1px solid #000; } + .stick .btn:last-child, .stick input:last-child { border-radius: 0 3px 3px 0; } + .stick .btn + .btn, .stick .btn + input, .stick .btn + .dropdown > .btn, @@ -146,80 +162,79 @@ button.as-link[disabled] { .stick .dropdown + .dropdown > .btn { border-left: none; } + .stick input:focus+input { border-left: 1px solid #000; } + .stick input+input:focus { border-left: 1px solid #333; } + .stick .btn + .dropdown > .btn { border-left: none; border-radius: 0 3px 3px 0; } .btn { + margin: 0; + padding: 5px 10px; + background: #111; display: inline-block; + color: #888; + font-size: 0.9rem; + border: 1px solid #000; + border-radius: 3px; min-height: 37px; min-width: 15px; line-height: 25px; - margin: 0; - padding: 5px 10px; - font-size: 0.9rem; vertical-align: middle; cursor: pointer; overflow: hidden; - background: #111; - border-radius: 3px; - border: 1px solid #000; - color: #888; } + a.btn { min-height: 25px; line-height: 25px; } + .btn:hover { text-decoration: none; - background: -moz-linear-gradient(top, #4A5D7A 0%, #26303F 100%); - background: -moz-linear-gradient(top, #4A5D7A 0%, #26303F 100%); - background: -webkit-linear-gradient(top, #4A5D7A 0%, #26303F 100%); - background: -o-linear-gradient(top, #4A5D7A 0%, #26303F 100%); - background: -ms-linear-gradient(top, #4A5D7A 0%, #26303F 100%); + background: linear-gradient(to top, #4a5d7a 0%, #26303f 100%); } + .btn.active, .dropdown-target:target ~ .btn.dropdown-toggle { background: #333; } + .btn:active { - background: #26303F; + background: #26303f; } .btn-important { font-weight: normal; - background: #26303F; + background: #26303f; } + .btn-important:hover { - background: linear-gradient(top, #4A5D7A 0%, #26303F 100%); - background: -moz-linear-gradient(top, #4A5D7A 0%, #26303F 100%); - background: -webkit-linear-gradient(top, #4A5D7A 0%, #26303F 100%); - background: -o-linear-gradient(top, #4A5D7A 0%, #26303F 100%); - background: -ms-linear-gradient(top, #4A5D7A 0%, #26303F 100%); + background: linear-gradient(to top, #4a5d7a 0%, #26303f 100%); } + .btn-important:active { - background: #26303F; + background: #26303f; } .btn-attention { - background: #880011; + background: #801; } + .btn-attention:hover { - background: linear-gradient(top, #cc0044 0%, #880011 100%); - background: -moz-linear-gradient(top, #cc0044 0%, #880011 100%); - background: -webkit-linear-gradient(top, #cc0044 0%, #880011 100%); - background: -o-linear-gradient(top, #cc0044 0%, #880011 100%); - background: -ms-linear-gradient(top, #cc0044 0%, #880011 100%); + background: linear-gradient(to top, #c04 0%, #801 100%); } + .btn-attention:active { - background: #880011; + background: #801; } /*=== Navigation */ @@ -229,42 +244,52 @@ a.btn { line-height: 2.5em; font-size: 0.9rem; } + .nav-list .item:hover { - background: #26303F; + background: #26303f; } + .nav-list .item.active { background: #333; } + .nav-list .item:hover a, .nav-list .item.active a { color: #888; } + .nav-list .disable { - text-align: center; - color: #aaa; background: #fafafa; + color: #aaa; + text-align: center; } + .nav-list .item > a { padding: 0 10px; } + .nav-list a:hover { text-decoration: none; } + .nav-list .item.empty a { color: #c95; } + .nav-list .item:hover.empty a, .nav-list .item.active.empty a { - color: #fff; background: #c95; + color: #fff; } + .nav-list .item.error a { color: #a44; } + .nav-list .item:hover.error a, .nav-list .item.active.error a { - color: #fff; background: #a44; + color: #fff; } .nav-list .nav-header { @@ -285,6 +310,7 @@ a.btn { background: #1c1c1c; border-bottom: 1px solid #333; } + .nav-head .item { padding: 5px 10px; font-size: 0.9rem; @@ -296,6 +322,7 @@ a.btn { margin: 0; padding: 0; } + .horizontal-list .item { vertical-align: middle; } @@ -304,34 +331,34 @@ a.btn { .dropdown-menu { margin: 5px 0 0; padding: 5px 0; - font-size: 0.8rem; - text-align: left; background: #1a1a1a; + font-size: 0.8rem; border: 1px solid #888; border-radius: 5px; + text-align: left; } + .dropdown-menu::after { + background: #1a1a1a; + width: 10px; + height: 10px; + border-top: 1px solid #888; + border-left: 1px solid #888; content: ""; position: absolute; top: -6px; right: 13px; - width: 10px; - height: 10px; z-index: -10; transform: rotate(45deg); - -moz-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); - background: #1a1a1a; - border-top: 1px solid #888; - border-left: 1px solid #888; } + .dropdown-header { padding: 0 5px 5px; font-weight: bold; text-align: left; color: #888; } + .dropdown-menu > .item > a, .dropdown-menu > .item > span, .dropdown-menu > .item > .as-link { @@ -339,18 +366,22 @@ a.btn { line-height: 2.5em; font-size: 0.8rem; } + .dropdown-menu > .item:hover { - background: #26303F; + background: #26303f; color: #888; } + .dropdown-menu > .item[aria-checked="true"] > a::before { font-weight: bold; margin: 0 0 0 -14px; } + .dropdown-menu > .item:hover > a { text-decoration: none; color: #888; } + .dropdown-menu .input select, .dropdown-menu .input input { margin: 0 auto 5px; @@ -367,48 +398,56 @@ a.btn { .alert { margin: 15px auto; padding: 10px 15px; - font-size: 0.9em; background: #111; + color: #aaa; + font-size: 0.9em; border: 1px solid #888; border-radius: 5px; - color: #aaa; } + .alert-head { font-size: 1.15em; } + .alert > a { text-decoration: underline; color: inherit; } + .alert-warn { - border: 1px solid #c95; color: #c95; + border: 1px solid #c95; } + .alert-success { - border: 1px solid #484; color: #484; + border: 1px solid #484; } + .alert-error { - border: 1px solid #a44; color: #a44; + border: 1px solid #a44; } /*=== Pagination */ .pagination { - text-align: center; - font-size: 0.8em; background: #1c1c1c; color: #888; + font-size: 0.8em; + text-align: center; } + .content .pagination { margin: 0; padding: 0; } + .pagination .item.pager-current { - font-weight: bold; - font-size: 1.5em; background: #111; + font-size: 1.5em; + font-weight: bold; } + .pagination .item a { display: block; font-style: italic; @@ -416,14 +455,17 @@ a.btn { text-decoration: none; color: #666; } + .pagination .item a:hover { background-color: #111; } + .pagination:first-child .item { border-bottom: 1px solid #333; } + .pagination:last-child .item { - border-top: 1px solid #333; + border-top: 1px solid #333; } .pagination .loading, @@ -436,13 +478,15 @@ a.btn { border: 1px solid #000; border-radius: 5px; } + .box .box-title { margin: 0; padding: 5px 10px; - background: #26303F; + background: #26303f; border-bottom: 1px solid #000; border-radius: 5px 5px 0 0; } + .box .box-content { max-height: 260px; } @@ -457,6 +501,7 @@ a.btn { .box .box-content .item .configure { visibility: hidden; } + .box .box-title:hover .configure, .box .box-content .item:hover .configure { visibility: visible; @@ -466,57 +511,70 @@ a.btn { .tree { margin: 10px 0; } + .tree-folder-title { - position: relative; padding: 0 10px; - line-height: 2.5rem; - font-size: 1rem; background: #1c1c1c; + font-size: 1rem; + position: relative; + line-height: 2.5rem; } + .tree-folder-title .title { background: inherit; color: #888; } + .tree-folder-title .title:hover { text-decoration: none; } + .tree-folder.active .tree-folder-title { background: #2c2c2c; font-weight: bold; } + .tree-folder-items { + background: #161616; border-top: 1px solid #222; border-bottom: 1px solid #222; - background: #161616; } + .tree-folder-items > .item { padding: 0 10px; line-height: 2.5rem; font-size: 0.8rem; } + .tree-folder-items > .item.active { background: #1c1c1c; } + .tree-folder-items > .item > a { text-decoration: none; } + .tree-folder-items > .item.active > a { color: #888; } /*=== Scrollbar */ + @supports (scrollbar-width: thin) { #sidebar { scrollbar-color: rgba(255, 255, 255, 0.05) rgba(0, 0, 0, 0.0); } + #sidebar:hover { scrollbar-color: rgba(255, 255, 255, 0.3) rgba(0, 0, 0, 0.0); } } + @supports not (scrollbar-width: thin) { #sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); } + #sidebar:hover::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); } @@ -528,24 +586,30 @@ a.btn { .header { height: 85px; } + .header > .item { padding: 10px; vertical-align: middle; text-align: center; border-bottom: 1px solid #333; } -.header > .item.title{ + +.header > .item.title { width: 230px; } + .header > .item.title h1 { margin: 0.5em 0; } + .header > .item.title h1 a { text-decoration: none; } + .header > .item.search input { width: 230px; } + .header .item.search input:focus { width: 350px; } @@ -554,55 +618,65 @@ a.btn { #global { height: calc(100% - 85px); } + .aside { - border-right: 1px solid #333; background: #1c1c1c; + border-right: 1px solid #333; } + .aside.aside_feed { padding: 10px 0; text-align: center; } + .aside.aside_feed .tree { margin: 10px 0 50px; } /*=== Aside main page (categories) */ .aside_feed .tree-folder-title > .title:not([data-unread="0"])::after { - position: absolute; - right: 0; margin: 10px 0; padding: 0 10px; + background: inherit; font-size: 0.9rem; + position: absolute; + right: 0; line-height: 1.5rem; - background: inherit; } /*=== Aside main page (feeds) */ .feed.item.empty.active { background: #c95; } + .feed.item.error.active { background: #a44; } + .feed.item.empty, .feed.item.empty > a { color: #c95; } + .feed.item.error, .feed.item.error > a { color: #a44; } + .feed.item.empty.active, .feed.item.empty.active > a { color: #111; } + .feed.item.error.active, .feed.item.error.active > a { color: #fff; } + .aside_feed .tree-folder-items .dropdown-menu::after { left: 2px; } + .aside_feed .tree-folder-items .item .dropdown-target:target ~ .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item:hover .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item.active .dropdown-toggle > .icon { @@ -615,9 +689,11 @@ a.btn { padding: 10px 50px; font-size: 0.9em; } + .post form { margin: 10px 0; } + .post.content { max-width: 550px; } @@ -626,35 +702,42 @@ a.btn { .prompt { text-align: center; } + .prompt label { text-align: left; } + .prompt form { margin: 10px auto 20px auto; width: 200px; } + .prompt input { margin: 5px auto; width: 100%; } + .prompt p { margin: 20px 0; } /*=== New article notification */ #new-article { - text-align: center; + background: #26303f; font-size: 0.9em; - background: #26303F; + text-align: center; } + #new-article:hover { - background: #4A5D7A; + background: #4a5d7a; } + #new-article > a { line-height: 3em; font-weight: bold; color: #fff; } + #new-article > a:hover { text-decoration: none; } @@ -667,13 +750,14 @@ a.btn { border-top: 1px solid #333; border-bottom: 1px solid #333; } + .day .name { padding: 0 10px 0 0; + color: #aab; font-size: 1.8em; opacity: 0.3; font-style: italic; text-align: right; - color: #aab; text-shadow: 0px -1px 0px #333; } @@ -688,18 +772,22 @@ a.btn { .flux { border-left: 2px solid #2f2f2f; } + .flux:hover { background: #111; } + .flux.current { - border-left: 2px solid #0062BE; background: #111; + border-left: 2px solid #0062be; } + .flux.not_read { - border-left: 2px solid #FF5300; + border-left: 2px solid #ff5300; } + .flux.favorite { - border-left: 2px solid #FFC300; + border-left: 2px solid #ffc300; } @@ -707,19 +795,24 @@ a.btn { font-size: 0.8rem; cursor: pointer; } + .flux_header .title { font-size: 0.9rem; } + .flux_header .item.title a { color: #888; } + .flux .website .favicon { margin: 5px; } + .flux .date { - font-size: 0.7rem; color: #666; + font-size: 0.7rem; } + .flux:not(.current):hover .item.title { background: #111; } @@ -733,14 +826,15 @@ a.btn { .content { padding: 20px 10px; } + .content > h1.title > a { color: #888; } .content hr { margin: 30px 10px; - height: 1px; background: #666; + height: 1px; border: 0; box-shadow: 0 2px 5px #666; } @@ -748,20 +842,22 @@ a.btn { .content pre { margin: 10px auto; padding: 10px 20px; - overflow: auto; background: #222; color: #fff; - border: 1px solid #000; font-size: 0.9rem; + border: 1px solid #000; border-radius: 3px; + overflow: auto; } + .content code { padding: 2px 5px; - color: #dd1144; background: #000; + color: #d14; border: 1px solid #333; border-radius: 3px; } + .content pre code { background: transparent; color: #fff; @@ -769,14 +865,15 @@ a.btn { } .content blockquote { - display: block; margin: 0; padding: 5px 20px; - border-top: 1px solid #444; - border-bottom: 1px solid #444; background: #222; + display: block; color: #999; + border-top: 1px solid #444; + border-bottom: 1px solid #444; } + .content blockquote p { margin: 0; } @@ -784,37 +881,43 @@ a.btn { /*=== Notification and actualize notification */ .notification { padding: 0 0 0 5px; + background: #111; + color: #c95; + font-size: 0.9em; + border: 1px solid #c95; + border-radius: 5px; + box-shadow: 0 0 5px #666; text-align: center; font-weight: bold; - font-size: 0.9em; line-height: 3em; z-index: 10; vertical-align: middle; - border-radius: 5px; - box-shadow: 0 0 5px #666; - background: #111; - color: #c95; - border: 1px solid #c95; } + .notification.good { border-color: #484; color: #484; } + .notification.bad { border-color: #a44; color: #a44; } + .notification a.close { padding: 0 15px; line-height: 3em; } + .notification a.close:hover { background: #222; border-radius: 0 3px 3px 0; } + .notification.good a.close:hover { background: #484; } + .notification.bad a.close:hover { background: #a44; } @@ -828,6 +931,7 @@ a.btn { text-align: center; text-decoration: none; } + #bigMarkAsRead:hover { background: #111; color: #aaa; @@ -847,13 +951,14 @@ a.btn { /*================*/ #stream.reader .flux { padding: 0 0 50px; - border: none; background: #111; + border: none; } + #stream.reader .flux .author { margin: 0 0 10px; - font-size: 90%; color: #666; + font-size: 90%; } /*=== GLOBAL VIEW */ @@ -864,25 +969,30 @@ a.btn { text-align: left; color: #888; } + .box.category:not([data-unread="0"]) .box-title { - background: #34495E; + background: #34495e; } + .box.category:not([data-unread="0"]) .box-title:active { - background: #26303F; + background: #26303f; } + .box.category:not([data-unread="0"]) .box-title .title { color: #fff; font-weight: bold; } + .box.category .title:not([data-unread="0"])::after { + background: none; + border: 0; position: absolute; top: 5px; right: 10px; - border: 0; - background: none; font-weight: bold; box-shadow: none; text-shadow: none; } + .box.category .item.feed { padding: 2px 10px; font-size: 0.8rem; @@ -907,9 +1017,11 @@ a.btn { .aside.aside_feed .nav-form select { width: 140px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu { right: -20px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu::after { right: 33px; } @@ -925,6 +1037,7 @@ a.btn { .stat tr { border: none; } + .stat > table td, .stat > table th { border-bottom: 1px solid #333; @@ -933,11 +1046,13 @@ a.btn { .stat > .horizontal-list { margin: 0 0 5px; } + .stat > .horizontal-list .item { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } + .stat > .horizontal-list .item:first-child { width: 270px; } @@ -948,31 +1063,38 @@ a.btn { overflow: hidden; border: 1px solid #333; } + .log { padding: 5px 10px; - font-size: 0.8rem; background: #111; color: #888; + font-size: 0.8rem; } + .log+.log { border-top: 1px solid #333; } + .log .date { display: block; font-weight: bold; } + .log.error { background: #a44; color: #fff; } + .log.warning { background: #c95; color: #fff; } + .log.notice { background: #ec9; color: #000; } + .log.debug { background: #111; color: #eee; @@ -980,23 +1102,21 @@ a.btn { /*=== MOBILE */ /*===========*/ -@media(max-width: 840px) { + +@media (max-width: 840px) { .aside { transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; } + .aside .toggle_aside, #panel .close { + background: #111; display: block; width: 100%; height: 50px; + border-bottom: 1px solid #333; line-height: 50px; text-align: center; - background: #111; - border-bottom: 1px solid #333; } .aside.aside_feed { @@ -1006,20 +1126,25 @@ a.btn { .nav_menu .btn { margin: 5px 10px; } + .nav_menu .stick { margin: 0 10px; } + .nav_menu .stick .btn { margin: 5px 0; } + .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; } @@ -1038,13 +1163,16 @@ a.btn { border-left: none; border-radius: 0; } + .notification a.close { display: block; left: 0; } + .notification a.close:hover { opacity: 0.5; } + .notification a.close .icon { display: none; } diff --git a/p/themes/Flat/flat.css b/p/themes/Flat/flat.css index 9132a013b..887ba0ac4 100644 --- a/p/themes/Flat/flat.css +++ b/p/themes/Flat/flat.css @@ -3,9 +3,9 @@ /*=== GENERAL */ /*============*/ html, body { + background: #fafafa; height: 100%; font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", "PingFang SC", "Microsoft YaHei", sans-serif; - background: #fafafa; } /*=== Links */ @@ -16,58 +16,62 @@ a, button.as-link { /*=== Forms */ legend { - display: inline-block; - width: auto; margin: 20px 0 5px; padding: 5px 20px; - font-size: 1.4em; - clear: both; background: #ecf0f1; + display: inline-block; + width: auto; + font-size: 1.4em; border-radius: 20px; + clear: both; } + label { min-height: 25px; padding: 5px 0; cursor: pointer; color: #444; } + textarea { width: 360px; height: 100px; } + input, select, textarea { - min-height: 25px; padding: 5px; - line-height: 25px; - vertical-align: middle; background: #fff; + color: #666; border: none; border-bottom: 3px solid #ddd; border-left-color: #ddd; - color: #666; border-radius: 5px; + min-height: 25px; + line-height: 25px; + vertical-align: middle; } + option { padding: 0 .5em; } + input:focus, select:focus, textarea:focus { color: #333; border-color: #2980b9; } + input:invalid, select:invalid { color: #f00; border-color: #f00; box-shadow: none; } + input:disabled, select:disabled { background: #eee; } + input.extend { transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; } /*=== Tables */ @@ -79,9 +83,11 @@ tr, th, td { padding: 0.5em; border: 1px solid #ddd; } + th { background: #f6f6f6; } + form td, form th { font-weight: normal; @@ -96,17 +102,19 @@ form th { border: 1px solid transparent; border-radius: 3px; } + .form-group::after { content: ""; display: block; clear: both; } + .form-group:hover { background: #fff; border: 1px solid #eee; border-radius: 3px; - border: 1px solid #eee; } + .form-group.form-actions { margin: 15px 0 25px; padding: 5px 0; @@ -114,20 +122,25 @@ form th { border-top: 3px solid #bdc3c7; border-radius: 5px 5px 0 0; } + .form-group.form-actions .btn { margin: 0 10px; } + .form-group .group-name { padding: 10px 0; text-align: right; } + .form-group .group-controls { min-height: 25px; padding: 5px 0; } + .form-group .group-controls .control { line-height: 2.0em; } + .form-group table { margin: 10px 0 0 220px; } @@ -137,19 +150,23 @@ form th { vertical-align: middle; font-size: 0; } + .stick input, .stick .btn { border-radius: 0; } + .stick .btn:first-child, .stick input:first-child { border-radius: 5px 0 0 5px; } + .stick .btn:last-child, .stick input:last-child, .stick .btn + .dropdown > .btn { border-radius: 0 5px 5px 0; } + .stick .btn + .btn, .stick .btn + input, .stick .btn + .dropdown > .btn, @@ -164,30 +181,33 @@ form th { } .btn { + margin: 0; + padding: 5px 10px; + background: #3498db; display: inline-block; + color: #fff; + font-size: 0.9rem; + border: none; + border-bottom: 3px solid #2980b9; + border-left-color: #2980b9; + border-radius: 5px; min-height: 38px; min-width: 15px; line-height: 25px; - margin: 0; - padding: 5px 10px; - font-size: 0.9rem; vertical-align: middle; cursor: pointer; overflow: hidden; - background: #3498db; - border-radius: 5px; - border: none; - border-bottom: 3px solid #2980b9; - border-left-color: #2980b9; - color: #fff; } + a.btn { min-height: 25px; line-height: 25px; } + .btn:hover { text-decoration: none; } + .btn.active, .btn:active, .btn:hover, @@ -202,6 +222,7 @@ a.btn { border-bottom: 3px solid #d35400; border-left-color: #d35400; } + .btn-important:hover, .btn-important:active { background: #d35400; @@ -213,6 +234,7 @@ a.btn { border-bottom: 3px solid #c0392b; border-left-color: #c0392b; } + .btn-attention:hover, .btn-attention:active { background: #c0392b; @@ -225,41 +247,50 @@ a.btn { line-height: 2.5em; font-size: 0.9rem; } + .nav-list .item:hover, .nav-list .item.active { background: #2980b9; color: #fff; } + .nav-list .item:hover a, .nav-list .item.active a { color: #fff; } + .nav-list .disable { text-align: center; background: #fafafa; color: #aaa; } + .nav-list .item > a { padding: 0 10px; } + .nav-list a:hover { text-decoration: none; } + .nav-list .item.empty a { color: #f39c12; } + .nav-list .item:hover.empty a, .nav-list .item.active.empty a { - color: #fff; background: #f39c12; + color: #fff; } + .nav-list .item.error a { color: #bd362f; } + .nav-list .item:hover.error a, .nav-list .item.active.error a { - color: #fff; background: #bd362f; + color: #fff; } .nav-list .nav-header { @@ -280,9 +311,11 @@ a.btn { background: #34495e; color: #fff; } + .nav-head a { color: #fff; } + .nav-head .item { padding: 5px 10px; font-size: 0.9rem; @@ -294,42 +327,43 @@ a.btn { margin: 0; padding: 0; } + .horizontal-list .item { vertical-align: middle; } /*=== Dropdown */ .dropdown-menu { - background: #fafafa; margin: 5px 0 0; padding: 5px 0; + background: #fafafa; font-size: 0.8rem; - text-align: left; border: 1px solid #95a5a6; border-radius: 3px; + text-align: left; } + .dropdown-menu::after { + background: #fff; + width: 10px; + height: 10px; + border-top: 1px solid #95a5a6; + border-left: 1px solid #95a5a6; content: ""; position: absolute; top: -6px; right: 13px; - width: 10px; - height: 10px; z-index: -10; transform: rotate(45deg); - -moz-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); - background: #fff; - border-top: 1px solid #95a5a6; - border-left: 1px solid #95a5a6; } + .dropdown-header { padding: 0 5px 5px; font-weight: bold; text-align: left; color: #34495e; } + .dropdown-menu > .item > a, .dropdown-menu > .item > span, .dropdown-menu > .item > .as-link { @@ -337,18 +371,22 @@ a.btn { line-height: 2.5em; font-size: 0.8rem; } + .dropdown-menu > .item:hover { background: #2980b9; color: #fff; } + .dropdown-menu > .item[aria-checked="true"] > a::before { font-weight: bold; margin: 0 0 0 -14px; } + .dropdown-menu > .item:hover > a { text-decoration: none; color: #fff; } + .dropdown-menu .input select, .dropdown-menu .input input { margin: 0 auto 5px; @@ -365,55 +403,63 @@ a.btn { .alert { margin: 15px auto; padding: 10px 15px; - font-size: 0.9em; background: #f4f4f4; + color: #aaa; + font-size: 0.9em; border: 1px solid #ccc; border-right: 1px solid #aaa; border-bottom: 1px solid #aaa; border-radius: 5px; - color: #aaa; text-shadow: 0 0 1px #eee; } + .alert-head { font-size: 1.15em; } + .alert > a { text-decoration: underline; color: inherit; } + .alert-warn { background: #ffe; - border: 1px solid #eeb; color: #c95; + border: 1px solid #eeb; } + .alert-success { background: #dfd; - border: 1px solid #cec; color: #484; + border: 1px solid #cec; } + .alert-error { background: #fdd; - border: 1px solid #ecc; color: #844; + border: 1px solid #ecc; } /*=== Pagination */ .pagination { - text-align: center; - font-size: 0.8em; background: #ecf0f1; color: #000; + font-size: 0.8em; + text-align: center; } + .content .pagination { margin: 0; padding: 0; } + .pagination .item.pager-current { - font-weight: bold; - font-size: 1.5em; background: #34495e; color: #ecf0f1; + font-size: 1.5em; + font-weight: bold; } + .pagination .item a { display: block; font-style: italic; @@ -421,6 +467,7 @@ a.btn { text-decoration: none; color: #000; } + .pagination .item a:hover { background: #34495e; color: #ecf0f1; @@ -428,8 +475,8 @@ a.btn { .pagination .loading, .pagination a:hover.loading { - font-size: 0; background: url("loader.gif") center center no-repeat #34495e; + font-size: 0; } /*=== Boxes */ @@ -437,6 +484,7 @@ a.btn { border: 1px solid #ddd; border-radius: 5px; } + .box .box-title { margin: 0; padding: 5px 10px; @@ -445,6 +493,7 @@ a.btn { border-bottom: 1px solid #ddd; border-radius: 5px 5px 0 0; } + .box .box-content { max-height: 260px; } @@ -459,11 +508,13 @@ a.btn { .box .box-content .item .configure { visibility: hidden; } + .box .box-content .item .configure .icon { vertical-align: middle; background-color: #95a5a6; border-radius: 3px; } + .box .box-title:hover .configure, .box .box-content .item:hover .configure { visibility: visible; @@ -473,6 +524,7 @@ a.btn { .tree { margin: 10px 0; } + .tree-folder-title { position: relative; padding: 0 10px; @@ -480,46 +532,57 @@ a.btn { line-height: 2.5rem; font-size: 1rem; } + .tree-folder-title .title { background: inherit; color: #fff; } + .tree-folder-title .title:hover { text-decoration: none; } + .tree-folder.active .tree-folder-title { background: #2980b9; font-weight: bold; } + .tree-folder-items { background: #2c3e50; } + .tree-folder-items > .item { padding: 0 10px; line-height: 2.5rem; font-size: 0.8rem; } + .tree-folder-items > .item.active { background: #2980b9; } + .tree-folder-items > .item > a { text-decoration: none; color: #fff; } /*=== Scrollbar */ + @supports (scrollbar-width: thin) { #sidebar { scrollbar-color: rgba(255, 255, 255, 0.05) rgba(0, 0, 0, 0.0); } + #sidebar:hover { scrollbar-color: rgba(255, 255, 255, 0.3) rgba(0, 0, 0, 0.0); } } + @supports not (scrollbar-width: thin) { #sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); } + #sidebar:hover::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); } @@ -529,26 +592,32 @@ a.btn { /*===============*/ /*=== Header */ .header { - height: 85px; background: #ecf0f1; + height: 85px; } + .header > .item { padding: 10px; vertical-align: middle; text-align: center; } -.header > .item.title{ + +.header > .item.title { width: 230px; } + .header > .item.title h1 { margin: 0.5em 0; } + .header > .item.title h1 a { text-decoration: none; } + .header > .item.search input { width: 230px; } + .header .item.search input:focus { width: 350px; } @@ -557,54 +626,63 @@ a.btn { #global { height: calc(100% - 85px); } + .aside { background: #ecf0f1; } + .aside.aside_feed { padding: 10px 0; text-align: center; background: #34495e; border-radius: 0 10px 0 0; } + .aside.aside_feed .tree { margin: 10px 0 50px; } /*=== Aside main page (categories) */ .aside_feed .tree-folder-title > .title:not([data-unread="0"])::after { - position: absolute; - right: 0; margin: 10px 0; padding: 0 10px; + background: inherit; font-size: 0.9rem; + position: absolute; + right: 0; line-height: 1.5rem; - background: inherit; } /*=== Aside main page (feeds) */ .feed.item.empty.active { background: #f39c12; } + .feed.item.error.active { background: #bd362f; } + .feed.item.empty, .feed.item.empty > a { color: #e67e22; } + .feed.item.error, .feed.item.error > a { color: #bd362f; } + .feed.item.empty.active, .feed.item.error.active, .feed.item.empty.active > a, .feed.item.error.active > a { color: #fff; } + .aside_feed .tree-folder-items .dropdown-menu::after { left: 2px; } + .aside_feed .tree-folder-items .item .dropdown-target:target ~ .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item:hover .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item.active .dropdown-toggle > .icon { @@ -616,9 +694,11 @@ a.btn { padding: 10px 50px; font-size: 0.9em; } + .post form { margin: 10px 0; } + .post.content { max-width: 550px; } @@ -627,35 +707,42 @@ a.btn { .prompt { text-align: center; } + .prompt label { text-align: left; } + .prompt form { margin: 10px auto 20px auto; width: 200px; } + .prompt input { margin: 5px auto; width: 100%; } + .prompt p { margin: 20px 0; } /*=== New article notification */ #new-article { - text-align: center; - font-size: 0.9em; background: #3498db; + font-size: 0.9em; + text-align: center; } + #new-article:hover { background: #2980b9; } + #new-article > a { line-height: 3em; font-weight: bold; color: #fff; } + #new-article > a:hover { text-decoration: none; } @@ -667,13 +754,14 @@ a.btn { line-height: 3em; border-left: 2px solid #ecf0f1; } + .day .name { padding: 0 10px 0 0; + color: #aab; font-size: 1.8em; opacity: 0.3; font-style: italic; text-align: right; - color: #aab; } /*=== Index menu */ @@ -692,45 +780,51 @@ a.btn { .flux { border-left: 2px solid #ecf0f1; } + .flux:hover { background: #fff; } + .flux.current { + background: #fff; border-left-color: #3498db; } + .flux.not_read { - background: #FFF3ED; - border-left-color: #FF5300; + background: #fff3ed; + border-left-color: #ff5300; } + .flux.not_read:not(.current):hover .item.title { - background: #FFF3ED; + background: #fff3ed; } + .flux.favorite { - background: #FFF6DA; - border-left-color: #FFC300; + background: #fff6da; + border-left-color: #ffc300; } + .flux.favorite:not(.current):hover .item.title { - background: #FFF6DA; -} -.flux.current { - background: #fff; + background: #fff6da; } - .flux_header { font-size: 0.8rem; cursor: pointer; border-top: 1px solid #ecf0f1; } + .flux_header .title { font-size: 0.9rem; } + .flux .website .favicon { padding: 5px; } + .flux .date { - font-size: 0.7rem; color: #666; + font-size: 0.7rem; } .flux .bottom { @@ -742,14 +836,15 @@ a.btn { .content { padding: 20px 10px; } + .content > h1.title > a { color: #000; } .content hr { margin: 30px 10px; - height: 1px; background: #ddd; + height: 1px; border: 0; box-shadow: 0 2px 5px #ccc; } @@ -763,13 +858,15 @@ a.btn { font-size: 0.9rem; border-radius: 3px; } + .content code { padding: 2px 5px; - color: #dd1144; background: #fafafa; + color: #d14; border: 1px solid #eee; border-radius: 3px; } + .content pre code { background: transparent; color: #fff; @@ -777,14 +874,15 @@ a.btn { } .content blockquote { - display: block; margin: 0; padding: 5px 20px; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; background: #fafafa; + display: block; color: #333; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; } + .content blockquote p { margin: 0; } @@ -792,33 +890,38 @@ a.btn { /*=== Notification and actualize notification */ .notification { padding: 0 0 0 5px; + background: #ddd; + color: #666; + font-size: 0.9em; + border: none; + border-radius: 3px; text-align: center; font-weight: bold; - font-size: 0.9em; line-height: 3em; z-index: 10; vertical-align: middle; - background: #ddd; - color: #666; - border-radius: 3px; - border: none; } + .notification.good { background: #1abc9c; color: #fff; } + .notification.bad { background: #e74c3c; color: #fff; } + .notification a.close { padding: 0 15px; line-height: 3em; border-radius: 0 3px 3px 0; } + .notification.good a.close:hover { background: #16a085; } + .notification.bad a.close:hover { background: #c0392b; } @@ -833,6 +936,7 @@ a.btn { text-decoration: none; background: #ecf0f1; } + #bigMarkAsRead:hover { background: #34495e; color: #fff; @@ -855,10 +959,11 @@ a.btn { color: #34495e; border: none; } + #stream.reader .flux .author { margin: 0 0 10px; - font-size: 90%; color: #999; + font-size: 90%; } /*=== GLOBAL VIEW */ @@ -868,25 +973,30 @@ a.btn { text-decoration: none; text-align: left; } + .box.category:not([data-unread="0"]) .box-title { background: #3498db; } + .box.category:not([data-unread="0"]) .box-title:active { background: #2980b9; } + .box.category:not([data-unread="0"]) .box-title .title { font-weight: bold; color: #fff; } + .box.category .title:not([data-unread="0"])::after { + background: none; + border: 0; position: absolute; top: 5px; right: 10px; - border: 0; - background: none; font-weight: bold; box-shadow: none; text-shadow: none; } + .box.category .item.feed { padding: 2px 10px; font-size: 0.8rem; @@ -898,9 +1008,11 @@ a.btn { .aside.aside_feed .nav-form select { width: 140px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu { right: -20px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu::after { right: 33px; } @@ -916,6 +1028,7 @@ a.btn { .stat tr { border: none; } + .stat > table td, .stat > table th { border-bottom: 1px solid #ddd; @@ -924,11 +1037,13 @@ a.btn { .stat > .horizontal-list { margin: 0 0 5px; } + .stat > .horizontal-list .item { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } + .stat > .horizontal-list .item:first-child { width: 270px; } @@ -939,13 +1054,14 @@ a.btn { overflow: hidden; border: 1px solid #aaa; } + .log { margin: 10px 0; padding: 5px 2%; - overflow: auto; - font-size: 0.8rem; background: #fafafa; color: #666; + font-size: 0.8rem; + overflow: auto; } .log > .date { @@ -953,16 +1069,20 @@ a.btn { padding: 5px 10px; border-radius: 20px; } + .log.error > .date { background: #e74c3c; color: #fff; } + .log.warning > .date { background: #f39c12; } + .log.notice > .date { background: #ecf0f1; } + .log.debug > .date { background: #111; color: #eee; @@ -970,22 +1090,20 @@ a.btn { /*=== MOBILE */ /*===========*/ -@media(max-width: 840px) { + +@media (max-width: 840px) { .aside { transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; } + .aside .toggle_aside, #panel .close { + background: #2c3e50; display: block; width: 100%; height: 50px; line-height: 50px; text-align: center; - background: #2c3e50; } .aside.aside_feed { @@ -995,20 +1113,25 @@ a.btn { .nav_menu .btn { margin: 5px 10px; } + .nav_menu .stick { margin: 0 10px; } + .nav_menu .stick .btn { margin: 5px 0; } + .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; } @@ -1024,14 +1147,17 @@ a.btn { .notification { border-radius: 0; } + .notification a.close { + background: transparent; display: block; left: 0; - background: transparent; } + .notification a.close:hover { opacity: 0.5; } + .notification a.close .icon { display: none; } diff --git a/p/themes/Mapco/_components.scss b/p/themes/Mapco/_components.scss index 342a428f5..79b2effa4 100644 --- a/p/themes/Mapco/_components.scss +++ b/p/themes/Mapco/_components.scss @@ -5,119 +5,118 @@ /*=== Horizontal-list */ .horizontal-list { - margin: 0; - padding: 0.1rem 0; + margin: 0; + padding: 0.1rem 0; - .item{ - vertical-align: middle; + .item { + vertical-align: middle; - &:first-child{ - padding-left: 0.5rem; - } + &:first-child { + padding-left: 0.5rem; + } - } + } } /*=== Dropdown */ .dropdown-menu { - background: $grey-lighter; - margin: 0; - font-size: 1rem; - text-align: left; - padding: 0.5rem 0 1rem 0; - border: none; - border-radius: 3px; - - -webkit-box-shadow: 0px 6px 8px 0px rgba(0,0,0,0.35); - -moz-box-shadow: 0px 6px 8px 0px rgba(0,0,0,0.35); - box-shadow: 0px 6px 8px 0px rgba(0,0,0,0.35); - - &::after { - content: ""; - position: absolute; - top: -4px; - right: 13px; - width: 10px; - height: 10px; - z-index: -10; - transform: rotate(45deg); - -moz-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); - background: white; - // border-top: 1px solid #95a5a6; - // border-left: 1px solid #95a5a6; - } - - .dropdown-header { - // padding: 0 5px 5px; - margin: 1.75rem 0 0.5rem 2rem; - font-weight: bold; + margin: 0; + padding: 0.5rem 0 1rem 0; + background: $grey-lighter; + font-size: 1rem; + border: none; + border-radius: 3px; + box-shadow: 0px 6px 8px 0px rgba(0,0,0,0.35); text-align: left; - color: $grey-dark; - text-transform: uppercase; - letter-spacing: 1px; - - - } - - .item{ - @include transition(all, 0.075s, ease-in-out); - a, span, .as-link{ - padding: 0 2rem; - line-height: 2.5em; - font-size: 1rem; - color: $main-font-color; - } - &:hover{ - background: $main-first; - color: $white; - a, button{ - text-decoration: none; - color: $white; - } + &::after { + background: white; + width: 10px; + height: 10px; + content: ""; + position: absolute; + top: -4px; + right: 13px; + z-index: -10; + transform: rotate(45deg); + // border-top: 1px solid #95a5a6; + // border-left: 1px solid #95a5a6; } - &[aria-checked="true"]{ - a::before{ + + .dropdown-header { + // padding: 0 5px 5px; + margin: 1.75rem 0 0.5rem 2rem; font-weight: bold; - margin: 0 0 0 -14px; - } + text-align: left; + color: $grey-dark; + text-transform: uppercase; + letter-spacing: 1px; + } - } - .input{ - select, input{ - margin: 0 auto 5px; - padding: 2px 5px; - border-radius: 3px; + + .item { + + @include transition(all, 0.075s, ease-in-out); + + a, span, .as-link { + padding: 0 2rem; + color: $main-font-color; + font-size: 1rem; + line-height: 2.5em; + } + + &:hover { + background: $main-first; + color: $white; + + a, button { + text-decoration: none; + color: $white; + } + } + + &[aria-checked="true"] { + a::before { + margin: 0 0 0 -14px; + font-weight: bold; + } + } } - } - .separator { - margin: 0.75rem 0; - border-bottom: 1px solid $grey-light; - // display: none; - } -} -.tree .tree-folder .tree-folder-items .dropdown-menu, -.tree .tree-folder .tree-folder-items .dropdown-menu{ - // tout ça sert à restaurer l'apparence du dropdown dans un contexte de sidebar sombre - - .item{ - padding: 0; - - a, - button{ - color: $main-font-color; - - &:hover{ - color: $white; - } + .input { + select, input { + margin: 0 auto 5px; + padding: 2px 5px; + border-radius: 3px; + } } - &:hover{ - background: $main-first; + + .separator { + margin: 0.75rem 0; + border-bottom: 1px solid $grey-light; + // display: none; + } + +} + +.tree .tree-folder .tree-folder-items .dropdown-menu { + // tout ça sert à restaurer l'apparence du dropdown dans un contexte de sidebar sombre + .item { + padding: 0; + + a, + button { + color: $main-font-color; + + &:hover { + color: $white; + } + } + + &:hover { + background: $main-first; + } } - } } @@ -125,255 +124,274 @@ /*=== Alerts */ .alert { - margin: 1rem 0; - // width: 100%; - padding: 1rem; - font-size: 1rem; - background: $grey-lighter; - border: 1px solid $grey-medium; - border-radius: 3px; - color: $grey-dark; - text-shadow: 0 0 1px $grey-light; + margin: 1rem 0; + // width: 100%; + padding: 1rem; + background: $grey-lighter; + color: $grey-dark; + font-size: 1rem; + border: 1px solid $grey-medium; + border-radius: 3px; + text-shadow: 0 0 1px $grey-light; } + .alert-head { - font-size: 1.15em; + font-size: 1.15em; } + .alert > a { - text-decoration: underline; - color: inherit; + text-decoration: underline; + color: inherit; } + .alert-warn { - background: $warning-light; - border: 1px solid unquote($warning-text+'33'); // on ajoute l'opacité à la fin - color: $warning-text; + background: $warning-light; + color: $warning-text; + border: 1px solid unquote($warning-text+'33'); // on ajoute l'opacité à la fin } + .alert-success { - background: $success-light; - border: 1px solid unquote($success-text+'33'); - color: $success-text; + background: $success-light; + color: $success-text; + border: 1px solid unquote($success-text+'33'); } + .alert-error { - background: $alert-light; - border: 1px solid unquote($alert-text+'33'); - color: $alert-text; + background: $alert-light; + color: $alert-text; + border: 1px solid unquote($alert-text+'33'); } /*=== Pagination */ .pagination { - text-align: center; - font-size: 0.8em; - background: $grey-light; - color: $main-font-color; - - .item{ - &.pager-current { - font-weight: bold; - font-size: 1.5em; - background: $sid-bg; - color: $grey-light; - } - a { - display: block; - font-style: italic; - line-height: 3em; - text-decoration: none; - color: $main-font-color; - - &:hover{ - background: $main-font-color; - color: $grey-light; - } + background: $grey-light; + color: $main-font-color; + font-size: 0.8em; + text-align: center; + + .item { + &.pager-current { + background: $sid-bg; + color: $grey-light; + font-size: 1.5em; + font-weight: bold; + } + + a { + display: block; + color: $main-font-color; + font-style: italic; + line-height: 3em; + text-decoration: none; + + &:hover { + background: $main-font-color; + color: $grey-light; + } + } } - } - .loading, - a:hover.loading { - font-size: 0; - background: url("loader.gif") center center no-repeat #34495e; - } + .loading, + a:hover.loading { + background: url("loader.gif") center center no-repeat #34495e; + font-size: 0; + } } + .content .pagination { - margin: 0; - padding: 0; + margin: 0; + padding: 0; } /*=== Boxes */ .box { - // border: 1px solid #ddd; - border: none; - border-radius: 3px; - background: $white; - - -webkit-box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.25); - -moz-box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.25); - box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.25); + background: $white; + // border: 1px solid #ddd; + border: none; + border-radius: 3px; + + box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.25); + + .box-title { + margin: 0; + padding: 5px 10px; + background: $grey-light; + color: $main-font-color; + // border-bottom: 1px solid #ddd; + border-radius: 2px 2px 0 0; + + img { + margin-right: 0.75rem; + } - .box-title { - margin: 0; - padding: 5px 10px; - background: $grey-light; - color: $main-font-color; - // border-bottom: 1px solid #ddd; - border-radius: 2px 2px 0 0; - img{ - margin-right: 0.75rem; - } + &:hover { + .configure { + background: url("icons/cog.svg") no-repeat 4px 4px; + display: block; + float: left; + width: 1.75rem; + height: 1.75rem; + border-radius: 2px; + visibility: visible; + margin-right: 0.5rem; + + .icon { + display: none; + border-radius: 3px; + vertical-align: middle; + } + + &:hover { + background: url("icons/cog-white.svg") no-repeat 4px 4px $main-first; + } + } + } - &:hover{ .configure { - visibility: visible; - background: url("icons/cog.svg") no-repeat 4px 4px; - width: 1.75rem; - height: 1.75rem; - display: block; - border-radius: 2px; - float: left; - margin-right: 0.5rem; - .icon { - vertical-align: middle; - border-radius: 3px; - display: none; + visibility: hidden; + } + + form { + input { + width: 85%; } - &:hover { - background: url("icons/cog-white.svg") no-repeat 4px 4px $main-first; + + .dropdown { + float: right; + + a.dropdown-toggle { + padding: 0; + // float: right; + border-radius: 0; + background-image: url(icons/more.svg); + background-repeat: no-repeat; + background-position: right 8px; + + img { + display: none; + } + } } } } - .configure { - visibility: hidden; - } - form{ - input{ - width: 85%; - } - .dropdown{ - float: right; - a.dropdown-toggle{ - padding: 0; - background-image: url(icons/more.svg); - background-repeat: no-repeat; - background-position: right 8px; - // float: right; - border-radius: 0; - img{ - display: none; - } - } - } - } - } - .box-content { - // max-height: 260px; + .box-content { + // max-height: 260px; + .item { + padding: 0.5rem 0.75rem; + color: $main-font-color; + font-size: 1rem; + border-bottom: 1px solid $grey-light; + line-height: 1.7em; + + img { + margin-right: 0.75rem; + } - .item { - padding: 0.5rem 0.75rem; - font-size: 1rem; - color: $main-font-color; - line-height: 1.7em; - border-bottom: 1px solid $grey-light; - - img{ - margin-right: 0.75rem; - } - - .configure { - visibility: hidden; - width: 1.75rem; - height: 1.75rem; - display: block; - border-radius: 2px; - float: left; - margin-right: 0.5rem; - background: url("icons/cog.svg") no-repeat 4px 4px; - - .icon { - vertical-align: middle; - border-radius: 3px; - display: none; + .configure { + background: url("icons/cog.svg") no-repeat 4px 4px; + display: block; + float: left; + width: 1.75rem; + height: 1.75rem; + border-radius: 2px; + visibility: hidden; + margin-right: 0.5rem; + + .icon { + display: none; + border-radius: 3px; + vertical-align: middle; + } + + &:hover { + // background: $main-first; + background: url("icons/cog-white.svg") no-repeat 4px 4px $main-first; + } + } + + &:hover .configure { + visibility: visible; + } } - &:hover{ - // background: $main-first; - background: url("icons/cog-white.svg") no-repeat 4px 4px $main-first; + + .item:last-child { + border-bottom: none; } - } - &:hover .configure { - visibility: visible; - } } - .item:last-child{ - border-bottom: none; - } - } } /*=== "Load more" part */ #bigMarkAsRead { - text-align: center; - text-decoration: none; - background: $main-first-light; - color: $main-first; + text-align: center; + text-decoration: none; + background: $main-first-light; + color: $main-first; - @include transition(all, 0.15s, ease-in-out); + @include transition(all, 0.15s, ease-in-out); - &:hover { - background: $main-first; - color: #fff; + &:hover { + background: $main-first; + color: #fff; - .bigTick{ - background: url(icons/tick-white.svg) center no-repeat; + .bigTick { + background: url(icons/tick-white.svg) center no-repeat; + } + } + + .bigTick { + margin: 0.5rem 0; + background: url(icons/tick-color.svg) center no-repeat; + display: inline-block; + width: 64px; + height: 64px; + text-indent: -9999px; + white-space: nowrap; } - } - .bigTick{ - margin: 0.5rem 0; - display: inline-block; - text-indent: -9999px; - background: url(icons/tick-color.svg) center no-repeat; - height: 64px; - width: 64px; - white-space: nowrap; - } } // page de login -.formLogin{ - background: $sid-bg; - - .header{ - .configure{ - padding-right: 1rem; - img{ - margin-right: 0.5rem; - } - - a.signin{ +.formLogin { + background: $sid-bg; + + .header { + .configure { + padding-right: 1rem; + + img { + margin-right: 0.5rem; + } + + a.signin { + color: $white; + } + } + } + + h1 { color: $white; - } } - } - - h1{ - color: $white; - } - form#crypto-form{ - div{ - margin-bottom: 1rem; - - label{ - font-size: 1rem; - color: $grey-medium; - - - } - input{ - background: $main-first-darker; - - &:focus{ - background: $grey-lighter; - color: $main-font-color; + + form#crypto-form { + div { + margin-bottom: 1rem; + + label { + color: $grey-medium; + font-size: 1rem; + + + } + + input { + background: $main-first-darker; + + &:focus { + background: $grey-lighter; + color: $main-font-color; + } + } } - } - } - } + } } diff --git a/p/themes/Mapco/_configuration.scss b/p/themes/Mapco/_configuration.scss index c3c6fd417..78e471f19 100644 --- a/p/themes/Mapco/_configuration.scss +++ b/p/themes/Mapco/_configuration.scss @@ -1,90 +1,89 @@ /*=== Configuration pages */ .post { - padding: 1rem 2rem; - font-size: 1rem; - - form { - margin: 1rem 0; - - // Gestion des extensions - .horizontal-list{ - margin-bottom: 0.5rem; - - .item{ - .stick{ - // width: 65%; - // margin-right: 1rem; - // display:flex; - - } - .btn{ - // width: 8rem; - // flex-grow: 1; + padding: 1rem 2rem; + font-size: 1rem; + + form { + margin: 1rem 0; + + // Gestion des extensions + .horizontal-list { + margin-bottom: 0.5rem; + + .item { + .stick { + // width: 65%; + // margin-right: 1rem; + // display:flex; + + } + + .btn { + // width: 8rem; + // flex-grow: 1; + } + } + } - } - } - } - &.content { - max-width: 550px; - } - - h1, h2{ // pages titles - font-size: 3rem; - margin-top: 1.75rem; - font-weight: 300; - line-height: 1.2em; - // font-family: "spectral"; - color: $main-font-color; - } - - a[href="./"]{ // C'est le bouton "Retour à vos flux" - display: inline-block; - // min-height: 38px; - min-width: 15px; - line-height: 25px; - margin: 0; - padding: 0.75rem 1.5rem; - font-size: 1rem; - vertical-align: middle; - cursor: pointer; - overflow: hidden; - background: $grey-lighter; - border: 1px solid $grey-medium-light; - border-radius: 5px; - // border: none; - color: $grey-dark; - - &:hover{ - text-decoration: none; - background: $main-first; - color: white; - border: 1px solid $main-first; + + &.content { + max-width: 550px; + } + + h1, h2 { // pages titles + // font-family: "spectral"; + color: $main-font-color; + font-size: 3rem; + margin-top: 1.75rem; + font-weight: 300; + line-height: 1.2em; } - } - + + a[href="./"] { // C'est le bouton "Retour à vos flux" + margin: 0; + padding: 0.75rem 1.5rem; + background: $grey-lighter; + display: inline-block; + // border: none; + color: $grey-dark; + font-size: 1rem; + border: 1px solid $grey-medium-light; + border-radius: 5px; + // min-height: 38px; + min-width: 15px; + line-height: 25px; + vertical-align: middle; + cursor: pointer; + overflow: hidden; + + &:hover { + background: $main-first; + color: white; + border: 1px solid $main-first; + text-decoration: none; + } + } + } -#slider{ - border-left: none; - - -webkit-box-shadow: 0px 6px 8px 0px rgba(0,0,0,0.35); - -moz-box-shadow: 0px 6px 8px 0px rgba(0,0,0,0.35); - box-shadow: 0px 6px 8px 0px rgba(0,0,0,0.35); +#slider { + border-left: none; + box-shadow: 0px 6px 8px 0px rgba(0,0,0,0.35); } -.slide-container{ - .properties{ - background: rgba(0, 0, 0, 0.75); - border: 0; - padding: 1rem; - color: white; +.slide-container { + .properties { + padding: 1rem; + background: rgba(0, 0, 0, 0.75); + color: white; + border: 0; - .page-number{ - right: 1rem; - top: 1rem; + .page-number { + right: 1rem; + top: 1rem; + } } - } } diff --git a/p/themes/Mapco/_divers.scss b/p/themes/Mapco/_divers.scss index 7d122f1b4..c6fb1f283 100644 --- a/p/themes/Mapco/_divers.scss +++ b/p/themes/Mapco/_divers.scss @@ -4,9 +4,11 @@ .aside.aside_feed .nav-form select { width: 140px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu { right: -20px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu::after { right: 33px; } diff --git a/p/themes/Mapco/_fonts.scss b/p/themes/Mapco/_fonts.scss index 5891be834..da1cf4ac7 100644 --- a/p/themes/Mapco/_fonts.scss +++ b/p/themes/Mapco/_fonts.scss @@ -1,56 +1,63 @@ @font-face { - font-family: "lato"; - font-style: normal; - font-stretch: normal; - font-weight: 400; - src: local("Lato"), url("../fonts/LatoLatin-Regular.woff") format("woff"); -} -@font-face { - font-family: "lato"; - font-style: italic; - font-stretch: normal; - font-weight: 400; - src: local("Lato"), url("../fonts/LatoLatin-Italic.woff") format("woff"); -} -@font-face { - font-family: "lato"; - font-style: normal; - font-stretch: normal; - font-weight: 700; - src: local("Lato"), url("../fonts/LatoLatin-Bold.woff") format("woff"); -} -@font-face { - font-family: "lato"; - font-style: italic; - font-stretch: normal; - font-weight: 700; - src: local("Lato"), url("../fonts/LatoLatin-BoldItalic.woff") format("woff"); -} -@font-face { - font-family: "spectral"; - font-style: normal; - font-stretch: normal; - font-weight: 400; - src: local("Spectral"), url("../fonts/Spectral-Regular.woff") format("woff"); -} -@font-face { - font-family: "spectral"; - font-style: italic; - font-stretch: normal; - font-weight: 400; - src: local("Spectral"), url("../fonts/Spectral-Italic.woff") format("woff"); -} -@font-face { - font-family: "spectral"; - font-style: normal; - font-stretch: normal; - font-weight: 700; - src: local("Spectral"), url("../fonts/Spectral-Bold.woff") format("woff"); -} -@font-face { - font-family: "spectral"; - font-style: italic; - font-stretch: normal; - font-weight: 700; - src: local("Spectral"), url("../fonts/Spectral-BoldItalic.woff") format("woff"); + font-family: "lato"; + font-style: normal; + font-stretch: normal; + font-weight: 400; + src: local("Lato"), url("../fonts/LatoLatin-Regular.woff") format("woff"); +} + +@font-face { + font-family: "lato"; + font-style: italic; + font-stretch: normal; + font-weight: 400; + src: local("Lato"), url("../fonts/LatoLatin-Italic.woff") format("woff"); +} + +@font-face { + font-family: "lato"; + font-style: normal; + font-stretch: normal; + font-weight: 700; + src: local("Lato"), url("../fonts/LatoLatin-Bold.woff") format("woff"); +} + +@font-face { + font-family: "lato"; + font-style: italic; + font-stretch: normal; + font-weight: 700; + src: local("Lato"), url("../fonts/LatoLatin-BoldItalic.woff") format("woff"); +} + +@font-face { + font-family: "spectral"; + font-style: normal; + font-stretch: normal; + font-weight: 400; + src: local("Spectral"), url("../fonts/Spectral-Regular.woff") format("woff"); +} + +@font-face { + font-family: "spectral"; + font-style: italic; + font-stretch: normal; + font-weight: 400; + src: local("Spectral"), url("../fonts/Spectral-Italic.woff") format("woff"); +} + +@font-face { + font-family: "spectral"; + font-style: normal; + font-stretch: normal; + font-weight: 700; + src: local("Spectral"), url("../fonts/Spectral-Bold.woff") format("woff"); +} + +@font-face { + font-family: "spectral"; + font-style: italic; + font-stretch: normal; + font-weight: 700; + src: local("Spectral"), url("../fonts/Spectral-BoldItalic.woff") format("woff"); } diff --git a/p/themes/Mapco/_forms.scss b/p/themes/Mapco/_forms.scss index 8a388aa8a..ff1691894 100644 --- a/p/themes/Mapco/_forms.scss +++ b/p/themes/Mapco/_forms.scss @@ -1,152 +1,160 @@ /* btns */ - .btn { - display: inline-block; - min-height: 38px; - min-width: 15px; - line-height: 25px; - margin: 0; - padding: 0.5rem 1.5rem; - font-size: 1rem; - vertical-align: middle; - cursor: pointer; - overflow: hidden; - background: $grey-lighter; - border-radius: 5px; - border: none; - color: $grey-dark; - - @include transition(all, 0.15s, ease-in-out); - - &.btn-important { - background: $main-first; - color: $white; - - // @include transition(all, 0.15s, ease-in-out); - - &:hover, - &:active { - background: $main-first-alt; + margin: 0; + padding: 0.5rem 1.5rem; + background: $grey-lighter; + display: inline-block; + color: $grey-dark; + font-size: 1rem; + border: none; + border-radius: 5px; + min-height: 38px; + min-width: 15px; + line-height: 25px; + vertical-align: middle; + cursor: pointer; + overflow: hidden; + + @include transition(all, 0.15s, ease-in-out); + + &.btn-important { + background: $main-first; + color: $white; + + // @include transition(all, 0.15s, ease-in-out); + &:hover, + &:active { + background: $main-first-alt; + } } - } - &.btn-attention { - background: $alert-bg; - color: #fff; + &.btn-attention { + background: $alert-bg; + color: #fff; - &:hover, - &:active { - background: $alert-text; + &:hover, + &:active { + background: $alert-text; + } } - } - &:hover { - text-decoration: none; - } + &:hover { + text-decoration: none; + } } a.btn { - min-height: 25px; - line-height: 25px; + min-height: 25px; + line-height: 25px; } /*=== Forms */ legend { - display: inline-block; - width: auto; - margin: 2rem 0 1rem 0; - padding: 0; - font-size: 1rem; - clear: both; - text-transform: uppercase; - letter-spacing: 1px; - font-weight: 700; + margin: 2rem 0 1rem 0; + padding: 0; + display: inline-block; + width: auto; + font-size: 1rem; + clear: both; + text-transform: uppercase; + letter-spacing: 1px; + font-weight: 700; } + label { - min-height: 25px; - padding: 5px 0; - cursor: pointer; - color: $grey-dark; + min-height: 25px; + padding: 5px 0; + cursor: pointer; + color: $grey-dark; } + textarea { - width: 360px; - height: 100px; + width: 360px; + height: 100px; } + input, select, textarea, button { - font-family: "lato", "Helvetica", "Arial", sans-serif; - min-height: 25px; - padding: 5px 10px; - line-height: 25px; - vertical-align: middle; - background: $white; - border: 1px solid $grey-light; - font-size: 1rem; - color: $grey-dark; - border-radius: 2px; + padding: 5px 10px; + background: $white; + color: $grey-dark; + font-family: "lato", "Helvetica", "Arial", sans-serif; + font-size: 1rem; + border: 1px solid $grey-light; + border-radius: 2px; + min-height: 25px; + line-height: 25px; + vertical-align: middle; } + option { - padding: 0 .5em; + padding: 0 .5em; } + input:focus, select:focus, textarea:focus { - color: $main-font-color; - border-color: $main-first; + color: $main-font-color; + border-color: $main-first; } + input:invalid, select:invalid { - color: $alert-bg; - border-color: $alert-bg; - box-shadow: none; + color: $alert-bg; + border-color: $alert-bg; + box-shadow: none; } + input:disabled, select:disabled { - background: $grey-light; + background: $grey-light; } + input.extend { - transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; + transition: width 200ms linear; } .form-group { - padding: 5px; - border-radius: 3px; + padding: 5px; + border-radius: 3px; - &::after { - content: ""; - display: block; - clear: both; - } - &:hover { - // background: #fff; - // border: 1px solid #eee; - // border-radius: 3px; - // border: 1px solid #eee; - } - .group-name { - padding: 10px 0; - text-align: right; - } - .group-controls { - min-height: 25px; - padding: 5px 0; - } - .group-controls .control { - line-height: 2.0em; - } - table { - margin: 10px 0 0 220px; - } - - &.form-actions { - margin: 15px 0 25px; - padding: 5px 0; - // background: #333; - } - &.form-actions .btn { - margin: 0 0.5rem 0 0; - } + &::after { + content: ""; + display: block; + clear: both; + } + + &:hover { + // background: #fff; + // border: 1px solid #eee; + // border-radius: 3px; + // border: 1px solid #eee; + } + + .group-name { + padding: 10px 0; + text-align: right; + } + + .group-controls { + min-height: 25px; + padding: 5px 0; + } + + .group-controls .control { + line-height: 2.0em; + } + + table { + margin: 10px 0 0 220px; + } + + &.form-actions { + margin: 15px 0 25px; + padding: 5px 0; + // background: #333; + } + + &.form-actions .btn { + margin: 0 0.5rem 0 0; + } } diff --git a/p/themes/Mapco/_global-view.scss b/p/themes/Mapco/_global-view.scss index 30979bd6c..7d24a9109 100644 --- a/p/themes/Mapco/_global-view.scss +++ b/p/themes/Mapco/_global-view.scss @@ -1,80 +1,83 @@ /*=== GLOBAL VIEW */ /*================*/ +#stream { + .box.category { + &:not([data-unread="0"]) .box-title { + // background: #3498db; + } -#stream{ - .box.category{ - - &:not([data-unread="0"]) .box-title { - // background: #3498db; - } - &:not([data-unread="0"]) .box-title:active { - // background: #2980b9; - } - &:not([data-unread="0"]) .box-title .title { - font-weight: bold; - // color: #fff; - } - - .box-title{ - background: none; - padding: 1.5rem; - - a.title{ - font-weight: normal; - text-decoration: none; - text-align: left; - font-size: 1rem; - text-transform: uppercase; - letter-spacing: 1px; - color: $grey-dark; + &:not([data-unread="0"]) .box-title:active { + // background: #2980b9; + } - &:not([data-unread="0"])::after { - position: absolute; - top: 1.75rem; - right: 0; - line-height: 1.5rem; - background: $grey-light; - border-radius: 12px; - padding: 0 0.75rem; - margin: -0.5rem 1rem 0 0; - text-align: center; + &:not([data-unread="0"]) .box-title .title { + font-weight: bold; + // color: #fff; } - &:hover{ - color: $main-first; + + .box-title { + padding: 1.5rem; + background: none; + + a.title { + color: $grey-dark; + font-size: 1rem; + font-weight: normal; + text-decoration: none; + text-align: left; + text-transform: uppercase; + letter-spacing: 1px; + + &:not([data-unread="0"])::after { + margin: -0.5rem 1rem 0 0; + padding: 0 0.75rem; + background: $grey-light; + border-radius: 12px; + position: absolute; + top: 1.75rem; + right: 0; + line-height: 1.5rem; + text-align: center; + } + + &:hover { + color: $main-first; + } + } } - } - } - .box-content{ - padding-bottom: 0.5rem; - .item.feed { - // padding: 2px 10px; - font-size: 1rem; - padding: 0.5rem 1.5rem; - - a{ - color: $main-font-color; - font-weight: 400; + .box-content { + padding-bottom: 0.5rem; + + .item.feed { + padding: 0.5rem 1.5rem; + // padding: 2px 10px; + font-size: 1rem; - &:hover{ - color: $main-first; - text-decoration: none; - } + a { + color: $main-font-color; + font-weight: 400; + + &:hover { + color: $main-first; + text-decoration: none; + } + } + } } - } - } - } + } } // le panel qui apparait en overlay pour afficher les flux -#overlay{ - background: rgba(0, 0, 0, 0.65); +#overlay { + background: rgba(0, 0, 0, 0.65); } -#panel{ - top: 3rem; - right: 3rem; - bottom: 3rem; - left: 3rem; - border-radius: 3px; + +#panel { + top: 3rem; + right: 3rem; + bottom: 3rem; + left: 3rem; + border-radius: 3px; } diff --git a/p/themes/Mapco/_layout.scss b/p/themes/Mapco/_layout.scss index b62618d81..c7c0849b4 100644 --- a/p/themes/Mapco/_layout.scss +++ b/p/themes/Mapco/_layout.scss @@ -2,118 +2,117 @@ /*===============*/ /*=== Header */ .header { - background: $sid-bg; - padding: 0.5rem 1.35rem; - display: block; - table-layout: none; - width: auto; - - .item{ - vertical-align: middle; - // text-align: center; - // display: flex; - // justify-content: space-between; - // flex-direction: row; - - &.title{ - - font-weight: 400; - width: 280px; - - h1{ - a{ - text-decoration: none; - color: $sid-font-color; - font-size: 1rem; - text-transform: uppercase; - letter-spacing: 1px; - - img{ - margin-right: 0.5rem; - - } + padding: 0.5rem 1.35rem; + background: $sid-bg; + display: block; + width: auto; + table-layout: none; + + .item { + vertical-align: middle; + // text-align: center; + // display: flex; + // justify-content: space-between; + // flex-direction: row; + &.title { + width: 280px; + + font-weight: 400; + + h1 { + a { + text-decoration: none; + color: $sid-font-color; + font-size: 1rem; + text-transform: uppercase; + letter-spacing: 1px; + + img { + margin-right: 0.5rem; + + } + } + } } - } - } - &.search{ - // text-align: center; - // width: 50%; - input{ - width: 230px; - border-radius: 2px 0 0 2px; - background-color: $sid-bg-alt; - color: $sid-font-color; - border: none; + &.search { + // text-align: center; + // width: 50%; + input { + width: 230px; + color: $sid-font-color; + border: none; + border-radius: 2px 0 0 2px; + background-color: $sid-bg-alt; - @include transition(all, 0.15s, ease-in-out); + @include transition(all, 0.15s, ease-in-out); - &:hover{ - background-color: $sid-bg-dark; - } - - &:focus{ - width: 350px; + &:hover { + background-color: $sid-bg-dark; + } - background-color: $white; - color: $grey-dark; - } - } - .btn{ - img{display: none;} - border-radius: 0 2px 2px 0; + &:focus { + width: 350px; + color: $grey-dark; - background-color: $main-first; - background-position: center; - background-repeat: no-repeat; - background-image: url(icons/magnifier.svg); - - border-left-width: 0; + background-color: $white; + } + } - width: 3rem; - min-height: 35px; + .btn { + img {display: none;} - &:hover{ - background-color: $main-first-alt; - } - } - } - &.configure{ - width: 2rem; - position: absolute; - right: 1rem; - top: 1.25rem; - text-align: center; - // float: right; - - .btn{ - img{display: none;} - // border-radius: 0 2px 2px 0; - - background-color: transparent; - background-position: center; - background-repeat: no-repeat; - background-image: url(icons/cog-white.svg); + width: 3rem; + border-radius: 0 2px 2px 0; + + background-color: $main-first; + background-position: center; + background-repeat: no-repeat; + background-image: url(icons/magnifier.svg); - padding: 0 0.5rem; - - // border-left-width: 0; + border-left-width: 0; + min-height: 35px; - // width: 3rem; + &:hover { + background-color: $main-first-alt; + } + } + } - &:hover{ - // background-color: $main-first-alt; + &.configure { + width: 2rem; + position: absolute; + right: 1rem; + top: 1.25rem; + text-align: center; + // float: right; + .btn { + img {display: none;} + + padding: 0 0.5rem; + // border-radius: 0 2px 2px 0; + + background-color: transparent; + background-position: center; + background-repeat: no-repeat; + background-image: url(icons/cog-white.svg); + + // border-left-width: 0; + + // width: 3rem; + &:hover { + // background-color: $main-first-alt; + } + } } - } } - } - + } /*=== Body */ #global { - height: calc(100% - 85px); + height: calc(100% - 85px); } @@ -121,342 +120,352 @@ /*=== Prompt (centered) */ .prompt { - text-align: center; + text-align: center; } + .prompt label { - text-align: left; + text-align: left; } + .prompt form { - margin: 10px auto 20px auto; - width: 200px; + margin: 10px auto 20px auto; + width: 200px; } + .prompt input { - margin: 5px auto; - width: 100%; + margin: 5px auto; + width: 100%; } + .prompt p { - margin: 20px 0; + margin: 20px 0; } /*=== New article notification */ #new-article { - text-align: center; - font-size: 1rem; - background: $main-first; + background: $main-first; + font-size: 1rem; + text-align: center; } + #new-article:hover { - background: $main-first-alt; + background: $main-first-alt; } + #new-article > a { - line-height: 3em; - font-weight: bold; - color: $white; + line-height: 3em; + font-weight: bold; + color: $white; } + #new-article > a:hover { - text-decoration: none; + text-decoration: none; } /*=== Day indication */ .day { - padding: 1rem 0 0 1.25rem; - font-weight: 700; - line-height: 3em; - letter-spacing: 1px; - text-transform: uppercase; - font-size: 0.875rem; - color: $light-font-color; - // border-left: 2px solid #ecf0f1; - - .name{ - padding: 0 1rem 0 1rem; + padding: 1rem 0 0 1.25rem; + color: $light-font-color; font-size: 0.875rem; - // font-weight: 700; - color: $main-font-color; - position: relative; - left: 0; - - // letter-spacing: 1px; + font-weight: 700; + line-height: 3em; + letter-spacing: 1px; text-transform: uppercase; - } + // border-left: 2px solid #ecf0f1; + .name { + padding: 0 1rem 0 1rem; + // font-weight: 700; + color: $main-font-color; + font-size: 0.875rem; + position: relative; + left: 0; + + // letter-spacing: 1px; + text-transform: uppercase; + } } /*=== Index menu */ .nav_menu { - text-align: center; - padding: 5px 0; - - .btn{ - border-left-width: 0; - padding: 0.5rem 1rem; - background-color: $grey-lighter; - background-position: center; - background-repeat: no-repeat; - - &:hover{ - background-color: $grey-light; - } - } - - .stick{ - background: $grey-lighter; - - .btn{ - border-left-width: 0; - padding: 0.5rem 1rem; - background-color: $grey-lighter; - background-position: center; - background-repeat: no-repeat; - @include transition(all, 0.15s, ease-in-out); - - &:hover{ - background-color: $grey-medium-light; - } - - &.active{ - background-color: $main-first; - } - - img.icon{display: none;} // on efface pour afficher nos icones, mouhahaha !! - - - // actions - &#toggle-read{ - background-image: url(icons/read.svg); - } - &#toggle-read.active{ - background-image: url(icons/read-white.svg); - } - - &#toggle-unread{ - background-image: url(icons/unread.svg); - } - &#toggle-unread.active{ - background-image: url(icons/unread-white.svg); - } - - &#toggle-starred{ - background-image: url(icons/starred.svg); - } - &#toggle-starred.active{ - background-image: url(icons/starred-white.svg); - } - - &#toggle-non-starred{ - background-image: url(icons/non-starred.svg); - } - &#toggle-non-starred.active{ - background-image: url(icons/non-starred-white.svg); - } - - // read all - &.read_all{ + text-align: center; + padding: 5px 0; + + .btn { + border-left-width: 0; + padding: 0.5rem 1rem; background-color: $grey-lighter; - // min-height: 0; - color:$main-font-color; - padding: 5px 16px; - @include transition(all, 0.15s, ease-in-out); + background-position: center; + background-repeat: no-repeat; - &:hover{ - background-color: $grey-medium-light; + &:hover { + background-color: $grey-light; } - } - - // views - &.view-normal{ - background-image: url(icons/view-list.svg); - } - &.view-normal.active{ - background-image: url(icons/view-list-white.svg); - } - - &.view-global{ - background-image: url(icons/view-global.svg); - } - &.view-global.active{ - background-image: url(icons/view-global-white.svg); - } - - &.view-reader{ - background-image: url(icons/view-reader.svg); - } - &.view-reader.active{ - background-image: url(icons/view-reader-white.svg); - } - - &.view-rss{ - background-image: url(icons/rss.svg); - } - - } - .dropdown { - a.dropdown-toggle{ - border-left-width: 0; - background-image: url(icons/more.svg); - } - } - - &#nav_menu_action{ - } - &#nav_menu_read_all{ - - } - &#nav_menu_views{ - + + .stick { + background: $grey-lighter; + + .btn { + border-left-width: 0; + padding: 0.5rem 1rem; + background-color: $grey-lighter; + background-position: center; + background-repeat: no-repeat; + + @include transition(all, 0.15s, ease-in-out); + + &:hover { + background-color: $grey-medium-light; + } + + &.active { + background-color: $main-first; + } + + img.icon {display: none;} // on efface pour afficher nos icones, mouhahaha !! + + + // actions + &#toggle-read { + background-image: url(icons/read.svg); + } + + &#toggle-read.active { + background-image: url(icons/read-white.svg); + } + + &#toggle-unread { + background-image: url(icons/unread.svg); + } + + &#toggle-unread.active { + background-image: url(icons/unread-white.svg); + } + + &#toggle-starred { + background-image: url(icons/starred.svg); + } + + &#toggle-starred.active { + background-image: url(icons/starred-white.svg); + } + + &#toggle-non-starred { + background-image: url(icons/non-starred.svg); + } + + &#toggle-non-starred.active { + background-image: url(icons/non-starred-white.svg); + } + + // read all + &.read_all { + padding: 5px 16px; + // min-height: 0; + color: $main-font-color; + background-color: $grey-lighter; + + @include transition(all, 0.15s, ease-in-out); + + &:hover { + background-color: $grey-medium-light; + } + } + + // views + &.view-normal { + background-image: url(icons/view-list.svg); + } + + &.view-normal.active { + background-image: url(icons/view-list-white.svg); + } + + &.view-global { + background-image: url(icons/view-global.svg); + } + + &.view-global.active { + background-image: url(icons/view-global-white.svg); + } + + &.view-reader { + background-image: url(icons/view-reader.svg); + } + + &.view-reader.active { + background-image: url(icons/view-reader-white.svg); + } + + &.view-rss { + background-image: url(icons/rss.svg); + } + + } + + .dropdown { + a.dropdown-toggle { + border-left-width: 0; + background-image: url(icons/more.svg); + } + } } - } } #dropdown-query ~ .dropdown-menu .dropdown-header .icon { - vertical-align: middle; - background-color: $grey-medium-dark; - border-radius: 3px; + vertical-align: middle; + background-color: $grey-medium-dark; + border-radius: 3px; } /*=== Content of feed articles */ .content, .content.thin { - padding: 20px 10px; + padding: 20px 10px; - font-size: 1.125rem; - line-height: 1.8rem; + font-size: 1.125rem; + line-height: 1.8rem; - h1.title, h1{ + h1.title, h1 { + a { + color: $main-font-color; + font-family: "spectral", serif; + font-size: 2rem; - a{ - color: $main-font-color; - font-family: "spectral"; - font-size: 2rem; + &:hover { + color: $main-first; + text-decoration: none; + } + } + } - &:hover{ - color: $main-first; - text-decoration: none; - } + .author { + color: $light-font-color; + font-size: 1.125rem; + } + + p, ul { + font-size: 1.125rem; + line-height: 1.8rem; + } + + .content hr { + margin: 30px 10px; + background: $grey-medium-light; + height: 1px; + border: 0; + box-shadow: 0 2px 5px #ccc; + } + + pre { + margin: 10px auto; + padding: 10px 20px; + overflow: auto; + background: $main-first-darker; + color: $white; + font-size: 0.9rem; + border-radius: 3px; + + code { + background: transparent; + color: $white; + border: none; + } } - } - .author{ - font-size: 1.125rem; - color: $light-font-color; - } - p, ul{ - font-size: 1.125rem; - line-height: 1.8rem; - } - hr{ - } - .content hr { - margin: 30px 10px; - height: 1px; - background: $grey-medium-light; - border: 0; - box-shadow: 0 2px 5px #ccc; - } - - pre { - margin: 10px auto; - padding: 10px 20px; - overflow: auto; - background: $main-first-darker; - color: $white; - font-size: 0.9rem; - border-radius: 3px; code { - background: transparent; - color: $white; - border: none; + padding: 2px 5px; + background: $grey-lighter; + color: $grey-light; + border: 1px solid $grey-light; + border-radius: 3px; } - } - code { - padding: 2px 5px; - color: $grey-light; - background: $grey-lighter; - border: 1px solid $grey-light; - border-radius: 3px; - } - blockquote { - display: block; - margin: 0; - padding: 5px 20px; - border-top: 1px solid $grey-medium-light; - border-bottom: 1px solid $grey-medium-light; - background: $grey-lighter; - color: $main-font-color; - - p { - margin: 0; + blockquote { + margin: 0; + padding: 5px 20px; + background: $grey-lighter; + display: block; + color: $main-font-color; + border-top: 1px solid $grey-medium-light; + border-bottom: 1px solid $grey-medium-light; + + p { + margin: 0; + } } - } } /*=== Notification and actualize notification */ .notification { - position: fixed; - top: auto; - bottom: 0; - left: 0; - right: 0; - width: 100%; - height: 3rem; - - padding: 1rem 0; - text-align: center; - // font-weight: bold; - font-size: 1em; - line-height: 3em; - z-index: 10; - vertical-align: middle; - background: $grey-medium-light; - color: $grey-dark; - // border-radius: 3px; - border: none; - - .msg{ - font-size: 1rem; - display: inline-block; - } - - &.good { - background: $success-bg; - color: $white; - } - &.bad { - background: $alert-bg; - color: $white; - } - a.close { - padding: 0 15px; + + padding: 1rem 0; + background: $grey-medium-light; + width: 100%; + height: 3rem; + color: $grey-dark; + // font-weight: bold; + font-size: 1em; + // border-radius: 3px; + border: none; + position: fixed; + top: auto; + bottom: 0; + left: 0; + right: 0; + text-align: center; line-height: 3em; - border-radius: 0 3px 3px 0; - } - - &.good a.close:hover { - background: $success-text; - } - &.bad a.close:hover { - background: $alert-text; - } - - &#actualizeProgress { - line-height: 2em; - - br{ - display: none; + z-index: 10; + vertical-align: middle; + + .msg { + display: inline-block; + font-size: 1rem; + } + + &.good { + background: $success-bg; + color: $white; + } + + &.bad { + background: $alert-bg; + color: $white; + } + + a.close { + padding: 0 15px; + border-radius: 0 3px 3px 0; + line-height: 3em; + } + + &.good a.close:hover { + background: $success-text; + } + + &.bad a.close:hover { + background: $alert-text; + } + + &#actualizeProgress { + line-height: 2em; + + br { + display: none; + } } - } } /*=== Navigation menu (for articles) */ #nav_entries { - margin: 0; - text-align: center; - line-height: 3em; - table-layout: fixed; - background: $sid-bg; + margin: 0; + text-align: center; + line-height: 3em; + table-layout: fixed; + background: $sid-bg; } diff --git a/p/themes/Mapco/_list-view.scss b/p/themes/Mapco/_list-view.scss index 69cd8a81d..ab3001ee4 100644 --- a/p/themes/Mapco/_list-view.scss +++ b/p/themes/Mapco/_list-view.scss @@ -1,92 +1,97 @@ /*=== Feed articles */ .flux { - // border-left: 2px solid #ecf0f1; - background: $white; + // border-left: 2px solid #ecf0f1; + background: $white; - @include transition(all, 0.15s, ease-in-out); - - &:hover{ - background: $grey-lighter; + @include transition(all, 0.15s, ease-in-out); - &:not(.current):hover .item.title { - background: $grey-lighter; + &:hover { + background: $grey-lighter; - - } - } - &.current{ - border-left-color: $main-first; - background: $grey-lighter; - } - &.not_read{ - background: $unread-bg; //-------------------- - // border-left-color: #FF5300; - - &:hover{ - background: $unread-bg-light; //-------------------- - } - - &:not(.current):hover .item.title { - background: $unread-bg-light; + &:not(.current):hover .item.title { + background: $grey-lighter; - + + } } - .item.title{ - a{ - color: $unread-font-color; //-------------------- - } - + + &.current { + background: $grey-lighter; + border-left-color: $main-first; } - .item.website{ - a{ - color: $unread-font-color; //-------------------- - } + + &.not_read { + background: $unread-bg; //-------------------- + // border-left-color: #FF5300; + &:hover { + background: $unread-bg-light; //-------------------- + } + + &:not(.current):hover .item.title { + background: $unread-bg-light; + + + } + + .item.title { + a { + color: $unread-font-color; //-------------------- + } + + } + + .item.website { + a { + color: $unread-font-color; //-------------------- + } + } + + .item.date { + color: unquote($unread-font-color+"99"); //-------------------- + } } - .item.date{ - color: unquote($unread-font-color+"99"); //-------------------- + + &.favorite { + background: $fav-light; + border-left-color: $fav-bg; + + @include transition(all, 0.15s, ease-in-out); + + &:not(.current):hover .item.title { + background: $fav-light; + } } -} - - &.favorite { - background: $fav-light; - border-left-color: $fav-bg; - @include transition(all, 0.15s, ease-in-out); + .website { + a { + color: $main-font-color; + opacity: 0.75; + } - &:not(.current):hover .item.title { - background: $fav-light; + .favicon { + padding: 5px; + } } - } - .website{ - a{ - color: $main-font-color; - opacity: 0.75; + .date { + color: $main-font-color; + font-size: 0.85rem; + opacity: 0.75; } - - .favicon { - padding: 5px; + + .bottom { + font-size: 1rem; + text-align: center; } - } - .date { - font-size: 0.85rem; - color: $main-font-color; - opacity: 0.75; - } - - .bottom { - font-size: 1rem; - text-align: center; - } } .flux_header { - font-size: 1rem; - cursor: pointer; - border-top: 1px solid $grey-light; - - .title { font-size: 1rem; - } + cursor: pointer; + border-top: 1px solid $grey-light; + + .title { + font-size: 1rem; + } } diff --git a/p/themes/Mapco/_logs.scss b/p/themes/Mapco/_logs.scss index ae1e24c6c..82eead3c9 100644 --- a/p/themes/Mapco/_logs.scss +++ b/p/themes/Mapco/_logs.scss @@ -4,13 +4,14 @@ overflow: hidden; border: 1px solid $grey-medium-dark; } + .log { margin: 10px 0; padding: 5px 2%; - overflow: auto; - font-size: 0.8rem; background: $grey-lighter; color: $grey-dark; + font-size: 0.8rem; + overflow: auto; } .log > .date { @@ -18,16 +19,20 @@ padding: 5px 10px; border-radius: 20px; } + .log.error > .date { background: $alert-bg; color: #fff; } + .log.warning > .date { background: $warning-bg; } + .log.notice > .date { background: $grey-light; } + .log.debug > .date { background: $main-first-darker; color: $white; diff --git a/p/themes/Mapco/_mixins.scss b/p/themes/Mapco/_mixins.scss index 3542ade6b..9dbed6945 100644 --- a/p/themes/Mapco/_mixins.scss +++ b/p/themes/Mapco/_mixins.scss @@ -1,59 +1,71 @@ +/* stylelint-disable property-no-vendor-prefix */ + /* FUNCTIONS */ //animation + @mixin transition($target, $duration, $ease) { - -webkit-transition: $target $duration $ease; - -moz-transition: $target $duration $ease; - -o-transition: $target $duration $ease; - -ms-transition: $target $duration $ease; - transition: $target $duration $ease; + -webkit-transition: $target $duration $ease; + -moz-transition: $target $duration $ease; + -o-transition: $target $duration $ease; + -ms-transition: $target $duration $ease; + transition: $target $duration $ease; } //animation + @mixin animation-delay($delay) { - -webkit-animation-delay: $delay; - /* Safari 4.0 - 8.0 */ - animation-delay: $delay; + -webkit-animation-delay: $delay; + /* Safari 4.0 - 8.0 */ + animation-delay: $delay; } //animation + @mixin animation($animate...) { - $max: length($animate); - $animations: ''; - @for $i from 1 through $max { - $animations: #{$animations + nth($animate, $i)}; - @if $i < $max { - $animations: #{$animations + ", "}; - } - } - -webkit-animation: $animations; - -moz-animation: $animations; - -o-animation: $animations; - -ms-transition: $animations; - animation: $animations; + $max: length($animate); + $animations: ''; + + @for $i from 1 through $max { + $animations: #{$animations + nth($animate, $i)}; + + @if $i < $max { + $animations: #{$animations + ", "}; + } + } + -webkit-animation: $animations; + -moz-animation: $animations; + -o-animation: $animations; + -ms-transition: $animations; + animation: $animations; } //keyframes + @mixin keyframes($animationName) { - @-webkit-keyframes #{$animationName} { - @content; - } - @-moz-keyframes #{$animationName} { - @content; - } - @-o-keyframes #{$animationName} { - @content; - } - @keyframes #{$animationName} { - @content; - } + + @-webkit-keyframes #{$animationName} { + @content; + } + + @-moz-keyframes #{$animationName} { + @content; + } + + @-o-keyframes #{$animationName} { + @content; + } + + @keyframes #{$animationName} { + @content; + } } -@mixin border-radius($radius: 4px){ - -moz-border-radius: $radius; - -webkit-border-radius: $radius; - -ms-border-radius: $radius; - -o-border-radius: $radius; - -khtml-border-radius: $radius; - border-radius: $radius; +@mixin border-radius($radius: 4px) { + -moz-border-radius: $radius; + -webkit-border-radius: $radius; + -ms-border-radius: $radius; + -o-border-radius: $radius; + -khtml-border-radius: $radius; + border-radius: $radius; } diff --git a/p/themes/Mapco/_mobile.scss b/p/themes/Mapco/_mobile.scss index dcf4e74f2..d646f3469 100644 --- a/p/themes/Mapco/_mobile.scss +++ b/p/themes/Mapco/_mobile.scss @@ -1,169 +1,185 @@ /*=== MOBILE */ /*===========*/ -@media(max-width: 840px) { - html, body{ - // font-size: 1rem; - } - ul.nav{ - .item{ - width: 100%; - - img{ - display: none; - } - a{ - display: inline-block; - padding: 1rem 1rem 1rem 2.5rem; - color: $sid-font-color; - width: 100%; - - background: url("../../themes/icons/logout.svg") no-repeat $sid-bg-dark 3% center; + +@media (max-width: 840px) { + html, body { + // font-size: 1rem; + } + + ul.nav { + .item { + width: 100%; + + img { + display: none; + } + + a { + padding: 1rem 1rem 1rem 2.5rem; + + background: url("../../themes/icons/logout.svg") no-repeat $sid-bg-dark 3% center; + display: inline-block; + width: 100%; + color: $sid-font-color; + + @include transition(all, 0.2s, ease-in-out); + + &:hover, + &:active { + background: url("../../themes/icons/logout.svg") no-repeat $alert-bg 3% center; + text-decoration: none; + } + } + + } + + } + + .aside { @include transition(all, 0.2s, ease-in-out); - &:hover, - &:active{ - background: url("../../themes/icons/logout.svg") no-repeat $alert-bg 3% center; - text-decoration: none; + &.aside_feed { + padding: 0; } - } + .tree .tree-folder .tree-folder-items .item a { + padding: 0.5rem 1rem; + } } - - } - .aside { - @include transition(all, 0.2s, ease-in-out); - - &.aside_feed { - padding: 0; + + .aside .toggle_aside, + #panel .close { + background: $main-first-alt; + display: block; + width: 100%; + height: 50px; + line-height: 50px; + text-align: center; } - .tree .tree-folder .tree-folder-items .item a{ - padding: 0.5rem 1rem; + .header { + padding: 0.5rem; + + .item { + &.title { + display: none; + } + + &.search { + input { + width: 90%; + height: 3.5rem; + + &:focus { + width: 100%; + + } + } + + .btn { + min-height: 49px; + padding: 0.5rem 2rem; + } + } + + &.configure { + width: 2.75rem; + top: 3.125rem; + + .dropdown { + .btn { + padding: 1.125rem; + } + } + } + } } - } - .aside .toggle_aside, - #panel .close { - display: block; - width: 100%; - height: 50px; - line-height: 50px; - text-align: center; - background: $main-first-alt; - } - - .header{ - padding: 0.5rem; - .item{ - &.title{ - display: none; - } - - &.search{ - input{ - width: 90%; - height: 3.5rem; - - &:focus{ - width: 100%; - } + .nav_menu { + .btn { + margin: 0; + padding: 0.85rem 1.25rem; } - .btn{ - min-height: 49px; - padding: 0.5rem 2rem; + + .stick { + margin: 0.5rem 0.5rem; + + .btn { + margin: 0; + padding: 0.85rem 1.25rem; + + &.read_all { + padding: 0.85rem 1.25rem; + } + } } - } - &.configure{ - width: 2.75rem; - top: 3.125rem; - .dropdown{ - .btn{ - padding: 1.125rem; - } + + .search { + display: none; + max-width: 97%; + + .input { + + max-width: 97%; + width: 90px; + + &:focus { + width: 400px; + } + } } - } - } - } - - .nav_menu{ - .btn { - margin: 0; - padding: 0.85rem 1.25rem; } - .stick { - margin: 0.5rem 0.5rem; - .btn{ - margin: 0; - padding: 0.85rem 1.25rem; - - &.read_all{ - padding: 0.85rem 1.25rem; + #stream { + .flux { + .flux_header { + padding: 0.5rem 0; + } } - } } - .search { - display: none; - max-width: 97%; - .input{ - max-width: 97%; - width: 90px; - &::focus{ - width: 400px; + .day { + text-align: center; + padding: 1rem 0; + + .name { + padding: 0; + // font-size: 1.1rem; + display: block; + width: 100%; + line-height: 1.5rem; + margin-bottom: 1rem; } - } + } - } - #stream{ - .flux{ - .flux_header{ - padding: 0.5rem 0; - } + + .pagination { + margin: 0 0 3.5em; } - } - - - - .day{ - text-align: center; - padding: 1rem 0; - .name { - // font-size: 1.1rem; - display: block; - padding: 0; - width: 100%; - line-height: 1.5rem; - margin-bottom: 1rem; + + #nav_entries { + line-height: 4.5rem; } - } + .notification { + border-radius: 0; - .pagination { - margin: 0 0 3.5em; - } + a.close { + background: transparent; + display: block; + left: 0; + } - #nav_entries{ - line-height: 4.5rem; - } + a.close:hover { + opacity: 0.5; + } - .notification { - border-radius: 0; + a.close .icon { + display: none; - a.close { - display: block; - left: 0; - background: transparent; - } - a.close:hover { - opacity: 0.5; - } - a.close .icon { - display: none; - + } } - } } diff --git a/p/themes/Mapco/_reader-view.scss b/p/themes/Mapco/_reader-view.scss index 4368908d6..e75e43d00 100644 --- a/p/themes/Mapco/_reader-view.scss +++ b/p/themes/Mapco/_reader-view.scss @@ -6,8 +6,9 @@ color: $main-font-color; border: none; } + #stream.reader .flux .author { margin: 0 0 10px; - font-size: 90%; color: $grey-medium-dark; + font-size: 90%; } diff --git a/p/themes/Mapco/_sidebar.scss b/p/themes/Mapco/_sidebar.scss index 62ec1c1cf..a26ff647c 100644 --- a/p/themes/Mapco/_sidebar.scss +++ b/p/themes/Mapco/_sidebar.scss @@ -1,134 +1,139 @@ /*=== Tree */ .tree { - margin: 10px 0; - - &#sidebar{ - scrollbar-color: rgba(255,255, 0, 0.1) rgba(0, 0, 0, 0.05); - scrollbar-color: unquote($sid-font-color+"33") unquote($sid-font-color+"22"); - } - - - .tree-folder{ - border-bottom: 1px solid $sid-sep; - - .tree-folder-title { - position: relative; - background: $sid-bg; - font-size: 0.85rem; - letter-spacing: 1px; - padding: 12px 16px; - font-weight: 700; - text-transform: uppercase; - - .title { - background: inherit; - color: $sid-font-color; - &:hover{ - text-decoration: none; - } - } - } - &.active { - .tree-folder-title { - background: $sid-bg; - font-weight: bold; - } + margin: 10px 0; + + &#sidebar { + scrollbar-color: rgba(255,255, 0, 0.1) rgba(0, 0, 0, 0.05); + scrollbar-color: unquote($sid-font-color+"33") unquote($sid-font-color+"22"); } - .tree-folder-items { - background: $sid-bg-alt; - .item{ - padding: 0 1rem; - line-height: 2.5rem; - font-size: 1rem; - font-weight: 400; - @include transition(all, 0.15s, ease-in-out); - &.active{ - background: $sid-active; + .tree-folder { + border-bottom: 1px solid $sid-sep; - .dropdown li a{ - color: $main-font-color; + .tree-folder-title { + padding: 12px 16px; + background: $sid-bg; + position: relative; + font-size: 0.85rem; + letter-spacing: 1px; + font-weight: 700; + text-transform: uppercase; - &:hover{ - color: $sid-font-color; - } - } + .title { + background: inherit; + color: $sid-font-color; - a{ - color: $sid-active-font; - } + &:hover { + text-decoration: none; + } + } } - &:hover{ - background: $sid-bg-dark; + &.active { + .tree-folder-title { + background: $sid-bg; + font-weight: bold; + } } - a{ - text-decoration: none; - color: $sid-font-color; + .tree-folder-items { + background: $sid-bg-alt; + + .item { + padding: 0 1rem; + line-height: 2.5rem; + font-size: 1rem; + font-weight: 400; + + @include transition(all, 0.15s, ease-in-out); + + &.active { + background: $sid-active; + + .dropdown li a { + color: $main-font-color; + + &:hover { + color: $sid-font-color; + } + } + + a { + color: $sid-active-font; + } + } + + &:hover { + background: $sid-bg-dark; + } + + a { + text-decoration: none; + color: $sid-font-color; + } + } + + .feed .item-title:not([data-unread="0"])::before { + margin: 11px 6px 0 4px; + padding: 3px 4px; + background: $sid-pills; + display: block; + float: left; + font-size: 0.75rem; + border-radius: 12px; + content: attr(data-unread); + text-align: center; + line-height: 0.75rem; + } } - } - - .feed .item-title:not([data-unread="0"])::before { - content: attr(data-unread); - background: $sid-pills; - font-size: 0.75rem; - display: block; - float: left; - padding: 3px 4px; - text-align:center; - border-radius: 12px; - margin: 11px 6px 0 4px; - line-height: 0.75rem; - } - .feed .item-title:not([data-unread="0"]) { - - } } - } } /*=== Buttons */ .stick { - vertical-align: middle; - font-size: 0; - - input, .btn { - border-radius: 0; - } - .btn:first-child, - input:first-child { - border-radius: 5px 0 0 5px; - } - .btn:last-child, input:last-child, .btn + .dropdown > .btn { - border-radius: 0 5px 5px 0; - } - .btn + .btn, - .btn + input, - .btn + .dropdown > .btn, - input + .btn, - input + input, - input + .dropdown > .btn, - .dropdown + .btn, - .dropdown + input, - .dropdown + .dropdown > .btn { - border-left: 1px solid $grey-medium-light; - } + vertical-align: middle; + font-size: 0; + + input, .btn { + border-radius: 0; + } + + .btn:first-child, + input:first-child { + border-radius: 5px 0 0 5px; + } + + .btn:last-child, input:last-child, .btn + .dropdown > .btn { + border-radius: 0 5px 5px 0; + } + + .btn + .btn, + .btn + input, + .btn + .dropdown > .btn, + input + .btn, + input + input, + input + .dropdown > .btn, + .dropdown + .btn, + .dropdown + input, + .dropdown + .dropdown > .btn { + border-left: 1px solid $grey-medium-light; + } } .aside { - background: $sid-bg; - - &.aside_feed { - padding: 10px 0; - text-align: center; background: $sid-bg; - } - &.aside_feed .tree { - margin: 10px 0 50px; - } + + &.aside_feed { + padding: 10px 0; + text-align: center; + background: $sid-bg; + } + + &.aside_feed .tree { + margin: 10px 0 50px; + } } @@ -138,154 +143,171 @@ /*=== Navigation */ - -.nav-list{ - .nav-header, - .item{ - height: 2.5em; - line-height: 2.5em; - font-size: 1rem; - } - .item{ - background: $sid-bg; - @include transition(all, 0.15s, ease-in-out); - a{ - padding: 0 1rem; - color: $sid-font-color; - } - .error{ - a{ - color: $alert-bg; - } +.nav-list { + .nav-header, + .item { + height: 2.5em; + line-height: 2.5em; + font-size: 1rem; } - &:hover{ - background: $sid-bg-dark; - color: $sid-font-color; - - .error{ - a{ - color: $sid-font-color; - background: $main-first; + + .item { + background: $sid-bg; + + @include transition(all, 0.15s, ease-in-out); + + a { + padding: 0 1rem; + color: $sid-font-color; } - } - .empty{ - a{ - color: $sid-font-color; - background: $warning-bg; + + .error { + a { + color: $alert-bg; + } } - } - - a{ - color: $sid-font-color; - text-decoration: none; - } - } - &.active{ - background: $main-first; - color: $white; - - .error{ - a{ - color: $white; - background: $main-first; + + &:hover { + background: $sid-bg-dark; + color: $sid-font-color; + + .error { + a { + background: $main-first; + color: $sid-font-color; + } + } + + .empty { + a { + background: $warning-bg; + color: $sid-font-color; + } + } + + a { + color: $sid-font-color; + text-decoration: none; + } } - } - .empty{ - a{ - color: $white; - background: $warning-bg; + &.active { + background: $main-first; + color: $white; + + .error { + a { + background: $main-first; + color: $white; + } + } + + .empty { + a { + background: $warning-bg; + color: $white; + } + } + + a { + color: $white; + text-decoration: none; + } } - } - - a{ - color: $white; - text-decoration: none; - } + } - - } - &.empty{ - a{ - color: $warning-bg; + + &.empty { + a { + color: $warning-bg; + } } - } - .disable{ - text-align: center; - background: $grey-lighter; - color: $grey-medium-dark; - } - .nav-header { - padding: 0 10px; - font-weight: bold; - color: $grey-dark; - text-transform: uppercase; - letter-spacing: 1px; - margin-top: 1rem; - } - - .nav-form { - padding: 3px; - text-align: center; - } - - .nav-head { - margin: 0; - text-align: right; - // background: #34495e; - color: $white; - a { - color: $white; - } - .item { - padding: 5px 10px; - font-size: 0.9rem; - line-height: 1.5rem; - } - } + .disable { + text-align: center; + background: $grey-lighter; + color: $grey-medium-dark; + } + + .nav-header { + padding: 0 10px; + font-weight: bold; + color: $grey-dark; + text-transform: uppercase; + letter-spacing: 1px; + margin-top: 1rem; + } + + .nav-form { + padding: 3px; + text-align: center; + } + + .nav-head { + margin: 0; + text-align: right; + // background: #34495e; + color: $white; + + a { + color: $white; + } + + .item { + padding: 5px 10px; + font-size: 0.9rem; + line-height: 1.5rem; + } + } } /*=== Aside main page (categories) */ .aside_feed .tree-folder-title > .title:not([data-unread="0"])::after { - position: absolute; - right: 0; - line-height: 1.5rem; - background: $sid-pills; - border-radius: 12px; - padding: 0 0.75rem; - margin: -0.5rem 1rem 0 0; - text-align: center; + margin: -0.5rem 1rem 0 0; + padding: 0 0.75rem; + background: $sid-pills; + border-radius: 12px; + position: absolute; + right: 0; + line-height: 1.5rem; + text-align: center; } .feed.item.empty.active { - background: $grey-dark; + background: $grey-dark; } + .feed.item.error.active { - background: $grey-dark; + background: $grey-dark; } + .feed.item.empty, .feed.item.empty > a { - color: $grey-dark; + color: $grey-dark; } + .feed.item.error, .feed.item.error > a { - color: $grey-dark; + color: $grey-dark; } + .feed.item.empty.active, .feed.item.error.active, .feed.item.empty.active > a, .feed.item.error.active > a { - color: $white; + color: $white; } + .aside_feed .tree-folder-items .dropdown-menu::after { - left: 2px; + left: 2px; } + .aside_feed .tree-folder-items .item .dropdown-target:target ~ .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item:hover .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item.active .dropdown-toggle > .icon { - border-radius: 3px; + border-radius: 3px; } -.aside_feed .stick #btn-importExport{ - border-left-color: $sid-bg; + +.aside_feed .stick #btn-importExport { + border-left-color: $sid-bg; } diff --git a/p/themes/Mapco/_stats.scss b/p/themes/Mapco/_stats.scss index f287efa08..592419166 100644 --- a/p/themes/Mapco/_stats.scss +++ b/p/themes/Mapco/_stats.scss @@ -9,6 +9,7 @@ .stat tr { border: none; } + .stat > table td, .stat > table th { border-bottom: 1px solid $grey-medium-light; @@ -17,11 +18,13 @@ .stat > .horizontal-list { margin: 0 0 5px; } + .stat > .horizontal-list .item { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } + .stat > .horizontal-list .item:first-child { width: 270px; } diff --git a/p/themes/Mapco/_tables.scss b/p/themes/Mapco/_tables.scss index 608e19aca..2d0311608 100644 --- a/p/themes/Mapco/_tables.scss +++ b/p/themes/Mapco/_tables.scss @@ -7,9 +7,11 @@ tr, th, td { padding: 0.5em; border: 1px solid $grey-medium-light; } + th { background: $grey-lighter; } + form td, form th { font-weight: normal; diff --git a/p/themes/Mapco/_variables.scss b/p/themes/Mapco/_variables.scss index b01d9bd67..993d263bf 100644 --- a/p/themes/Mapco/_variables.scss +++ b/p/themes/Mapco/_variables.scss @@ -1,6 +1,6 @@ // La couleur principale du thème -$main-first: #3366cc; // couleur principale -$main-first-alt: #2255cc; // var pour les hovers +$main-first: #36c; // couleur principale +$main-first-alt: #25c; // var pour les hovers $main-first-light: #effcfd; // var light 1 $main-first-lighter: #f7fdfe; // var light 2 $main-first-dark: #35363c; // var pour les hovers @@ -15,11 +15,11 @@ $white: #fff; // le blanc (des fois qu'on aurait envie de le teinter un peu) // on essaiera de teinter ces gris suivant la couleur principale $grey-darker: #3b3f4d; $grey-dark: #5b6871; -$grey-medium-dark: #a6a7ae; +$grey-medium-dark: #a6a7ae; $grey-medium: #c5ced3; -$grey-medium-light: #d5d8db; -$grey-light: #eff0f2; -$grey-lighter: #f9fafb; +$grey-medium-light: #d5d8db; +$grey-light: #eff0f2; +$grey-lighter: #f9fafb; $unread-font-color: $main-first; $unread-bg: #f2f6f8; @@ -39,15 +39,15 @@ $success-light: #cffde7; $success-text: #0c7540; // les favoris -$fav-bg: #FFC300; -$fav-light: #FFF6DA; +$fav-bg: #ffc300; +$fav-light: #fff6da; // la couleur de sidebar, utile si on a envie d'un thème qui aurait une sidebar foncé, e.g. -$sid-font-color: #FFFFFF; // la couleur de fond de la barre de gauche et du header +$sid-font-color: #fff; // la couleur de fond de la barre de gauche et du header $sid-bg: #303136; // le background général de la barre de gauche, et du header $sid-bg-alt: #26272a; // le background de l'intérieur des groupes $sid-bg-dark: #17181a; // les hovers $sid-sep: #3f3f3f; // les séparateurs $sid-active: $main-first; // la couleur active -$sid-active-font: #FFFFFF; // la couleur active +$sid-active-font: #fff; // la couleur active $sid-pills: rgba(0,0,0, 0.25); // les gélules diff --git a/p/themes/Mapco/mapco.css b/p/themes/Mapco/mapco.css index a69a4f960..b144dca58 100644 --- a/p/themes/Mapco/mapco.css +++ b/p/themes/Mapco/mapco.css @@ -46,33 +46,34 @@ font-stretch: normal; font-weight: 700; src: local("Spectral"), url("../fonts/Spectral-BoldItalic.woff") format("woff"); } +/* stylelint-disable property-no-vendor-prefix */ /* FUNCTIONS */ /* btns */ .btn { + margin: 0; + padding: 0.5rem 1.5rem; + background: #f9fafb; display: inline-block; + color: #5b6871; + font-size: 1rem; + border: none; + border-radius: 5px; min-height: 38px; min-width: 15px; line-height: 25px; - margin: 0; - padding: 0.5rem 1.5rem; - font-size: 1rem; vertical-align: middle; cursor: pointer; overflow: hidden; - background: #f9fafb; - border-radius: 5px; - border: none; - color: #5b6871; -webkit-transition: all 0.15s ease-in-out; -moz-transition: all 0.15s ease-in-out; -o-transition: all 0.15s ease-in-out; -ms-transition: all 0.15s ease-in-out; transition: all 0.15s ease-in-out; } .btn.btn-important { - background: #3366cc; + background: #36c; color: #fff; } .btn.btn-important:hover, .btn.btn-important:active { - background: #2255cc; } + background: #25c; } .btn.btn-attention { background: #f5633e; color: #fff; } @@ -87,10 +88,10 @@ a.btn { /*=== Forms */ legend { - display: inline-block; - width: auto; margin: 2rem 0 1rem 0; padding: 0; + display: inline-block; + width: auto; font-size: 1rem; clear: both; text-transform: uppercase; @@ -108,23 +109,23 @@ textarea { height: 100px; } input, select, textarea, button { - font-family: "lato", "Helvetica", "Arial", sans-serif; - min-height: 25px; padding: 5px 10px; - line-height: 25px; - vertical-align: middle; background: #fff; - border: 1px solid #eff0f2; - font-size: 1rem; color: #5b6871; - border-radius: 2px; } + font-family: "lato", "Helvetica", "Arial", sans-serif; + font-size: 1rem; + border: 1px solid #eff0f2; + border-radius: 2px; + min-height: 25px; + line-height: 25px; + vertical-align: middle; } option { padding: 0 .5em; } input:focus, select:focus, textarea:focus { color: #303136; - border-color: #3366cc; } + border-color: #36c; } input:invalid, select:invalid { color: #f5633e; @@ -135,11 +136,7 @@ input:disabled, select:disabled { background: #eff0f2; } input.extend { - transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; } + transition: width 200ms linear; } .form-group { padding: 5px; @@ -194,29 +191,24 @@ form th { /*=== Dropdown */ .dropdown-menu { - background: #f9fafb; margin: 0; - font-size: 1rem; - text-align: left; padding: 0.5rem 0 1rem 0; + background: #f9fafb; + font-size: 1rem; border: none; border-radius: 3px; - -webkit-box-shadow: 0px 6px 8px 0px rgba(0, 0, 0, 0.35); - -moz-box-shadow: 0px 6px 8px 0px rgba(0, 0, 0, 0.35); - box-shadow: 0px 6px 8px 0px rgba(0, 0, 0, 0.35); } + box-shadow: 0px 6px 8px 0px rgba(0, 0, 0, 0.35); + text-align: left; } .dropdown-menu::after { + background: white; + width: 10px; + height: 10px; content: ""; position: absolute; top: -4px; right: 13px; - width: 10px; - height: 10px; z-index: -10; - transform: rotate(45deg); - -moz-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); - background: white; } + transform: rotate(45deg); } .dropdown-menu .dropdown-header { margin: 1.75rem 0 0.5rem 2rem; font-weight: bold; @@ -232,18 +224,18 @@ form th { transition: all 0.075s ease-in-out; } .dropdown-menu .item a, .dropdown-menu .item span, .dropdown-menu .item .as-link { padding: 0 2rem; - line-height: 2.5em; + color: #303136; font-size: 1rem; - color: #303136; } + line-height: 2.5em; } .dropdown-menu .item:hover { - background: #3366cc; + background: #36c; color: #fff; } .dropdown-menu .item:hover a, .dropdown-menu .item:hover button { text-decoration: none; color: #fff; } .dropdown-menu .item[aria-checked="true"] a::before { - font-weight: bold; - margin: 0 0 0 -14px; } + margin: 0 0 0 -14px; + font-weight: bold; } .dropdown-menu .input select, .dropdown-menu .input input { margin: 0 auto 5px; padding: 2px 5px; @@ -252,32 +244,26 @@ form th { margin: 0.75rem 0; border-bottom: 1px solid #eff0f2; } -.tree .tree-folder .tree-folder-items .dropdown-menu .item, .tree .tree-folder .tree-folder-items .dropdown-menu .item { padding: 0; } .tree .tree-folder .tree-folder-items .dropdown-menu .item a, - .tree .tree-folder .tree-folder-items .dropdown-menu .item button, - .tree .tree-folder .tree-folder-items .dropdown-menu .item a, .tree .tree-folder .tree-folder-items .dropdown-menu .item button { color: #303136; } .tree .tree-folder .tree-folder-items .dropdown-menu .item a:hover, - .tree .tree-folder .tree-folder-items .dropdown-menu .item button:hover, - .tree .tree-folder .tree-folder-items .dropdown-menu .item a:hover, .tree .tree-folder .tree-folder-items .dropdown-menu .item button:hover { color: #fff; } - .tree .tree-folder .tree-folder-items .dropdown-menu .item:hover, .tree .tree-folder .tree-folder-items .dropdown-menu .item:hover { - background: #3366cc; } + background: #36c; } /*=== Alerts */ .alert { margin: 1rem 0; padding: 1rem; - font-size: 1rem; background: #f9fafb; + color: #5b6871; + font-size: 1rem; border: 1px solid #c5ced3; border-radius: 3px; - color: #5b6871; text-shadow: 0 0 1px #eff0f2; } .alert-head { @@ -289,43 +275,43 @@ form th { .alert-warn { background: #fdfde0; - border: 1px solid #73762f33; - color: #73762f; } + color: #73762f; + border: 1px solid #73762f33; } .alert-success { background: #cffde7; - border: 1px solid #0c754033; - color: #0c7540; } + color: #0c7540; + border: 1px solid #0c754033; } .alert-error { background: #fde0d8; - border: 1px solid #73341f33; - color: #73341f; } + color: #73341f; + border: 1px solid #73341f33; } /*=== Pagination */ .pagination { - text-align: center; - font-size: 0.8em; background: #eff0f2; - color: #303136; } + color: #303136; + font-size: 0.8em; + text-align: center; } .pagination .item.pager-current { - font-weight: bold; - font-size: 1.5em; background: #303136; - color: #eff0f2; } + color: #eff0f2; + font-size: 1.5em; + font-weight: bold; } .pagination .item a { display: block; + color: #303136; font-style: italic; line-height: 3em; - text-decoration: none; - color: #303136; } + text-decoration: none; } .pagination .item a:hover { background: #303136; color: #eff0f2; } .pagination .loading, .pagination a:hover.loading { - font-size: 0; - background: url("loader.gif") center center no-repeat #34495e; } + background: url("loader.gif") center center no-repeat #34495e; + font-size: 0; } .content .pagination { margin: 0; @@ -333,11 +319,9 @@ form th { /*=== Boxes */ .box { + background: #fff; border: none; border-radius: 3px; - background: #fff; - -webkit-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25); - -moz-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25); box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25); } .box .box-title { margin: 0; @@ -348,20 +332,20 @@ form th { .box .box-title img { margin-right: 0.75rem; } .box .box-title:hover .configure { - visibility: visible; background: url("icons/cog.svg") no-repeat 4px 4px; + display: block; + float: left; width: 1.75rem; height: 1.75rem; - display: block; border-radius: 2px; - float: left; + visibility: visible; margin-right: 0.5rem; } .box .box-title:hover .configure .icon { - vertical-align: middle; + display: none; border-radius: 3px; - display: none; } + vertical-align: middle; } .box .box-title:hover .configure:hover { - background: url("icons/cog-white.svg") no-repeat 4px 4px #3366cc; } + background: url("icons/cog-white.svg") no-repeat 4px 4px #36c; } .box .box-title .configure { visibility: hidden; } .box .box-title form input { @@ -370,35 +354,35 @@ form th { float: right; } .box .box-title form .dropdown a.dropdown-toggle { padding: 0; + border-radius: 0; background-image: url(icons/more.svg); background-repeat: no-repeat; - background-position: right 8px; - border-radius: 0; } + background-position: right 8px; } .box .box-title form .dropdown a.dropdown-toggle img { display: none; } .box .box-content .item { padding: 0.5rem 0.75rem; - font-size: 1rem; color: #303136; - line-height: 1.7em; - border-bottom: 1px solid #eff0f2; } + font-size: 1rem; + border-bottom: 1px solid #eff0f2; + line-height: 1.7em; } .box .box-content .item img { margin-right: 0.75rem; } .box .box-content .item .configure { - visibility: hidden; + background: url("icons/cog.svg") no-repeat 4px 4px; + display: block; + float: left; width: 1.75rem; height: 1.75rem; - display: block; border-radius: 2px; - float: left; - margin-right: 0.5rem; - background: url("icons/cog.svg") no-repeat 4px 4px; } + visibility: hidden; + margin-right: 0.5rem; } .box .box-content .item .configure .icon { - vertical-align: middle; + display: none; border-radius: 3px; - display: none; } + vertical-align: middle; } .box .box-content .item .configure:hover { - background: url("icons/cog-white.svg") no-repeat 4px 4px #3366cc; } + background: url("icons/cog-white.svg") no-repeat 4px 4px #36c; } .box .box-content .item:hover .configure { visibility: visible; } .box .box-content .item:last-child { @@ -409,24 +393,24 @@ form th { text-align: center; text-decoration: none; background: #effcfd; - color: #3366cc; + color: #36c; -webkit-transition: all 0.15s ease-in-out; -moz-transition: all 0.15s ease-in-out; -o-transition: all 0.15s ease-in-out; -ms-transition: all 0.15s ease-in-out; transition: all 0.15s ease-in-out; } #bigMarkAsRead:hover { - background: #3366cc; + background: #36c; color: #fff; } #bigMarkAsRead:hover .bigTick { background: url(icons/tick-white.svg) center no-repeat; } #bigMarkAsRead .bigTick { margin: 0.5rem 0; - display: inline-block; - text-indent: -9999px; background: url(icons/tick-color.svg) center no-repeat; - height: 64px; + display: inline-block; width: 64px; + height: 64px; + text-indent: -9999px; white-space: nowrap; } .formLogin { @@ -442,8 +426,8 @@ form th { .formLogin form#crypto-form div { margin-bottom: 1rem; } .formLogin form#crypto-form div label { - font-size: 1rem; - color: #c5ced3; } + color: #c5ced3; + font-size: 1rem; } .formLogin form#crypto-form div input { background: #1d1e22; } .formLogin form#crypto-form div input:focus { @@ -467,20 +451,20 @@ form th { margin: 10px 0; } .tree#sidebar { scrollbar-color: rgba(255, 255, 0, 0.1) rgba(0, 0, 0, 0.05); - scrollbar-color: #FFFFFF33 #FFFFFF22; } + scrollbar-color: #fff33 #fff22; } .tree .tree-folder { border-bottom: 1px solid #3f3f3f; } .tree .tree-folder .tree-folder-title { - position: relative; + padding: 12px 16px; background: #303136; + position: relative; font-size: 0.85rem; letter-spacing: 1px; - padding: 12px 16px; font-weight: 700; text-transform: uppercase; } .tree .tree-folder .tree-folder-title .title { background: inherit; - color: #FFFFFF; } + color: #fff; } .tree .tree-folder .tree-folder-title .title:hover { text-decoration: none; } .tree .tree-folder.active .tree-folder-title { @@ -499,28 +483,28 @@ form th { -ms-transition: all 0.15s ease-in-out; transition: all 0.15s ease-in-out; } .tree .tree-folder .tree-folder-items .item.active { - background: #3366cc; } + background: #36c; } .tree .tree-folder .tree-folder-items .item.active .dropdown li a { color: #303136; } .tree .tree-folder .tree-folder-items .item.active .dropdown li a:hover { - color: #FFFFFF; } + color: #fff; } .tree .tree-folder .tree-folder-items .item.active a { - color: #FFFFFF; } + color: #fff; } .tree .tree-folder .tree-folder-items .item:hover { background: #17181a; } .tree .tree-folder .tree-folder-items .item a { text-decoration: none; - color: #FFFFFF; } + color: #fff; } .tree .tree-folder .tree-folder-items .feed .item-title:not([data-unread="0"])::before { - content: attr(data-unread); + margin: 11px 6px 0 4px; + padding: 3px 4px; background: rgba(0, 0, 0, 0.25); - font-size: 0.75rem; display: block; float: left; - padding: 3px 4px; - text-align: center; + font-size: 0.75rem; border-radius: 12px; - margin: 11px 6px 0 4px; + content: attr(data-unread); + text-align: center; line-height: 0.75rem; } /*=== Buttons */ @@ -570,30 +554,30 @@ form th { transition: all 0.15s ease-in-out; } .nav-list .item a { padding: 0 1rem; - color: #FFFFFF; } + color: #fff; } .nav-list .item .error a { color: #f5633e; } .nav-list .item:hover { background: #17181a; - color: #FFFFFF; } + color: #fff; } .nav-list .item:hover .error a { - color: #FFFFFF; - background: #3366cc; } + background: #36c; + color: #fff; } .nav-list .item:hover .empty a { - color: #FFFFFF; - background: #f4f762; } + background: #f4f762; + color: #fff; } .nav-list .item:hover a { - color: #FFFFFF; + color: #fff; text-decoration: none; } .nav-list .item.active { - background: #3366cc; + background: #36c; color: #fff; } .nav-list .item.active .error a { - color: #fff; - background: #3366cc; } + background: #36c; + color: #fff; } .nav-list .item.active .empty a { - color: #fff; - background: #f4f762; } + background: #f4f762; + color: #fff; } .nav-list .item.active a { color: #fff; text-decoration: none; } @@ -626,13 +610,13 @@ form th { /*=== Aside main page (categories) */ .aside_feed .tree-folder-title > .title:not([data-unread="0"])::after { + margin: -0.5rem 1rem 0 0; + padding: 0 0.75rem; + background: rgba(0, 0, 0, 0.25); + border-radius: 12px; position: absolute; right: 0; line-height: 1.5rem; - background: rgba(0, 0, 0, 0.25); - border-radius: 12px; - padding: 0 0.75rem; - margin: -0.5rem 1rem 0 0; text-align: center; } .feed.item.empty.active { @@ -670,19 +654,19 @@ form th { /*===============*/ /*=== Header */ .header { - background: #303136; padding: 0.5rem 1.35rem; + background: #303136; display: block; - table-layout: none; - width: auto; } + width: auto; + table-layout: none; } .header .item { vertical-align: middle; } .header .item.title { - font-weight: 400; - width: 280px; } + width: 280px; + font-weight: 400; } .header .item.title h1 a { text-decoration: none; - color: #FFFFFF; + color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; } @@ -690,10 +674,10 @@ form th { margin-right: 0.5rem; } .header .item.search input { width: 230px; + color: #fff; + border: none; border-radius: 2px 0 0 2px; background-color: #26272a; - color: #FFFFFF; - border: none; -webkit-transition: all 0.15s ease-in-out; -moz-transition: all 0.15s ease-in-out; -o-transition: all 0.15s ease-in-out; @@ -703,21 +687,21 @@ form th { background-color: #17181a; } .header .item.search input:focus { width: 350px; - background-color: #fff; - color: #5b6871; } + color: #5b6871; + background-color: #fff; } .header .item.search .btn { + width: 3rem; border-radius: 0 2px 2px 0; - background-color: #3366cc; + background-color: #36c; background-position: center; background-repeat: no-repeat; background-image: url(icons/magnifier.svg); border-left-width: 0; - width: 3rem; min-height: 35px; } .header .item.search .btn img { display: none; } .header .item.search .btn:hover { - background-color: #2255cc; } + background-color: #25c; } .header .item.configure { width: 2rem; position: absolute; @@ -725,11 +709,11 @@ form th { top: 1.25rem; text-align: center; } .header .item.configure .btn { + padding: 0 0.5rem; background-color: transparent; background-position: center; background-repeat: no-repeat; - background-image: url(icons/cog-white.svg); - padding: 0 0.5rem; } + background-image: url(icons/cog-white.svg); } .header .item.configure .btn img { display: none; } @@ -757,12 +741,12 @@ form th { /*=== New article notification */ #new-article { - text-align: center; + background: #36c; font-size: 1rem; - background: #3366cc; } + text-align: center; } #new-article:hover { - background: #2255cc; } + background: #25c; } #new-article > a { line-height: 3em; @@ -775,16 +759,16 @@ form th { /*=== Day indication */ .day { padding: 1rem 0 0 1.25rem; + color: #5b6871; + font-size: 0.875rem; font-weight: 700; line-height: 3em; letter-spacing: 1px; - text-transform: uppercase; - font-size: 0.875rem; - color: #5b6871; } + text-transform: uppercase; } .day .name { padding: 0 1rem 0 1rem; - font-size: 0.875rem; color: #303136; + font-size: 0.875rem; position: relative; left: 0; text-transform: uppercase; } @@ -817,7 +801,7 @@ form th { .nav_menu .stick .btn:hover { background-color: #d5d8db; } .nav_menu .stick .btn.active { - background-color: #3366cc; } + background-color: #36c; } .nav_menu .stick .btn img.icon { display: none; } .nav_menu .stick .btn#toggle-read { @@ -837,9 +821,9 @@ form th { .nav_menu .stick .btn#toggle-non-starred.active { background-image: url(icons/non-starred-white.svg); } .nav_menu .stick .btn.read_all { - background-color: #f9fafb; - color: #303136; padding: 5px 16px; + color: #303136; + background-color: #f9fafb; -webkit-transition: all 0.15s ease-in-out; -moz-transition: all 0.15s ease-in-out; -o-transition: all 0.15s ease-in-out; @@ -877,21 +861,21 @@ form th { line-height: 1.8rem; } .content h1.title a, .content h1 a, .content.thin h1.title a, .content.thin h1 a { color: #303136; - font-family: "spectral"; + font-family: "spectral", serif; font-size: 2rem; } .content h1.title a:hover, .content h1 a:hover, .content.thin h1.title a:hover, .content.thin h1 a:hover { - color: #3366cc; + color: #36c; text-decoration: none; } .content .author, .content.thin .author { - font-size: 1.125rem; - color: #5b6871; } + color: #5b6871; + font-size: 1.125rem; } .content p, .content ul, .content.thin p, .content.thin ul { font-size: 1.125rem; line-height: 1.8rem; } .content .content hr, .content.thin .content hr { margin: 30px 10px; - height: 1px; background: #d5d8db; + height: 1px; border: 0; box-shadow: 0 2px 5px #ccc; } .content pre, .content.thin pre { @@ -908,42 +892,42 @@ form th { border: none; } .content code, .content.thin code { padding: 2px 5px; - color: #eff0f2; background: #f9fafb; + color: #eff0f2; border: 1px solid #eff0f2; border-radius: 3px; } .content blockquote, .content.thin blockquote { - display: block; margin: 0; padding: 5px 20px; - border-top: 1px solid #d5d8db; - border-bottom: 1px solid #d5d8db; background: #f9fafb; - color: #303136; } + display: block; + color: #303136; + border-top: 1px solid #d5d8db; + border-bottom: 1px solid #d5d8db; } .content blockquote p, .content.thin blockquote p { margin: 0; } /*=== Notification and actualize notification */ .notification { + padding: 1rem 0; + background: #d5d8db; + width: 100%; + height: 3rem; + color: #5b6871; + font-size: 1em; + border: none; position: fixed; top: auto; bottom: 0; left: 0; right: 0; - width: 100%; - height: 3rem; - padding: 1rem 0; text-align: center; - font-size: 1em; line-height: 3em; z-index: 10; - vertical-align: middle; - background: #d5d8db; - color: #5b6871; - border: none; } + vertical-align: middle; } .notification .msg { - font-size: 1rem; - display: inline-block; } + display: inline-block; + font-size: 1rem; } .notification.good { background: #10f587; color: #fff; } @@ -952,8 +936,8 @@ form th { color: #fff; } .notification a.close { padding: 0 15px; - line-height: 3em; - border-radius: 0 3px 3px 0; } + border-radius: 0 3px 3px 0; + line-height: 3em; } .notification.good a.close:hover { background: #0c7540; } .notification.bad a.close:hover { @@ -984,8 +968,8 @@ form th { .flux:hover:not(.current):hover .item.title { background: #f9fafb; } .flux.current { - border-left-color: #3366cc; - background: #f9fafb; } + background: #f9fafb; + border-left-color: #36c; } .flux.not_read { background: #f2f6f8; } .flux.not_read:hover { @@ -993,29 +977,29 @@ form th { .flux.not_read:not(.current):hover .item.title { background: #fdfdfe; } .flux.not_read .item.title a { - color: #3366cc; } + color: #36c; } .flux.not_read .item.website a { - color: #3366cc; } + color: #36c; } .flux.not_read .item.date { - color: #3366cc99; } + color: #36c99; } .flux.favorite { - background: #FFF6DA; - border-left-color: #FFC300; + background: #fff6da; + border-left-color: #ffc300; -webkit-transition: all 0.15s ease-in-out; -moz-transition: all 0.15s ease-in-out; -o-transition: all 0.15s ease-in-out; -ms-transition: all 0.15s ease-in-out; transition: all 0.15s ease-in-out; } .flux.favorite:not(.current):hover .item.title { - background: #FFF6DA; } + background: #fff6da; } .flux .website a { color: #303136; opacity: 0.75; } .flux .website .favicon { padding: 5px; } .flux .date { - font-size: 0.85rem; color: #303136; + font-size: 0.85rem; opacity: 0.75; } .flux .bottom { font-size: 1rem; @@ -1033,38 +1017,38 @@ form th { #stream .box.category:not([data-unread="0"]) .box-title .title { font-weight: bold; } #stream .box.category .box-title { - background: none; - padding: 1.5rem; } + padding: 1.5rem; + background: none; } #stream .box.category .box-title a.title { + color: #5b6871; + font-size: 1rem; font-weight: normal; text-decoration: none; text-align: left; - font-size: 1rem; text-transform: uppercase; - letter-spacing: 1px; - color: #5b6871; } + letter-spacing: 1px; } #stream .box.category .box-title a.title:not([data-unread="0"])::after { + margin: -0.5rem 1rem 0 0; + padding: 0 0.75rem; + background: #eff0f2; + border-radius: 12px; position: absolute; top: 1.75rem; right: 0; line-height: 1.5rem; - background: #eff0f2; - border-radius: 12px; - padding: 0 0.75rem; - margin: -0.5rem 1rem 0 0; text-align: center; } #stream .box.category .box-title a.title:hover { - color: #3366cc; } + color: #36c; } #stream .box.category .box-content { padding-bottom: 0.5rem; } #stream .box.category .box-content .item.feed { - font-size: 1rem; - padding: 0.5rem 1.5rem; } + padding: 0.5rem 1.5rem; + font-size: 1rem; } #stream .box.category .box-content .item.feed a { color: #303136; font-weight: 400; } #stream .box.category .box-content .item.feed a:hover { - color: #3366cc; + color: #36c; text-decoration: none; } #overlay { @@ -1087,8 +1071,8 @@ form th { #stream.reader .flux .author { margin: 0 0 10px; - font-size: 90%; - color: #a6a7ae; } + color: #a6a7ae; + font-size: 90%; } /*=== Configuration pages */ .post { @@ -1101,42 +1085,40 @@ form th { .post.content { max-width: 550px; } .post h1, .post h2 { + color: #303136; font-size: 3rem; margin-top: 1.75rem; font-weight: 300; - line-height: 1.2em; - color: #303136; } + line-height: 1.2em; } .post a[href="./"] { - display: inline-block; - min-width: 15px; - line-height: 25px; margin: 0; padding: 0.75rem 1.5rem; - font-size: 1rem; - vertical-align: middle; - cursor: pointer; - overflow: hidden; background: #f9fafb; + display: inline-block; + color: #5b6871; + font-size: 1rem; border: 1px solid #d5d8db; border-radius: 5px; - color: #5b6871; } + min-width: 15px; + line-height: 25px; + vertical-align: middle; + cursor: pointer; + overflow: hidden; } .post a[href="./"]:hover { - text-decoration: none; - background: #3366cc; + background: #36c; color: white; - border: 1px solid #3366cc; } + border: 1px solid #36c; + text-decoration: none; } #slider { border-left: none; - -webkit-box-shadow: 0px 6px 8px 0px rgba(0, 0, 0, 0.35); - -moz-box-shadow: 0px 6px 8px 0px rgba(0, 0, 0, 0.35); box-shadow: 0px 6px 8px 0px rgba(0, 0, 0, 0.35); } .slide-container .properties { - background: rgba(0, 0, 0, 0.75); - border: 0; padding: 1rem; - color: white; } + background: rgba(0, 0, 0, 0.75); + color: white; + border: 0; } .slide-container .properties .page-number { right: 1rem; top: 1rem; } @@ -1150,10 +1132,10 @@ form th { .log { margin: 10px 0; padding: 5px 2%; - overflow: auto; - font-size: 0.8rem; background: #f9fafb; - color: #5b6871; } + color: #5b6871; + font-size: 0.8rem; + overflow: auto; } .log > .date { margin: 0 10px 0 0; @@ -1207,11 +1189,11 @@ form th { ul.nav .item img { display: none; } ul.nav .item a { - display: inline-block; padding: 1rem 1rem 1rem 2.5rem; - color: #FFFFFF; - width: 100%; background: url("../../themes/icons/logout.svg") no-repeat #17181a 3% center; + display: inline-block; + width: 100%; + color: #fff; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; @@ -1234,12 +1216,12 @@ form th { .aside .toggle_aside, #panel .close { + background: #25c; display: block; width: 100%; height: 50px; line-height: 50px; - text-align: center; - background: #2255cc; } + text-align: center; } .header { padding: 0.5rem; } @@ -1275,7 +1257,7 @@ form th { .nav_menu .search .input { max-width: 97%; width: 90px; } - .nav_menu .search .input::focus { + .nav_menu .search .input:focus { width: 400px; } #stream .flux .flux_header { @@ -1285,8 +1267,8 @@ form th { text-align: center; padding: 1rem 0; } .day .name { - display: block; padding: 0; + display: block; width: 100%; line-height: 1.5rem; margin-bottom: 1rem; } @@ -1300,26 +1282,24 @@ form th { .notification { border-radius: 0; } .notification a.close { + background: transparent; display: block; - left: 0; - background: transparent; } + left: 0; } .notification a.close:hover { opacity: 0.5; } .notification a.close .icon { display: none; } } -html, body { - font-family: "lato", "Helvetica", "Arial", sans-serif; - font-size: 0.875rem; } - /*=== GENERAL */ /*============*/ html, body { + background: #eff0f2; height: 100%; - background: #eff0f2; } + font-family: "lato", "Helvetica", "Arial", sans-serif; + font-size: 0.875rem; } /*=== Links */ a, button.as-link { outline: none; - color: #3366cc; } + color: #36c; } /*# sourceMappingURL=mapco.css.map */ diff --git a/p/themes/Mapco/mapco.css.map b/p/themes/Mapco/mapco.css.map deleted file mode 100644 index b4bb0bebc..000000000 --- a/p/themes/Mapco/mapco.css.map +++ /dev/null @@ -1,7 +0,0 @@ -{ -"version": 3, -"mappings": "AAAA,UAMC;EALG,WAAW,EAAE,MAAM;EACnB,UAAU,EAAE,MAAM;EAClB,YAAY,EAAE,MAAM;EACpB,WAAW,EAAE,GAAG;EAChB,GAAG,EAAE,oEAAoE;AAE7E,UAMC;EALG,WAAW,EAAE,MAAM;EACnB,UAAU,EAAE,MAAM;EAClB,YAAY,EAAE,MAAM;EACpB,WAAW,EAAE,GAAG;EAChB,GAAG,EAAE,mEAAmE;AAE5E,UAMC;EALG,WAAW,EAAE,MAAM;EACnB,UAAU,EAAE,MAAM;EAClB,YAAY,EAAE,MAAM;EACpB,WAAW,EAAE,GAAG;EAChB,GAAG,EAAE,iEAAiE;AAE1E,UAMC;EALG,WAAW,EAAE,MAAM;EACnB,UAAU,EAAE,MAAM;EAClB,YAAY,EAAE,MAAM;EACpB,WAAW,EAAE,GAAG;EAChB,GAAG,EAAE,uEAAuE;AAEhF,UAMC;EALG,WAAW,EAAE,UAAU;EACvB,UAAU,EAAE,MAAM;EAClB,YAAY,EAAE,MAAM;EACpB,WAAW,EAAE,GAAG;EAChB,GAAG,EAAE,uEAAuE;AAEhF,UAMC;EALG,WAAW,EAAE,UAAU;EACvB,UAAU,EAAE,MAAM;EAClB,YAAY,EAAE,MAAM;EACpB,WAAW,EAAE,GAAG;EAChB,GAAG,EAAE,sEAAsE;AAE/E,UAMC;EALG,WAAW,EAAE,UAAU;EACvB,UAAU,EAAE,MAAM;EAClB,Y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AE,MAAM;;EAGhB,aAAc;IACjB,aAAa,EAAE,CAAC;IAEhB,qBAAQ;MACJ,OAAO,EAAE,KAAK;MACd,IAAI,EAAE,CAAC;MACP,UAAU,EAAE,WAAW;IAE3B,2BAAc;MACV,OAAO,EAAE,GAAG;IAEhB,2BAAc;MACV,OAAO,EAAE,IAAI;AC7IlB,UAAU;EACN,WAAW,EAAE,wCAAwC;EACrD,SAAS,EAAE,QAAQ;;AAKvB,gBAAgB;AAChB,gBAAgB;AAChB,UAAW;EACV,MAAM,EAAE,IAAI;EACZ,UAAU,EbdE,OAAO;;AaiBpB,cAAc;AACd,iBAAkB;EACd,OAAO,EAAE,IAAI;EACb,KAAK,EbUI,OAAW", -"sources": ["_fonts.scss","_mixins.scss","_forms.scss","_variables.scss","_tables.scss","_components.scss","_divers.scss","_sidebar.scss","_layout.scss","_list-view.scss","_global-view.scss","_reader-view.scss","_configuration.scss","_logs.scss","_stats.scss","_mobile.scss","mapco.scss"], -"names": [], -"file": "mapco.css" -} diff --git a/p/themes/Mapco/mapco.scss b/p/themes/Mapco/mapco.scss index 1a538b50a..337cc5f97 100644 --- a/p/themes/Mapco/mapco.scss +++ b/p/themes/Mapco/mapco.scss @@ -1,51 +1,48 @@ @import "fonts"; + @import "mixins"; + @import "variables"; @import "forms"; + @import "tables"; + @import "components"; @import "divers"; @import "sidebar"; + @import "layout"; + @import "list-view"; + @import "global-view"; + @import "reader-view"; @import "configuration"; @import "logs"; + @import "stats"; @import "mobile"; -html, body{ - font-family: "lato", "Helvetica", "Arial", sans-serif; - font-size: 0.875rem; -} - @charset "UTF-8"; /*=== GENERAL */ /*============*/ html, body { - height: 100%; background: $grey-light; + height: 100%; + font-family: "lato", "Helvetica", "Arial", sans-serif; + font-size: 0.875rem; } /*=== Links */ a, button.as-link { - outline: none; - color: $main-first; + outline: none; + color: $main-first; } - - - - - - - - - diff --git a/p/themes/Origine-compact/origine-compact.css b/p/themes/Origine-compact/origine-compact.css index e8046e0b1..c0e538d74 100644 --- a/p/themes/Origine-compact/origine-compact.css +++ b/p/themes/Origine-compact/origine-compact.css @@ -3,9 +3,9 @@ /*=== GENERAL */ /*============*/ html, body { + background: #fafafa; height: 100%; font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", "PingFang SC", "Microsoft YaHei", sans-serif; - background: #fafafa; } /*=== Links */ @@ -18,50 +18,54 @@ a, button.as-link { legend { margin: 20px 0 5px; padding: 5px 0; - border-bottom: 1px solid #ddd; font-size: 1.4em; + border-bottom: 1px solid #ddd; } + label { min-height: 25px; padding: 5px 0; cursor: pointer; } + textarea { width: 360px; height: 100px; } + input, select, textarea { - min-height: 25px; padding: 3px 5px 2px 5px; background: #fdfdfd; + color: #666; border: 1px solid #bbb; border-radius: 3px; - color: #666; + box-shadow: 0 2px 2px #eee inset; + min-height: 25px; line-height: 25px; vertical-align: middle; - box-shadow: 0 2px 2px #eee inset; } + option { padding: 0 .5em; } + input:focus, select:focus, textarea:focus { color: #0062be; - border-color: #33bbff; - box-shadow: 0 2px 2px #ddddff inset; + border-color: #3bf; + box-shadow: 0 2px 2px #ddf inset; } + input:invalid, select:invalid { border-color: #f00; box-shadow: 0 0 2px 2px #fdd inset; } + input:disabled, select:disabled { background: #eee; } + input.extend { transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; } /*=== Tables */ @@ -73,9 +77,11 @@ tr, th, td { padding: 0.5em; border: 1px solid #ddd; } + th { background: #f6f6f6; } + form td, form th { font-weight: normal; @@ -90,17 +96,21 @@ form th { background: #f4f4f4; border-top: 1px solid #ddd; } + .form-group.form-actions .btn { margin: 0 10px; } + .form-group .group-name { padding: 10px 0; text-align: right; } + .form-group .group-controls { min-height: 25px; padding: 8px 0; } + .form-group table { margin: 10px 0 0 220px; } @@ -110,21 +120,26 @@ form th { vertical-align: middle; font-size: 0; } + .stick input, .stick .btn { border-radius: 0; } + .stick .btn:first-child, .stick input:first-child { border-radius: 3px 0 0 3px; } + .stick .btn-important:first-child { border-right: 1px solid #06f; } + .stick .btn:last-child, .stick input:last-child { border-radius: 0 3px 3px 0; } + .stick .btn + .btn, .stick .btn + input, .stick .btn + .dropdown > .btn, @@ -136,18 +151,17 @@ form th { .stick .dropdown + .dropdown > .btn { border-left: none; } + .stick input + .btn { border-top: 1px solid #bbb; } + .stick .btn + .dropdown > .btn { border-left: none; border-radius: 0 3px 3px 0; } .btn { - display: inline-block; - min-height: 32px; - min-width: 15px; margin: 0; padding: 5px 10px; background: #fff; @@ -156,22 +170,27 @@ form th { background: -webkit-linear-gradient(top, #fff 0%, #eee 100%); background: -o-linear-gradient(top, #fff 0%, #eee 100%); background: -ms-linear-gradient(top, #fff 0%, #eee 100%); - border-radius: 3px; + display: inline-block; + color: #666; + font-size: 0.9rem; border: 1px solid #ddd; - border-bottom: 1px solid #aaa; border-right: 1px solid #aaa; - color: #666; + border-bottom: 1px solid #aaa; + border-radius: 3px; + min-height: 32px; + min-width: 15px; text-shadow: 0px -1px 0 #ddd; - font-size: 0.9rem; vertical-align: middle; cursor: pointer; overflow: hidden; } + a.btn, .stick .btn { min-height: 20px; line-height: 20px; } + .btn:hover { background: #f0f0f0; background: linear-gradient(to bottom, #f8f8f8, #f0f0f0); @@ -181,57 +200,62 @@ a.btn, background: -ms-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%); text-decoration: none; } + .btn.active, .btn:active, .dropdown-target:target ~ .btn.dropdown-toggle { - box-shadow: 0px 2px 4px #e0e0e0 inset, 0px 1px 2px #fafafa; background: #eee; + box-shadow: 0px 2px 4px #e0e0e0 inset, 0px 1px 2px #fafafa; } .btn-important { - background: #0084CC; - background: linear-gradient(to bottom, #0084CC, #0045CC); - background: -moz-linear-gradient(top, #0084CC 0%, #0045CC 100%); - background: -webkit-linear-gradient(top, #0084CC 0%, #0045CC 100%); - background: -o-linear-gradient(top, #0084CC 0%, #0045CC 100%); - background: -ms-linear-gradient(top, #0084CC 0%, #0045CC 100%); + background: #0084cc; + background: linear-gradient(to bottom, #0084cc, #0045cc); + background: -moz-linear-gradient(top, #0084cc 0%, #0045cc 100%); + background: -webkit-linear-gradient(top, #0084cc 0%, #0045cc 100%); + background: -o-linear-gradient(top, #0084cc 0%, #0045cc 100%); + background: -ms-linear-gradient(top, #0084cc 0%, #0045cc 100%); color: #fff; - border: 1px solid #0062B7; + border: 1px solid #0062b7; text-shadow: 0px -1px 0 #aaa; font-weight: normal; } + .btn-important:hover { - background: linear-gradient(to bottom, #0066CC, #0045CC); - background: -moz-linear-gradient(top, #0066CC 0%, #0045CC 100%); - background: -webkit-linear-gradient(top, #0066CC 0%, #0045CC 100%); - background: -o-linear-gradient(top, #0066CC 0%, #0045CC 100%); - background: -ms-linear-gradient(top, #0066CC 0%, #0045CC 100%); + background: linear-gradient(to bottom, #06c, #0045cc); + background: -moz-linear-gradient(top, #06c 0%, #0045cc 100%); + background: -webkit-linear-gradient(top, #06c 0%, #0045cc 100%); + background: -o-linear-gradient(top, #06c 0%, #0045cc 100%); + background: -ms-linear-gradient(top, #06c 0%, #0045cc 100%); } + .btn-important:active { - background: #0044CB; + background: #0044cb; box-shadow: none; } .btn-attention { - background: #E95B57; - background: linear-gradient(to bottom, #E95B57, #BD362F); - background: -moz-linear-gradient(top, #E95B57 0%, #BD362F 100%); - background: -webkit-linear-gradient(top, #E95B57 0%, #BD362F 100%); - background: -o-linear-gradient(top, #E95B57 0%, #BD362F 100%); - background: -ms-linear-gradient(top, #E95B57 0%, #BD362F 100%); + background: #e95b57; + background: linear-gradient(to bottom, #e95b57, #bd362f); + background: -moz-linear-gradient(top, #e95b57 0%, #bd362f 100%); + background: -webkit-linear-gradient(top, #e95b57 0%, #bd362f 100%); + background: -o-linear-gradient(top, #e95b57 0%, #bd362f 100%); + background: -ms-linear-gradient(top, #e95b57 0%, #bd362f 100%); color: #fff; - border: 1px solid #C44742; + border: 1px solid #c44742; text-shadow: 0px -1px 0px #666; } + .btn-attention:hover { - background: linear-gradient(to bottom, #D14641, #BD362F); - background: -moz-linear-gradient(top, #D14641 0%, #BD362F 100%); - background: -webkit-linear-gradient(top, #D14641 0%, #BD362F 100%); - background: -o-linear-gradient(top, #D14641 0%, #BD362F 100%); - background: -ms-linear-gradient(top, #D14641 0%, #BD362F 100%); + background: linear-gradient(to bottom, #d14641, #bd362f); + background: -moz-linear-gradient(top, #d14641 0%, #bd362f 100%); + background: -webkit-linear-gradient(top, #d14641 0%, #bd362f 100%); + background: -o-linear-gradient(top, #d14641 0%, #bd362f 100%); + background: -ms-linear-gradient(top, #d14641 0%, #bd362f 100%); } + .btn-attention:active { - background: #BD362F; + background: #bd362f; box-shadow: none; } @@ -242,49 +266,60 @@ a.btn, line-height: 2.5em; font-size: 0.9rem; } + .nav-list .item:hover { background: #fafafa; } + .nav-list .item:hover a { - color: #003388; + color: #038; } + .nav-list .item.active { - background: #0062BE; + background: #0062be; color: #fff; } + .nav-list .item.active a { color: #fff; } + .nav-list .disable { - color: #aaa; background: #fafafa; + color: #aaa; text-align: center; } + .nav-list .item > a { padding: 0 10px; } + .nav-list a:hover { text-decoration: none; } + .nav-list .item.empty a { color: #f39c12; } + .nav-list .item.active.empty a { - color: #fff; background: #f39c12; + color: #fff; } + .nav-list .item.error a { - color: #BD362F; + color: #bd362f; } + .nav-list .item.active.error a { + background: #bd362f; color: #fff; - background: #BD362F; } .nav-list .nav-header { padding: 0 10px; - color: #888; background: #f4f4f4; + color: #888; border-bottom: 1px solid #ddd; font-weight: bold; text-shadow: 0 0 1px #ddd; @@ -306,6 +341,7 @@ a.btn, border-bottom: 1px solid #ddd; text-align: right; } + .nav-head .item { padding: 5px 10px; font-size: 0.9rem; @@ -318,6 +354,7 @@ a.btn, padding: 0; font-size: 0.9rem; } + .horizontal-list .item { vertical-align: middle; line-height: 30px; @@ -327,34 +364,34 @@ a.btn, .dropdown-menu { margin: 5px 0 0; padding: 5px 0; + font-size: 0.8rem; border: 1px solid #ddd; border-radius: 5px; box-shadow: 3px 3px 3px #ddd; - font-size: 0.8rem; text-align: left; } + .dropdown-menu::after { - content: ""; - position: absolute; - top: -6px; - right: 13px; + background: #fff; width: 10px; height: 10px; - background: #fff; border-top: 1px solid #ddd; border-left: 1px solid #ddd; + content: ""; + position: absolute; + top: -6px; + right: 13px; z-index: -10; transform: rotate(45deg); - -moz-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); } + .dropdown-header { padding: 0 5px 5px; color: #888; font-weight: bold; text-align: left; } + .dropdown-menu > .item > a, .dropdown-menu > .item > span, .dropdown-menu > .item > .as-link { @@ -362,18 +399,22 @@ a.btn, line-height: 2.5em; font-size: 0.8rem; } + .dropdown-menu > .item:hover { - background: #0062BE; + background: #0062be; color: #fff; } + .dropdown-menu > .item[aria-checked="true"] > a::before { font-weight: bold; margin: 0 0 0 -14px; } + .dropdown-menu > .item:hover > a { color: #fff; text-decoration: none; } + .dropdown-menu .input select, .dropdown-menu .input input { margin: 0 auto 5px; @@ -391,35 +432,40 @@ a.btn, margin: 15px auto; padding: 10px 15px; background: #f4f4f4; + color: #aaa; + font-size: 0.9em; border: 1px solid #ccc; border-right: 1px solid #aaa; border-bottom: 1px solid #aaa; border-radius: 5px; - color: #aaa; text-shadow: 0 0 1px #eee; - font-size: 0.9em; } + .alert-head { font-size: 1.15em; } + .alert > a { color: inherit; text-decoration: underline; } + .alert-warn { background: #ffe; - border: 1px solid #eeb; color: #c95; + border: 1px solid #eeb; } + .alert-success { background: #dfd; - border: 1px solid #cec; color: #484; + border: 1px solid #cec; } + .alert-error { background: #fdd; - border: 1px solid #ecc; color: #844; + border: 1px solid #ecc; } /*=== Pagination */ @@ -429,14 +475,17 @@ a.btn, color: #333; font-size: 0.8em; } + .content .pagination { margin: 0; padding: 0; } + .pagination .item.pager-current { font-weight: bold; font-size: 1.5em; } + .pagination .item a { display: block; color: #333; @@ -444,12 +493,15 @@ a.btn, line-height: 3em; text-decoration: none; } + .pagination .item a:hover { background: #ddd; } + .pagination:first-child .item { border-bottom: 1px solid #aaa; } + .pagination:last-child .item { border-top: 1px solid #aaa; } @@ -466,6 +518,7 @@ a.btn, border-radius: 5px; box-shadow: 0 0 3px #bbb; } + .box .box-title { margin: 0; padding: 5px 10px; @@ -473,6 +526,7 @@ a.btn, border-bottom: 1px solid #ddd; border-radius: 5px 5px 0 0; } + .box .box-content { min-height: 2.5em; max-height: 260px; @@ -488,6 +542,7 @@ a.btn, .box .box-content .item .configure { visibility: hidden; } + .box .box-title:hover .configure, .box .box-content .item:hover .configure { visibility: visible; @@ -497,6 +552,7 @@ a.btn, .tree { margin: 10px 0; } + .tree-folder-title { position: relative; padding: 0 5px; @@ -504,36 +560,45 @@ a.btn, line-height: 2rem; font-size: 0.9rem; } + .tree-folder-title .title { background: inherit; color: #444; } + .tree-folder-title .title:hover { text-decoration: none; } + .tree-folder.active .tree-folder-title { background: #f0f0f0; font-weight: bold; } + .tree-folder.active .tree-folder-title .title { - color: #0062BE; + color: #0062be; } + .tree-folder-items { + background: #f6f6f6; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; - background: #f6f6f6; } + .tree-folder-items > .item { padding: 0 10px; line-height: 2.2rem; font-size: 0.8rem; } + .tree-folder-items > .item.active { background: #0062be; } + .tree-folder-items > .item > a { text-decoration: none; } + .tree-folder-items > .item.active > a { color: #fff; } @@ -542,40 +607,47 @@ a.btn, /*===============*/ /*=== Header */ .header { - height: 40px; background: #f4f4f4; + height: 40px; } + .header > .item { padding: 0px; border-bottom: 1px solid #aaa; vertical-align: middle; text-align: center; } -.header > .item.title{ + +.header > .item.title { width: 230px; } + .header > .item.title h1 { margin: 0; font-size: 1em; } + .header > .item.title h1 a { text-decoration: none; } + .header .item.configure .btn, .header .item.search .btn { min-height: 18px; padding: 4px 10px; line-height: 18px; } + .header > .item.title .logo { - height: 25px; width: 25px; + height: 25px; } .header > .item.search input { - width: 230px; padding: 1px 5px; + width: 230px; } + .header .item.search input:focus { width: 350px; } @@ -584,54 +656,63 @@ a.btn, #global { height: calc(100% - 85px); } + .aside { - border-right: 1px solid #aaa; background: #fff; + border-right: 1px solid #aaa; } + .aside.aside_feed { padding: 10px 0; text-align: center; background: #fff; } + .aside.aside_feed .tree { margin: 10px 0 50px; } /*=== Aside main page (categories) */ .aside_feed .category .title:not([data-unread="0"])::after { - position: absolute; - right: 0; margin: 10px 0; padding: 0 10px; + background: inherit; font-size: 0.8rem; + position: absolute; + right: 0; line-height: 0.9rem; - background: inherit; } /*=== Aside main page (feeds) */ .feed.item.empty.active { background: #e67e22; } + .feed.item.error.active { background: #bd362f; } + .feed.item.empty, .feed.item.empty > a { color: #e67e22; } + .feed.item.error, .feed.item.error > a { color: #bd362f; } + .feed.item.empty.active, .feed.item.error.active, .feed.item.empty.active > a, .feed.item.error.active > a { color: #fff; } + .aside_feed .tree-folder-items .dropdown-menu::after { left: 2px; } + .aside_feed .tree-folder-items .item .dropdown-target:target ~ .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item.active .dropdown-toggle > .icon { background-color: #fff; @@ -643,9 +724,11 @@ a.btn, padding: 10px 50px; font-size: 0.9em; } + .post form { margin: 10px 0; } + .post.content { max-width: 550px; } @@ -654,52 +737,61 @@ a.btn, .prompt { text-align: center; } + .prompt label { text-align: left; } + .prompt form { margin: 10px auto 20px auto; width: 200px; } + .prompt input { margin: 5px auto; width: 100%; } + .prompt p { margin: 20px 0; } /*=== New article notification */ #new-article { - background: #0084CC; + background: #0084cc; text-align: center; font-size: 0.9em; } + #new-article:hover { - background: #0066CC; + background: #06c; } + #new-article > a { line-height: 3em; color: #fff; font-weight: bold; } + #new-article > a:hover { text-decoration: none; } /*=== Day indication */ .day { - font-size: 0.9rem; padding: 0 10px; - font-weight: bold; - line-height: 2em; background: #fff; + font-size: 0.9rem; border-top: 1px solid #aaa; border-bottom: 1px solid #aaa; + font-weight: bold; + line-height: 2em; } + #new-article + .day { border-top: none; } + .day .name { padding: 0 10px 0 0; color: #aab; @@ -711,53 +803,59 @@ a.btn, /*=== Index menu */ .nav_menu { + padding: 5px 0; background: #fafafa; border-bottom: 1px solid #aaa; text-align: center; - padding: 5px 0; } /*=== Feed articles */ .flux { - border-left: 2px solid #aaa; background: #fafafa; + border-left: 2px solid #aaa; } + .flux:hover { background: #fff; } + .flux.current { - border-left: 2px solid #0062BE; + background: #fff; + border-left: 2px solid #0062be; } + .flux.not_read { - border-left: 2px solid #FF5300; - background: #FFF3ED; + background: #fff3ed; + border-left: 2px solid #ff5300; } + .flux.not_read:not(.current):hover .item.title { - background: #FFF3ED; + background: #fff3ed; } + .flux.favorite { - border-left: 2px solid #FFC300; - background: #FFF6DA; + background: #fff6da; + border-left: 2px solid #ffc300; } + .flux.favorite:not(.current):hover .item.title { - background: #FFF6DA; + background: #fff6da; } -.flux.current { - background: #fff; -} - .flux_header { - border-top: 1px solid #ddd; font-size: 0.8rem; + border-top: 1px solid #ddd; cursor: pointer; } + .flux_header .title { font-size: 0.8rem; } + .flux .website .favicon { padding: 5px; } + .flux .date { color: #666; font-size: 0.7rem; @@ -772,17 +870,19 @@ a.btn, .content { padding: 10px 10px; } + #stream.normal .content > h1.title { - display:none; + display: none; } + .content > h1.title > a { color: #000; } .content hr { margin: 30px 10px; - height: 1px; background: #ddd; + height: 1px; border: 0; box-shadow: 0 2px 5px #ccc; } @@ -796,13 +896,15 @@ a.btn, font-size: 0.9rem; border-radius: 3px; } + .content code { padding: 2px 5px; - color: #dd1144; background: #fafafa; + color: #d14; border: 1px solid #eee; border-radius: 3px; } + .content pre code { background: transparent; color: #fff; @@ -810,14 +912,15 @@ a.btn, } .content blockquote { - display: block; margin: 0; padding: 5px 20px; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; background: #fafafa; + display: block; color: #333; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; } + .content blockquote p { margin: 0; } @@ -825,33 +928,38 @@ a.btn, /*=== Notification and actualize notification */ .notification { padding: 0 0 0 5px; - text-align: center; + font-size: 0.9em; border: 1px solid #eeb; border-radius: 3px; box-shadow: 0 0 5px #ddd; + text-align: center; font-weight: bold; - font-size: 0.9em; line-height: 3em; z-index: 10; vertical-align: middle; } + .notification.good { background: #ffe; - border: 1px solid #eeb; color: #c95; + border: 1px solid #eeb; } + .notification.bad { background: #fdd; - border: 1px solid #ecc; color: #844; + border: 1px solid #ecc; } + .notification a.close { padding: 0 15px; line-height: 3em; } + .notification.good a.close:hover { background: #eeb; } + .notification.bad a.close:hover { background: #ecc; } @@ -862,20 +970,23 @@ a.btn, /*=== "Load more" part */ #bigMarkAsRead { - text-align: center; - text-decoration: none; - color: #666; background: #fafafa; + color: #666; font-size: 1.2em; + text-align: center; + text-decoration: none; } + #bigMarkAsRead:hover { - color: #0062be; background: #fff; + color: #0062be; box-shadow: 0 -5px 10px #eee inset; } + #bigMarkAsRead .bigTick { font-size: 3em; } + #bigMarkAsRead:hover .bigTick { text-shadow: 0 0 5px #0062be; } @@ -894,14 +1005,15 @@ a.btn, /*================*/ #stream.reader .flux { padding: 0 0 50px; - border: none; background: #f0f0f0; color: #333; + border: none; } + #stream.reader .flux .author { margin: 0 0 10px; - font-size: 90%; color: #666; + font-size: 90%; } /*=== GLOBAL VIEW */ @@ -911,26 +1023,31 @@ a.btn, text-decoration: none; text-align: left; } + .box.category:not([data-unread="0"]) .box-title { - background: #0084CC; + background: #0084cc; } + .box.category:not([data-unread="0"]) .box-title:active { background: #3498db; } + .box.category:not([data-unread="0"]) .box-title .title { color: #fff; font-weight: bold; } + .box.category .title:not([data-unread="0"])::after { - position: absolute; - top: 5px; right: 10px; - border: 0; background: none; color: #fff; - font-weight: bold; + border: 0; box-shadow: none; + position: absolute; + top: 5px; right: 10px; + font-weight: bold; text-shadow: none; } + .box.category .item.feed { padding: 2px 10px; font-size: 0.8rem; @@ -942,9 +1059,11 @@ a.btn, .aside.aside_feed .nav-form select { width: 140px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu { right: -20px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu::after { right: 33px; } @@ -960,6 +1079,7 @@ a.btn, .stat tr { border: none; } + .stat > table td, .stat > table th { border-bottom: 1px solid #ddd; @@ -968,11 +1088,13 @@ a.btn, .stat > .horizontal-list { margin: 0 0 5px; } + .stat > .horizontal-list .item { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } + .stat > .horizontal-list .item:first-child { width: 270px; } @@ -984,31 +1106,38 @@ a.btn, border-radius: 5px; overflow: hidden; } + .log { padding: 5px 10px; background: #fafafa; color: #333; font-size: 0.8rem; } + .log+.log { border-top: 1px solid #aaa; } + .log .date { display: block; font-weight: bold; } + .log.error { background: #fdd; color: #844; } + .log.warning { background: #ffe; color: #c95; } + .log.notice { background: #f4f4f4; color: #aaa; } + .log.debug { background: #333; color: #eee; @@ -1016,24 +1145,22 @@ a.btn, /*=== MOBILE */ /*===========*/ -@media(max-width: 840px) { + +@media (max-width: 840px) { .aside { box-shadow: 3px 0 3px #aaa; transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; } + .aside .toggle_aside, #panel .close { + background: #f6f6f6; display: block; width: 100%; height: 50px; + border-bottom: 1px solid #ddd; line-height: 50px; text-align: center; - background: #f6f6f6; - border-bottom: 1px solid #ddd; } .aside.aside_feed { @@ -1043,20 +1170,25 @@ a.btn, .nav_menu .btn { margin: 5px 10px; } + .nav_menu .stick { margin: 0 10px; } + .nav_menu .stick .btn { margin: 5px 0; } + .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; } @@ -1071,13 +1203,15 @@ a.btn, } .notification a.close { + background: transparent; display: block; left: 0; - background: transparent; } + .notification a.close:hover { opacity: 0.5; } + .notification a.close .icon { display: none; } diff --git a/p/themes/Origine/origine.css b/p/themes/Origine/origine.css index 11dec90ac..b4416b6a6 100644 --- a/p/themes/Origine/origine.css +++ b/p/themes/Origine/origine.css @@ -3,9 +3,9 @@ /*=== GENERAL */ /*============*/ html, body { + background: #fafafa; height: 100%; font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", "PingFang SC", "Microsoft YaHei", sans-serif; - background: #fafafa; } /*=== Links */ @@ -18,50 +18,54 @@ a, button.as-link { legend { margin: 20px 0 5px; padding: 5px 0; - border-bottom: 1px solid #ddd; font-size: 1.4em; + border-bottom: 1px solid #ddd; } + label { min-height: 25px; padding: 5px 0; cursor: pointer; } + textarea { width: 360px; height: 100px; } + input, select, textarea { - min-height: 25px; padding: 5px; background: #fdfdfd; + color: #666; border: 1px solid #bbb; border-radius: 3px; - color: #666; + box-shadow: 0 2px 2px #eee inset; + min-height: 25px; line-height: 25px; vertical-align: middle; - box-shadow: 0 2px 2px #eee inset; } + option { padding: 0 .5em; } + input:focus, select:focus, textarea:focus { color: #0062be; - border-color: #33bbff; - box-shadow: 0 2px 2px #ddddff inset; + border-color: #3bf; + box-shadow: 0 2px 2px #ddf inset; } + input:invalid, select:invalid { border-color: #f00; box-shadow: 0 0 2px 2px #fdd inset; } + input:disabled, select:disabled { background: #eee; } + input.extend { transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; } /*=== Tables */ @@ -73,9 +77,11 @@ tr, th, td { padding: 0.5em; border: 1px solid #ddd; } + th { background: #f6f6f6; } + form td, form th { font-weight: normal; @@ -90,17 +96,21 @@ form th { background: #f4f4f4; border-top: 1px solid #ddd; } + .form-group.form-actions .btn { margin: 0 10px; } + .form-group .group-name { padding: 10px 0; text-align: right; } + .form-group .group-controls { min-height: 25px; padding: 5px 0; } + .form-group table { margin: 10px 0 0 220px; } @@ -110,21 +120,26 @@ form th { vertical-align: middle; font-size: 0; } + .stick input, .stick .btn { border-radius: 0; } + .stick .btn:first-child, .stick input:first-child { border-radius: 3px 0 0 3px; } + .stick .btn-important:first-child { border-right: 1px solid #06f; } + .stick .btn:last-child, .stick input:last-child { border-radius: 0 3px 3px 0; } + .stick .btn + .btn, .stick .btn + input, .stick .btn + .dropdown > .btn, @@ -136,102 +151,87 @@ form th { .stick .dropdown + .dropdown > .btn { border-left: none; } + .stick input + .btn { border-top: 1px solid #bbb; } + .stick .btn + .dropdown > .btn { border-left: none; border-radius: 0 3px 3px 0; } .btn { - display: inline-block; - min-height: 37px; - min-width: 15px; - line-height: 25px; margin: 0; padding: 5px 10px; background: #fff; background: linear-gradient(to bottom, #fff 0%, #eee 100%); - background: -moz-linear-gradient(top, #fff 0%, #eee 100%); - background: -webkit-linear-gradient(top, #fff 0%, #eee 100%); - background: -o-linear-gradient(top, #fff 0%, #eee 100%); - background: -ms-linear-gradient(top, #fff 0%, #eee 100%); - border-radius: 3px; + display: inline-block; + color: #666; + font-size: 0.9rem; border: 1px solid #ddd; - border-bottom: 1px solid #aaa; border-right: 1px solid #aaa; - color: #666; + border-bottom: 1px solid #aaa; + border-radius: 3px; + min-height: 37px; + min-width: 15px; + line-height: 25px; text-shadow: 0px -1px 0 #ddd; - font-size: 0.9rem; vertical-align: middle; cursor: pointer; overflow: hidden; } + a.btn { min-height: 25px; line-height: 25px; } + .btn:hover { background: #f0f0f0; background: linear-gradient(to bottom, #f8f8f8, #f0f0f0); - background: -moz-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%); - background: -webkit-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%); - background: -o-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%); - background: -ms-linear-gradient(top, #f8f8f8 0%, #f0f0f0 100%); text-decoration: none; } + .btn.active, .btn:active, .dropdown-target:target ~ .btn.dropdown-toggle { - box-shadow: 0px 2px 4px #e0e0e0 inset, 0px 1px 2px #fafafa; background: #eee; + box-shadow: 0px 2px 4px #e0e0e0 inset, 0px 1px 2px #fafafa; } .btn-important { - background: #0084CC; - background: linear-gradient(to bottom, #0084CC, #0045CC); - background: -moz-linear-gradient(top, #0084CC 0%, #0045CC 100%); - background: -webkit-linear-gradient(top, #0084CC 0%, #0045CC 100%); - background: -o-linear-gradient(top, #0084CC 0%, #0045CC 100%); - background: -ms-linear-gradient(top, #0084CC 0%, #0045CC 100%); + background: #0084cc; + background: linear-gradient(to bottom, #0084cc, #0045cc); color: #fff; - border: 1px solid #0062B7; + border: 1px solid #0062b7; text-shadow: 0px -1px 0 #aaa; font-weight: normal; } + .btn-important:hover { - background: linear-gradient(to bottom, #0066CC, #0045CC); - background: -moz-linear-gradient(top, #0066CC 0%, #0045CC 100%); - background: -webkit-linear-gradient(top, #0066CC 0%, #0045CC 100%); - background: -o-linear-gradient(top, #0066CC 0%, #0045CC 100%); - background: -ms-linear-gradient(top, #0066CC 0%, #0045CC 100%); + background: linear-gradient(to bottom, #06c, #0045cc); } + .btn-important:active { - background: #0044CB; + background: #0044cb; box-shadow: none; } .btn-attention { - background: #E95B57; - background: linear-gradient(to bottom, #E95B57, #BD362F); - background: -moz-linear-gradient(top, #E95B57 0%, #BD362F 100%); - background: -webkit-linear-gradient(top, #E95B57 0%, #BD362F 100%); - background: -o-linear-gradient(top, #E95B57 0%, #BD362F 100%); - background: -ms-linear-gradient(top, #E95B57 0%, #BD362F 100%); + background: #e95b57; + background: linear-gradient(to bottom, #e95b57, #bd362f); color: #fff; - border: 1px solid #C44742; + border: 1px solid #c44742; text-shadow: 0px -1px 0px #666; } + .btn-attention:hover { - background: linear-gradient(to bottom, #D14641, #BD362F); - background: -moz-linear-gradient(top, #D14641 0%, #BD362F 100%); - background: -webkit-linear-gradient(top, #D14641 0%, #BD362F 100%); - background: -o-linear-gradient(top, #D14641 0%, #BD362F 100%); - background: -ms-linear-gradient(top, #D14641 0%, #BD362F 100%); + background: linear-gradient(to bottom, #d14641, #bd362f); } + .btn-attention:active { - background: #BD362F; + background: #bd362f; box-shadow: none; } @@ -242,49 +242,60 @@ a.btn { line-height: 2.5em; font-size: 0.9rem; } + .nav-list .item:hover { background: #fafafa; } + .nav-list .item:hover a { - color: #003388; + color: #038; } + .nav-list .item.active { - background: #0062BE; + background: #0062be; color: #fff; } + .nav-list .item.active a { color: #fff; } + .nav-list .disable { - color: #aaa; background: #fafafa; + color: #aaa; text-align: center; } + .nav-list .item > a { padding: 0 10px; } + .nav-list a:hover { text-decoration: none; } + .nav-list .item.empty a { color: #f39c12; } + .nav-list .item.active.empty a { - color: #fff; background: #f39c12; + color: #fff; } + .nav-list .item.error a { - color: #BD362F; + color: #bd362f; } + .nav-list .item.active.error a { + background: #bd362f; color: #fff; - background: #BD362F; } .nav-list .nav-header { padding: 0 10px; - color: #888; background: #f4f4f4; + color: #888; border-bottom: 1px solid #ddd; font-weight: bold; text-shadow: 0 0 1px #ddd; @@ -299,13 +310,10 @@ a.btn { margin: 0; background: #fff; background: linear-gradient(to bottom, #fff, #f0f0f0); - background: -moz-linear-gradient(top, #fff 0%, #f0f0f0 100%); - background: -webkit-linear-gradient(top, #fff 0%, #f0f0f0 100%); - background: -o-linear-gradient(top, #fff 0%, #f0f0f0 100%); - background: -ms-linear-gradient(top, #fff 0%, #f0f0f0 100%); border-bottom: 1px solid #ddd; text-align: right; } + .nav-head .item { padding: 5px 10px; font-size: 0.9rem; @@ -317,6 +325,7 @@ a.btn { margin: 0; padding: 0; } + .horizontal-list .item { vertical-align: middle; } @@ -325,34 +334,34 @@ a.btn { .dropdown-menu { margin: 5px 0 0; padding: 5px 0; + font-size: 0.8rem; border: 1px solid #ddd; border-radius: 5px; box-shadow: 3px 3px 3px #ddd; - font-size: 0.8rem; text-align: left; } + .dropdown-menu::after { - content: ""; - position: absolute; - top: -6px; - right: 13px; + background: #fff; width: 10px; height: 10px; - background: #fff; border-top: 1px solid #ddd; border-left: 1px solid #ddd; + content: ""; + position: absolute; + top: -6px; + right: 13px; z-index: -10; transform: rotate(45deg); - -moz-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); } + .dropdown-header { padding: 0 5px 5px; color: #888; font-weight: bold; text-align: left; } + .dropdown-menu > .item > a, .dropdown-menu > .item > span, .dropdown-menu > .item > .as-link { @@ -360,18 +369,22 @@ a.btn { line-height: 2.5em; font-size: 0.8rem; } + .dropdown-menu > .item:hover { - background: #0062BE; + background: #0062be; color: #fff; } + .dropdown-menu > .item[aria-checked="true"] > a::before { font-weight: bold; margin: 0 0 0 -14px; } + .dropdown-menu > .item:hover > a { color: #fff; text-decoration: none; } + .dropdown-menu .input select, .dropdown-menu .input input { margin: 0 auto 5px; @@ -389,35 +402,40 @@ a.btn { margin: 15px auto; padding: 10px 15px; background: #f4f4f4; + color: #aaa; + font-size: 0.9em; border: 1px solid #ccc; border-right: 1px solid #aaa; border-bottom: 1px solid #aaa; border-radius: 5px; - color: #aaa; text-shadow: 0 0 1px #eee; - font-size: 0.9em; } + .alert-head { font-size: 1.15em; } + .alert > a { color: inherit; text-decoration: underline; } + .alert-warn { background: #ffe; - border: 1px solid #eeb; color: #c95; + border: 1px solid #eeb; } + .alert-success { background: #dfd; - border: 1px solid #cec; color: #484; + border: 1px solid #cec; } + .alert-error { background: #fdd; - border: 1px solid #ecc; color: #844; + border: 1px solid #ecc; } /*=== Pagination */ @@ -427,14 +445,17 @@ a.btn { color: #333; font-size: 0.8em; } + .content .pagination { margin: 0; padding: 0; } + .pagination .item.pager-current { font-weight: bold; font-size: 1.5em; } + .pagination .item a { display: block; color: #333; @@ -442,12 +463,15 @@ a.btn { line-height: 3em; text-decoration: none; } + .pagination .item a:hover { background: #ddd; } + .pagination:first-child .item { border-bottom: 1px solid #aaa; } + .pagination:last-child .item { border-top: 1px solid #aaa; } @@ -464,6 +488,7 @@ a.btn { border-radius: 5px; box-shadow: 0 0 3px #bbb; } + .box .box-title { margin: 0; padding: 5px 10px; @@ -471,6 +496,7 @@ a.btn { border-bottom: 1px solid #ddd; border-radius: 5px 5px 0 0; } + .box .box-content { min-height: 2.5em; max-height: 260px; @@ -486,6 +512,7 @@ a.btn { .box .box-content .item .configure { visibility: hidden; } + .box .box-title:hover .configure, .box .box-content .item:hover .configure { visibility: visible; @@ -495,6 +522,7 @@ a.btn { .tree { margin: 10px 0; } + .tree-folder-title { position: relative; padding: 0 10px; @@ -502,36 +530,45 @@ a.btn { line-height: 2.5rem; font-size: 1rem; } + .tree-folder-title .title { background: inherit; color: #444; } + .tree-folder-title .title:hover { text-decoration: none; } + .tree-folder.active .tree-folder-title { background: #f0f0f0; font-weight: bold; } + .tree-folder.active .tree-folder-title .title { - color: #0062BE; + color: #0062be; } + .tree-folder-items { + background: #f6f6f6; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; - background: #f6f6f6; } + .tree-folder-items > .item { padding: 0 10px; line-height: 2.5rem; font-size: 0.8rem; } + .tree-folder-items > .item.active { background: #0062be; } + .tree-folder-items > .item > a { text-decoration: none; } + .tree-folder-items > .item.active > a { color: #fff; } @@ -540,28 +577,34 @@ a.btn { /*===============*/ /*=== Header */ .header { - height: 85px; background: #f4f4f4; + height: 85px; } + .header > .item { padding: 10px; border-bottom: 1px solid #aaa; vertical-align: middle; text-align: center; } -.header > .item.title{ + +.header > .item.title { width: 230px; } + .header > .item.title h1 { margin: 0.5em 0; text-shadow: 1px -1px 0 #ccc; } + .header > .item.title h1 a { text-decoration: none; } + .header > .item.search input { width: 230px; } + .header .item.search input:focus { width: 350px; } @@ -570,54 +613,63 @@ a.btn { #global { height: calc(100% - 85px); } + .aside { - border-right: 1px solid #aaa; background: #fff; + border-right: 1px solid #aaa; } + .aside.aside_feed { padding: 10px 0; text-align: center; background: #fff; } + .aside.aside_feed .tree { margin: 10px 0 50px; } /*=== Aside main page (categories) */ .aside_feed .category .title:not([data-unread="0"])::after { - position: absolute; - right: 0; margin: 10px 0; padding: 0 10px; + background: inherit; font-size: 0.9rem; + position: absolute; + right: 0; line-height: 1.5rem; - background: inherit; } /*=== Aside main page (feeds) */ .feed.item.empty.active { background: #e67e22; } + .feed.item.error.active { background: #bd362f; } + .feed.item.empty, .feed.item.empty > a { color: #e67e22; } + .feed.item.error, .feed.item.error > a { color: #bd362f; } + .feed.item.empty.active, .feed.item.error.active, .feed.item.empty.active > a, .feed.item.error.active > a { color: #fff; } + .aside_feed .tree-folder-items .dropdown-menu::after { left: 2px; } + .aside_feed .tree-folder-items .item .dropdown-target:target ~ .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item.active .dropdown-toggle > .icon { background-color: #fff; @@ -629,9 +681,11 @@ a.btn { padding: 10px 50px; font-size: 0.9em; } + .post form { margin: 10px 0; } + .post.content { max-width: 550px; } @@ -640,35 +694,42 @@ a.btn { .prompt { text-align: center; } + .prompt label { text-align: left; } + .prompt form { margin: 10px auto 20px auto; width: 200px; } + .prompt input { margin: 5px auto; width: 100%; } + .prompt p { margin: 20px 0; } /*=== New article notification */ #new-article { - background: #0084CC; + background: #0084cc; text-align: center; font-size: 0.9em; } + #new-article:hover { - background: #0066CC; + background: #06c; } + #new-article > a { line-height: 3em; color: #fff; font-weight: bold; } + #new-article > a:hover { text-decoration: none; } @@ -682,9 +743,11 @@ a.btn { border-top: 1px solid #aaa; border-bottom: 1px solid #aaa; } + #new-article + .day { border-top: none; } + .day .name { padding: 0 10px 0 0; color: #aab; @@ -697,53 +760,59 @@ a.btn { /*=== Index menu */ .nav_menu { + padding: 5px 0; background: #fafafa; border-bottom: 1px solid #aaa; text-align: center; - padding: 5px 0; } /*=== Feed articles */ .flux { - border-left: 2px solid #aaa; background: #fafafa; + border-left: 2px solid #aaa; } + .flux:hover { background: #fff; } + .flux.current { - border-left: 2px solid #0062BE; + background: #fff; + border-left: 2px solid #0062be; } + .flux.not_read { - border-left: 2px solid #FF5300; - background: #FFF3ED; + background: #fff3ed; + border-left: 2px solid #ff5300; } + .flux.not_read:not(.current):hover .item.title { - background: #FFF3ED; + background: #fff3ed; } + .flux.favorite { - border-left: 2px solid #FFC300; - background: #FFF6DA; + background: #fff6da; + border-left: 2px solid #ffc300; } + .flux.favorite:not(.current):hover .item.title { - background: #FFF6DA; -} -.flux.current { - background: #fff; + background: #fff6da; } - .flux_header { - border-top: 1px solid #ddd; font-size: 0.8rem; + border-top: 1px solid #ddd; cursor: pointer; } + .flux_header .title { font-size: 0.9rem; } + .flux .website .favicon { padding: 5px; } + .flux .date { color: #666; font-size: 0.7rem; @@ -758,14 +827,15 @@ a.btn { .content { padding: 20px 10px; } + .content > h1.title > a { color: #000; } .content hr { margin: 30px 10px; - height: 1px; background: #ddd; + height: 1px; border: 0; box-shadow: 0 2px 5px #ccc; } @@ -779,13 +849,15 @@ a.btn { font-size: 0.9rem; border-radius: 3px; } + .content code { padding: 2px 5px; - color: #dd1144; background: #fafafa; + color: #d14; border: 1px solid #eee; border-radius: 3px; } + .content pre code { background: transparent; color: #fff; @@ -793,14 +865,15 @@ a.btn { } .content blockquote { - display: block; margin: 0; padding: 5px 20px; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; background: #fafafa; + display: block; color: #333; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; } + .content blockquote p { margin: 0; } @@ -808,33 +881,38 @@ a.btn { /*=== Notification and actualize notification */ .notification { padding: 0 0 0 5px; - text-align: center; + font-size: 0.9em; border: 1px solid #eeb; border-radius: 3px; box-shadow: 0 0 5px #ddd; + text-align: center; font-weight: bold; - font-size: 0.9em; line-height: 3em; z-index: 10; vertical-align: middle; } + .notification.good { background: #ffe; - border: 1px solid #eeb; color: #c95; + border: 1px solid #eeb; } + .notification.bad { background: #fdd; - border: 1px solid #ecc; color: #844; + border: 1px solid #ecc; } + .notification a.close { padding: 0 15px; line-height: 3em; } + .notification.good a.close:hover { background: #eeb; } + .notification.bad a.close:hover { background: #ecc; } @@ -845,17 +923,19 @@ a.btn { /*=== "Load more" part */ #bigMarkAsRead { + background: #fafafa; + color: #666; text-align: center; text-decoration: none; text-shadow: 0 -1px 0 #aaa; - color: #666; - background: #fafafa; } + #bigMarkAsRead:hover { - color: #0062be; background: #fff; + color: #0062be; box-shadow: 0 -5px 10px #eee inset; } + #bigMarkAsRead:hover .bigTick { text-shadow: 0 0 5px #0062be; } @@ -874,14 +954,15 @@ a.btn { /*================*/ #stream.reader .flux { padding: 0 0 50px; - border: none; background: #f0f0f0; color: #333; + border: none; } + #stream.reader .flux .author { margin: 0 0 10px; - font-size: 90%; color: #666; + font-size: 90%; } /*=== GLOBAL VIEW */ @@ -891,26 +972,31 @@ a.btn { text-decoration: none; text-align: left; } + .box.category:not([data-unread="0"]) .box-title { - background: #0084CC; + background: #0084cc; } + .box.category:not([data-unread="0"]) .box-title:active { background: #3498db; } + .box.category:not([data-unread="0"]) .box-title .title { color: #fff; font-weight: bold; } + .box.category .title:not([data-unread="0"])::after { - position: absolute; - top: 5px; right: 10px; - border: 0; background: none; color: #fff; - font-weight: bold; + border: 0; box-shadow: none; + position: absolute; + top: 5px; right: 10px; + font-weight: bold; text-shadow: none; } + .box.category .item.feed { padding: 2px 10px; font-size: 0.8rem; @@ -922,9 +1008,11 @@ a.btn { .aside.aside_feed .nav-form select { width: 140px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu { right: -20px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu::after { right: 33px; } @@ -940,6 +1028,7 @@ a.btn { .stat tr { border: none; } + .stat > table td, .stat > table th { border-bottom: 1px solid #ddd; @@ -948,11 +1037,13 @@ a.btn { .stat > .horizontal-list { margin: 0 0 5px; } + .stat > .horizontal-list .item { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } + .stat > .horizontal-list .item:first-child { width: 270px; } @@ -964,31 +1055,38 @@ a.btn { border-radius: 5px; overflow: hidden; } + .log { padding: 5px 10px; background: #fafafa; color: #333; font-size: 0.8rem; } + .log+.log { border-top: 1px solid #aaa; } + .log .date { display: block; font-weight: bold; } + .log.error { background: #fdd; color: #844; } + .log.warning { background: #ffe; color: #c95; } + .log.notice { background: #f4f4f4; color: #aaa; } + .log.debug { background: #333; color: #eee; @@ -996,24 +1094,22 @@ a.btn { /*=== MOBILE */ /*===========*/ -@media(max-width: 840px) { + +@media (max-width: 840px) { .aside { box-shadow: 3px 0 3px #aaa; transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; } + .aside .toggle_aside, #panel .close { + background: #f6f6f6; display: block; width: 100%; height: 50px; + border-bottom: 1px solid #ddd; line-height: 50px; text-align: center; - background: #f6f6f6; - border-bottom: 1px solid #ddd; } .aside.aside_feed { @@ -1023,20 +1119,25 @@ a.btn { .nav_menu .btn { margin: 5px 10px; } + .nav_menu .stick { margin: 0 10px; } + .nav_menu .stick .btn { margin: 5px 0; } + .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; } @@ -1051,13 +1152,15 @@ a.btn { } .notification a.close { + background: transparent; display: block; left: 0; - background: transparent; } + .notification a.close:hover { opacity: 0.5; } + .notification a.close .icon { display: none; } diff --git a/p/themes/Pafat/pafat.css b/p/themes/Pafat/pafat.css index 46425cd5c..8b6bc5f62 100644 --- a/p/themes/Pafat/pafat.css +++ b/p/themes/Pafat/pafat.css @@ -3,10 +3,10 @@ /*=== GENERAL */ /*============*/ html, body { + background: #fafafa; height: 100%; + color: #666; font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", "PingFang SC", "Microsoft YaHei", sans-serif; - background: #fafafa; - color : #666; } /*=== Links */ @@ -19,25 +19,28 @@ a { legend { margin: 20px 0 5px; padding: 5px 0; - border-bottom: 1px solid #ddd; font-size: 1.4em; + border-bottom: 1px solid #ddd; } + label { min-height: 25px; padding: 5px 0; cursor: pointer; } + textarea { width: 360px; height: 100px; } + input, select, textarea { - min-height: 25px; padding: 1px; background: #fdfdfd; + color: #666; border: 1px solid #bbb; border-radius: 3px; - color: #666; + min-height: 25px; line-height: 21px; vertical-align: middle; } @@ -45,24 +48,23 @@ input, select, textarea { option { padding: 0 .5em; } + input:focus, select:focus, textarea:focus { - outline-color: #aaa; + outline-color: #aaa; } input:invalid, select:invalid { border-color: #f00; box-shadow: 0 0 2px 2px #fdd inset; - outline-color: #fdd; + outline-color: #fdd; } + input:disabled, select:disabled { background: #eee; } + input.extend { transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; } /*=== Tables */ @@ -74,9 +76,11 @@ tr, th, td { padding: 0.5em; border: 1px solid #ddd; } + th { background: #f6f6f6; } + form td, form th { font-weight: normal; @@ -91,19 +95,23 @@ form th { background: #f4f4f4; border-top: 1px solid #ddd; } + .form-group.form-actions .btn { margin: 0 10px; } + .form-group .group-name { padding: 10px 0; text-align: right; } + .form-group .group-controls { - min-height: 25px; + margin: 10px 0 10px 220px; padding: 5px 0; - margin : 10px 0 10px 220px; + min-height: 25px; } + .form-group table { margin: 10px 0 0 220px; } @@ -114,21 +122,26 @@ form th { font-size: 0; min-width: 215px; } + .stick input, .stick .btn { border-radius: 0; } + .stick .btn:first-child, .stick input:first-child { border-radius: 3px 0 0 3px; } + .stick .btn-important:first-child { - width:176px; + width: 176px; } + .stick .btn:last-child, .stick input:last-child { border-radius: 0 3px 3px 0; } + .stick .btn + .btn, .stick .btn + input, .stick .btn + .dropdown > .btn, @@ -148,17 +161,17 @@ form th { } .btn { - display: inline-block; - min-height: 29px; - min-width: 15px; - line-height: 25px; margin: 0; padding: 1px 5px; background: #fff; - border-radius: 3px; - border: 1px solid #aaa; + display: inline-block; color: #666; font-size: 0.9rem; + border: 1px solid #aaa; + border-radius: 3px; + min-height: 29px; + min-width: 15px; + line-height: 25px; vertical-align: middle; cursor: pointer; overflow: hidden; @@ -170,7 +183,7 @@ a.btn { } .read_all.btn { - height:29px; + height: 29px; } .btn:hover { @@ -190,9 +203,10 @@ a.btn { border-color: #5cb85c; font-weight: normal; } + .btn-important:hover, .btn-important:active { - background:#47a447; - border-color : #47a447; + background: #47a447; + border-color: #47a447; box-shadow: none; } @@ -200,12 +214,14 @@ a.btn { background: #d9534f; color: #fff; border: 1px solid #d9534f; - outline-color : #aaa; + outline-color: #aaa; } + .btn-attention:hover { background: #d2322d; - border-color : #d2322d; + border-color: #d2322d; } + .btn-attention:active { background: #d2322d; box-shadow: none; @@ -218,49 +234,60 @@ a.btn { line-height: 2.5em; font-size: 0.9rem; } + .nav-list .item:hover { background: #fafafa; } + .nav-list .item:hover a { - color: #003388; + color: #038; } + .nav-list .item.active { - background: #3498DB; + background: #3498db; color: #fff; } + .nav-list .item.active a { color: #fff; } + .nav-list .disable { - color: #aaa; background: #fafafa; + color: #aaa; text-align: center; } + .nav-list .item > a { padding: 0 10px; } + .nav-list a:hover { text-decoration: none; } + .nav-list .item.empty a { color: #f39c12; } + .nav-list .item.active.empty a { - color: #fff; background: #f39c12; + color: #fff; } + .nav-list .item.error a { - color: #BD362F; + color: #bd362f; } + .nav-list .item.active.error a { + background: #bd362f; color: #fff; - background: #BD362F; } .nav-list .nav-header { padding: 0 10px; - color: #888; background: #f4f4f4; + color: #888; border-bottom: 1px solid #ddd; font-weight: bold; } @@ -274,13 +301,9 @@ a.btn { margin: 0; background: #fff; background: linear-gradient(to bottom, #fff, #f0f0f0); - background: -moz-linear-gradient(top, #fff 0%, #f0f0f0 100%); - background: -webkit-linear-gradient(top, #fff 0%, #f0f0f0 100%); - background: -o-linear-gradient(top, #fff 0%, #f0f0f0 100%); - background: -ms-linear-gradient(top, #fff 0%, #f0f0f0 100%); - border-bottom: 1px solid #ddd; text-align: right; } + .nav-head .item { padding: 5px 10px; font-size: 0.9rem; @@ -292,6 +315,7 @@ a.btn { margin: 0; padding: 0; } + .horizontal-list .item { vertical-align: middle; } @@ -300,27 +324,26 @@ a.btn { .dropdown-menu { margin: 5px 0 0; padding: 5px 0; + font-size: 0.8rem; border: 1px solid #aaa; border-radius: 5px; - font-size: 0.8rem; text-align: left; } + .dropdown-menu::after { - content: ""; - position: absolute; - top: -6px; - right: 13px; + background: #fff; width: 10px; height: 10px; - background: #fff; border-top: 1px solid #aaa; border-left: 1px solid #aaa; + content: ""; + position: absolute; + top: -6px; + right: 13px; z-index: -10; transform: rotate(45deg); - -moz-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); } + .dropdown-header { padding: 0 5px 5px; color: #888; @@ -341,14 +364,17 @@ a.btn { background: #eee; color: #666; } + .dropdown-menu > .item[aria-checked="true"] > a::before { font-weight: bold; margin: 0 0 0 -14px; } + .dropdown-menu > .item:hover > a { color: #666; text-decoration: none; } + .dropdown-menu .input select, .dropdown-menu .input input { margin: 0 auto 5px; @@ -366,34 +392,39 @@ a.btn { margin: 15px auto; padding: 10px 15px; background: #f4f4f4; + color: #aaa; + font-size: 0.9em; border: 1px solid #ccc; border-right: 1px solid #aaa; border-bottom: 1px solid #aaa; border-radius: 5px; - color: #aaa; - font-size: 0.9em; } + .alert-head { font-size: 1.15em; } + .alert > a { color: inherit; text-decoration: underline; } + .alert-warn { background: #ffe; - border: 1px solid #eeb; color: #c95; + border: 1px solid #eeb; } + .alert-success { background: #dfd; - border: 1px solid #cec; color: #484; + border: 1px solid #cec; } + .alert-error { background: #fdd; - border: 1px solid #ecc; color: #844; + border: 1px solid #ecc; } /*=== Pagination */ @@ -403,14 +434,17 @@ a.btn { color: #41444f; font-size: 0.8em; } + .content .pagination { margin: 0; padding: 0; } + .pagination .item.pager-current { font-weight: bold; font-size: 1.5em; } + .pagination .item a { display: block; color: #41444f; @@ -418,12 +452,15 @@ a.btn { line-height: 3em; text-decoration: none; } + .pagination .item a:hover { background: #ddd; } + .pagination:first-child .item { border-bottom: 1px solid #aaa; } + .pagination:last-child .item { border-top: 1px solid #aaa; } @@ -439,6 +476,7 @@ a.btn { border: 1px solid #aaa; border-radius: 5px; } + .box .box-title { margin: 0; padding: 5px 10px; @@ -446,6 +484,7 @@ a.btn { border-bottom: 1px solid #aaa; border-radius: 5px 5px 0 0; } + .box .box-content { max-height: 260px; } @@ -460,6 +499,7 @@ a.btn { .box .box-content .item .configure { visibility: hidden; } + .box .box-title:hover .configure, .box .box-content .item:hover .configure { visibility: visible; @@ -469,25 +509,29 @@ a.btn { .tree { margin: 10px 0; } + .tree-folder-title { - position: relative; margin: 5px; padding: 0 10px; - line-height: 2rem; - font-size: 0.9rem; background: #5bc0de; color: #fff; + font-size: 0.9rem; border-top: 1px solid transparent; border-bottom: 1px solid transparent; border-radius: 5px; + position: relative; + line-height: 2rem; } + .tree-folder-title .title { background: inherit; color: #fff; } + .tree-folder-title .title:hover { text-decoration: none; } + .tree-folder.active .tree-folder-title { background: #39b3d7; font-weight: bold; @@ -495,17 +539,21 @@ a.btn { border-top: 1px solid #666; border-bottom: 1px solid #666; } + .tree-folder-items > .item { padding: 0 10px; line-height: 2.5rem; font-size: 0.8rem; } + .tree-folder-items > .item.active { background: #5cb85c; } + .tree-folder-items > .item > a { text-decoration: none; } + .tree-folder-items > .item.active > a { color: #fff; } @@ -514,40 +562,39 @@ a.btn { /*===============*/ /*=== Header */ .header { - height: 85px; background: #41444f; + height: 85px; } + .header > .item { padding: 10px; border-bottom: 1px solid #aaa; vertical-align: middle; text-align: center; } -.header > .item.title{ + +.header > .item.title { width: 230px; } + .header > .item.title h1 { margin: 0.5em 0; } .header > .item.title h1 a, a.signin { text-decoration: none; - color : #C5C6CA; + color: #c5c6ca; } .header > .item.search input { width: 230px; - height : 29px; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; + height: 29px; box-sizing: border-box; } .header > .item.search button { - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; box-sizing: border-box; - height : 29px; + height: 29px; } .header .item.search input:focus { @@ -558,37 +605,44 @@ a.btn { #global { height: calc(100% - 85px); } + .aside { - border-right: 1px solid #aaa; background: #fff; + border-right: 1px solid #aaa; } + .aside.aside_feed { padding: 10px 0; text-align: center; } + .aside.aside_feed .tree { margin: 10px 0 50px; } /*=== Aside main page (categories) */ .aside_feed .tree-folder-title > .title:not([data-unread="0"])::after { - position: absolute; - top: 0.25rem; right: 3px; padding: 0px 5px; + font-size: 0.8rem; border: 1px solid #fff; border-radius: 3px; - font-size: 0.8rem; + position: absolute; + top: 0.25rem; right: 3px; line-height: 1.5rem; } + .aside_feed .tree-folder.all .tree-folder-title { background: #428bca; } + .aside_feed .tree-folder.all.active .tree-folder-title { background: #3276b1; } + .aside_feed .tree-folder.favorites .tree-folder-title { background: #f0ad4e; } + .aside_feed .tree-folder.favorites.active .tree-folder-title { background: #ed9c28; } @@ -597,26 +651,32 @@ a.btn { .feed.item.empty.active { background: #e67e22; } + .feed.item.error.active { background: #bd362f; } + .feed.item.empty, .feed.item.empty > a { color: #e67e22; } + .feed.item.error, .feed.item.error > a { color: #bd362f; } + .feed.item.empty.active, .feed.item.error.active, .feed.item.empty.active > a, .feed.item.error.active > a { color: #fff; } + .aside_feed .tree-folder-items .dropdown-menu::after { left: 2px; } + .aside_feed .tree-folder-items .item .dropdown-target:target ~ .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item:hover .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item.active .dropdown-toggle > .icon { @@ -629,9 +689,11 @@ a.btn { padding: 10px 50px; font-size: 0.9em; } + .post form { margin: 10px 0; } + .post.content { max-width: 550px; } @@ -640,17 +702,21 @@ a.btn { .prompt { text-align: center; } + .prompt label { text-align: left; } + .prompt form { margin: 10px auto 20px auto; width: 200px; } + .prompt input { margin: 5px auto; width: 100%; } + .prompt p { margin: 20px 0; } @@ -661,14 +727,17 @@ a.btn { text-align: center; font-size: 0.9em; } + #new-article:hover { background: #3276b1; } + #new-article > a { line-height: 3em; color: #fff; font-weight: bold; } + #new-article > a:hover { text-decoration: none; } @@ -676,19 +745,21 @@ a.btn { /*=== Day indication */ .day { padding: 0 10px; - font-weight: bold; - line-height: 3em; background: #fff; + color: #666; border-top: 1px solid #aaa; border-bottom: 1px solid #aaa; - color : #666; + font-weight: bold; + line-height: 3em; } + #new-article + .day { border-top: none; } + .day .name { padding: 0 10px 0 0; - color : #666; + color: #666; font-size: 1.8em; opacity: 0.3; font-style: italic; @@ -697,52 +768,58 @@ a.btn { /*=== Index menu */ .nav_menu { + padding: 5px 0; background: #fafafa; border-bottom: 1px solid #aaa; text-align: center; - padding: 5px 0; } /*=== Feed articles */ .flux { - border-left: 3px solid #5cb85c; background: #fafafa; + border-left: 3px solid #5cb85c; } + .flux:hover { background: #fff; } + .flux.current { + background: #fff; border-left: 3px solid #39b3d7; } + .flux.not_read { border-left: 3px solid #d9534f; } + .flux .item.title a, .flux.not_read:not(.current):hover .item.title { - color : #333; + color: #333; } + .flux.favorite { + background: #fff6da; border-left: 2px solid #428bca; - background: #FFF6DA; } + .flux.favorite:not(.current):hover .item.title { - background: #FFF6DA; -} -.flux.current { - background: #fff; + background: #fff6da; } - .flux_header { - border-top: 1px solid #ddd; font-size: 0.8rem; + border-top: 1px solid #ddd; cursor: pointer; } + .flux_header .title { font-size: 0.9rem; } + .flux .website .favicon { padding: 5px; } + .flux .date { color: #666; font-size: 0.7rem; @@ -757,14 +834,15 @@ a.btn { .content { padding: 20px 10px; } + .content > h1.title > a { color: #333; } .content hr { margin: 30px 10px; - height: 1px; background: #ddd; + height: 1px; border: 0; box-shadow: 0 2px 5px #ccc; } @@ -778,13 +856,15 @@ a.btn { font-size: 0.9rem; border-radius: 3px; } + .content code { padding: 2px 5px; - color: #dd1144; background: #fafafa; + color: #d14; border: 1px solid #eee; border-radius: 3px; } + .content pre code { background: transparent; color: #fff; @@ -792,14 +872,15 @@ a.btn { } .content blockquote { - display: block; margin: 0; padding: 5px 20px; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; background: #fafafa; + display: block; color: #41444f; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; } + .content blockquote p { margin: 0; } @@ -807,33 +888,38 @@ a.btn { /*=== Notification and actualize notification */ .notification { padding: 0 0 0 5px; - text-align: center; + font-size: 0.9em; border: 1px solid #eeb; border-radius: 3px; box-shadow: 0 0 5px #ddd; + text-align: center; font-weight: bold; - font-size: 0.9em; line-height: 3em; z-index: 10; vertical-align: middle; } + .notification.good { background: #ffe; - border: 1px solid #eeb; color: #c95; + border: 1px solid #eeb; } + .notification.bad { background: #fdd; - border: 1px solid #ecc; color: #844; + border: 1px solid #ecc; } + .notification a.close { padding: 0 15px; line-height: 3em; } + .notification.good a.close:hover { background: #eeb; } + .notification.bad a.close:hover { background: #ecc; } @@ -844,18 +930,19 @@ a.btn { /*=== "Load more" part */ #bigMarkAsRead { + background: #fafafa; + color: #666; text-align: center; text-decoration: none; - color: #666; - background: #fafafa; } + #bigMarkAsRead:hover { - color: #000; background: #f0f0f0; + color: #000; } #bigMarkAsRead:hover .bigTick { -/* text-shadow: 0 0 10px #666;*/ + /* text-shadow: 0 0 10px #666;*/ } /*=== Navigation menu (for articles) */ @@ -869,20 +956,21 @@ a.btn { } #nav_entries .item:hover { - background:#eee ; + background: #eee ; } /*=== READER VIEW */ /*================*/ #stream.reader .flux { padding: 0 0 50px; - border: none; background: #f0f0f0; color: #41444f; + border: none; } + #stream.reader .flux .author { margin: 0 0 10px; - font-size: 90%; color: #666; + font-size: 90%; } /*=== GLOBAL VIEW */ @@ -892,24 +980,28 @@ a.btn { text-decoration: none; text-align: left; } + .box.category:not([data-unread="0"]) .box-title { - background: #5BC0DE; + background: #5bc0de; } + .box.category:not([data-unread="0"]) .box-title .title { font-weight: bold; color: #fff; } + .box.category .title:not([data-unread="0"])::after { + background: none; + font-size: 0.8rem; + border: 0; + box-shadow: none; position: absolute; top: 5px; right: 10px; - border: 0; - background: none; font-weight: bold; - box-shadow: none; text-shadow: none; - font-size: 0.8rem; line-height: 1.6rem; } + .box.category .item.feed { padding: 2px 10px; font-size: 0.8rem; @@ -921,9 +1013,11 @@ a.btn { .aside.aside_feed .nav-form select { width: 140px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu { right: -20px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu::after { right: 33px; } @@ -939,19 +1033,23 @@ a.btn { .stat tr { border: none; } + .stat > table td, .stat > table th { border-bottom: 1px solid #ddd; text-align: center; } + .stat > .horizontal-list { margin: 0 0 5px; } + .stat > .horizontal-list .item { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } + .stat > .horizontal-list .item:first-child { width: 250px; } @@ -963,31 +1061,38 @@ a.btn { border-radius: 5px; overflow: hidden; } + .log { padding: 5px 10px; background: #fafafa; color: #41444f; font-size: 0.8rem; } + .log+.log { border-top: 1px solid #aaa; } + .log .date { display: block; font-weight: bold; } + .log.error { background: #fdd; color: #844; } + .log.warning { background: #ffe; color: #c95; } + .log.notice { background: #f4f4f4; color: #aaa; } + .log.debug { background: #41444f; color: #eee; @@ -995,24 +1100,22 @@ a.btn { /*=== MOBILE */ /*===========*/ -@media(max-width: 840px) { + +@media (max-width: 840px) { .aside { box-shadow: 3px 0 3px #aaa; transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; } + .aside .toggle_aside, #panel .close { + background: #f6f6f6; display: block; width: 100%; height: 40px; + border-bottom: 1px solid #ddd; line-height: 40px; text-align: center; - background: #f6f6f6; - border-bottom: 1px solid #ddd; } .aside.aside_feed { @@ -1022,20 +1125,25 @@ a.btn { .nav_menu .btn { margin: 5px 10px; } + .nav_menu .stick { margin: 0 10px; } + .nav_menu .stick .btn { margin: 5px 0; } + .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; } @@ -1050,13 +1158,15 @@ a.btn { } .notification a.close { + background: transparent; display: block; left: 0; - background: transparent; } + .notification a.close:hover { opacity: 0.5; } + .notification a.close .icon { display: none; } diff --git a/p/themes/Screwdriver/screwdriver.css b/p/themes/Screwdriver/screwdriver.css index 3a78bdf50..d397f473d 100644 --- a/p/themes/Screwdriver/screwdriver.css +++ b/p/themes/Screwdriver/screwdriver.css @@ -3,72 +3,77 @@ /*=== GENERAL */ /*============*/ html, body { + background: #fafafa; height: 100%; font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", "PingFang SC", "Microsoft YaHei", sans-serif; - background: #fafafa; font-size: 92%; } /*=== Links */ a, button.as-link { - color: #D18114; + color: #d18114; outline: none; } /*=== Forms */ -.form-group{ - width: 100%; +.form-group { + display: inline-block; float: left; + width: 100%; height: auto; - display: inline-block; } + legend { margin: 20px 0 5px; padding: 5px 0; - border-bottom: 1px solid #ddd; font-size: 1.4em; + border-bottom: 1px solid #ddd; } + label { min-height: 25px; padding: 5px 0; cursor: pointer; } + textarea { width: 360px; height: 100px; } + input, select, textarea { - min-height: 25px; padding: 5px; background: #fff; + color: #222; border: 1px solid #ccc; border-radius: 3px; - color: #222; + box-shadow: 0 1px 2px #ccc inset, 0 1px #fff; + min-height: 25px; line-height: 25px; vertical-align: middle; - box-shadow: 0 1px 2px #ccc inset, 0 1px #fff; } + option { padding: 0 .5em; } + input:focus, select:focus, textarea:focus { - color: #0F0F0F; - box-shadow: 0 0 3px #E7AB34; - border: solid 1px #E7AB34; + color: #0f0f0f; + border: solid 1px #e7ab34; + box-shadow: 0 0 3px #e7ab34; } + input:invalid, select:invalid { border-color: #f00; box-shadow: 0 0 2px 2px #fdd inset; } + input:disabled, select:disabled { background: #eee; } + input.extend { transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; } /*=== Tables */ @@ -80,9 +85,11 @@ tr, th, td { padding: 0.5em; border: 1px solid #ddd; } + th { background: #f6f6f6; } + form td, form th { font-weight: normal; @@ -97,51 +104,60 @@ form th { background: #f4f4f4; border-top: 1px solid #ddd; } + .form-group.form-actions .btn { margin: 0 10px; border-radius: 4px; - box-shadow:0 1px rgba(255,255,255,0.08) inset; + box-shadow: 0 1px rgba(255,255,255,0.08) inset; } + .form-group .group-name { padding: 10px 0; text-align: right; } + .form-group .group-controls { min-height: 25px; padding: 5px 0; } + .form-group table { margin: 10px 0 0 220px; } /*=== Buttons */ button.as-link[disabled] { - color:#555 !important; + color: #555 !important; } .dropdown-menu .input select, .dropdown-menu .input input { - background:#444; - color:#fff; - box-shadow:0 2px 2px #222 inset, 0px 1px rgba(255, 255, 255, 0.08); - border:solid 1px #171717; + margin: 0 auto 5px; + padding: 2px 5px; + background: #444; + color: #fff; + border: solid 1px #171717; + border-radius: 3px; + box-shadow: 0 2px 2px #222 inset, 0px 1px rgba(255, 255, 255, 0.08); } .stick { vertical-align: middle; font-size: 0; } + .stick input, .stick .btn { border-radius: 0; } + .stick .btn:first-child,.stick input:first-child { border-radius: 6px 0 0 6px; } -.stick .btn-important:first-child { -} + .stick .btn:last-child, .stick input:last-child { border-radius: 0 6px 6px 0; } + .stick .btn + .btn, .stick .btn + input, .stick .btn + .dropdown > .btn, @@ -153,103 +169,113 @@ button.as-link[disabled] { .stick .dropdown + .dropdown > .btn { border-left: none; } + .stick .btn + .dropdown > .btn { border-left: none; border-radius: 0 3px 3px 0; } .btn { - display: inline-block; - min-height: 37px; - min-width: 15px; margin: 0; padding: 5px 10px; - color:#222; + background: linear-gradient(0deg, #ede7de 0%, #fff 100%) #ede7de; + background: -webkit-linear-gradient(bottom, #ede7de 0%, #fff 100%); + display: inline-block; + color: #222; + font-size: 0.9rem; border: solid 1px #ccc; border-radius: 4px; - background: linear-gradient(0deg, #EDE7DE 0%, #FFF 100%) #EDE7DE; - background: -webkit-linear-gradient(bottom, #EDE7DE 0%, #FFF 100%); + min-height: 37px; + min-width: 15px; text-shadow: 0px -1px rgba(255,255,255,0.08); - font-size: 0.9rem; vertical-align: middle; cursor: pointer; overflow: hidden; } + a.btn { min-height: 25px; line-height: 25px; } + .btn:hover { text-shadow: 0 0 2px #fff; - text-decoration:none; + text-decoration: none; } + .btn.active,.btn:active,.dropdown-target:target ~ .btn.dropdown-toggle { - background: linear-gradient(180deg, #EDE7DE 0%, #FFF 100%) #EDE7DE; - background: -webkit-linear-gradient(top, #EDE7DE 0%, #FFF 100%); + background: linear-gradient(180deg, #ede7de 0%, #fff 100%) #ede7de; + background: -webkit-linear-gradient(top, #ede7de 0%, #fff 100%); } -.nav_menu .btn.active, .nav_menu .btn:active, .nav_menu .dropdown-target:target ~ .btn.dropdown-toggle{ - box-shadow: 0 1px #fff; - border-radius: 4px; - background: linear-gradient(180deg, #EDE7DE 0%, #F6F6F6 100%) #EDE7DE; - background: -webkit-linear-gradient(top, #EDE7DE 0%, #F6F6F6 100%); +.nav_menu .btn.active, .nav_menu .btn:active, .nav_menu .dropdown-target:target ~ .btn.dropdown-toggle { + background: linear-gradient(180deg, #ede7de 0%, #f6f6f6 100%) #ede7de; + background: -webkit-linear-gradient(top, #ede7de 0%, #f6f6f6 100%); border: solid 1px #ccc; + border-radius: 4px; + box-shadow: 0 1px #fff; } + .nav_menu .btn { + background: transparent; border: 0; - background:transparent; } .read_all { - color:#222; + color: #222; } -.btn.dropdown-toggle[href="#dropdown-configure"]{ - background: linear-gradient(0deg, #EDE7DE 0%, #FFF 100%) #EDE7DE; - background: -webkit-linear-gradient(bottom, #EDE7DE 0%, #FFF 100%); - border-radius: 4px; + +.btn.dropdown-toggle[href="#dropdown-configure"] { + background: linear-gradient(0deg, #ede7de 0%, #fff 100%) #ede7de; + background: -webkit-linear-gradient(bottom, #ede7de 0%, #fff 100%); border: solid 1px #ccc; + border-radius: 4px; box-shadow: 0 1px #fff; } + .btn.dropdown-toggle:active { - background:transparent; + background: transparent; } + .btn-important { - background: linear-gradient(180deg, #E4992C 0%, #D18114 100%) #E4992C; - background: -webkit-linear-gradient(top, #E4992C 0%, #D18114 100%); - color: #FFF; - box-shadow: 0 1px rgba(255,255,255,0.08) inset; + background: linear-gradient(180deg, #e4992c 0%, #d18114 100%) #e4992c; + background: -webkit-linear-gradient(top, #e4992c 0%, #d18114 100%); + color: #fff; border-radius: 4px; + box-shadow: 0 1px rgba(255,255,255,0.08) inset; text-shadow: 0px -1px rgba(255,255,255,0.08); font-weight: normal; } -.btn-important:hover { -} + .btn-important:active { - background: linear-gradient(0deg, #E4992C 0%, #D18114 100%) #E4992C; - background: -webkit-linear-gradient(bottom, #E4992C 0%, #D18114 100%); + background: linear-gradient(0deg, #e4992c 0%, #d18114 100%) #e4992c; + background: -webkit-linear-gradient(bottom, #e4992c 0%, #d18114 100%); } .btn-attention { - background: #E95B57; - background: linear-gradient(to bottom, #E95B57, #BD362F); - background: -webkit-linear-gradient(top, #E95B57 0%, #BD362F 100%); + background: #e95b57; + background: linear-gradient(to bottom, #e95b57, #bd362f); + background: -webkit-linear-gradient(top, #e95b57 0%, #bd362f 100%); color: #fff; - border: 1px solid #C44742; + border: 1px solid #c44742; text-shadow: 0px -1px 0px #666; } + .btn-attention:hover { - background: linear-gradient(to bottom, #D14641, #BD362F); - background: -webkit-linear-gradient(top, #D14641 0%, #BD362F 100%); + background: linear-gradient(to bottom, #d14641, #bd362f); + background: -webkit-linear-gradient(top, #d14641 0%, #bd362f 100%); } + .btn-attention:active { - background: #BD362F; + background: #bd362f; box-shadow: none; } -.btn[type="reset"]{ + +.btn[type="reset"] { + background: linear-gradient(180deg, #222 0%, #171717 100%) #171717; + background: -webkit-linear-gradient(top, #222 0%, #171717 100%); color: #fff; - background:linear-gradient(180deg, #222 0%, #171717 100%) #171717; - background: -webkit-linear-gradient(top, #222 0%, #171717 100%); - box-shadow:0 -1px rgba(255,255,255,0.08) inset; + box-shadow: 0 -1px rgba(255,255,255,0.08) inset; } /*=== Navigation */ .nav-list .nav-header, @@ -258,55 +284,64 @@ a.btn { line-height: 2.5em; font-size: 0.9rem; } + .nav-list .item:hover { text-shadow: 0 0 2px rgba(255,255,255,0.28); - color:#fff; + color: #fff; } .nav-list .item.active { + margin: 0; background: linear-gradient(180deg, #222 0%, #171717 100%) repeat scroll 0% 0% #171717; background: -webkit-linear-gradient(180deg, #222 0%, #171717 100%); + box-shadow: -1px 2px 2px #171717, 0px 1px rgba(255, 255, 255, 0.08) inset; border-width: medium medium 1px; border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color #171717; - box-shadow: -1px 2px 2px #171717, 0px 1px rgba(255, 255, 255, 0.08) inset; - margin: 0; } + .nav-list .item.active a { - color: #D18114; + color: #d18114; } + .nav-list .disable { - color: #aaa; background: #fafafa; + color: #aaa; text-align: center; } + .nav-list .item > a { padding: 0 10px; - color:#ccc; + color: #ccc; } + .nav-list a:hover { text-decoration: none; } + .nav-list .item.empty a { color: #f39c12; } + .nav-list .item.active.empty a { + background: linear-gradient(180deg, #e4992c 0%, #d18114 100%) #e4992c; + background: -webkit-linear-gradient(180deg, #e4992c 0%, #d18114 100%); color: #fff; - background: linear-gradient(180deg, #E4992C 0%, #D18114 100%) #E4992C; - background: -webkit-linear-gradient(180deg, #E4992C 0%, #D18114 100%); } + .nav-list .item.error a { - color: #BD362F; + color: #bd362f; } + .nav-list .item.active.error a { + background: #bd362f; color: #fff; - background: #BD362F; } .nav-list .nav-header { padding: 0 10px; - color: #222; background: transparent; + color: #222; } .nav-list .nav-form { @@ -316,10 +351,11 @@ a.btn { .nav-head { margin: 0; - background: linear-gradient(0deg, #EDE7DE 0%, #FFF 100%) #EDE7DE; - background: -webkit-linear-gradient(bottom, #EDE7DE 0%, #FFF 100%); + background: linear-gradient(0deg, #ede7de 0%, #fff 100%) #ede7de; + background: -webkit-linear-gradient(bottom, #ede7de 0%, #fff 100%); text-align: right; } + .nav-head .item { padding: 5px 10px; font-size: 0.9rem; @@ -331,6 +367,7 @@ a.btn { margin: 0; padding: 0; } + .horizontal-list .item { vertical-align: middle; } @@ -339,32 +376,32 @@ a.btn { .dropdown-menu { margin: 5px 0 0; padding: 5px 0; + background: #222; + font-size: 0.8rem; border: 1px solid #171717; border-radius: 4px; box-shadow: 0 0 3px #000; - font-size: 0.8rem; text-align: left; - background: #222; } + .dropdown-menu::after { - content: ""; - position: absolute; - top: -6px; - right: 13px; + background: #222; width: 10px; height: 10px; - background: #222; border-top: 1px solid #171717; border-left: 1px solid #171717; + content: ""; + position: absolute; + top: -6px; + right: 13px; z-index: -10; transform: rotate(45deg); - -moz-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); } + .dropdown-header { - display:none; + display: none; } + .dropdown-menu > .item > a, .dropdown-menu > .item > span, .dropdown-menu > .item > .as-link { @@ -373,27 +410,25 @@ a.btn { color: #ccc; font-size: 0.8rem; } + .dropdown-menu > .item > label { color: #ccc; } + .dropdown-menu > .item:hover { background: #171717; color: #fff; } + .dropdown-menu > .item[aria-checked="true"] > a::before { font-weight: bold; margin: 0 0 0 -14px; } + .dropdown-menu > .item:hover > a { color: #fff; text-decoration: none; } -.dropdown-menu .input select, -.dropdown-menu .input input { - margin: 0 auto 5px; - padding: 2px 5px; - border-radius: 3px; -} .separator { margin: 5px 0; @@ -406,35 +441,40 @@ a.btn { margin: 15px auto; padding: 10px 15px; background: #f4f4f4; + color: #aaa; + font-size: 0.9em; border: 1px solid #ccc; border-right: 1px solid #aaa; border-bottom: 1px solid #aaa; border-radius: 5px; - color: #aaa; text-shadow: 0 0 1px #eee; - font-size: 0.9em; } + .alert-head { font-size: 1.15em; } + .alert > a { color: inherit; text-decoration: underline; } + .alert-warn { background: #ffe; - border: 1px solid #eeb; color: #c95; + border: 1px solid #eeb; } + .alert-success { background: #dfd; - border: 1px solid #cec; color: #484; + border: 1px solid #cec; } + .alert-error { background: #fdd; - border: 1px solid #ecc; color: #844; + border: 1px solid #ecc; } /*=== Pagination */ @@ -444,14 +484,17 @@ a.btn { color: #333; font-size: 0.8em; } + .content .pagination { margin: 0; padding: 0; } + .pagination .item.pager-current { font-weight: bold; font-size: 1.5em; } + .pagination .item a { display: block; color: #333; @@ -459,12 +502,15 @@ a.btn { line-height: 3em; text-decoration: none; } + .pagination .item a:hover { background: #ddd; } + .pagination:first-child .item { border-bottom: 1px solid #aaa; } + .pagination:last-child .item { border-top: 1px solid #ddd; } @@ -477,22 +523,24 @@ a.btn { /*=== Boxes */ .box { - background: #EDE7DE; + background: #ede7de; border-radius: 4px; box-shadow: 0 1px #fff; } + .box .box-title { margin: 0; padding: 5px 10px; - background: linear-gradient(0deg, #EDE7DE 0%, #fff 100%) #171717; - background: -webkit-linear-gradient(bottom, #EDE7DE 0%, #fff 100%); - box-shadow: 0px -1px #fff inset,0 -2px #ccc inset; + background: linear-gradient(0deg, #ede7de 0%, #fff 100%) #171717; + background: -webkit-linear-gradient(bottom, #ede7de 0%, #fff 100%); color: #888; - text-shadow: 0 1px #ccc; - border-radius: 4px 4px 0 0; font-size: 1.1rem; + border-radius: 4px 4px 0 0; + box-shadow: 0px -1px #fff inset,0 -2px #ccc inset; + text-shadow: 0 1px #ccc; font-weight: normal; } + .box .box-content { max-height: 260px; } @@ -507,6 +555,7 @@ a.btn { .box .box-content .item .configure { visibility: hidden; } + .box .box-title:hover .configure, .box .box-content .item:hover .configure { visibility: visible; @@ -516,64 +565,74 @@ a.btn { .tree { margin: 10px 0; } + .tree-folder-title { position: relative; padding: 0 10px; line-height: 2.5rem; font-size: 0.9rem; } + .tree-folder-title .title { background: inherit; color: #fff; } + .tree-folder-title .title:hover { text-decoration: none; } + .tree-folder.active .tree-folder-title { background: linear-gradient(180deg, #222 0%, #171717 100%) #171717; background: -webkit-linear-gradient(top, #222 0%, #171717 100%); + color: #fff; box-shadow: 0px 1px #171717, 0px 1px rgba(255, 255, 255, 0.08) inset; text-shadow: 0 0 2px rgba(255,255,255,0.28); - color: #fff; } + .tree-folder-items { - background: #171717; - padding: 8px 0; + padding: 8px 0; + background: #171717; box-shadow: 0 4px 4px #171717 inset, 0 1px rgba(255,255,255,0.08),0 -1px rgba(255,255,255,0.08); } + .tree-folder-items > .item { padding: 0 10px; line-height: 2.5rem; font-size: 0.8rem; } + .tree-folder-items > .item.active { + margin: 0px 8px; background: linear-gradient(180deg, #222 0%, #171717 100%) #171717; background: -webkit-linear-gradient(top, #222 0%, #171717 100%); border-radius: 4px; - margin: 0px 8px; box-shadow: 0px 1px #171717, 0px 1px rgba(255, 255, 255, 0.08) inset, 0 2px 2px #111; } + .tree-folder-items > .item > a { text-decoration: none; color: #fff; font-size: 0.92em; } -.tree-folder-items > .item.active > a { -} /*=== Scrollbar */ + @supports (scrollbar-width: thin) { #sidebar { scrollbar-color: rgba(255, 255, 255, 0.05) rgba(0, 0, 0, 0.0); } + #sidebar:hover { scrollbar-color: rgba(255, 255, 255, 0.3) rgba(0, 0, 0, 0.0); } } + @supports not (scrollbar-width: thin) { #sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); } + #sidebar:hover::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); } @@ -583,54 +642,64 @@ a.btn { /*===============*/ /*=== Header */ .header { + background: linear-gradient(0deg, #ede7de 0%, #fff 100%) #ede7de; + background: -webkit-linear-gradient(bottom, #ede7de 0%, #fff 100%); height: 55px; - background: linear-gradient(0deg, #EDE7DE 0%, #FFF 100%) #EDE7DE; - background: -webkit-linear-gradient(bottom, #EDE7DE 0%, #FFF 100%); } + .header > .item { padding: 0; vertical-align: middle; text-align: center; } + .header > .item.title .logo { - height: 60px; width: 60px; + height: 60px; } -.header > .item.title{ + +.header > .item.title { width: 250px; } + .header > .item.title h1 { margin: 0.5em 0; } + .header > .item.title h1 a { - text-decoration: none; + color: #222; font-size: 28px; - color:#222; + text-decoration: none; text-shadow: 0 1px #fff; } + .header > .item.search input { width: 230px; } + .header .item.search input:focus { width: 350px; } /*=== Body */ #global { - background:#EDE7DE; + background: #ede7de; height: calc(100% - 60px); } + .aside { - border-radius: 0px 12px 0px 0px; - box-shadow: 0px -1px #FFF, 0 2px 2px #171717 inset; - border-top: 1px solid #CCC; background: #222; width: 235px; + border-top: 1px solid #ccc; + border-radius: 0px 12px 0px 0px; + box-shadow: 0px -1px #fff, 0 2px 2px #171717 inset; } + .aside.aside_feed { padding: 10px 0; text-align: center; } + .aside.aside_feed .tree { margin: 10px 0 50px; } @@ -643,6 +712,7 @@ a.btn { color: #fff; text-shadow: 0 1px rgba(255,255,255,0.08); } + .aside_feed .btn-important { border: none; } @@ -652,13 +722,16 @@ a.btn { .feed.item.empty > a { color: #e67e22; } + .feed.item.error, .feed.item.error > a { - color: #BD362F; + color: #bd362f; } + .aside_feed .tree-folder-items .dropdown-menu::after { left: 2px; } + .aside_feed .tree-folder-items .item .dropdown-target:target ~ .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item:hover .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item.active .dropdown-toggle > .icon { @@ -670,9 +743,11 @@ a.btn { padding: 10px 50px; font-size: 0.9em; } + .post form { margin: 10px 0; } + .post.content { max-width: 550px; } @@ -683,44 +758,53 @@ a.btn { padding: 14px 0px; text-shadow: 0 1px rgba(255,255,255,0.08); } + .prompt label { text-align: left; } + .prompt form { margin: 10px auto 20px auto; width: 180px; } + .prompt input { margin: 5px auto; width: 100%; } + .prompt p { margin: 20px 0; } -.prompt input#username,.prompt input#passwordPlain{ - border:solid 1px #ccc; + +.prompt input#username,.prompt input#passwordPlain { + background: #fff; + border: solid 1px #ccc; box-shadow: 0 4px -4px #ccc inset,0px 1px rgba(255, 255, 255, 0.08); - background:#fff; } -.prompt input#username:focus,.prompt input#passwordPlain:focus{ - border: solid 1px #E7AB34; - box-shadow: 0 0 3px #E7AB34; + +.prompt input#username:focus,.prompt input#passwordPlain:focus { + border: solid 1px #e7ab34; + box-shadow: 0 0 3px #e7ab34; } /*=== New article notification */ #new-article { - background: #0084CC; + background: #0084cc; text-align: center; font-size: 0.9em; } + #new-article:hover { - background: #0066CC; + background: #06c; } + #new-article > a { line-height: 3em; color: #fff; font-weight: bold; } + #new-article > a:hover { text-decoration: none; } @@ -728,112 +812,133 @@ a.btn { /*=== Day indication */ .day { padding: 0 10px; - font-style:italic; - line-height: 3em; - box-shadow: 0 1px #BDB7AE inset, 0 -1px rgba(255,255,255,0.28) inset; - background: linear-gradient(0deg, #EDE7DE 0%, #C2BCB3 100%) #EDE7DE; - background: -webkit-linear-gradient(bottom, #C2BCB3 0%, #FFF 100%); + background: linear-gradient(0deg, #ede7de 0%, #c2bcb3 100%) #ede7de; + background: -webkit-linear-gradient(bottom, #c2bcb3 0%, #fff 100%); color: #666; + box-shadow: 0 1px #bdb7ae inset, 0 -1px rgba(255,255,255,0.28) inset; + font-style: italic; + line-height: 3em; text-shadow: 0 1px rgba(255,255,255,0.28); text-align: center; } + #new-article + .day { border-top: none; } + .day .name { display: none; } /*=== Index menu */ .nav_menu { - background: #EDE7DE; + padding: 5px 0; + background: #ede7de; border-bottom: 1px solid #ccc; - box-shadow:0 -1px rgba(255, 255, 255, 0.28) inset; + box-shadow: 0 -1px rgba(255, 255, 255, 0.28) inset; text-align: center; - padding: 5px 0; } -#panel >.nav_menu{ - background: linear-gradient(0deg, #EDE7DE 0%, #FFF 100%) #EDE7DE; - background: -webkit-linear-gradient(bottom, #EDE7DE 0%, #FFF 100%); + +#panel >.nav_menu { + background: linear-gradient(0deg, #ede7de 0%, #fff 100%) #ede7de; + background: -webkit-linear-gradient(bottom, #ede7de 0%, #fff 100%); } -#panel > .nav_menu > #nav_menu_read_all{ - background: linear-gradient(0deg, #EDE7DE 0%, #FFF 100%) #EDE7DE; - background: -webkit-linear-gradient(bottom, #EDE7DE 0%, #FFF 100%); + +#panel > .nav_menu > #nav_menu_read_all { + background: linear-gradient(0deg, #ede7de 0%, #fff 100%) #ede7de; + background: -webkit-linear-gradient(bottom, #ede7de 0%, #fff 100%); + border: 1px solid #ccc; border-radius: 4px; - border: 1px solid #CCC; - box-shadow: 0px 1px #FFF; + box-shadow: 0px 1px #fff; } + #panel > .nav_menu > #nav_menu_read_all .dropdown > .btn.dropdown-toggle { - border-radius: 0 4px 4px 0; - border:none; + border: none; border-left: solid 1px #ccc; + border-radius: 0 4px 4px 0; } /*=== Feed articles */ .flux_content { - background: #FFF; - border-radius: 10px; + background: #fff; + border-radius: 10px; } + .flux { - background: #EDE7DE; + background: #ede7de; } + .flux:hover { - background: #F9F7F4; + background: #f9f7f4; } + .flux:not(.current):hover .item.title { - background: #F9F7F4; + background: #f9f7f4; } + .flux.current .flux .item.title a { - text-shadow:0 0 2px #ccc; + text-shadow: 0 0 2px #ccc; } + .flux.not_read:not(.current):hover .item.title { - opacity:0.85; + opacity: 0.85; } + .flux.favorite { - background: #FFF6DA; + background: #fff6da; } -.flux.favorite:not(.current):hover{ - background: #F9F7F4; + +.flux.favorite:not(.current):hover { + background: #f9f7f4; } + .flux.favorite:not(.current):hover .item.title { - background: #F9F7F4; + background: #f9f7f4; } + .flux.current { - background: linear-gradient(0deg, #EDE7DE 0%, #FFF 100%) #EDE7DE; - background: -webkit-linear-gradient(bottom, #EDE7DE 0%, #FFF 100%); - box-shadow: 0 -1px #fff inset, 0 2px #ccc; - border-radius: 10px; margin: 3px 6px; + background: linear-gradient(0deg, #ede7de 0%, #fff 100%) #ede7de; + background: -webkit-linear-gradient(bottom, #ede7de 0%, #fff 100%); + border-radius: 10px; + box-shadow: 0 -1px #fff inset, 0 2px #ccc; } .flux .item.title { -opacity: 0.35; + opacity: 0.35; } + .flux.favorite .item.title { -opacity: 1; + opacity: 1; } + .flux.not_read .item.title { -opacity: 1; + opacity: 1; } + .flux.current .item.title a { color: #0f0f0f; } + .flux .item.title a { color: #333; } .flux_header { - border-top: 1px solid #ddd; font-size: 0.8rem; - cursor: pointer; + border-top: 1px solid #ddd; box-shadow: 0 -1px rgba(255,255,255,0.28) inset; + cursor: pointer; } + .flux_header .title { font-size: 0.9rem; } + .flux .website .favicon { padding: 5px; } + .flux .date { color: #666; font-size: 0.7rem; @@ -848,14 +953,15 @@ opacity: 1; .content { padding: 20px 10px; } + .content > h1.title > a { color: #000; } .content hr { margin: 30px 10px; - height: 1px; background: #ddd; + height: 1px; border: 0; box-shadow: 0 2px 5px #ccc; } @@ -869,13 +975,15 @@ opacity: 1; font-size: 0.9rem; border-radius: 3px; } + .content code { padding: 2px 5px; - color: #dd1144; background: #fafafa; + color: #d14; border: 1px solid #eee; border-radius: 3px; } + .content pre code { background: transparent; color: #fff; @@ -883,14 +991,15 @@ opacity: 1; } .content blockquote { - display: block; margin: 0; padding: 5px 20px; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; background: #fafafa; + display: block; color: #333; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; } + .content blockquote p { margin: 0; } @@ -898,49 +1007,55 @@ opacity: 1; /*=== Notification and actualize notification */ .notification { padding: 0 0 0 5px; - text-align: center; - background:#222; + background: #222; + color: #fff; + font-size: 0.9em; border: none; border-radius: 0 0 12px 12px; box-shadow: 0px 0px 4px rgba(0,0,0,0.45), 0 -1px rgba(255,255,255,0.08) inset, 0 2px 2px #171717 inset; - color:#fff; + text-align: center; font-weight: bold; - font-size: 0.9em; line-height: 3em; - position:absolute; - top:0; + position: absolute; + top: 0; z-index: 10; vertical-align: middle; } + .notification.good { color: #c95; } + .notification.bad { background: #fdd; color: #844; } + .notification a.close { padding: 0 15px; line-height: 3em; } + .notification#actualizeProgress { line-height: 2em; } /*=== "Load more" part */ #bigMarkAsRead { + background: #ede7de; + color: #666; + box-shadow: 0 1px rgba(255,255,255,0.28)inset; text-align: center; text-decoration: none; text-shadow: 0 -1px 0 #aaa; - color: #666; - background: #EDE7DE; - box-shadow: 0 1px rgba(255,255,255,0.28)inset; } + #bigMarkAsRead:hover { + background: #ede7de; + background: radial-gradient(circle at 50% -25% , #ccc 0%, #ede7de 50%); color: #000; - background: #EDE7DE; - background: radial-gradient(circle at 50% -25% , #ccc 0%, #EDE7DE 50%); } + #bigMarkAsRead:hover .bigTick { text-shadow: 0 0 10px #666; } @@ -949,69 +1064,71 @@ opacity: 1; #nav_entries { background: linear-gradient(180deg, #222 0%, #171717 100%) #222; background: -webkit-linear-gradient(top, #222 0%, #171717 100%); + width: 235px; border-top: 1px solid #171717; + box-shadow: 0 1px rgba(255,255,255,0.08) inset, 0 -2px 2px #171717; text-align: center; line-height: 3em; table-layout: fixed; - box-shadow: 0 1px rgba(255,255,255,0.08) inset, 0 -2px 2px #171717; - width:235px; } /*=== READER VIEW */ /*================*/ #stream.reader .flux { padding: 0 0 50px; - border: none; background: #f0f0f0; color: #333; + border: none; } + #stream.reader .flux .author { margin: 0 0 10px; - font-size: 90%; color: #666; + font-size: 90%; } /*=== GLOBAL VIEW */ /*================*/ #stream.global { padding: 24px 0; - box-shadow: 0px 8px 8px #C2BCB3 inset; + box-shadow: 0px 8px 8px #c2bcb3 inset; } .box.category .box-title { - background: linear-gradient(0deg, #EDE7DE 0%, #fff 100%) #171717; - background: -webkit-linear-gradient(bottom, #EDE7DE 0%, #fff 100%); - box-shadow: 0px -1px #fff inset,0 -2px #ccc inset; + background: linear-gradient(0deg, #ede7de 0%, #fff 100%) #171717; + background: -webkit-linear-gradient(bottom, #ede7de 0%, #fff 100%); + font-size: 1.2rem; border-radius: none; + box-shadow: 0px -1px #fff inset,0 -2px #ccc inset; line-height: 2em; - font-size: 1.2rem; - text-shadow:0 1px #ccc; + text-shadow: 0 1px #ccc; } + .box.category .box-title .title { font-weight: normal; text-decoration: none; text-align: left; color: #888; } -.box.category:not([data-unread="0"]) .box-title { -} -.box.category:not([data-unread="0"]) .box-title:active { -} + .box.category:not([data-unread="0"]) .box-title .title { color: #222; font-weight: bold; } + .box.category .title:not([data-unread="0"])::after { + background: none; + border: 0; position: absolute; top: 5px; right: 10px; - border: 0; - background: none; font-weight: bold; } + .box.category .item.feed { padding: 2px 10px; font-size: 0.8rem; } + .box.category .item.feed:not(.empty):not(.error) .item-title { color: #222; } @@ -1019,18 +1136,20 @@ opacity: 1; /*=== PANEL */ /*===========*/ #panel { - box-shadow: 0px 0px 4px #000; + background: #ede7de; border-radius: 8px; - background:#EDE7DE; + box-shadow: 0px 0px 4px #000; } /*=== DIVERS */ /*===========*/ .aside.aside_feed .nav-form input,.aside.aside_feed .nav-form select { width: 130px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu { right: -20px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu::after { right: 33px; } @@ -1046,21 +1165,24 @@ opacity: 1; .stat tr { border: none; } + .stat > table td, .stat > table th { - border-bottom: 1px solid #ccc; background: rgba(255,255,255,0.38); + border-bottom: 1px solid #ccc; box-shadow: 0 1px #fff; } .stat > .horizontal-list { margin: 0 0 5px; } + .stat > .horizontal-list .item { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } + .stat > .horizontal-list .item:first-child { width: 250px; } @@ -1072,50 +1194,60 @@ opacity: 1; border-radius: 5px; overflow: hidden; } + .log { padding: 5px 10px; background: #fafafa; color: #333; font-size: 0.8rem; } + .log+.log { border-top: 1px solid #aaa; } + .log .date { display: block; font-weight: bold; } + .log.error { background: #fdd; color: #844; } + .log.warning { background: #ffe; color: #c95; } + .log.notice { background: #f4f4f4; color: #aaa; } + .log.debug { background: #333; color: #eee; } #slider.active { - box-shadow: -4px 0 4px rgba(15, 15, 15, 0.55); - background: #F8F8F8; + background: #f8f8f8; + box-shadow: -4px 0 4px rgba(15, 15, 15, 0.55); } + #close-slider.active { - background: rgba(15, 15, 15, 0.35); + background: rgba(15, 15, 15, 0.35); } /*=== MOBILE */ /*===========*/ + @media screen and (max-width: 840px) { .header { display: table; } + .nav-login { display: none; } @@ -1125,28 +1257,27 @@ opacity: 1; border-top: none; box-shadow: 3px 0 3px #000; transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; } + .aside:target { width: 235px; } + .aside .toggle_aside, #panel .close { + background: #171717; display: block; width: 100%; height: 40px; + border-radius: 0 8px 0 8px; + box-shadow: 0 1px rgba(255,255,255,0.08); line-height: 40px; text-align: center; - background: #171717; - box-shadow: 0 1px rgba(255,255,255,0.08); - border-radius: 0 8px 0 8px; } + .aside .btn-important { - display: inline-block; margin: 20px 0 0; + display: inline-block; } .aside.aside_feed { @@ -1156,20 +1287,24 @@ opacity: 1; .nav_menu .btn { margin: 5px 10px; } + .nav_menu .stick { margin: 0 10px; } + .nav_menu .stick .btn { margin: 5px 0; } + .nav_menu .search { - display: inline-block; - max-width: 97%; + display: none; } + .nav_menu .search input { max-width: 97%; width: 90px; } + .nav_menu .search input:focus { width: 400px; } @@ -1183,19 +1318,18 @@ opacity: 1; } .notification a.close { + background: transparent; display: block; left: 0; - background: transparent; } + .notification a.close:hover { opacity: 0.5; } + .notification a.close .icon { display: none; } - .nav_menu .search { - display: none; - } #nav_entries { width: 100%; @@ -1203,16 +1337,19 @@ opacity: 1; } @media (max-width: 700px) { - .header{ + .header { display: none; } + .nav-login { display: inline-block; width: 100%; } + .nav_menu .search { display: inline-block; } + .aside .btn-important { display: none; } diff --git a/p/themes/Swage/swage.css b/p/themes/Swage/swage.css index a861bca5c..c59fafba4 100644 --- a/p/themes/Swage/swage.css +++ b/p/themes/Swage/swage.css @@ -1,1129 +1,909 @@ -textarea, input, select { -min-height: 25px; -margin-top: 4px; -line-height: 25px; -vertical-align: middle; -background: #FCFCFC; -border: none; -padding-left: 5px; -} - -input:invalid, select:invalid { -color: #B0425B; -border-color: #B0425B; -box-shadow: none; -} +textarea, input, +select { + min-height: 25px; + margin-top: 4px; + line-height: 25px; + vertical-align: middle; + background: #fcfcfc; + border: none; + padding-left: 5px; } + +input:invalid, +select:invalid { + color: #b0425b; + border-color: #b0425b; + box-shadow: none; } .nav-list .nav-header, .nav-list .item { -height: 2.5em; -line-height: 2.5em; -font-size: 0.9rem; -} - -.dropdown-menu > .item, .dropdown-menu > .item > a, .dropdown-menu > .item > span, .dropdown-menu > .item > as-link, .dropdown-menu > .item button { -padding: 0 22px; -line-height: 2.5em; -font-size: 0.8rem; -color: #FCFCFC; -} + height: 2.5em; + line-height: 2.5em; + font-size: 0.9rem; } + +.dropdown-menu > .item, .dropdown-menu > .item > a, +.dropdown-menu > .item > span, +.dropdown-menu > .item > .as-link, +.dropdown-menu > .item button { + padding: 0 22px; + color: #fcfcfc; + font-size: 0.8rem; + line-height: 2.5em; } .form-group::after, .flux::after { -content: ""; -display: block; -clear: both; -} + content: ""; + display: block; + clear: both; } .stick.configure-feeds, .header > .item.title, .aside, #new-article, .notification, #nav_entries { -width: 231px; -} + width: 231px; } -html, body { -height: 100%; -font-family: Helvetica, Arial, sans-serif; -} +html, +body { + height: 100%; + font-family: Helvetica, Arial, sans-serif; } a { -color: #00488b; -outline: none; -} -a.btn { -min-height: 25px; -line-height: 25px; -text-decoration: none; -} -a.btn:hover { -background: #00488b; -} -a#btn-subscription { -width: 76%; -} -a#btn-importExport { -width: 5%; -} + color: #00488b; + outline: none; } + a.btn { + min-height: 25px; + line-height: 25px; + text-decoration: none; } + a.btn:hover { + background: #00488b; } + a#btn-subscription { + width: 76%; } + a#btn-importExport { + width: 5%; } img.icon:hover { -background: none; -} + background: none; } div#stream { -margin-top: 35px; -} + margin-top: 35px; } sup { -top: -0.3em; -} + top: -0.3em; } legend { -display: inline-block; -width: auto; -margin: 20px 0 5px; -padding: 5px 20px; -font-size: 1.4em; -clear: both; -background: #e3e3e3; -} + margin: 20px 0 5px; + padding: 5px 20px; + background: #e3e3e3; + display: inline-block; + width: auto; + font-size: 1.4em; + clear: both; } label { -min-height: 25px; -} + min-height: 25px; } textarea { -width: 360px; -height: 100px; -background: #e3e3e3; -} -textarea:focus { -border-color: #00488b; -} - -input:focus, select:focus { -border-color: #00488b; -} -input:disabled, select:disabled { -background: #FCFCFC; -} + background: #e3e3e3; + width: 360px; + height: 100px; } + textarea:focus { + border-color: #00488b; } + +input:focus, +select:focus { + border-color: #00488b; } +input:disabled, +select:disabled { + background: #fcfcfc; } select { -background: #e3e3e3; -} + background: #e3e3e3; } input.extend { -transition: width 200ms linear; -} + transition: width 200ms linear; } option { -padding: 0 .5em; -} + padding: 0 .5em; } table { -border-collapse: collapse; -} + border-collapse: collapse; } -tr, td, th { -padding: 0.5em; -border: 1px solid #e3e3e3; -} +tr, +td, +th { + padding: 0.5em; + border: 1px solid #e3e3e3; } th { -background: #FCFCFC; -} + background: #fcfcfc; } -form td, form th { -font-weight: normal; -text-align: center; -} +form td, +form th { + font-weight: normal; + text-align: center; } .category .title.error::before { -display: inline-block; -padding-right: 7px; -width: 16px; -content: url(../Swage/icons/error.svg); -} + display: inline-block; + padding-right: 7px; + width: 16px; + content: url(../Swage/icons/error.svg); } .form-group { -padding: 5px; -border: 1px solid transparent; -} -.form-group:hover { -background: #FCFCFC; -border: 1px solid #FCFCFC; -} -.form-group.form-actions { -margin: 15px 0 25px; -padding: 5px 0; -background: #e3e3e3; -border-top: 3px solid #e3e3e3; -} -.form-group.form-actions .btn { -margin: 0 10px; -} -.form-group .group-name { -padding: 10px 0; -text-align: right; -} -.form-group .group-controls { -min-height: 25px; -padding: 5px 0; -} -.form-group .group-controls .control { -line-height: 2.0em; -} -.form-group table { -margin: 10px 0 0 220px; -} + padding: 5px; + border: 1px solid transparent; } + .form-group:hover { + background: #fcfcfc; + border: 1px solid #fcfcfc; } + .form-group.form-actions { + margin: 15px 0 25px; + padding: 5px 0; + background: #e3e3e3; + border-top: 3px solid #e3e3e3; } + .form-group.form-actions .btn { + margin: 0 10px; } + .form-group .group-name { + padding: 10px 0; + text-align: right; } + .form-group .group-controls { + min-height: 25px; + padding: 5px 0; } + .form-group .group-controls .control { + line-height: 2.0em; } + .form-group table { + margin: 10px 0 0 220px; } .stick { -vertical-align: middle; -font-size: 0; -} + vertical-align: middle; + font-size: 0; } .btn { -display: inline-block; -min-height: 35px; -min-width: 15px; -margin: 0; -padding: 5px 10px; -font-size: 0.9rem; -vertical-align: middle; -cursor: pointer; -overflow: hidden; -background: #0062be; -border: none; -color: #FCFCFC; -} -.btn.active, .btn :active, .btn :hover { -background: #00488b; -text-decoration: none; -} + margin: 0; + padding: 5px 10px; + background: #0062be; + display: inline-block; + color: #fcfcfc; + font-size: 0.9rem; + border: none; + min-height: 35px; + min-width: 15px; + vertical-align: middle; + cursor: pointer; + overflow: hidden; } + .btn.active, + .btn :active, + .btn :hover { + background: #00488b; + text-decoration: none; } .btn-important, .btn-attention { -font-weight: normal; -background: #FA8052; -color: #FCFCFC; -} -.btn-important:hover, .btn-important :active, .btn-attention:hover, .btn-attention :active { -background: #f95c20 !important; -} + font-weight: normal; + background: #fa8052; + color: #fcfcfc; } + .btn-important:hover, + .btn-important :active, .btn-attention:hover, + .btn-attention :active { + background: #f95c20 !important; } .nav-list .nav-header { -padding: 0 10px; -font-weight: bold; -background: #22303d; -color: #FCFCFC; -cursor: default; -} + padding: 0 10px; + font-weight: bold; + background: #22303d; + color: #fcfcfc; + cursor: default; } .nav-list .item:hover, .nav-list .item.active { -background: #00488b; -color: #FCFCFC; -} -.nav-list .item:hover a, .nav-list .item.active a { -color: #FCFCFC; -} -.nav-list .item:hover.empty a, .nav-list .item:hover .error a, .nav-list .item.active.empty a, .nav-list .item.active .error a { -color: #FCFCFC; -} -.nav-list .item:hover.empty a, .nav-list .item.active.empty a { -background: #FA8052; -} -.nav-list .item:hover.error a, .nav-list .item.active.error a { -background: #c46178; -} + background: #00488b; + color: #fcfcfc; } + .nav-list .item:hover a, .nav-list .item.active a { + color: #fcfcfc; } + .nav-list .item:hover.empty a, + .nav-list .item:hover .error a, .nav-list .item.active.empty a, + .nav-list .item.active .error a { + color: #fcfcfc; } + .nav-list .item:hover.empty a, .nav-list .item.active.empty a { + background: #fa8052; } + .nav-list .item:hover.error a, .nav-list .item.active.error a { + background: #c46178; } .nav-list .item > a { -padding: 0 10px; -} + padding: 0 10px; } .nav-list .item.empty a { -color: #FA8052; -} + color: #fa8052; } .nav-list .item.error a { -color: #c46178; -} + color: #c46178; } .nav-list .disable { -text-align: center; -background: #FCFCFC; -color: #969696; -} + text-align: center; + background: #fcfcfc; + color: #969696; } .nav-list .nav-form { -padding: 3px; -text-align: center; -} + padding: 3px; + text-align: center; } .nav-list a:hover { -text-decoration: none; -} + text-decoration: none; } .nav-head { -margin: 0; -text-align: right; -background: #22303d; -color: #FCFCFC; -} -.nav-head a { -color: #FCFCFC; -} -.nav-head .item { -padding: 5px 10px; -font-size: 0.9rem; -line-height: 1.5rem; -} + margin: 0; + text-align: right; + background: #22303d; + color: #fcfcfc; } + .nav-head a { + color: #fcfcfc; } + .nav-head .item { + padding: 5px 10px; + font-size: 0.9rem; + line-height: 1.5rem; } .horizontal-list { -margin: 0; -padding: 0; -} -.horizontal-list .item { -vertical-align: middle; -} + margin: 0; + padding: 0; } + .horizontal-list .item { + vertical-align: middle; } .dropdown-menu { -padding: 5px 0; -font-size: 0.8rem; -text-align: left; -border: none; -background-color: #00488b; -} -.dropdown-menu .dropdown-header { -cursor: default; -} -.dropdown-menu > .item { -padding: 0; -margin-left: 10px; -} -.dropdown-menu > .item > a { -min-width: initial; -white-space: nowrap; -} -.dropdown-menu > .item:hover { -background: #0062be; -color: #FCFCFC; -} -.dropdown-menu > .item:hover > a { -text-decoration: none; -color: #FCFCFC; -} -.dropdown-menu > .item[aria-checked="true"] > a::before { -font-weight: bold; -margin: 0 0 0 -14px; -} -.dropdown-menu .input select, .dropdown-menu .input input { -margin: 0 auto 5px; -padding: 2px 5px; -} + padding: 5px 0; + font-size: 0.8rem; + text-align: left; + border: none; + background-color: #00488b; } + .dropdown-menu .dropdown-header { + cursor: default; } + .dropdown-menu > .item { + padding: 0; + margin-left: 10px; } + .dropdown-menu > .item > a { + min-width: initial; + white-space: nowrap; } + .dropdown-menu > .item:hover { + background: #0062be; + color: #fcfcfc; } + .dropdown-menu > .item:hover > a { + text-decoration: none; + color: #fcfcfc; } + .dropdown-menu > .item[aria-checked="true"] > a::before { + font-weight: bold; + margin: 0 0 0 -14px; } + .dropdown-menu .input select, + .dropdown-menu .input input { + margin: 0 auto 5px; + padding: 2px 5px; } .dropdown-header { -padding: 0 5px 5px; -font-weight: bold; -text-align: left; -color: #FCFCFC; -} + padding: 0 5px 5px; + font-weight: bold; + text-align: left; + color: #fcfcfc; } .separator { -margin: 5px 0; -border-bottom: 1px solid #e3e3e3; -cursor: default; -} + margin: 5px 0; + border-bottom: 1px solid #e3e3e3; + cursor: default; } .alert { -margin: 5px auto; -padding: 10px 15px; -font-size: 0.9em; -background: #FCFCFC; -border: none; -color: #969696; -text-shadow: 0 0 1px #FCFCFC; -} -.alert > a { -text-decoration: underline; -color: inherit; -} + margin: 5px auto; + padding: 10px 15px; + background: #fcfcfc; + color: #969696; + font-size: 0.9em; + border: none; + text-shadow: 0 0 1px #fcfcfc; } + .alert > a { + color: inherit; + text-decoration: underline; } .alert-head { -font-size: 1.15em; -} + font-size: 1.15em; } -.alert-warn, .alert-success, .alert-error { -border: none; -} +.alert-warn, +.alert-success, +.alert-error { + border: none; } .alert-warn { -background: #FCFCFC; -color: #FA8052; -} + background: #fcfcfc; + color: #fa8052; } .alert-success { -background: #FCFCFC; -color: #5EAABF; -} + background: #fcfcfc; + color: #5eaabf; } .alert-error { -background: #FCFCFC; -color: #B0425B; -} + background: #fcfcfc; + color: #b0425b; } .pagination { -text-align: center; -font-size: 0.8em; -background: #e3e3e3; -color: #181621; -} -.pagination .item.pager-current { -font-weight: bold; -font-size: 1.5em; -background: #22303d; -color: #e3e3e3; -} -.pagination .item a { -display: block; -font-style: italic; -line-height: 3em; -text-decoration: none; -color: #181621; -} -.pagination .item a:hover { -background: #22303d; -color: #e3e3e3; -} -.pagination .loading, .pagination a:hover.loading { -font-size: 0; -background: url(loader.gif) center center no-repeat #22303d; -} + background: #e3e3e3; + color: #181621; + font-size: 0.8em; + text-align: center; } + .pagination .item.pager-current { + background: #22303d; + color: #e3e3e3; + font-size: 1.5em; + font-weight: bold; } + .pagination .item a { + display: block; + color: #181621; + font-style: italic; + line-height: 3em; + text-decoration: none; } + .pagination .item a:hover { + background: #22303d; + color: #e3e3e3; } + .pagination .loading, + .pagination a:hover.loading { + background: url(loader.gif) center center no-repeat #22303d; + font-size: 0; } .content { -padding: 20px 10px; -} -.content .pagination { -margin: 0; -padding: 0; -} -.content hr { -margin: 30px 10px; -height: 1px; -background: #e3e3e3; -border: 0; -box-shadow: 0 2px 5px #e3e3e3; -} -.content pre { -margin: 10px auto; -padding: 10px 20px; -overflow: auto; -background: #181621; -color: #FCFCFC; -font-size: 0.9rem; -} -.content pre code { -background: transparent; -color: #FCFCFC; -border: none; -} -.content code { -padding: 2px 5px; -color: #B0425B; -background: #FCFCFC; -border: 1px solid #FCFCFC; -} -.content blockquote { -display: block; -margin: 0; -padding: 5px 20px; -border-top: 1px solid #e3e3e3; -border-bottom: 1px solid #e3e3e3; -background: #FCFCFC; -color: #969696; -} -.content blockquote p { -margin: 0; -} -.content > h1.title > a { -color: #181621; -} + padding: 20px 10px; } + .content .pagination { + margin: 0; + padding: 0; } + .content hr { + margin: 30px 10px; + background: #e3e3e3; + height: 1px; + border: 0; + box-shadow: 0 2px 5px #e3e3e3; } + .content pre { + margin: 10px auto; + padding: 10px 20px; + overflow: auto; + background: #181621; + color: #fcfcfc; + font-size: 0.9rem; } + .content pre code { + background: transparent; + color: #fcfcfc; + border: none; } + .content code { + padding: 2px 5px; + background: #fcfcfc; + color: #b0425b; + border: 1px solid #fcfcfc; } + .content blockquote { + margin: 0; + padding: 5px 20px; + background: #fcfcfc; + display: block; + color: #969696; + border-top: 1px solid #e3e3e3; + border-bottom: 1px solid #e3e3e3; } + .content blockquote p { + margin: 0; } + .content > h1.title > a { + color: #181621; } .box { -border: 1px solid #e3e3e3; -} -.box .box-title { -margin: 0; -padding: 5px 10px; -background: #e3e3e3; -color: #969696; -border-bottom: 1px solid #e3e3e3; -} -.box .box-content { -max-height: 260px; -} -.box .box-content .item { -padding: 0 10px; -font-size: 0.9rem; -line-height: 2.5em; -} -.box .box-content .item .configure { -visibility: hidden; -} -.box .box-content .item .configure .icon { -vertical-align: middle; -background-color: #e3e3e3; -} -.box .box-content .item:hover .configure { -visibility: visible; -} -.box.category .box-title .title { -font-weight: normal; -text-decoration: none; -text-align: left; -} -.box.category:not([data-unread="0"]) .box-title { -background: #0062be; -} -.box.category:not([data-unread="0"]) .box-title:active { -background: #00488b; -} -.box.category:not([data-unread="0"]) .box-title .title { -font-weight: bold; -color: #FCFCFC; -} -.box.category .title:not([data-unread="0"])::after { -position: absolute; -top: 5px; -right: 10px; -border: 0; -background: none; -font-weight: bold; -box-shadow: none; -text-shadow: none; -} -.box.category .item.feed { -padding: 2px 10px; -font-size: 0.8rem; -} + border: 1px solid #e3e3e3; } + .box .box-title { + margin: 0; + padding: 5px 10px; + background: #e3e3e3; + color: #969696; + border-bottom: 1px solid #e3e3e3; } + .box .box-content { + max-height: 260px; } + .box .box-content .item { + padding: 0 10px; + font-size: 0.9rem; + line-height: 2.5em; } + .box .box-content .item .configure { + visibility: hidden; } + .box .box-content .item .configure .icon { + vertical-align: middle; + background-color: #e3e3e3; } + .box .box-content .item:hover .configure { + visibility: visible; } + .box.category .box-title .title { + font-weight: normal; + text-decoration: none; + text-align: left; } + .box.category:not([data-unread="0"]) .box-title { + background: #0062be; } + .box.category:not([data-unread="0"]) .box-title:active { + background: #00488b; } + .box.category:not([data-unread="0"]) .box-title .title { + font-weight: bold; + color: #fcfcfc; } + .box.category .title:not([data-unread="0"])::after { + background: none; + border: 0; + box-shadow: none; + position: absolute; + top: 5px; + right: 10px; + font-weight: bold; + text-shadow: none; } + .box.category .item.feed { + padding: 2px 10px; + font-size: 0.8rem; } .tree { -margin: 10px 0; -} + margin: 10px 0; } .tree-folder-title { -position: relative; -padding: 0 10px; -background: #22303d; -line-height: 2.3rem; -font-size: 1rem; -height: 35px; -} -.tree-folder-title .title { -background: inherit; -color: #FCFCFC; -} -.tree-folder-title .title:hover { -text-decoration: none; -} + padding: 0 10px; + background: #22303d; + height: 35px; + font-size: 1rem; + position: relative; + line-height: 2.3rem; } + .tree-folder-title .title { + background: inherit; + color: #fcfcfc; } + .tree-folder-title .title:hover { + text-decoration: none; } .tree-folder-items { -background: #22303d; -} -.tree-folder-items > .item { -padding: 0 10px; -line-height: 2.5rem; -font-size: 0.8rem; -} -.tree-folder-items > .item.active { -background: #00488b; -} -.tree-folder-items > .item > a { -text-decoration: none; -color: #FCFCFC; -} + background: #22303d; } + .tree-folder-items > .item { + padding: 0 10px; + line-height: 2.5rem; + font-size: 0.8rem; } + .tree-folder-items > .item.active { + background: #00488b; } + .tree-folder-items > .item > a { + text-decoration: none; + color: #fcfcfc; } @supports (scrollbar-width: thin) { - #sidebar { -scrollbar-color: rgba(255, 255, 255, 0.05) rgba(0, 0, 0, 0.0); -} -#sidebar:hover { -scrollbar-color: rgba(255, 255, 255, 0.3) rgba(0, 0, 0, 0.0); -} -} + #sidebar { + scrollbar-color: rgba(255, 255, 255, 0.05) rgba(0, 0, 0, 0); } + #sidebar:hover { + scrollbar-color: rgba(255, 255, 255, 0.3) rgba(0, 0, 0, 0); } } @supports not (scrollbar-width: thin) { -#sidebar::-webkit-scrollbar-thumb { -background: rgba(255, 255, 255, 0.1); -} -#sidebar:hover::-webkit-scrollbar-thumb { -background: rgba(255, 255, 255, 0.3); -} -} + #sidebar::-webkit-scrollbar-thumb { + background: rgba(255, 255, 255, 0.1); } + #sidebar:hover::-webkit-scrollbar-thumb { + background: rgba(255, 255, 255, 0.3); } } .header > .item { -vertical-align: middle; -} -.header > .item.title { -position: absolute; -} -.header > .item.title h1 { -margin: 0; -display: block; -} -.header > .item.title h1 a { -text-decoration: none; -color: #FCFCFC; -} -.header > .item.title .logo { -display: inline-block; -height: 26px; -vertical-align: top; -position: relative; -top: 5px; -} -.header > .item.search input { -width: 230px; -} + vertical-align: middle; } + .header > .item.title { + position: absolute; } + .header > .item.title h1 { + margin: 0; + display: block; } + .header > .item.title h1 a { + text-decoration: none; + color: #fcfcfc; } + .header > .item.title .logo { + display: inline-block; + height: 26px; + vertical-align: top; + position: relative; + top: 5px; } + .header > .item.search input { + width: 230px; } .header .item.search input:focus { -width: 350px; -} + width: 350px; } .header .item.search { -display: none; -} + display: none; } .header .item.configure { -position: fixed; -right: 0px; -z-index: 1000; -width: 35px; -} + position: fixed; + right: 0px; + z-index: 1000; + width: 35px; } .header h1 { -text-align: center; -font-size: 1.5em; -} + text-align: center; + font-size: 1.5em; } .aside { -background: #22303d; -padding: 35px 0; -} -.aside.aside_feed .tree { -margin: 0 0 50px; -} -.aside.aside_feed .nav-form input, .aside.aside_feed .nav-form select { -width: 140px; -} -.aside.aside_feed .nav-form .dropdown .dropdown-menu { -right: -20px; -} -.aside.aside_feed .nav-form .dropdown .dropdown-menu::after { -right: 33px; -} + padding: 35px 0; + background: #22303d; } + .aside.aside_feed .tree { + margin: 0 0 50px; } + .aside.aside_feed .nav-form input, + .aside.aside_feed .nav-form select { + width: 140px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu { + right: -20px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu::after { + right: 33px; } .aside_feed .tree-folder-title > .title:not([data-unread="0"])::after { -position: absolute; -right: 0; -margin: 6px 0; -padding: 0 10px; -font-size: 0.9rem; -line-height: 1.5rem; -background: inherit; -} + margin: 6px 0; + padding: 0 10px; + background: inherit; + font-size: 0.9rem; + position: absolute; + right: 0; + line-height: 1.5rem; } .aside_feed .tree-folder-items .dropdown-menu::after { -left: 2px; -} + left: 2px; } .post { -padding: 10px 50px; -font-size: 0.9em; -} -.post input { -background: #e3e3e3; -} -.post input.long { -height: 33px; -margin-top: 0px; -} -.post form { -margin: 10px 0; -} -.post.content { -max-width: 550px; -} + padding: 10px 50px; + font-size: 0.9em; } + .post input { + background: #e3e3e3; } + .post input.long { + height: 33px; + margin-top: 0px; } + .post form { + margin: 10px 0; } + .post.content { + max-width: 550px; } .prompt { -text-align: center; -} -.prompt label { -text-align: left; -} -.prompt form { -margin: 10px auto 20px auto; -width: 200px; -} -.prompt input { -margin: 5px auto; -width: 100%; -} -.prompt p { -margin: 20px 0; -} + text-align: center; } + .prompt label { + text-align: left; } + .prompt form { + margin: 10px auto 20px auto; + width: 200px; } + .prompt input { + margin: 5px auto; + width: 100%; } + .prompt p { + margin: 20px 0; } #new-article { -text-align: center; -font-size: 1em; -background: #0062be; -position: fixed; -bottom: 48px; -z-index: 900; -left: 0; -line-height: 1.5em; -} -#new-article:hover { -background: #00488b; -} -#new-article > a { -line-height: 1.5em; -font-weight: bold; -color: #FCFCFC; -} -#new-article > a:hover { -text-decoration: none; -} + background: #0062be; + font-size: 1em; + text-align: center; + position: fixed; + bottom: 48px; + z-index: 900; + left: 0; + line-height: 1.5em; } + #new-article:hover { + background: #00488b; } + #new-article > a { + line-height: 1.5em; + font-weight: bold; + color: #fcfcfc; } + #new-article > a:hover { + text-decoration: none; } .day { -padding: 0 10px; -font-weight: bold; -line-height: 3em; -text-align: center; -} -.day .name { -display: none; -} + padding: 0 10px; + font-weight: bold; + line-height: 3em; + text-align: center; } + .day .name { + display: none; } .nav a { -color: #FCFCFC; -} + color: #fcfcfc; } .nav_menu { -font-size: 0; -background-color: #0062be; -position: fixed; -width: 100%; -z-index: 900; -} -.nav_menu .item.search { -display: inline-block; -position: fixed; -right: 40px; -} + width: 100%; + font-size: 0; + background-color: #0062be; + position: fixed; + z-index: 900; } + .nav_menu .item.search { + display: inline-block; + position: fixed; + right: 40px; } .flux { -padding-right: 10px; -background: #FCFCFC; -} -.flux::after { -margin: 0 auto; -width: 90%; -border-top: 1px solid #e3e3e3; -} -.flux:hover, .flux .current { -background: #FFFFFF; -} -.flux:hover:not(.current):hover .item.title, .flux .current:not(.current):hover .item.title { -background: #FFFFFF; -} -.flux.not_read { -background: #FFF3ED; -} -.flux.not_read:not(.current):hover .item.title { -background: #FFF3ED; -} -.flux.favorite { -background: #FFF6DA; -} -.flux.favorite:not(.current):hover .item.title { -background: #FFF6DA; -} -.flux .date { -font-size: 0.7rem; -color: #969696; -} -.flux .bottom { -font-size: 0.8rem; -text-align: center; -} -.flux .website .favicon { -padding: 5px; -} -.flux label { -color: #FCFCFC; -cursor: pointer; -} + padding-right: 10px; + background: #fcfcfc; } + .flux::after { + margin: 0 auto; + width: 90%; + border-top: 1px solid #e3e3e3; } + .flux:hover, + .flux .current { + background: #fff; } + .flux:hover:not(.current):hover .item.title, + .flux .current:not(.current):hover .item.title { + background: #fff; } + .flux.not_read { + background: #fff3ed; } + .flux.not_read:not(.current):hover .item.title { + background: #fff3ed; } + .flux.favorite { + background: #fff6da; } + .flux.favorite:not(.current):hover .item.title { + background: #fff6da; } + .flux .date { + color: #969696; + font-size: 0.7rem; } + .flux .bottom { + font-size: 0.8rem; + text-align: center; } + .flux .website .favicon { + padding: 5px; } + .flux label { + color: #fcfcfc; + cursor: pointer; } .flux_header { -font-size: 0.8rem; -cursor: pointer; -} -.flux_header .title { -font-size: 0.9rem; -} + font-size: 0.8rem; + cursor: pointer; } + .flux_header .title { + font-size: 0.9rem; } .notification { -text-align: center; -font-weight: bold; -font-size: 1em; -padding: 10px 0; -z-index: 10; -vertical-align: middle; -background: #e3e3e3; -color: #969696; -border: none; -position: fixed; -bottom: 48px; -left: 0; -top: auto; -height: auto; -} -.notification.good, .notification .bad { -color: #FCFCFC; -} -.notification.good { -background: #5EAABF; -} -.notification.good a.close:hover { -background: #5EAABF; -} -.notification.bad { -background: #c46178; -} -.notification.bad a.close:hover { -background: #c46178; -} -.notification#actualizeProgress { -line-height: 2em; -} -.notification a.close { -display: none; -} + padding: 10px 0; + background: #e3e3e3; + height: auto; + color: #969696; + font-size: 1em; + border: none; + text-align: center; + font-weight: bold; + z-index: 10; + vertical-align: middle; + position: fixed; + bottom: 48px; + left: 0; + top: auto; } + .notification.good, + .notification .bad { + color: #fcfcfc; } + .notification.good { + background: #5eaabf; } + .notification.good a.close:hover { + background: #5eaabf; } + .notification.bad { + background: #c46178; } + .notification.bad a.close:hover { + background: #c46178; } + .notification#actualizeProgress { + line-height: 2em; } + .notification a.close { + display: none; } #bigMarkAsRead { -text-align: center; -text-decoration: none; -background: #e3e3e3; -} -#bigMarkAsRead:hover { -background: #22303d; -color: #FCFCFC; -} + text-align: center; + text-decoration: none; + background: #e3e3e3; } + #bigMarkAsRead:hover { + background: #22303d; + color: #fcfcfc; } #nav_entries { -margin: 0; -text-align: center; -line-height: 3em; -table-layout: fixed; -background: #22303d; -} + margin: 0; + text-align: center; + line-height: 3em; + table-layout: fixed; + background: #22303d; } .stat { -margin: 10px 0 20px; -} -.stat th, .stat td, .stat tr { -border: none; -} -.stat > table td, .stat > table th { -border-bottom: 1px solid #e3e3e3; -} -.stat > .horizontal-list { -margin: 0 0 5px; -} -.stat > .horizontal-list .item { -overflow: hidden; -white-space: nowrap; -text-overflow: ellipsis; -} -.stat > .horizontal-list .item:first-child { -width: 270px; -} + margin: 10px 0 20px; } + .stat th, + .stat td, + .stat tr { + border: none; } + .stat > table td, + .stat > table th { + border-bottom: 1px solid #e3e3e3; } + .stat > .horizontal-list { + margin: 0 0 5px; } + .stat > .horizontal-list .item { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } + .stat > .horizontal-list .item:first-child { + width: 270px; } .formLogin #global { -height: 0; -} - + height: 0; } .formLogin .header { -height: 55px; -background: #22303d; -} - -.formLogin .header > .item.configure { -width: 200px; -position: unset; -} - + background: #22303d; + height: 55px; } + .formLogin .header > .item.configure { + width: 200px; + position: unset; } + .formLogin .header > .item.title h1 { + display: unset; } .formLogin a.signin { - color: #FCFCFC; - padding-left: 5px; -} - -.formLogin .header > .item.title h1 { - display: unset; -} - + color: #fcfcfc; + padding-left: 5px; } .formLogin input { - border-left: 5px solid; - border-right: 1px solid #e3e3e3; - border-top: 1px solid #e3e3e3; - border-bottom: 1px solid #e3e3e3; -} + border-top: 1px #e3e3e3; + border-right: 1px #e3e3e3; + border-bottom: 1px #e3e3e3; + border-left: 5px solid; } .loglist { -overflow: hidden; -border: 1px solid #969696; -} + overflow: hidden; + border: 1px solid #969696; } .log { -padding: 5px 2%; -overflow: auto; -font-size: 0.8rem; -background: #FCFCFC; -} -.log > .date { -margin: 0 10px 0 0; -padding: 5px 10px; -} -.log.error > .date { -background: #c46178; -color: #FCFCFC; -} -.log.warning > .date { -background: #FA8052; -color: #FCFCFC; -} -.log.notice > .date { -background: #e3e3e3; -color: #FCFCFC; -} -.log.debug > .date { -background: #181621; -color: #FCFCFC; -} + padding: 5px 2%; + background: #fcfcfc; + font-size: 0.8rem; + overflow: auto; } + .log > .date { + margin: 0 10px 0 0; + padding: 5px 10px; } + .log.error > .date { + background: #c46178; + color: #fcfcfc; } + .log.warning > .date { + background: #fa8052; + color: #fcfcfc; } + .log.notice > .date { + background: #e3e3e3; + color: #fcfcfc; } + .log.debug > .date { + background: #181621; + color: #fcfcfc; } @media (max-width: 840px) { -.formLogin .header { -display: none; -} - -.dropdown-header, .dropdown-menu > .item { -padding: 12px; -} - -#new-article { -width: 100%; -position: sticky; -top: 0; -} - -.header { -display: table; -} -.header .item.title .logo { -display: none; -} - -.header > .item.title h1 a { -display: block; -position: absolute; -top: -35px; -left: 10px; -font-size: 0.6em; -} - -.header .item.configure, button.read_all.btn { -display: none; -} - -.flux .item.manage, .flux_header .item.website { -width: 35px; -text-align: center; -} - -.aside { -width: 0; -transition: width 200ms linear; -} -.aside .toggle_aside { -display: block; -height: 50px; -line-height: 50px; -text-align: right; -padding-right: 10px; -background: #22303d; -} -.aside.aside_feed { -padding: 0; -} -.aside:target { -width: 78%; -z-index: 1000; -} - -.nav_menu { -position: initial; -height: 71px; -} -.nav_menu .btn { -margin: 5px 10px; -} -.nav_menu .stick { -margin: 0 10px; -} -.nav_menu .stick .btn { -margin: 5px 0; -} -.nav_menu .search { -position: absolute !important; -top: 35px; -left: 55px; -} -.nav_menu .search input { -width: 85%; -} - -.pagination { -margin: 0 0 3.5em; -} - -#panel .close { -display: block; -height: 50px; -line-height: 50px; -text-align: right; -padding-right: 10px; -background: #22303d; -} - -.day .name { -font-size: 1.1rem; -} - -.notification { -width: 100%; -} -.notification a.close { -display: block; -left: 0; -background: transparent; -} -.notification a.close:hover { -opacity: 0.5; -} -.notification a.close .icon { -display: none; -} - -#nav_entries { -width: 100% !important; -} - -div#stream { -margin-top: 0px; -} - -a.btn.toggle_aside { -position: absolute; -top: 29px; -} - -form#mark-read-menu, a#actualize, a#toggle-order, div#nav_menu_actions, div#nav_menu_views { -position: absolute; -} - -form#mark-read-menu { -right: 46px; -top: 30px; -z-index: 1100; -} - -a#actualize, a#toggle-order { -right: 0px; -} - -a#actualize { -top: 29px; -} - -a#toggle-order, div#nav_menu_actions, div#nav_menu_views { -top: 65px; -} - -div#nav_menu_actions { -left: 0px; -} - -div#nav_menu_views { -right: 50px; -} -} + .formLogin .header { + display: none; } + + .dropdown-header, .dropdown-menu > .item { + padding: 12px; } + + #new-article { + width: 100%; + position: sticky; + top: 0; } + + .header { + display: table; } + .header .item.title .logo { + display: none; } + + .header > .item.title h1 a { + display: block; + position: absolute; + top: -35px; + left: 10px; + font-size: 0.6em; } + + .header .item.configure, + button.read_all.btn { + display: none; } + + .flux .item.manage, + .flux_header .item.website { + width: 35px; + text-align: center; } + + .aside { + width: 0; + transition: width 200ms linear; } + .aside .toggle_aside { + background: #22303d; + display: block; + height: 50px; + line-height: 50px; + text-align: right; + padding-right: 10px; } + .aside.aside_feed { + padding: 0; } + .aside:target { + width: 78%; + z-index: 1000; } + + .nav_menu { + position: initial; + height: 71px; } + .nav_menu .btn { + margin: 5px 10px; } + .nav_menu .stick { + margin: 0 10px; } + .nav_menu .stick .btn { + margin: 5px 0; } + .nav_menu .search { + position: absolute !important; + top: 35px; + left: 55px; } + .nav_menu .search input { + width: 85%; } + + .pagination { + margin: 0 0 3.5em; } + + #panel .close { + background: #22303d; + display: block; + height: 50px; + line-height: 50px; + text-align: right; + padding-right: 10px; } + + .day .name { + font-size: 1.1rem; } + + .notification { + width: 100%; } + .notification a.close { + background: transparent; + display: block; + left: 0; } + .notification a.close:hover { + opacity: 0.5; } + .notification a.close .icon { + display: none; } + + #nav_entries { + width: 100% !important; } + + div#stream { + margin-top: 0px; } + + a.btn.toggle_aside { + position: absolute; + top: 29px; } + + form#mark-read-menu, + a#actualize, + a#toggle-order, + div#nav_menu_actions, + div#nav_menu_views { + position: absolute; } + + form#mark-read-menu { + right: 46px; + top: 30px; + z-index: 1100; } + + a#actualize, + a#toggle-order { + right: 0px; } + + a#actualize { + top: 29px; } + + a#toggle-order, + div#nav_menu_actions, + div#nav_menu_views { + top: 65px; } + + div#nav_menu_actions { + left: 0px; } + + div#nav_menu_views { + right: 50px; } } @media (max-width: 410px) { -.nav_menu .stick { -margin: 0; -} -} + .nav_menu .stick { + margin: 0; } } @media (max-width: 374px) { -#nav_menu_views { -display: none; -} -} + #nav_menu_views { + display: none; } } button.as-link { -color: #FCFCFC; -outline: none; -} + color: #fcfcfc; + outline: none; } .dropdown-target:target ~ .btn.dropdown-toggle { -background: #00488b; -} + background: #00488b; } .tree-folder.active .tree-folder-title { -background: #00488b; -font-weight: bold; -} + background: #00488b; + font-weight: bold; } .feed.item.empty { -color: #FA8052; -} -.feed.item.empty.active { -background: #FA8052; -color: #FCFCFC; -} -.feed.item.empty.active > a { -color: #FCFCFC; -} -.feed.item.empty > a { -color: #FA8052; -} + color: #fa8052; } + .feed.item.empty.active { + background: #fa8052; + color: #fcfcfc; } + .feed.item.empty.active > a { + color: #fcfcfc; } + .feed.item.empty > a { + color: #fa8052; } .feed.item.error { -color: #c46178; -} -.feed.item.error.active { -background: #c46178; -color: #FCFCFC; -} -.feed.item.error.active > a { -color: #FCFCFC; -} -.feed.item.error > a { -color: #c46178; -} + color: #c46178; } + .feed.item.error.active { + background: #c46178; + color: #fcfcfc; } + .feed.item.error.active > a { + color: #fcfcfc; } + .feed.item.error > a { + color: #c46178; } #dropdown-query ~ .dropdown-menu .dropdown-header .icon { -vertical-align: middle; -float: right; -} + vertical-align: middle; + float: right; } #stream.reader .flux { -padding: 0 0 50px; -background: #FCFCFC; -color: #22303d; -border: none; -} -#stream.reader .flux .author { -margin: 0 0 10px; -font-size: 90%; -color: #969696; -} + padding: 0 0 50px; + background: #fcfcfc; + color: #22303d; + border: none; } + #stream.reader .flux .author { + margin: 0 0 10px; + color: #969696; + font-size: 90%; } #nav_menu_actions ul.dropdown-menu, #nav_menu_read_all ul.dropdown-menu { -left: 0px; -} + left: 0px; } #slider label { -min-height: initial; -} + min-height: initial; } #slider .form-group:hover { -background: inital; -} + background: inital; } + +/*# sourceMappingURL=swage.css.map */ diff --git a/p/themes/Swage/swage.scss b/p/themes/Swage/swage.scss index eb1dbc1ab..1671890b3 100644 --- a/p/themes/Swage/swage.scss +++ b/p/themes/Swage/swage.scss @@ -2,15 +2,15 @@ //colors $color_text: #181621; -$color_light: #FCFCFC; +$color_light: #fcfcfc; $color_nav: #0062be; $color_aside: #22303d; -$color_alert: #FA8052; -$color_good: #5EAABF; -$color_bad: #B0425B; -$color_stared: #FFF6DA; -$color_unread: #FFF3ED; -$color_hover: #FFFFFF; +$color_alert: #fa8052; +$color_good: #5eaabf; +$color_bad: #b0425b; +$color_stared: #fff6da; +$color_unread: #fff3ed; +$color_hover: #fff; // @extend-elements @@ -38,9 +38,9 @@ $color_hover: #FFFFFF; %dropdown { padding: 0 22px; - line-height: 2.5em; - font-size: 0.8rem; color: $color_light; + font-size: 0.8rem; + line-height: 2.5em; } %after { @@ -63,19 +63,23 @@ body { a { color: darken( $color_nav, 10%); outline: none; + &.btn { min-height: 25px; line-height: 25px; text-decoration: none; + &:hover { background: darken( $color_nav, 10%); } } + &#btn-subscription { width: 76%; } + &#btn-importExport { - width: 5%; + width: 5%; } } @@ -94,13 +98,13 @@ sup { } legend { - display: inline-block; - width: auto; margin: 20px 0 5px; padding: 5px 20px; + background: darken( $color_light, 10%); + display: inline-block; + width: auto; font-size: 1.4em; clear: both; - background: darken( $color_light, 10%); } label { @@ -108,10 +112,12 @@ label { } textarea { + background: darken( $color_light, 10% ); width: 360px; height: 100px; + @extend %input; - background: darken( $color_light, 10% ); + &:focus { border-color: darken( $color_nav, 10%); } @@ -119,13 +125,18 @@ textarea { input, select { + @extend %input; + &:focus { border-color: darken( $color_nav, 10%); } + &:invalid { + @extend %invalid; } + &:disabled { background: $color_light; } @@ -167,6 +178,7 @@ form { text-align: center; } } + .category { .title.error::before { display: inline-block; @@ -180,60 +192,71 @@ form { .form-group { padding: 5px; border: 1px solid transparent; + &:hover { background: $color_light; border: 1px solid $color_light; } + &.form-actions { margin: 15px 0 25px; padding: 5px 0; background: darken( $color_light, 10%); border-top: 3px solid darken( $color_light, 10%); + .btn { margin: 0 10px; } } + .group-name { padding: 10px 0; text-align: right; } + .group-controls { min-height: 25px; padding: 5px 0; + .control { line-height: 2.0em; } } + table { margin: 10px 0 0 220px; } } .form-group::after { + @extend %after; } .stick { vertical-align: middle; font-size: 0; + &.configure-feeds { + @extend %aside-width; } } .btn { - display: inline-block; - min-height: 35px; - min-width: 15px; margin: 0; padding: 5px 10px; + background: $color_nav; + display: inline-block; + color: $color_light; font-size: 0.9rem; + border: none; + min-height: 35px; + min-width: 15px; vertical-align: middle; cursor: pointer; overflow: hidden; - background: $color_nav; - border: none; - color: $color_light; + &.active, :active, :hover { @@ -246,6 +269,7 @@ form { font-weight: normal; background: $color_alert; color: $color_light; + &:hover, :active { background: darken( $color_alert, 10%) !important; @@ -254,6 +278,7 @@ form { .nav-list { .nav-header { + @extend %nav-list; padding: 0 10px; font-weight: bold; @@ -261,45 +286,58 @@ form { color: $color_light; cursor: default; } + .item { + @extend %nav-list; + &:hover, &.active { background: darken( $color_nav, 10%); color: $color_light; + a { color: $color_light; } + &.empty a, .error a { color: $color_light; } + &.empty a { background: $color_alert; } + &.error a { background: lighten( $color_bad, 10%); } } + > a { padding: 0 10px; } + &.empty a { color: $color_alert; } + &.error a { color: lighten( $color_bad, 10%); } } + .disable { text-align: center; background: $color_light; color: darken( $color_light, 40% ); } + .nav-form { padding: 3px; text-align: center; } + a:hover { text-decoration: none; } @@ -310,9 +348,11 @@ form { text-align: right; background: $color_aside; color: $color_light; + a { color: $color_light; } + .item { padding: 5px 10px; font-size: 0.9rem; @@ -323,6 +363,7 @@ form { .horizontal-list { margin: 0; padding: 0; + .item { vertical-align: middle; } @@ -334,38 +375,48 @@ form { text-align: left; border: none; background-color: darken( $color_nav, 10%); + .dropdown-header { cursor: default; } + > { .item { + @extend %dropdown; padding: 0; margin-left: 10px; + > a, > span, - > as-link, + > .as-link, button { + @extend %dropdown; } + > a { min-width: initial; white-space: nowrap; } + &:hover { background: $color_nav; color: $color_light; + > a { text-decoration: none; color: $color_light; } } } + .item[aria-checked="true"] > a::before { font-weight: bold; margin: 0 0 0 -14px; } } + .input { select, input { @@ -391,14 +442,15 @@ form { .alert { margin: 5px auto; padding: 10px 15px; - font-size: 0.9em; background: $color_light; - border: none; color: darken( $color_light, 40% ); + font-size: 0.9em; + border: none; text-shadow: 0 0 1px $color_light; + > a { - text-decoration: underline; color: inherit; + text-decoration: underline; } } @@ -428,49 +480,56 @@ form { } .pagination { - text-align: center; - font-size: 0.8em; background: darken( $color_light, 10%); color: $color_text; + font-size: 0.8em; + text-align: center; + .item { &.pager-current { - font-weight: bold; - font-size: 1.5em; background: $color_aside; color: darken( $color_light, 10%); + font-size: 1.5em; + font-weight: bold; } + a { display: block; + color: $color_text; font-style: italic; line-height: 3em; text-decoration: none; - color: $color_text; + &:hover { background: $color_aside; color: darken( $color_light, 10%); } } } + .loading, a:hover.loading { - font-size: 0; background: url(loader.gif) center center no-repeat $color_aside; + font-size: 0; } } .content { padding: 20px 10px; + .pagination { margin: 0; padding: 0; } + hr { margin: 30px 10px; - height: 1px; background: darken( $color_light, 10%); + height: 1px; border: 0; box-shadow: 0 2px 5px darken( $color_light, 10%); } + pre { margin: 10px auto; padding: 10px 20px; @@ -478,30 +537,35 @@ form { background: $color_text; color: $color_light; font-size: 0.9rem; + code { background: transparent; color: $color_light; border: none; } } + code { padding: 2px 5px; - color: $color_bad; background: $color_light; + color: $color_bad; border: 1px solid $color_light; } + blockquote { - display: block; margin: 0; padding: 5px 20px; - border-top: 1px solid darken( $color_light, 10%); - border-bottom: 1px solid darken( $color_light, 10%); background: $color_light; + display: block; color: darken( $color_light, 40% ); + border-top: 1px solid darken( $color_light, 10%); + border-bottom: 1px solid darken( $color_light, 10%); + p { margin: 0; } } + > h1.title > a { color: $color_text; } @@ -509,6 +573,7 @@ form { .box { border: 1px solid darken( $color_light, 10%); + .box-title { margin: 0; padding: 5px 10px; @@ -516,50 +581,61 @@ form { color: darken( $color_light, 40% ); border-bottom: 1px solid darken( $color_light, 10%); } + .box-content { max-height: 260px; + .item { padding: 0 10px; font-size: 0.9rem; line-height: 2.5em; + .configure { visibility: hidden; + .icon { vertical-align: middle; background-color: darken( $color_light, 10%); } } + &:hover .configure { visibility: visible; } } } + &.category { .box-title .title { font-weight: normal; text-decoration: none; text-align: left; } + &:not([data-unread="0"]) .box-title { background: $color_nav; + &:active { background: darken( $color_nav, 10%); } + .title { font-weight: bold; color: $color_light; } } + .title:not([data-unread="0"])::after { + background: none; + border: 0; + box-shadow: none; position: absolute; top: 5px; right: 10px; - border: 0; - background: none; font-weight: bold; - box-shadow: none; text-shadow: none; } + .item.feed { padding: 2px 10px; font-size: 0.8rem; @@ -572,15 +648,17 @@ form { } .tree-folder-title { - position: relative; padding: 0 10px; background: $color_aside; - line-height: 2.3rem; - font-size: 1rem; height: 35px; + font-size: 1rem; + position: relative; + line-height: 2.3rem; + .title { background: inherit; color: $color_light; + &:hover { text-decoration: none; } @@ -589,13 +667,16 @@ form { .tree-folder-items { background: $color_aside; + > .item { padding: 0 10px; line-height: 2.5rem; font-size: 0.8rem; + &.active { background: darken( $color_nav, 10%); } + > a { text-decoration: none; color: $color_light; @@ -607,6 +688,7 @@ form { #sidebar { scrollbar-color: rgba(255, 255, 255, 0.05) rgba(0, 0, 0, 0.0); } + #sidebar:hover { scrollbar-color: rgba(255, 255, 255, 0.3) rgba(0, 0, 0, 0.0); } @@ -616,6 +698,7 @@ form { #sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); } + #sidebar:hover::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); } @@ -624,17 +707,22 @@ form { .header { > .item { vertical-align: middle; + &.title { + @extend %aside-width; position: absolute; + h1 { margin: 0; display: block; + a { text-decoration: none; color: $color_light; } } + .logo { display: inline-block; height: 26px; @@ -643,22 +731,27 @@ form { top: 5px; } } + &.search input { width: 230px; } } + .item.search input:focus { width: 350px; } + .item.search { display: none; } + .item.configure { position: fixed; right: 0px; z-index: 1000; width: 35px; } + h1 { text-align: center; font-size: 1.5em; @@ -666,22 +759,27 @@ form { } .aside { - background: $color_aside; padding: 35px 0; + background: $color_aside; + @extend %aside-width; + &.aside_feed { .tree { margin: 0 0 50px; } + .nav-form { input, select { width: 140px; } + .dropdown { .dropdown-menu { right: -20px; } + .dropdown-menu::after { right: 33px; } @@ -692,14 +790,15 @@ form { .aside_feed { .tree-folder-title > .title:not([data-unread="0"])::after { - position: absolute; - right: 0; margin: 6px 0; padding: 0 10px; + background: inherit; font-size: 0.9rem; + position: absolute; + right: 0; line-height: 1.5rem; - background: inherit; } + .tree-folder-items .dropdown-menu::after { left: 2px; } @@ -708,16 +807,20 @@ form { .post { padding: 10px 50px; font-size: 0.9em; + input { background: darken( $color_light, 10% ); - &.long{ + + &.long { height: 33px; - margin-top: 0px; + margin-top: 0px; } } + form { margin: 10px 0; } + &.content { max-width: 550px; } @@ -725,39 +828,47 @@ form { .prompt { text-align: center; + label { text-align: left; } + form { margin: 10px auto 20px auto; width: 200px; } + input { margin: 5px auto; width: 100%; } + p { margin: 20px 0; } } #new-article { - text-align: center; - font-size: 1em; background: $color_nav; + font-size: 1em; + text-align: center; position: fixed; bottom: 48px; z-index: 900; left: 0; - @extend %aside-width; line-height: 1.5em; + + @extend %aside-width; + &:hover { background: darken( $color_nav, 10%); } + > a { line-height: 1.5em; font-weight: bold; color: $color_light; + &:hover { text-decoration: none; } @@ -769,6 +880,7 @@ form { font-weight: bold; line-height: 3em; text-align: center; + .name { display: none; } @@ -782,11 +894,12 @@ form { .nav_menu { + width: 100%; font-size: 0; background-color: $color_nav; position: fixed; - width: 100%; z-index: 900; + .item.search { display: inline-block; position: fixed; @@ -797,42 +910,54 @@ form { .flux { padding-right: 10px; background: $color_light; + &::after { + @extend %after; margin: 0 auto; width: 90%; border-top: 1px solid darken( $color_light, 10%); } + &:hover, .current { background: $color_hover; + &:not(.current):hover .item.title { background: $color_hover; } } + &.not_read { background: $color_unread; + &:not(.current):hover .item.title { background: $color_unread; } } - &.favorite,{ + + &.favorite, { background: $color_stared; + &:not(.current):hover .item.title { background: $color_stared; } } + .date { - font-size: 0.7rem; color: darken( $color_light, 40% ); + font-size: 0.7rem; } + .bottom { font-size: 0.8rem; text-align: center; } + .website .favicon { padding: 5px; } + label { color: $color_light; cursor: pointer; @@ -842,46 +967,55 @@ form { .flux_header { font-size: 0.8rem; cursor: pointer; + .title { font-size: 0.9rem; } } .notification { - text-align: center; - font-weight: bold; - font-size: 1em; padding: 10px 0; - z-index: 10; - vertical-align: middle; background: darken( $color_light, 10%); + height: auto; color: darken( $color_light, 40% ); + font-size: 1em; border: none; + text-align: center; + font-weight: bold; + z-index: 10; + vertical-align: middle; position: fixed; bottom: 48px; left: 0; top: auto; + @extend %aside-width; - height: auto; + &.good, .bad { color: $color_light; } + &.good { background: $color_good; + a.close:hover { background: $color_good; } } + &.bad { background: lighten( $color_bad, 10%); + a.close:hover { background: lighten( $color_bad, 10%); } } + &#actualizeProgress { line-height: 2em; } + a.close { display: none; } @@ -891,6 +1025,7 @@ form { text-align: center; text-decoration: none; background: darken( $color_light, 10%); + &:hover { background: $color_aside; color: $color_light; @@ -902,29 +1037,35 @@ form { text-align: center; line-height: 3em; table-layout: fixed; + @extend %aside-width; background: $color_aside; } .stat { margin: 10px 0 20px; + th, td, tr { border: none; } + > table { td, th { border-bottom: 1px solid darken( $color_light, 10%); } } + > .horizontal-list { margin: 0 0 5px; + .item { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; + &:first-child { width: 270px; } @@ -938,28 +1079,31 @@ form { } .header { - height: 55px; background: $color_aside; + height: 55px; + > .item { &.configure { width: 200px; position: unset; } + &.title h1 { display: unset; } } } + a.signin { color: $color_light; padding-left: 5px; } input { - border-left: 5px solid; - border-right: 1px darken( $color_light, 10%); border-top: 1px darken( $color_light, 10%); + border-right: 1px darken( $color_light, 10%); border-bottom: 1px darken( $color_light, 10%); + border-left: 5px solid; } } @@ -970,49 +1114,59 @@ form { .log { padding: 5px 2%; - overflow: auto; - font-size: 0.8rem; background: $color_light; + font-size: 0.8rem; + overflow: auto; + > .date { margin: 0 10px 0 0; padding: 5px 10px; } + &.error > .date { background: lighten( $color_bad, 10%); color: $color_light; } + &.warning > .date { background: $color_alert; color: $color_light; } + &.notice > .date { background: darken( $color_light, 10%); color: $color_light; } + &.debug > .date { background: $color_text; color: $color_light; } } -@media(max-width: 840px) { +@media (max-width: 840px) { .formLogin .header { display: none; } + .dropdown-header, .dropdown-menu > .item { padding: 12px; } + #new-article { width: 100%; position: sticky; top: 0; } + .header { display: table; + .item.title .logo { display: none; } } + .header > .item.title h1 a { display: block; position: absolute; @@ -1020,93 +1174,116 @@ form { left: 10px; font-size: 0.6em; } + .header .item.configure, button.read_all.btn { display: none; } + .flux .item.manage, .flux_header .item.website { width: 35px; text-align: center; } + .aside { width: 0; transition: width 200ms linear; + .toggle_aside { + background: $color_aside; display: block; height: 50px; line-height: 50px; text-align: right; padding-right: 10px; - background: $color_aside; } + &.aside_feed { padding: 0; } + &:target { width: 78%; z-index: 1000; } } + .nav_menu { position: initial; height: 71px; + .btn { margin: 5px 10px; } + .stick { margin: 0 10px; + .btn { margin: 5px 0; } } + .search { position: absolute !important; top: 35px; left: 55px; + input { width: 85%; } } } + .pagination { margin: 0 0 3.5em; } + #panel .close { + background: $color_aside; display: block; height: 50px; line-height: 50px; text-align: right; padding-right: 10px; - background: $color_aside; } + .day .name { font-size: 1.1rem; } + .notification { width: 100%; + a.close { + background: transparent; display: block; left: 0; - background: transparent; + &:hover { opacity: 0.5; } + .icon { display: none; } } } + #nav_entries { width: 100% !important; } + div#stream { margin-top: 0px; } + a.btn.toggle_aside { position: absolute; top: 29px; } + form#mark-read-menu, a#actualize, a#toggle-order, @@ -1114,38 +1291,44 @@ form { div#nav_menu_views { position: absolute; } + form#mark-read-menu { right: 46px; top: 30px; z-index: 1100; } + a#actualize, a#toggle-order { right: 0px; } + a#actualize { top: 29px; } + a#toggle-order, div#nav_menu_actions, div#nav_menu_views { top: 65px; } + div#nav_menu_actions { left: 0px; } + div#nav_menu_views { right: 50px; } } -@media(max-width: 410px) { +@media (max-width: 410px) { .nav_menu .stick { margin: 0; } } -@media(max-width: 374px) { +@media (max-width: 374px) { #nav_menu_views { display: none; } @@ -1168,26 +1351,33 @@ button.as-link { .feed.item { &.empty { color: $color_alert; + &.active { background: $color_alert; color: $color_light; + > a { color: $color_light; } } + > a { color: $color_alert; } } + &.error { color: lighten( $color_bad, 10%); + &.active { background: lighten( $color_bad, 10%); color: $color_light; + > a { color: $color_light; } } + > a { color: lighten( $color_bad, 10%); } @@ -1204,16 +1394,17 @@ button.as-link { background: $color_light; color: $color_aside; border: none; + .author { margin: 0 0 10px; - font-size: 90%; color: darken( $color_light, 40% ); + font-size: 90%; } } #nav_menu_actions, #nav_menu_read_all { ul.dropdown-menu { - left: 0px; + left: 0px; } } @@ -1221,6 +1412,7 @@ button.as-link { label { min-height: initial; } + .form-group { &:hover { background: inital; diff --git a/p/themes/base-theme/base.css b/p/themes/base-theme/base.css index e265cd7ff..72020e8e6 100644 --- a/p/themes/base-theme/base.css +++ b/p/themes/base-theme/base.css @@ -1,3 +1,5 @@ +/* stylelint-disable block-no-empty */ + @charset "UTF-8"; /*=== GENERAL */ @@ -18,36 +20,40 @@ legend { padding: 5px 0; font-size: 1.4em; } + label { min-height: 25px; padding: 5px 0; cursor: pointer; } + textarea { width: 360px; height: 100px; } + input, select, textarea { min-height: 25px; padding: 5px; line-height: 25px; vertical-align: middle; } + option { padding: 0 .5em; } + input:focus, select:focus, textarea:focus { } + input:invalid, select:invalid { } + input:disabled, select:disabled { } + input.extend { transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; } /*=== Tables */ @@ -58,8 +64,10 @@ table { tr, th, td { padding: 0.5em; } + th { } + form td, form th { font-weight: normal; @@ -72,17 +80,21 @@ form th { .form-group.form-actions { padding: 5px 0; } + .form-group.form-actions .btn { margin: 0 10px; } + .form-group .group-name { padding: 10px 0; text-align: right; } + .form-group .group-controls { min-height: 25px; padding: 5px 0; } + .form-group table { margin: 10px 0 0 220px; } @@ -92,17 +104,22 @@ form th { vertical-align: middle; font-size: 0; } + .stick input, .stick .btn { } + .stick .btn:first-child, .stick input:first-child { } + .stick .btn-important:first-child { } + .stick .btn:last-child, .stick input:last-child { } + .stick .btn + .btn, .stick .btn + input, .stick .btn + .dropdown > .btn, @@ -113,29 +130,34 @@ form th { .stick .dropdown + input, .stick .dropdown + .dropdown > .btn { } + .stick input + .btn { } + .stick .btn + .dropdown > .btn { } .btn { + margin: 0; + padding: 5px 10px; display: inline-block; min-height: 37px; min-width: 15px; - margin: 0; - padding: 5px 10px; font-size: 0.9rem; vertical-align: middle; cursor: pointer; overflow: hidden; } + a.btn { min-height: 25px; line-height: 25px; } + .btn:hover { text-decoration: none; } + .btn.active, .btn:active, .dropdown-target:target ~ .btn.dropdown-toggle { @@ -144,15 +166,19 @@ a.btn { .btn-important { font-weight: normal; } + .btn-important:hover { } + .btn-important:active { } .btn-attention { } + .btn-attention:hover { } + .btn-attention:active { } @@ -163,29 +189,40 @@ a.btn { line-height: 2.5em; font-size: 0.9rem; } + .nav-list .item:hover { } + .nav-list .item:hover a { } + .nav-list .item.active { } + .nav-list .item.active a { } + .nav-list .disable { text-align: center; } + .nav-list .item > a { padding: 0 10px; } + .nav-list a:hover { text-decoration: none; } + .nav-list .item.empty a { } + .nav-list .item.active.empty a { } + .nav-list .item.error a { } + .nav-list .item.active.error a { } @@ -203,6 +240,7 @@ a.btn { margin: 0; text-align: right; } + .nav-head .item { padding: 5px 10px; font-size: 0.9rem; @@ -214,6 +252,7 @@ a.btn { margin: 0; padding: 0; } + .horizontal-list .item { vertical-align: middle; } @@ -225,6 +264,7 @@ a.btn { font-size: 0.8rem; text-align: left; } + .dropdown-menu::after { content: ""; position: absolute; @@ -234,32 +274,36 @@ a.btn { height: 10px; z-index: -10; transform: rotate(45deg); - -moz-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); } + .dropdown-header { padding: 0 5px 5px; font-weight: bold; text-align: left; } + .dropdown-menu > .item { } + .dropdown-menu > .item > a, .dropdown-menu > .item > span, .dropdown-menu > .item > .as-link { padding: 0 22px; line-height: 2.5em; } + .dropdown-menu > .item:hover { } + .dropdown-menu > .item[aria-checked="true"] > a::before { font-weight: bold; margin: 0 0 0 -14px; } + .dropdown-menu > .item:hover > a { text-decoration: none; } + .dropdown-menu .input select, .dropdown-menu .input input { margin: 0 auto 5px; @@ -276,16 +320,21 @@ a.btn { padding: 10px 15px; font-size: 0.9em; } + .alert-head { font-size: 1.15em; } + .alert > a { text-decoration: underline; } + .alert-warn { } + .alert-success { } + .alert-error { } @@ -294,24 +343,30 @@ a.btn { text-align: center; font-size: 0.8em; } + .content .pagination { margin: 0; padding: 0; } + .pagination .item.pager-current { font-weight: bold; font-size: 1.5em; } + .pagination .item a { display: block; font-style: italic; line-height: 3em; text-decoration: none; } + .pagination .item a:hover { } + .pagination:first-child .item { } + .pagination:last-child .item { } @@ -323,10 +378,12 @@ a.btn { /*=== Boxes */ .box { } + .box .box-title { margin: 0; padding: 5px 10px; } + .box .box-content { max-height: 260px; } @@ -340,6 +397,7 @@ a.btn { .box .box-content .item .configure { visibility: hidden; } + .box .box-content .item:hover .configure { visibility: visible; } @@ -348,35 +406,45 @@ a.btn { .tree { margin: 10px 0; } + .tree-folder-title { position: relative; padding: 0 10px; line-height: 2.5rem; font-size: 1rem; } + .tree-folder-title .title { background: inherit; } + .tree-folder-title .title:hover { text-decoration: none; } + .tree-folder.active .tree-folder-title { font-weight: bold; } + .tree-folder.active .tree-folder-title .title { } + .tree-folder-items { } + .tree-folder-items > .item { padding: 0 10px; line-height: 2.5rem; font-size: 0.8rem; } + .tree-folder-items > .item.active { } + .tree-folder-items > .item > a { text-decoration: none; } + .tree-folder-items > .item.active > a { } @@ -386,23 +454,29 @@ a.btn { .header { height: 85px; } + .header > .item { padding: 10px; vertical-align: middle; text-align: center; } -.header > .item.title{ + +.header > .item.title { width: 230px; } + .header > .item.title h1 { margin: 0.5em 0; } + .header > .item.title h1 a { text-decoration: none; } + .header > .item.search input { width: 230px; } + .header .item.search input:focus { width: 350px; } @@ -411,12 +485,15 @@ a.btn { #global { height: calc(100% - 85px); } + .aside { } + .aside.aside_feed { padding: 10px 0; text-align: center; } + .aside.aside_feed .tree { margin: 10px 0 50px; } @@ -434,22 +511,28 @@ a.btn { /*=== Aside main page (feeds) */ .feed.item.empty.active { } + .feed.item.error.active { } + .feed.item.empty, .feed.item.empty > a { } + .feed.item.error, .feed.item.error > a { } + .feed.item.empty.active, .feed.item.error.active, .feed.item.empty.active > a, .feed.item.error.active > a { } + .aside_feed .tree-folder-items .dropdown-menu::after { left: 2px; } + .aside_feed .tree-folder-items .item .dropdown-target:target ~ .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item:hover .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item.active .dropdown-toggle > .icon { @@ -461,9 +544,11 @@ a.btn { padding: 10px 50px; font-size: 0.9em; } + .post form { margin: 10px 0; } + .post.content { max-width: 550px; } @@ -472,17 +557,21 @@ a.btn { .prompt { text-align: center; } + .prompt label { text-align: left; } + .prompt form { margin: 10px auto 20px auto; width: 180px; } + .prompt input { margin: 5px auto; width: 100%; } + .prompt p { margin: 20px 0; } @@ -492,12 +581,15 @@ a.btn { text-align: center; font-size: 0.9em; } + #new-article:hover { } + #new-article > a { line-height: 3em; font-weight: bold; } + #new-article > a:hover { text-decoration: none; } @@ -508,8 +600,10 @@ a.btn { font-weight: bold; line-height: 3em; } + #new-article + .day { } + .day .name { padding: 0 10px 0 0; font-size: 1.8em; @@ -527,35 +621,42 @@ a.btn { /*=== Feed articles */ .flux { } + .flux:hover { } + .flux.current { } + .flux.not_read { } + .flux.not_read:not(.current):hover .item.title { } + .flux.favorite { } + .flux.favorite:not(.current):hover .item.title { } -.flux.current { -} - .flux_header { font-size: 0.8rem; cursor: pointer; } + .flux_header .title { font-size: 0.9rem; } + .flux .website .favicon { padding: 5px; } + .flux .date { font-size: 0.7rem; } + .flux:not(.current):hover .item.title { } @@ -568,6 +669,7 @@ a.btn { .content { padding: 20px 10px; } + .content > h1.title > a { } @@ -582,17 +684,20 @@ a.btn { overflow: auto; font-size: 0.9rem; } + .content code { padding: 2px 5px; } + .content pre code { } .content blockquote { - display: block; margin: 0; padding: 5px 20px; + display: block; } + .content blockquote p { margin: 0; } @@ -607,16 +712,21 @@ a.btn { z-index: 10; vertical-align: middle; } + .notification.good { } + .notification.bad { } + .notification a.close { padding: 0 15px; line-height: 3em; } + .notification.good a.close:hover { } + .notification.bad a.close:hover { } @@ -629,8 +739,10 @@ a.btn { text-align: center; text-decoration: none; } + #bigMarkAsRead:hover { } + #bigMarkAsRead:hover .bigTick { } @@ -647,6 +759,7 @@ a.btn { #stream.reader .flux { padding: 0 0 50px; } + #stream.reader .flux .author { margin: 0 0 10px; font-size: 90%; @@ -659,22 +772,27 @@ a.btn { text-decoration: none; text-align: left; } + .box.category:not([data-unread="0"]) .box-title { } + .box.category:not([data-unread="0"]) .box-title:active { } + .box.category:not([data-unread="0"]) .box-title .title { font-weight: bold; } + .box.category .title:not([data-unread="0"])::after { + background: none; + border: 0; position: absolute; top: 5px; right: 10px; - border: 0; - background: none; font-weight: bold; box-shadow: none; text-shadow: none; } + .box.category .item.feed { padding: 2px 10px; font-size: 0.8rem; @@ -686,9 +804,11 @@ a.btn { .aside.aside_feed .nav-form select { width: 140px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu { right: -20px; } + .aside.aside_feed .nav-form .dropdown .dropdown-menu::after { right: 33px; } @@ -703,6 +823,7 @@ a.btn { .stat td, .stat tr { } + .stat > table td, .stat > table th { text-align: center; @@ -711,11 +832,13 @@ a.btn { .stat > .horizontal-list { margin: 0 0 5px; } + .stat > .horizontal-list .item { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } + .stat > .horizontal-list .item:first-child { width: 250px; } @@ -725,35 +848,40 @@ a.btn { .loglist { overflow: hidden; } + .log { padding: 5px 10px; font-size: 0.8rem; } + .log+.log { } + .log .date { display: block; font-weight: bold; } + .log.error { } + .log.warning { } + .log.notice { } + .log.debug { } /*=== MOBILE */ /*===========*/ -@media(max-width: 840px) { + +@media (max-width: 840px) { .aside { transition: width 200ms linear; - -moz-transition: width 200ms linear; - -webkit-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; } + .aside .toggle_aside, #panel .close { display: block; @@ -770,20 +898,25 @@ a.btn { .nav_menu .btn { margin: 5px 10px; } + .nav_menu .stick { margin: 0 10px; } + .nav_menu .stick .btn { margin: 5px 0; } + .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; } @@ -800,9 +933,11 @@ a.btn { display: block; left: 0; } + .notification a.close:hover { opacity: 0.5; } + .notification a.close .icon { display: none; } diff --git a/p/themes/base-theme/template.css b/p/themes/base-theme/template.css index 42e08be65..889d33c4e 100644 --- a/p/themes/base-theme/template.css +++ b/p/themes/base-theme/template.css @@ -2,6 +2,7 @@ /*=== GENERAL */ /*============*/ + @font-face { font-family: 'OpenSans'; font-style: normal; @@ -22,6 +23,7 @@ html, body { a { text-decoration: none; } + a:hover { text-decoration: underline; } @@ -38,11 +40,13 @@ h1 { font-size: 1.5em; line-height: 1.6em; } + h2 { margin: 0.5em 0 0.25em; font-size: 1.3em; line-height: 2em; } + h3 { margin: 0.5em 0 0.25em; font-size: 1.1em; @@ -54,6 +58,7 @@ p { margin: 1em 0 0.5em; font-size: 1em; } + sup { line-height: 25px; position: relative; @@ -63,14 +68,16 @@ sup { /*=== Images */ img { - height: auto; max-width: 100%; + height: auto; } + img.favicon { - height: 16px; width: 16px; + height: 16px; vertical-align: middle; } + .feed.mute::before { content: '🔇'; } @@ -86,54 +93,64 @@ legend { width: 100%; clear: both; } + label { display: block; } + input { width: 180px; } + textarea, input[type="file"], input.long, input.extend:focus { width: 300px; } + input, select, textarea { display: inline-block; max-width: 100%; font-size: 0.8rem; } + input[type="radio"], input[type="checkbox"] { width: 15px !important; min-height: 15px !important; } + .dropdown-menu label > input[type="text"] { width: 150px; width: calc(99% - 5em); } + .dropdown-menu input[type="checkbox"] { margin-left: 1em; margin-right: .5em; } + button.as-link, button.as-link:hover, button.as-link:active { background: transparent; - border: none; color: inherit; - cursor: pointer; font-size: 1.1em; + border: none; + cursor: pointer; text-align: left; } + button.as-link[disabled] { - color:#DDD !important; + color: #ddd !important; } /*=== Tables */ table { max-width: 100%; } + th.numeric, td.numeric { text-align: center; @@ -141,7 +158,6 @@ td.numeric { /*=== COMPONENTS */ /*===============*/ - [aria-hidden="true"] { display: none !important; } @@ -152,18 +168,22 @@ td.numeric { 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; margin: 0 0 0 220px; } + .form-group .group-controls .control { display: block; } @@ -180,12 +200,14 @@ td.numeric { display: inline-block; white-space: nowrap; } + .btn, a.btn { display: inline-block; cursor: pointer; overflow: hidden; } + .btn-important { font-weight: bold; } @@ -195,6 +217,7 @@ a.btn { .nav-list .item { display: block; } + .nav-list .item, .nav-list .item > a { display: block; @@ -202,9 +225,11 @@ a.btn { white-space: nowrap; text-overflow: ellipsis; } + .nav-head { display: block; } + .nav-head .item { display: inline-block; } @@ -215,6 +240,7 @@ a.btn { table-layout: fixed; width: 100%; } + .horizontal-list .item { display: table-cell; } @@ -225,29 +251,35 @@ a.btn { display: inline-block; vertical-align: middle; } + .dropdown-target { display: none; } + .dropdown-menu { + margin: 0; + background: #fff; display: none; + border: 1px solid #aaa; min-width: 200px; - margin: 0; position: absolute; right: 0; - background: #fff; - border: 1px solid #aaa; } + .dropdown-menu-scrollable { max-height: 75vh; overflow-x: hidden; overflow-y: auto; } + .dropdown-header { display: block; } + .dropdown-menu > .item { display: block; } + .dropdown-menu > .item > a, .dropdown-menu > .item > .as-link, .dropdown-menu > .item > span { @@ -255,33 +287,40 @@ a.btn { min-width: 200px; white-space: nowrap; } + .dropdown-menu > .item[aria-checked="true"] > a::before { content: '✓'; } + .dropdown-menu .input { display: block; } + .dropdown-menu .input select, .dropdown-menu .input input { display: block; max-width: 95%; } + .dropdown-target:target ~ .dropdown-menu { display: block; z-index: 1000; } + .dropdown-close { display: inline; } + .dropdown-close a { + display: block; font-size: 0; position: fixed; top: 0; bottom: 0; left: 0; right: 0; - display: block; z-index: -10; cursor: default; } + .separator { display: block; height: 0; @@ -293,13 +332,16 @@ a.btn { display: block; width: 90%; } + .group-controls .alert { width: 100% } + .alert-head { margin: 0; font-weight: bold; } + .alert ul { margin: 5px 20px; } @@ -315,15 +357,17 @@ a.btn { /*=== Pagination */ .pagination { - display: table; - width: 100%; margin: 0; padding: 0; + display: table; + width: 100%; table-layout: fixed; } + .pagination .item { display: table-cell; } + .pagination .pager-first, .pagination .pager-previous, .pagination .pager-next, @@ -333,28 +377,33 @@ a.btn { /*=== Boxes */ .box { + margin: 20px 10px; display: inline-block; - width: 20rem; max-width: 95%; - margin: 20px 10px; + width: 20rem; border: 1px solid #ccc; vertical-align: top; } + .box .box-title { position: relative; font-size: 1.2rem; font-weight: bold; } + .box .box-title form { margin: 0; } + .box .box-content { display: block; overflow: auto; } + .box .box-content .item { display: block; } + .box .box-content .item.disabled { text-align: center; font-style: italic; @@ -364,6 +413,7 @@ a.btn { padding: 30px 5px; text-align: center; } + .box .box-content-centered .btn { margin: 20px 0 0; } @@ -373,17 +423,20 @@ a.btn { margin: 0 0 5px; border-bottom: 2px solid #ccc; } + [draggable=true] { cursor: grab; } /*=== Scrollbar */ + @supports (scrollbar-width: thin) { #sidebar { overflow-y: auto; scrollbar-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.05); scrollbar-width: thin; } + #sidebar:hover { scrollbar-color: rgba(0, 0, 0, 0.3) rgba(0, 0, 0, 0.05); } @@ -394,11 +447,13 @@ a.btn { background: rgba(0, 0, 0, 0.05); width: 8px; } + #sidebar::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.1); - border-radius: 5px; display: unset; + border-radius: 5px; } + #sidebar:hover::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.3); } @@ -414,26 +469,30 @@ a.btn { } .tree-folder-items { - list-style: none; - max-height: 200em; padding: 0; + max-height: 200em; + list-style: none; transition: max-height .3s linear; } + .tree-folder-title { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } + .tree-folder-title .title { display: inline-block; width: 100%; vertical-align: middle; } + .tree-folder-items > .item { display: block; white-space: nowrap; } + .tree-folder-items > .item > a { display: inline-block; vertical-align: middle; @@ -442,6 +501,7 @@ a.btn { white-space: nowrap; text-overflow: ellipsis; } + .tree-bottom { visibility: hidden; margin-bottom: 18em; @@ -455,22 +515,27 @@ a.btn { width: 100%; table-layout: fixed; } + .header > .item { display: table-cell; } + .header > .item.title { width: 250px; white-space: nowrap; } + .header > .item.title h1 { display: inline-block; } + .header > .item.title .logo { display: inline-block; - height: 32px; width: 32px; + height: 32px; vertical-align: middle; } + .header > .item.configure { width: 100px; } @@ -482,6 +547,7 @@ a.btn { height: 100%; table-layout: fixed; } + .aside { display: table-cell; width: 300px; @@ -496,26 +562,32 @@ a.btn { .aside_feed .tree-folder-title .icon { padding: 5px; } + .aside_feed .tree-folder-items .item.feed { padding: 0px 15px; } + .aside_feed .tree-folder-items:not(.active) { - border: none; margin: 0; - max-height: 0; padding: 0; + max-height: 0; + border: none; overflow: hidden; } + .aside_feed .tree-folder-items .dropdown { vertical-align: top; } + .aside_feed .tree-folder-items .dropdown-menu { left: 0; } + .aside_feed .tree-folder-items .item .dropdown-toggle > .icon { visibility: hidden; cursor: pointer; } + .aside_feed .tree-folder-items .item .dropdown-target:target ~ .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item:hover .dropdown-toggle > .icon, .aside_feed .tree-folder-items .item.active .dropdown-toggle > .icon { @@ -526,6 +598,7 @@ a.btn { #new-article { display: none; } + #new-article > a { display: block; } @@ -544,45 +617,51 @@ a.btn { .flux_header { position: relative; } + .flux .item { line-height: 40px; white-space: nowrap; } + .flux .item.manage, .flux .item.link { width: 40px; text-align: center; } + .flux .item.website { width: 200px; } + .flux.not_read .item.title, .flux.current .item.title { font-weight: bold; } + .flux:not(.current):hover .item.title { - position: absolute; - max-width: calc(100% - 320px); background: #fff; + max-width: calc(100% - 320px); + position: absolute; } + .flux .item.title a { color: #000; text-decoration: none; } + .flux .item.author { color: #555; font-size: .7rem; font-weight: normal; white-space: normal; } + .flux .item.date { width: 155px; text-align: right; overflow: hidden; } -.flux .item > a { - display: block; -} + .flux .item > a { display: block; text-decoration: none; @@ -590,6 +669,7 @@ a.btn { text-overflow: ellipsis; overflow: hidden; } + .flux .item.share > a, .item.query > a { display: list-item; @@ -601,30 +681,37 @@ a.btn { .hide_posts > .flux:not(.active) > .flux_content { display: none; } + .content { min-height: 20em; margin: auto; line-height: 1.7em; word-wrap: break-word; } + .content.large { max-width: 1000px; } + .content.medium { max-width: 800px; } + .content.thin { max-width: 550px; } + .content ul, .content ol, .content dd { margin: 0 0 0 15px; padding: 0 0 5px 15px; } + .content pre { overflow: auto; } + br { line-height: 1em; } @@ -641,10 +728,12 @@ br { visibility: visible; transition: visibility 0s, opacity .3s linear; } + .notification.closed { opacity: 0; visibility: hidden; } + .notification a.close { position: absolute; top: 0; bottom: 0; @@ -655,27 +744,31 @@ br { #actualizeProgress { position: fixed; } + #actualizeProgress progress { max-width: 100%; vertical-align: middle; } + #actualizeProgress .progress { vertical-align: middle; } /*=== Navigation menu (for articles) */ #nav_entries { + background: #fff; + display: table; position: fixed; bottom: 0; left: 0; - display: table; width: 300px; - background: #fff; table-layout: fixed; } + #nav_entries .item { display: table-cell; width: 30%; } + #nav_entries a { display: block; } @@ -684,19 +777,22 @@ br { #load_more { min-height: 40px; } + .loading { background: url("loader.gif") center center no-repeat; font-size: 0; } + #bigMarkAsRead { + margin: 0 0 100% 0; + margin: 0 0 100vh 0; + padding: 1em 0 50px 0; display: block; width: 100%; text-align: center; font-size: 1.4em; - padding: 1em 0 50px 0; - margin: 0 0 100% 0; - margin: 0 0 100vh 0; } + .bigTick { font-size: 4em; } @@ -705,14 +801,17 @@ br { .stat { margin: 15px 0; } + .stat.half { + padding: 0 2%; display: inline-block; width: 46%; - padding: 0 2%; } + .stat > table { width: 100%; } + .statGraph { height: 300px; } @@ -741,12 +840,14 @@ br { #stream.global .box { text-align: left; } + #global > #panel { bottom: 99vh; display: block; transition: visibility .3s, bottom .3s; visibility: hidden; } + #global > #panel.visible { bottom: 1em; visibility: visible; @@ -761,24 +862,28 @@ br { transition: visibility .3s, opacity .3s; visibility: hidden; } + #overlay.visible { opacity: 1; visibility: visible; } + #panel { + background: #fff; display: none; position: fixed; top: 1em; bottom: 1em; left: 2em; right: 2em; overflow: auto; - background: #fff; } + #overlay .close { position: fixed; top: 0; bottom: 0; left: 0; right: 0; display: block; } + #overlay .close img { display: none; } @@ -792,20 +897,19 @@ br { background: #fff; border-left: 1px solid #aaa; transition: left 200ms linear; - -moz-transition: left 200ms linear; - -webkit-transition: left 200ms linear; - -o-transition: left 200ms linear; - -ms-transition: left 200ms linear; } + #slider.active { left: 40%; } + #close-slider { position: fixed; top: 0; bottom: 0; left: 100%; right: 0; cursor: pointer; } + #close-slider.active { left: 0; } @@ -814,85 +918,98 @@ br { /*==============*/ .slides { padding: 0; - height: 320px; display: block; + max-width: 640px; + height: 320px; + border: 1px solid #aaa; position: relative; min-width: 260px; - max-width: 640px; margin-bottom: 30px; - border: 1px solid #aaa; } + .slides input { display: none; } + .slide-container { display: block; } + .slide { - top: 0; - opacity: 0; + display: block; width: 100%; height: 100%; - display: block; + top: 0; + opacity: 0; position: absolute; transform: scale(0); transition: all .7s ease-in-out; } + .slide img { width: 100%; height: 100%; } + .nav label { + padding: 0; + display: none; width: 10%; height: 100%; - display: none; + color: #fff; + font-family: "Varela Round", sans-serif; + font-size: 1000%; position: absolute; opacity: 0; z-index: 9; cursor: pointer; transition: opacity .2s; - color: #FFF; - font-size: 1000%; text-align: center; line-height: 225%; - font-family: "Varela Round", sans-serif; background-color: rgba(255, 255, 255, .3); text-shadow: 0px 0px 15px rgb(119, 119, 119); - padding: 0; } + .properties { - display: none; - bottom: 0; - left: 0; right: 0; - position: absolute; padding: 5px; background: rgba(255, 255, 255, 0.7); + display: none; color: #000; border-top: 1px solid #aaa; + bottom: 0; + left: 0; right: 0; + position: absolute; z-index: 10; } + .properties .page-number { right: 5px; top: 0; position: absolute; } + .slide:hover + .nav label { opacity: 0.5; } + .nav label:hover { opacity: 1; } + .nav .next { right: 0; } + input:checked + .slide-container .slide { opacity: 1; transform: scale(1); transition: opacity 1s ease-in-out; } + input:checked + .slide-container .nav label { display: block; } + input:checked + .slide-container .properties { display: block; } @@ -902,13 +1019,16 @@ input:checked + .slide-container .properties { .category .title:not([data-unread="0"])::after { content: attr(data-unread); } + .category .title.error::before { content: "⚠ "; color: #bd362f; } + .feed .item-title:not([data-unread="0"])::before { content: "(" attr(data-unread) ") "; } + .feed .item-title:not([data-unread="0"]) { font-weight: bold; } @@ -959,7 +1079,8 @@ pre.enclosure-description { /*=== MOBILE */ /*===========*/ -@media(max-width: 840px) { + +@media (max-width: 840px) { .header, .aside .btn-important, .flux_header .item.website span, @@ -968,19 +1089,23 @@ pre.enclosure-description { .no-mobile { display: none; } + .dropdown .dropdown-menu { + width: 100%; border-radius: 0; bottom: 0; position: fixed; - width: 100%; } + .dropdown-menu::after { display: none; } + .aside .toggle_aside, .nav-login { display: block; } + .nav_menu .toggle_aside, .nav_menu .search, #panel .close img { @@ -995,6 +1120,7 @@ pre.enclosure-description { overflow: hidden; z-index: 100; } + .aside:target { width: 90%; } @@ -1023,6 +1149,7 @@ pre.enclosure-description { top: 25px; bottom: 30px; left: 0; right: 0; } + #panel .close { top: 0; right: 0; left: auto; bottom: auto; @@ -1034,6 +1161,7 @@ pre.enclosure-description { /*=== PRINTER */ /*============*/ + @media print { .header, .aside, .nav_menu, .day, @@ -1043,21 +1171,26 @@ pre.enclosure-description { #nav_entries { display: none; } + html, body { background: #fff; color: #000; font-family: Serif; } + #global, .flux_content { display: block !important; } + .flux_content .content { width: 100% !important; } + .flux_content .content a { color: #000; } + .flux_content .content a::after { content: " [" attr(href) "] "; font-style: italic; diff --git a/p/themes/p.css b/p/themes/p.css index 171b2078b..34b2ea72f 100644 --- a/p/themes/p.css +++ b/p/themes/p.css @@ -4,14 +4,17 @@ body { font-family: sans-serif; text-align: center; } + h1 { font-size: xx-large; - text-shadow: 1px -1px 0 #CCCCCC; + text-shadow: 1px -1px 0 #ccc; } + h1 a { - color: #0062BE; + color: #0062be; text-decoration: none; } + img { border: 0; } -- cgit v1.2.3 From fd33d92d413acb5ee48e04d8a78f251e35ef06c5 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 20 Aug 2019 14:55:43 +0200 Subject: Require PHP 5.5+ (#2495) * Require PHP 5.5+ https://github.com/FreshRSS/FreshRSS/issues/2469#issuecomment-522255093 I think it would be reasonable to require PHP 5.5+ for the core of FreshRSS after all. As Frenzie said, WordPress currently requires PHP 5.6.20+, and it is the most popular PHP application. We would loose about 20% of the PHP servers according to https://w3techs.com/technologies/details/pl-php/5/all but I expect this number to drop fast after the release of CentOS 8 (CentOS accounts for 17% of Linux servers https://w3techs.com/technologies/details/os-linux/all/all ). Distributions: * no impact on Ubuntu, Fedora, Alpine, OpenWRT, FreeBSD, OpenSuze, Mageia, as all active versions have PHP > 7 * no impact on OpenSuze, Synology, as all active versions have PHP > 5.5 * we drop Debian 8 Jessie (-2020) - we keep supporting Debian 9 Stretch (2017-06) - current is Debian 10 Buster * we drop Red Hat 7 (-2024) - we keep supporting RHEL 8 (2019-05) * we drop CentOS 7 (-2024) - we will support CentOS 8 (to be released soonish) When dropping older versions, I can better like when it is for a good reason, and there is actually one with PHP 5.5, namely generators (yield) https://php.net/language.generators.overview which I consider using. * Version note for JSON.php * hex2bin * Update .travis.yml Co-Authored-By: Frans de Jonge --- .travis.yml | 7 +- README.fr.md | 3 +- README.md | 3 +- app/Controllers/authController.php | 4 - app/Controllers/userController.php | 3 - app/Models/Auth.php | 7 +- app/Models/EntryDAO.php | 4 +- app/install.php | 2 +- app/views/helpers/export/articles.phtml | 5 +- app/views/update/checkInstall.phtml | 2 +- docs/en/admins/02_Installation.md | 6 +- docs/en/developers/01_First_steps.md | 21 +-- docs/en/users/06_Mobile_access.md | 2 +- docs/fr/developers/01_First_steps.md | 21 +-- docs/fr/users/01_Installation.md | 6 +- docs/fr/users/06_Mobile_access.md | 2 +- lib/Minz/Configuration.php | 2 +- lib/Minz/ModelArray.php | 2 +- lib/Minz/ModelPdo.php | 2 +- lib/lib_install.php | 2 +- lib/lib_rss.php | 32 ++-- lib/password_compat.php | 279 -------------------------------- p/api/greader.php | 10 +- phpcs.xml | 1 - 24 files changed, 31 insertions(+), 397 deletions(-) delete mode 100644 lib/password_compat.php (limited to 'p') diff --git a/.travis.yml b/.travis.yml index b24a0c176..5b0ba705a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,12 +30,7 @@ env: matrix: fast_finish: true include: - # PHP 5.3 only runs on Ubuntu 12.04 (precise), not 14.04 (trusty) - - php: "5.3" - dist: precise - # PHP 5.4 & 5.5 only run on Travis in 14.04 (trusty), not 16.04 (xenial) - - php: "5.4" - dist: trusty + # PHP 5.5 only runs on Travis in 14.04 (trusty), not 16.04 (xenial) - php: "5.5" dist: trusty - php: "7.2" diff --git a/README.fr.md b/README.fr.md index d9b145fc4..ceee48f5b 100644 --- a/README.fr.md +++ b/README.fr.md @@ -43,7 +43,7 @@ FreshRSS n’est fourni avec aucune garantie. * Serveur modeste, par exemple sous Linux ou Windows * Fonctionne même sur un Raspberry Pi 1 avec des temps de réponse < 1s (testé sur 150 flux, 22k articles) * Serveur Web Apache2 (recommandé), ou nginx, lighttpd (non testé sur les autres) -* PHP 5.3.8+ (PHP 5.4+ recommandé, et PHP 5.5+ pour les performances, ou PHP 7+ pour d’encore meilleures performances) +* PHP 5.5+ (PHP 7+ recommandé pour de meilleures performances) * Requis : [cURL](https://secure.php.net/curl), [DOM](https://secure.php.net/dom), [XML](https://secure.php.net/xml), [session](https://secure.php.net/session), [ctype](https://secure.php.net/ctype), et [PDO_MySQL](https://secure.php.net/pdo-mysql) ou [PDO_SQLite](https://secure.php.net/pdo-sqlite) ou [PDO_PGSQL](https://secure.php.net/pdo-pgsql) * Recommandés : [JSON](https://secure.php.net/json), [GMP](https://secure.php.net/gmp) (pour accès API sur plateformes < 64 bits), [IDN](https://secure.php.net/intl.idn) (pour les noms de domaines internationalisés), [mbstring](https://secure.php.net/mbstring) (pour le texte Unicode), [iconv](https://secure.php.net/iconv) (pour conversion d’encodages), [ZIP](https://secure.php.net/zip) (pour import/export), [zlib](https://secure.php.net/zlib) (pour les flux compressés) * MySQL 5.5.3+ (recommandé) ou équivalent MariaDB, ou SQLite 3.7.4+, ou PostgreSQL 9.2+ @@ -219,7 +219,6 @@ Tout client supportant une API de type Fever ; Sélection : * [bcrypt.js](https://github.com/dcodeIO/bcrypt.js) * [phpQuery](https://github.com/phpquery/phpquery) * [Services_JSON](https://pear.php.net/pepr/pepr-proposal-show.php?id=198) -* [password_compat](https://github.com/ircmaxell/password_compat) diff --git a/README.md b/README.md index e1660a9d1..6123ae903 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ FreshRSS comes with absolutely no warranty. * Light server running Linux or Windows * It even works on Raspberry Pi 1 with response time under a second (tested with 150 feeds, 22k articles) * A web server: Apache2 (recommended), nginx, lighttpd (not tested on others) -* PHP 5.3.8+ (PHP 5.4+ recommended, and PHP 5.5+ for performance, or PHP 7 for even higher performance) +* PHP 5.5+ (PHP 7+ recommended for higher performance) * Required extensions: [cURL](https://secure.php.net/curl), [DOM](https://secure.php.net/dom), [XML](https://secure.php.net/xml), [session](https://secure.php.net/session), [ctype](https://secure.php.net/ctype), and [PDO_MySQL](https://secure.php.net/pdo-mysql) or [PDO_SQLite](https://secure.php.net/pdo-sqlite) or [PDO_PGSQL](https://secure.php.net/pdo-pgsql) * Recommended extensions: [JSON](https://secure.php.net/json), [GMP](https://secure.php.net/gmp) (for API access on 32-bit platforms), [IDN](https://secure.php.net/intl.idn) (for Internationalized Domain Names), [mbstring](https://secure.php.net/mbstring) (for Unicode strings), [iconv](https://secure.php.net/iconv) (for charset conversion), [ZIP](https://secure.php.net/zip) (for import/export), [zlib](https://secure.php.net/zlib) (for compressed feeds) * MySQL 5.5.3+ (recommended) or MariaDB equivalent, or SQLite 3.7.4+, or PostgreSQL 9.2+ @@ -219,7 +219,6 @@ Supported clients are: * [bcrypt.js](https://github.com/dcodeIO/bcrypt.js) * [phpQuery](https://github.com/phpquery/phpquery) * [Services_JSON](https://pear.php.net/pepr/pepr-proposal-show.php?id=198) -* [password_compat](https://github.com/ircmaxell/password_compat) [travis-badge]:https://travis-ci.org/FreshRSS/FreshRSS.svg?branch=master [travis-link]:https://travis-ci.org/FreshRSS/FreshRSS diff --git a/app/Controllers/authController.php b/app/Controllers/authController.php index ca44b1a96..e06a26399 100644 --- a/app/Controllers/authController.php +++ b/app/Controllers/authController.php @@ -169,10 +169,6 @@ class FreshRSS_auth_Controller extends Minz_ActionController { return; } - if (!function_exists('password_verify')) { - include_once(LIB_PATH . '/password_compat.php'); - } - $s = $conf->passwordHash; $ok = password_verify($password, $s); unset($password); diff --git a/app/Controllers/userController.php b/app/Controllers/userController.php index bf9084930..c1c27a4ab 100644 --- a/app/Controllers/userController.php +++ b/app/Controllers/userController.php @@ -9,9 +9,6 @@ class FreshRSS_user_Controller extends Minz_ActionController { const BCRYPT_COST = 9; public static function hashPassword($passwordPlain) { - if (!function_exists('password_hash')) { - include_once(LIB_PATH . '/password_compat.php'); - } $passwordHash = password_hash($passwordPlain, PASSWORD_BCRYPT, array('cost' => self::BCRYPT_COST)); $passwordPlain = ''; $passwordHash = preg_replace('/^\$2[xy]\$/', '\$2a\$', $passwordHash); //Compatibility with bcrypt.js diff --git a/app/Models/Auth.php b/app/Models/Auth.php index 6d079a01f..b7fb0e6d6 100644 --- a/app/Models/Auth.php +++ b/app/Models/Auth.php @@ -219,10 +219,6 @@ class FreshRSS_FormAuth { return false; } - if (!function_exists('password_verify')) { - include_once(LIB_PATH . '/password_compat.php'); - } - return password_verify($nonce . $hash, $challenge); } @@ -283,8 +279,7 @@ class FreshRSS_FormAuth { $cookie_duration = empty($limits['cookie_duration']) ? 2592000 : $limits['cookie_duration']; $oldest = time() - $cookie_duration; foreach (new DirectoryIterator(DATA_PATH . '/tokens/') as $file_info) { - // $extension = $file_info->getExtension(); doesn't work in PHP < 5.3.7 - $extension = pathinfo($file_info->getFilename(), PATHINFO_EXTENSION); + $extension = $file_info->getExtension(); if ($extension === 'txt' && $file_info->getMTime() < $oldest) { @unlink($file_info->getPathname()); } diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index b47cd55ad..1b2786a6a 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -191,7 +191,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { if ($this->hasNativeHex()) { $this->addEntryPrepared->bindParam(':hash', $valuesTmp['hash']); } else { - $valuesTmp['hashBin'] = pack('H*', $valuesTmp['hash']); //hex2bin() is PHP5.4+ + $valuesTmp['hashBin'] = hex2bin($valuesTmp['hash']); $this->addEntryPrepared->bindParam(':hash', $valuesTmp['hashBin']); } } @@ -273,7 +273,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { if ($this->hasNativeHex()) { $this->updateEntryPrepared->bindParam(':hash', $valuesTmp['hash']); } else { - $valuesTmp['hashBin'] = pack('H*', $valuesTmp['hash']); //hex2bin() is PHP5.4+ + $valuesTmp['hashBin'] = hex2bin($valuesTmp['hash']); $this->updateEntryPrepared->bindParam(':hash', $valuesTmp['hashBin']); } diff --git a/app/install.php b/app/install.php index 961a7c171..8e14d14c0 100644 --- a/app/install.php +++ b/app/install.php @@ -413,7 +413,7 @@ function printStep1() {

-

+

diff --git a/app/views/helpers/export/articles.phtml b/app/views/helpers/export/articles.phtml index 2d1fcd133..0bbfb86ec 100644 --- a/app/views/helpers/export/articles.phtml +++ b/app/views/helpers/export/articles.phtml @@ -1,10 +1,7 @@ = 0) { - $options = JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; -} +$options = JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; $articles = array( 'id' => 'user/' . str_replace('/', '', $username) . '/state/org.freshrss/' . $this->type, diff --git a/app/views/update/checkInstall.phtml b/app/views/update/checkInstall.phtml index 33d78cbe7..e719e53dd 100644 --- a/app/views/update/checkInstall.phtml +++ b/app/views/update/checkInstall.phtml @@ -9,7 +9,7 @@

Required (32-bit only): GMP
Recommanded: JSON, Zlib, mbstring, iconv, ZipArchive
*For the whole modules list see [Dockerfile](https://github.com/FreshRSS/FreshRSS/blob/744a9e8cf00aef7dec0acfa5f90f0dcfa2ef8837/Docker/Dockerfile-Alpine#L7-L9)* | | | Database | **MySQL 5.5.3+** | SQLite 3.7.4+ | | Browser | **Firefox** | Chrome, Opera, Safari, or IE11+ | -## Important notice - -FreshRSS **CAN** work with PHP 5.3.8+. To do so, we are using specific functions available in the [''password_compat'' library](https://github.com/ircmaxell/password_compat#requirements) for the form authentication. - # Getting the appropriate version of FreshRSS diff --git a/docs/en/developers/01_First_steps.md b/docs/en/developers/01_First_steps.md index adca4495b..fef27cb39 100644 --- a/docs/en/developers/01_First_steps.md +++ b/docs/en/developers/01_First_steps.md @@ -148,26 +148,9 @@ abstract class ClassName {} Files must be encoded with UTF-8 character set. -## PHP 5.3 compatibility +## PHP compatibility -Do not get an array item directly from a function or a method. Use a variable. - -```php -// code with PHP 5.3 compatibility -$my_variable = function_returning_an_array(); -echo $my_variable[0]; -// code without PHP 5.3 compatibility -echo function_returning_an_array()[0]; -``` - -Do not use short array declaration. - -```php -// code with PHP 5.3 compatibility -$variable = array(); -// code without PHP 5.3 compatibility -$variable = []; -``` +Ensure that your code is working with a PHP version as old as what FreshRSS officially supports. ## Miscellaneous diff --git a/docs/en/users/06_Mobile_access.md b/docs/en/users/06_Mobile_access.md index 13dba828d..be4d0ded2 100644 --- a/docs/en/users/06_Mobile_access.md +++ b/docs/en/users/06_Mobile_access.md @@ -29,7 +29,7 @@ See the [page about the Fever compatible API](06_Fever_API.md) for another possi * If you get *Service Unavailable!*, then check from step 1 again. * With __Apache__: * If you get *FAIL getallheaders!*, the combination of your PHP version and your Web server does not provide access to [`getallheaders`](http://php.net/getallheaders) - * Update to PHP 5.4+, or use PHP as module instead of CGI. Otherwise turn on Apache `mod_setenvif` (often enabled by default), or `mod_rewrite` with the following procedure: + * Turn on Apache `mod_setenvif` (often enabled by default), or `mod_rewrite` with the following procedure: * Allow [`FileInfo` in `.htaccess`](http://httpd.apache.org/docs/trunk/mod/core.html#allowoverride): see the [server setup](../admins/02_Installation.md) again. * Enable [`mod_rewrite`](http://httpd.apache.org/docs/trunk/mod/mod_rewrite.html): * With Debian / Ubuntu: `sudo a2enmod rewrite` diff --git a/docs/fr/developers/01_First_steps.md b/docs/fr/developers/01_First_steps.md index d2bf9d315..dd38bcb3f 100644 --- a/docs/fr/developers/01_First_steps.md +++ b/docs/fr/developers/01_First_steps.md @@ -148,26 +148,9 @@ abstract class NomDeLaClasse {} Les fichiers doivent être encodés en UTF-8. -## Compatibilité avec PHP 5.3 +## Compatibilité PHP -Il ne faut pas demander l'indice d'un tableau qui est retourné par une fonction ou une méthode. Il faut passer par une variable intermédiaire. - -```php -// code compatible avec PHP 5.3 -$ma_variable = fonction_qui_retourne_un_tableau(); -echo $ma_variable[0]; -// code incompatible avec PHP 5.3 -echo fonction_qui_retourne_un_tableau()[0]; -``` - -Il ne faut pas utiliser la déclaration raccourcie des tableaux. - -```php -// code compatible avec PHP 5.3 -$variable = array(); -// code incompatible avec PHP 5.3 -$variable = []; -``` +Assurez-vous que votre code fonctionne avec une version de PHP aussi ancienne que celle que FreshRSS supporte officiellement. ## Divers diff --git a/docs/fr/users/01_Installation.md b/docs/fr/users/01_Installation.md index a6495d2fd..cc1f543f1 100644 --- a/docs/fr/users/01_Installation.md +++ b/docs/fr/users/01_Installation.md @@ -7,15 +7,11 @@ Il est toutefois de votre responsabilité de vérifier que votre hébergement pe | Logiciel | Recommandé | Fonctionne aussi avec | | -------- | ----------- | --------------------- | | Serveur web | **Apache 2** | Nginx | - | PHP | **PHP 5.5+** | PHP 5.3.8+ | + | PHP | **PHP 7+** | PHP 5.5+ | | Modules PHP | Requis : libxml, cURL, PDO_MySQL, PCRE et ctype
Requis (32 bits seulement) : GMP
Recommandé : JSON, Zlib, mbstring et iconv, ZipArchive
*Pour une liste complète des modules nécessaires voir le [Dockerfile](https://github.com/FreshRSS/FreshRSS/blob/744a9e8cf00aef7dec0acfa5f90f0dcfa2ef8837/Docker/Dockerfile-Alpine#L7-L9)* | | | Base de données | **MySQL 5.5.3+** | SQLite 3.7.4+ | | Navigateur | **Firefox** | Chrome, Opera, Safari, or IE 11+ | -## Note importante - -FreshRSS **PEUT** fonctionner sur la version de PHP 5.3.8+. En effet, nous utilisons des fonctions spécifiques pour la connexion par formulaire et notamment la [bibliothèque ''password_compat''](https://github.com/ircmaxell/password_compat#requirements). - # Choisir la bonne version de FreshRSS FreshRSS possède trois versions différentes (nous parlons de branches) qui sortent à des fréquences plus ou moins rapides. Aussi prenez le temps de comprendre à quoi correspond chacune de ces versions. diff --git a/docs/fr/users/06_Mobile_access.md b/docs/fr/users/06_Mobile_access.md index 7bce9eea3..225c55c7c 100644 --- a/docs/fr/users/06_Mobile_access.md +++ b/docs/fr/users/06_Mobile_access.md @@ -29,7 +29,7 @@ Voir la [page sur l’API compatible Fever](06_Fever_API.md) pour une autre poss * Si vous obtenez *Service Unavailable!*, retourner à l’étape 6. * Avec __Apache__: * Si vous obtenez *FAIL getallheaders!*, alors la combinaison de votre version de PHP et de votre serveur Web ne permet pas l’accès à [`getallheaders`](http://php.net/getallheaders) - * Utilisez au moins PHP 5.4+, ou utilisez PHP en tant que module plutôt que CGI. Sinon, activer Apache `mod_setenvif` (souvent activé par défault), ou `mod_rewrite` avec la procédure suivante : + * Activer Apache `mod_setenvif` (souvent activé par défault), ou `mod_rewrite` avec la procédure suivante : * Autoriser [`FileInfo` dans `.htaccess`](http://httpd.apache.org/docs/trunk/mod/core.html#allowoverride) : revoir [l’installation du serveur](01_Installation.md). * Activer [`mod_rewrite`](http://httpd.apache.org/docs/trunk/mod/mod_rewrite.html) : * Sur Debian / Ubuntu : `sudo a2enmod rewrite` diff --git a/lib/Minz/Configuration.php b/lib/Minz/Configuration.php index aae3accc6..93f6b494c 100644 --- a/lib/Minz/Configuration.php +++ b/lib/Minz/Configuration.php @@ -198,7 +198,7 @@ class Minz_Configuration { return false; } - // Clear PHP 5.5+ cache for include + // Clear PHP cache for include if (function_exists('opcache_invalidate')) { opcache_invalidate($this->config_filename); } diff --git a/lib/Minz/ModelArray.php b/lib/Minz/ModelArray.php index 1ac2b313d..4938f4b1d 100644 --- a/lib/Minz/ModelArray.php +++ b/lib/Minz/ModelArray.php @@ -48,7 +48,7 @@ class Minz_ModelArray { throw new Minz_PermissionDeniedException($this->filename); } if (function_exists('opcache_invalidate')) { - opcache_invalidate($this->filename); //Clear PHP 5.5+ cache for include + opcache_invalidate($this->filename); //Clear PHP cache for include } return true; } diff --git a/lib/Minz/ModelPdo.php b/lib/Minz/ModelPdo.php index 733982c14..14510c983 100644 --- a/lib/Minz/ModelPdo.php +++ b/lib/Minz/ModelPdo.php @@ -103,7 +103,7 @@ class Minz_ModelPdo { $this->bd->beginTransaction(); } public function inTransaction() { - return $this->bd->inTransaction(); //requires PHP >= 5.3.3 + return $this->bd->inTransaction(); } public function commit() { $this->bd->commit(); diff --git a/lib/lib_install.php b/lib/lib_install.php index 6e4df4e9c..6b9b33240 100644 --- a/lib/lib_install.php +++ b/lib/lib_install.php @@ -6,7 +6,7 @@ Minz_Configuration::register('default_system', join_path(FRESHRSS_PATH, 'config. Minz_Configuration::register('default_user', join_path(FRESHRSS_PATH, 'config-user.default.php')); function checkRequirements($dbType = '') { - $php = version_compare(PHP_VERSION, '5.3.8') >= 0; + $php = version_compare(PHP_VERSION, '5.5.0') >= 0; $minz = file_exists(join_path(LIB_PATH, 'Minz')); $curl = extension_loaded('curl'); $pdo_mysql = extension_loaded('pdo_mysql'); diff --git a/lib/lib_rss.php b/lib/lib_rss.php index c0ea23989..2706ff606 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -1,9 +1,9 @@ = 0) { - $htmlEntitiesOnly = array_flip(array_diff( - get_html_translation_table(HTML_ENTITIES, ENT_NOQUOTES, 'UTF-8'), //Decode HTML entities - get_html_translation_table(HTML_SPECIALCHARS, ENT_NOQUOTES, 'UTF-8') //Preserve XML entities - )); - } else { - $htmlEntitiesOnly = array_map('utf8_encode', array_flip(array_diff( - get_html_translation_table(HTML_ENTITIES, ENT_NOQUOTES), //Decode HTML entities - get_html_translation_table(HTML_SPECIALCHARS, ENT_NOQUOTES) //Preserve XML entities - ))); - } + $htmlEntitiesOnly = array_flip(array_diff( + get_html_translation_table(HTML_ENTITIES, ENT_NOQUOTES, 'UTF-8'), //Decode HTML entities + get_html_translation_table(HTML_SPECIALCHARS, ENT_NOQUOTES, 'UTF-8') //Preserve XML entities + )); } return strtr($text, $htmlEntitiesOnly); } @@ -428,7 +414,7 @@ function check_install_php() { $pdo_pgsql = extension_loaded('pdo_pgsql'); $pdo_sqlite = extension_loaded('pdo_sqlite'); return array( - 'php' => version_compare(PHP_VERSION, '5.3.8') >= 0, + 'php' => version_compare(PHP_VERSION, '5.5.0') >= 0, 'minz' => file_exists(LIB_PATH . '/Minz'), 'curl' => extension_loaded('curl'), 'pdo' => $pdo_mysql || $pdo_sqlite || $pdo_pgsql, diff --git a/lib/password_compat.php b/lib/password_compat.php deleted file mode 100644 index e8ec02885..000000000 --- a/lib/password_compat.php +++ /dev/null @@ -1,279 +0,0 @@ - - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @copyright 2012 The Authors - */ - -namespace { - -if (!defined('PASSWORD_DEFAULT')) { - - define('PASSWORD_BCRYPT', 1); - define('PASSWORD_DEFAULT', PASSWORD_BCRYPT); - - /** - * Hash the password using the specified algorithm - * - * @param string $password The password to hash - * @param int $algo The algorithm to use (Defined by PASSWORD_* constants) - * @param array $options The options for the algorithm to use - * - * @return string|false The hashed password, or false on error. - */ - function password_hash($password, $algo, array $options = array()) { - if (!function_exists('crypt')) { - trigger_error("Crypt must be loaded for password_hash to function", E_USER_WARNING); - return null; - } - if (!is_string($password)) { - trigger_error("password_hash(): Password must be a string", E_USER_WARNING); - return null; - } - if (!is_int($algo)) { - trigger_error("password_hash() expects parameter 2 to be long, " . gettype($algo) . " given", E_USER_WARNING); - return null; - } - $resultLength = 0; - switch ($algo) { - case PASSWORD_BCRYPT: - // Note that this is a C constant, but not exposed to PHP, so we don't define it here. - $cost = 10; - if (isset($options['cost'])) { - $cost = $options['cost']; - if ($cost < 4 || $cost > 31) { - trigger_error(sprintf("password_hash(): Invalid bcrypt cost parameter specified: %d", $cost), E_USER_WARNING); - return null; - } - } - // The length of salt to generate - $raw_salt_len = 16; - // The length required in the final serialization - $required_salt_len = 22; - $hash_format = sprintf("$2y$%02d$", $cost); - // The expected length of the final crypt() output - $resultLength = 60; - break; - default: - trigger_error(sprintf("password_hash(): Unknown password hashing algorithm: %s", $algo), E_USER_WARNING); - return null; - } - $salt_requires_encoding = false; - if (isset($options['salt'])) { - switch (gettype($options['salt'])) { - case 'NULL': - case 'boolean': - case 'integer': - case 'double': - case 'string': - $salt = (string) $options['salt']; - break; - case 'object': - if (method_exists($options['salt'], '__tostring')) { - $salt = (string) $options['salt']; - break; - } - case 'array': - case 'resource': - default: - trigger_error('password_hash(): Non-string salt parameter supplied', E_USER_WARNING); - return null; - } - if (PasswordCompat\binary\_strlen($salt) < $required_salt_len) { - trigger_error(sprintf("password_hash(): Provided salt is too short: %d expecting %d", PasswordCompat\binary\_strlen($salt), $required_salt_len), E_USER_WARNING); - return null; - } elseif (0 == preg_match('#^[a-zA-Z0-9./]+$#D', $salt)) { - $salt_requires_encoding = true; - } - } else { - $buffer = ''; - $buffer_valid = false; - if (function_exists('mcrypt_create_iv') && !defined('PHALANGER')) { - $buffer = mcrypt_create_iv($raw_salt_len, MCRYPT_DEV_URANDOM); - if ($buffer) { - $buffer_valid = true; - } - } - if (!$buffer_valid && function_exists('openssl_random_pseudo_bytes')) { - $buffer = openssl_random_pseudo_bytes($raw_salt_len); - if ($buffer) { - $buffer_valid = true; - } - } - if (!$buffer_valid && @is_readable('/dev/urandom')) { - $f = fopen('/dev/urandom', 'r'); - $read = PasswordCompat\binary\_strlen($buffer); - while ($read < $raw_salt_len) { - $buffer .= fread($f, $raw_salt_len - $read); - $read = PasswordCompat\binary\_strlen($buffer); - } - fclose($f); - if ($read >= $raw_salt_len) { - $buffer_valid = true; - } - } - if (!$buffer_valid || PasswordCompat\binary\_strlen($buffer) < $raw_salt_len) { - $bl = PasswordCompat\binary\_strlen($buffer); - for ($i = 0; $i < $raw_salt_len; $i++) { - if ($i < $bl) { - $buffer[$i] = $buffer[$i] ^ chr(mt_rand(0, 255)); - } else { - $buffer .= chr(mt_rand(0, 255)); - } - } - } - $salt = $buffer; - $salt_requires_encoding = true; - } - if ($salt_requires_encoding) { - // encode string with the Base64 variant used by crypt - $base64_digits = - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - $bcrypt64_digits = - './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; - - $base64_string = base64_encode($salt); - $salt = strtr(rtrim($base64_string, '='), $base64_digits, $bcrypt64_digits); - } - $salt = PasswordCompat\binary\_substr($salt, 0, $required_salt_len); - - $hash = $hash_format . $salt; - - $ret = crypt($password, $hash); - - if (!is_string($ret) || PasswordCompat\binary\_strlen($ret) != $resultLength) { - return false; - } - - return $ret; - } - - /** - * Get information about the password hash. Returns an array of the information - * that was used to generate the password hash. - * - * array( - * 'algo' => 1, - * 'algoName' => 'bcrypt', - * 'options' => array( - * 'cost' => 10, - * ), - * ) - * - * @param string $hash The password hash to extract info from - * - * @return array The array of information about the hash. - */ - function password_get_info($hash) { - $return = array( - 'algo' => 0, - 'algoName' => 'unknown', - 'options' => array(), - ); - if (PasswordCompat\binary\_substr($hash, 0, 4) == '$2y$' && PasswordCompat\binary\_strlen($hash) == 60) { - $return['algo'] = PASSWORD_BCRYPT; - $return['algoName'] = 'bcrypt'; - list($cost) = sscanf($hash, "$2y$%d$"); - $return['options']['cost'] = $cost; - } - return $return; - } - - /** - * Determine if the password hash needs to be rehashed according to the options provided - * - * If the answer is true, after validating the password using password_verify, rehash it. - * - * @param string $hash The hash to test - * @param int $algo The algorithm used for new password hashes - * @param array $options The options array passed to password_hash - * - * @return boolean True if the password needs to be rehashed. - */ - function password_needs_rehash($hash, $algo, array $options = array()) { - $info = password_get_info($hash); - if ($info['algo'] != $algo) { - return true; - } - switch ($algo) { - case PASSWORD_BCRYPT: - $cost = isset($options['cost']) ? $options['cost'] : 10; - if ($cost != $info['options']['cost']) { - return true; - } - break; - } - return false; - } - - /** - * Verify a password against a hash using a timing attack resistant approach - * - * @param string $password The password to verify - * @param string $hash The hash to verify against - * - * @return boolean If the password matches the hash - */ - function password_verify($password, $hash) { - if (!function_exists('crypt')) { - trigger_error("Crypt must be loaded for password_verify to function", E_USER_WARNING); - return false; - } - $ret = crypt($password, $hash); - if (!is_string($ret) || PasswordCompat\binary\_strlen($ret) != PasswordCompat\binary\_strlen($hash) || PasswordCompat\binary\_strlen($ret) <= 13) { - return false; - } - - $status = 0; - for ($i = 0; $i < PasswordCompat\binary\_strlen($ret); $i++) { - $status |= (ord($ret[$i]) ^ ord($hash[$i])); - } - - return $status === 0; - } -} - -} - -namespace PasswordCompat\binary { - /** - * Count the number of bytes in a string - * - * We cannot simply use strlen() for this, because it might be overwritten by the mbstring extension. - * In this case, strlen() will count the number of *characters* based on the internal encoding. A - * sequence of bytes might be regarded as a single multibyte character. - * - * @param string $binary_string The input string - * - * @internal - * @return int The number of bytes - */ - function _strlen($binary_string) { - if (function_exists('mb_strlen')) { - return mb_strlen($binary_string, '8bit'); - } - return strlen($binary_string); - } - - /** - * Get a substring based on byte limits - * - * @see _strlen() - * - * @param string $binary_string The input string - * @param int $start - * @param int $length - * - * @internal - * @return string The substring - */ - function _substr($binary_string, $start, $length) { - if (function_exists('mb_substr')) { - return mb_substr($binary_string, $start, $length, '8bit'); - } - return substr($binary_string, $start, $length); - } - -} diff --git a/p/api/greader.php b/p/api/greader.php index 3d628c855..4cf1b7b20 100644 --- a/p/api/greader.php +++ b/p/api/greader.php @@ -43,11 +43,7 @@ if (PHP_INT_SIZE < 8) { //32-bit } } -if (version_compare(PHP_VERSION, '5.4.0') >= 0) { - define('JSON_OPTIONS', JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); -} else { - define('JSON_OPTIONS', 0); -} +define('JSON_OPTIONS', JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); function headerVariable($headerName, $varName) { $header = ''; @@ -182,10 +178,6 @@ function authorizationToUser() { function clientLogin($email, $pass) { //http://web.archive.org/web/20130604091042/http://undoc.in/clientLogin.html if (FreshRSS_user_Controller::checkUsername($email)) { - if (!function_exists('password_verify')) { - include_once(LIB_PATH . '/password_compat.php'); - } - FreshRSS_Context::$user_conf = get_user_configuration($email); if (FreshRSS_Context::$user_conf == null) { Minz_Log::warning('Invalid API user ' . $email . ': configuration cannot be found.'); diff --git a/phpcs.xml b/phpcs.xml index c30ad54f6..8234aced8 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -10,7 +10,6 @@ ./lib/http-conditional.php ./lib/JSON.php ./lib/lib_phpQuery.php - ./lib/password_compat.php -- cgit v1.2.3 From 3f8804f54f8426961a31287fb8e9a3d8f8f84b4d Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Wed, 21 Aug 2019 21:14:22 +0200 Subject: Prevent window opener vulnerability with space shortcut (#2506) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Prevent window opener vulnerability with space shortcut This change fixes a vulnerability introduced by `window.open()` on untrusted sources. It reproduces the effect of `rel="noreferrer"` with JS. Cross browser solution from: https://stackoverflow.com/a/40593743 ## Reproduction > tested with Firefox 68 1. Add this RSS feed 2. Open the 2nd link "À propos de la faille de sécurité liée à target="_blank" **using the space key shortcut**. 3. Click on the first of three links "http://bookmarks.ecyseo.net" Current behaviour: the FreshRSS tab changes. Expected behaviour: no effect on FreshRSS * Test for popup blockers --- p/scripts/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'p') diff --git a/p/scripts/main.js b/p/scripts/main.js index 4fd91235e..3f964e70e 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -803,7 +803,11 @@ function init_shortcuts() { if (context.auto_mark_site) { mark_read(document.querySelector('.flux.current'), true, false); } - window.open(document.querySelector('.flux.current a.go_website').href); + const newWindow = window.open(); + if (newWindow) { + newWindow.opener = null; + newWindow.location = document.querySelector('.flux.current a.go_website').href; + } return false; } if (k === s.skip_next_entry) { next_entry(true); return false; } -- cgit v1.2.3 From 125a83efc9e6cafb5eb274b07d1d006b0abb3031 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 22 Aug 2019 20:13:40 +0200 Subject: IE11 / Edge keyboard compatibility (#2507) https://github.com/FreshRSS/FreshRSS/pull/2506#issuecomment-523544684 --- p/scripts/main.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'p') diff --git a/p/scripts/main.js b/p/scripts/main.js index 3f964e70e..3a9d8a52a 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -720,8 +720,14 @@ function init_shortcuts() { return true; } - const s = context.shortcuts, - k = (ev.key.trim() || ev.code).toUpperCase(); + const s = context.shortcuts; + let k = (ev.key.trim() || ev.code || 'Space').toUpperCase(); + + //IE11 + if (k === 'SPACEBAR') k = 'SPACE'; + else if (k === 'DEL') k = 'DELETE'; + else if (k === 'ESC') k = 'ESCAPE'; + if (location.hash.match(/^#dropdown-/)) { const n = parseInt(k); if (n) { -- cgit v1.2.3 From 18efce354326c78d0ae0579a163eb4ac6322deca Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Thu, 29 Aug 2019 17:31:49 +0200 Subject: tec: Ignore theme folders starting by xTheme- (#2511) --- p/themes/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 p/themes/.gitignore (limited to 'p') diff --git a/p/themes/.gitignore b/p/themes/.gitignore new file mode 100644 index 000000000..18cb4b685 --- /dev/null +++ b/p/themes/.gitignore @@ -0,0 +1 @@ +xTheme-* -- cgit v1.2.3 From 28ab89146be497a5018c217f198103eb9cfddd8b Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 18 Sep 2019 13:03:53 +0200 Subject: API Reeder compatibility (#2526) https://github.com/FreshRSS/FreshRSS/issues/2513 --- p/api/greader.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'p') diff --git a/p/api/greader.php b/p/api/greader.php index 4cf1b7b20..b6777796a 100644 --- a/p/api/greader.php +++ b/p/api/greader.php @@ -214,8 +214,10 @@ function token($conf) { function checkToken($conf, $token) { //http://code.google.com/p/google-reader-api/wiki/ActionToken $user = Minz_Session::param('currentUser', '_'); - if ($user !== '_' && $token == '') { - return true; //FeedMe //TODO: Check security consequences + if ($user !== '_' && ( //TODO: Check security consequences + $token == '' || //FeedMe + $token === 'x')) { //Reeder + return true; } if ($token === str_pad(sha1(FreshRSS_Context::$system_conf->salt . $user . $conf->apiPasswordHash), 57, 'Z')) { return true; -- cgit v1.2.3 From 1f3672fcc1d279aa8eb464e7aabc6fec9ae0a5e1 Mon Sep 17 00:00:00 2001 From: rocka Date: Sat, 28 Sep 2019 18:10:52 +0800 Subject: Optimize dynamic favicon for HiDPI screens (#2539) This PR leveraging `window.devicePixelRatio` to generate high resolution favicons for HiDPI screens. --- p/scripts/main.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'p') diff --git a/p/scripts/main.js b/p/scripts/main.js index 3a9d8a52a..c51d91c8e 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -1397,9 +1397,10 @@ function faviconNbUnread(n) { } //http://remysharp.com/2010/08/24/dynamic-favicons/ const canvas = document.createElement('canvas'), - link = document.getElementById('favicon').cloneNode(true); + link = document.getElementById('favicon').cloneNode(true), + ratio = window.devicePixelRatio; if (canvas.getContext && link) { - canvas.height = canvas.width = 16; + canvas.height = canvas.width = 16 * ratio; const img = document.createElement('img'); img.onload = function () { const ctx = canvas.getContext('2d'); @@ -1413,9 +1414,9 @@ function faviconNbUnread(n) { } else { text = 'E' + Math.floor(Math.log10(n)); } - ctx.font = 'bold 9px "Arial", sans-serif'; + ctx.font = 'bold ' + 9 * ratio + 'px "Arial", sans-serif'; ctx.fillStyle = 'rgba(255, 255, 255, 0.8)'; - ctx.fillRect(0, 7, ctx.measureText(text).width, 9); + ctx.fillRect(0, 7 * ratio, ctx.measureText(text).width, 9 * ratio); ctx.fillStyle = '#F00'; ctx.fillText(text, 0, canvas.height - 1); } -- cgit v1.2.3 From e3e5954394f4523850c78e80e496f1b916622677 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 29 Sep 2019 16:22:50 +0200 Subject: PDO refactoring for code simplification (#2522) * PDO refactor * Automatic prefix when using the syntax `_tableName` * Uniformity: MySQL is now PDO::ATTR_EMULATE_PREPARES = false just like SQLite and PostgreSQL, with consequences such as only one statement per query * Use PDO methods exec(), query(), prepare() + execute() in a more efficient way * Remove auto-update SQL code for versions older than FreshRSS 1.5 (3 years old) * The name of the default category is set in PHP instead of in the DB (simplies SQL and allows changing the name according to the FreshRSS language) * Rename `->bd` to `->pdo` (less of a frenshism, and more informative) * Fix some requests, which were not compatible with MySQL prepared statements * Whitespace * Fix syntax for PostgreSQL sequences + MySQL install * Minor formatting * Fix lastInsertId for PostgreSQL * Use PHP 5.6+ const Take advantage of https://github.com/FreshRSS/FreshRSS/pull/2527 https://www.php.net/manual/en/migration56.new-features.php * A bit of forgotten PHP 5.6 simplification for cURL * Forgotten $s * Mini fix custom user config https://github.com/FreshRSS/FreshRSS/pull/2490/files#r326290346 * More work on install.php but not finished * install.php working * More cleaning of PDO in install * Even more simplification Take advantage of PDO->exec() to run multiple statements * Disallow changing the name of the default category https://github.com/FreshRSS/FreshRSS/pull/2522#discussion_r326967724 --- app/Controllers/configureController.php | 3 +- app/Controllers/feedController.php | 2 +- app/Controllers/userController.php | 13 +- app/Models/Category.php | 7 +- app/Models/CategoryDAO.php | 104 ++++---- app/Models/DatabaseDAO.php | 92 ++++--- app/Models/DatabaseDAOPGSQL.php | 28 +-- app/Models/DatabaseDAOSQLite.php | 26 +- app/Models/Entry.php | 12 +- app/Models/EntryDAO.php | 341 ++++++++++---------------- app/Models/EntryDAOPGSQL.php | 24 +- app/Models/EntryDAOSQLite.php | 72 +++--- app/Models/Feed.php | 17 +- app/Models/FeedDAO.php | 154 ++++++------ app/Models/FeedDAOSQLite.php | 2 +- app/Models/StatsDAO.php | 47 ++-- app/Models/StatsDAOPGSQL.php | 5 +- app/Models/StatsDAOSQLite.php | 5 +- app/Models/TagDAO.php | 106 ++++----- app/Models/TagDAOSQLite.php | 2 +- app/Models/UserDAO.php | 57 +---- app/SQL/install.sql.mysql.php | 89 +++---- app/SQL/install.sql.pgsql.php | 93 ++++---- app/SQL/install.sql.sqlite.php | 88 +++---- app/install.php | 409 ++++++++++++++------------------ app/views/helpers/category/update.phtml | 5 +- cli/do-install.php | 7 +- lib/Minz/ModelPdo.php | 132 ++++++----- lib/favicons.php | 19 +- lib/lib_install.php | 79 ++---- lib/lib_rss.php | 11 +- p/api/fever.php | 4 +- p/api/greader.php | 20 +- p/f.php | 10 +- 34 files changed, 885 insertions(+), 1200 deletions(-) (limited to 'p') diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index b02ad02e4..85ca9da39 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -167,8 +167,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController { * tab and up. */ public function shortcutAction() { - global $SHORTCUT_KEYS; - $this->view->list_keys = $SHORTCUT_KEYS; + $this->view->list_keys = SHORTCUT_KEYS; if (Minz_Request::isPost()) { FreshRSS_Context::$user_conf->shortcuts = validateShortcutList(Minz_Request::param('shortcuts')); diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index c2c0cce37..ea07d96e4 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -429,7 +429,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController { $feedDAO->updateLastUpdate($feed->id(), false, $mtime); if ($needFeedCacheRefresh) { - $feedDAO->updateCachedValue($feed->id()); + $feedDAO->updateCachedValues($feed->id()); } if ($entryDAO->inTransaction()) { $entryDAO->commit(); diff --git a/app/Controllers/userController.php b/app/Controllers/userController.php index ab8dfb0b2..6afc91b4e 100644 --- a/app/Controllers/userController.php +++ b/app/Controllers/userController.php @@ -211,16 +211,15 @@ class FreshRSS_user_Controller extends Minz_ActionController { } } - public static function createUser($new_user_name, $email, $passwordPlain, $apiPasswordPlain, $userConfigOverride = array(), $insertDefaultFeeds = true) { - $userConfig = array(); + public static function createUser($new_user_name, $email, $passwordPlain, $apiPasswordPlain = '', $userConfigOverride = [], $insertDefaultFeeds = true) { + $userConfig = []; $customUserConfigPath = join_path(DATA_PATH, 'config-user.custom.php'); if (file_exists($customUserConfigPath)) { $customUserConfig = include($customUserConfigPath); - } - - if (is_array($customUserConfig)) { - $userConfig = $customUserConfig; + if (is_array($customUserConfig)) { + $userConfig = $customUserConfig; + } } if (is_array($userConfigOverride)) { @@ -249,7 +248,7 @@ class FreshRSS_user_Controller extends Minz_ActionController { } if ($ok) { $newUserDAO = FreshRSS_Factory::createUserDao($new_user_name); - $ok &= $newUserDAO->createUser($userConfig['language'], $insertDefaultFeeds); + $ok &= $newUserDAO->createUser($insertDefaultFeeds); $ok &= self::updateUser($new_user_name, $email, $passwordPlain, $apiPasswordPlain); } return $ok; diff --git a/app/Models/Category.php b/app/Models/Category.php index fa711aa66..29c0e586b 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -68,8 +68,11 @@ class FreshRSS_Category extends Minz_Model { return $this->hasFeedsWithError; } - public function _id($value) { - $this->id = $value; + public function _id($id) { + $this->id = $id; + if ($id == FreshRSS_CategoryDAO::DEFAULTCATEGORYID) { + $this->_name(_t('gen.short.default_category')); + } } public function _name($value) { $this->name = trim($value); diff --git a/app/Models/CategoryDAO.php b/app/Models/CategoryDAO.php index b0fcb5033..2bae5ef83 100644 --- a/app/Models/CategoryDAO.php +++ b/app/Models/CategoryDAO.php @@ -5,10 +5,10 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable const DEFAULTCATEGORYID = 1; public function addCategory($valuesTmp) { - $sql = 'INSERT INTO `' . $this->prefix . 'category`(name) ' + $sql = 'INSERT INTO `_category`(name) ' . 'SELECT * FROM (SELECT TRIM(?)) c2 ' //TRIM() to provide a type hint as text for PostgreSQL - . 'WHERE NOT EXISTS (SELECT 1 FROM `' . $this->prefix . 'tag` WHERE name = TRIM(?))'; //No tag of the same name - $stm = $this->bd->prepare($sql); + . 'WHERE NOT EXISTS (SELECT 1 FROM `_tag` WHERE name = TRIM(?))'; //No tag of the same name + $stm = $this->pdo->prepare($sql); $valuesTmp['name'] = mb_strcut(trim($valuesTmp['name']), 0, FreshRSS_DatabaseDAO::LENGTH_INDEX_UNICODE, 'UTF-8'); $values = array( @@ -17,7 +17,7 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable ); if ($stm && $stm->execute($values)) { - return $this->bd->lastInsertId('"' . $this->prefix . 'category_id_seq"'); + return $this->pdo->lastInsertId('`_category_id_seq`'); } else { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); Minz_Log::error('SQL error addCategory: ' . $info[2]); @@ -39,9 +39,9 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable } public function updateCategory($id, $valuesTmp) { - $sql = 'UPDATE `' . $this->prefix . 'category` SET name=? WHERE id=? ' - . 'AND NOT EXISTS (SELECT 1 FROM `' . $this->prefix . 'tag` WHERE name = ?)'; //No tag of the same name - $stm = $this->bd->prepare($sql); + $sql = 'UPDATE `_category` SET name=? WHERE id=? ' + . 'AND NOT EXISTS (SELECT 1 FROM `_tag` WHERE name = ?)'; //No tag of the same name + $stm = $this->pdo->prepare($sql); $valuesTmp['name'] = mb_strcut(trim($valuesTmp['name']), 0, FreshRSS_DatabaseDAO::LENGTH_INDEX_UNICODE, 'UTF-8'); $values = array( @@ -63,12 +63,10 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable if ($id <= self::DEFAULTCATEGORYID) { return false; } - $sql = 'DELETE FROM `' . $this->prefix . 'category` WHERE id=?'; - $stm = $this->bd->prepare($sql); - - $values = array($id); - - if ($stm && $stm->execute($values)) { + $sql = 'DELETE FROM `_category` WHERE id=:id'; + $stm = $this->pdo->prepare($sql); + $stm->bindParam(':id', $id, PDO::PARAM_INT); + if ($stm && $stm->execute()) { return $stm->rowCount(); } else { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); @@ -78,21 +76,18 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable } public function selectAll() { - $sql = 'SELECT id, name FROM `' . $this->prefix . 'category`'; - $stm = $this->bd->prepare($sql); - $stm->execute(); + $sql = 'SELECT id, name FROM `_category`'; + $stm = $this->pdo->query($sql); while ($row = $stm->fetch(PDO::FETCH_ASSOC)) { yield $row; } } public function searchById($id) { - $sql = 'SELECT * FROM `' . $this->prefix . 'category` WHERE id=?'; - $stm = $this->bd->prepare($sql); - - $values = array($id); - - $stm->execute($values); + $sql = 'SELECT * FROM `_category` WHERE id=:id'; + $stm = $this->pdo->prepare($sql); + $stm->bindParam(':id', $id, PDO::PARAM_INT); + $stm->execute(); $res = $stm->fetchAll(PDO::FETCH_ASSOC); $cat = self::daoToCategory($res); @@ -103,18 +98,15 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable } } public function searchByName($name) { - $sql = 'SELECT * FROM `' . $this->prefix . 'category` WHERE name=?'; - $stm = $this->bd->prepare($sql); + $sql = 'SELECT * FROM `_category` WHERE name=:name'; + $stm = $this->pdo->prepare($sql); if ($stm == false) { return false; } - - $values = array($name); - - $stm->execute($values); + $stm->bindParam(':name', $name); + $stm->execute(); $res = $stm->fetchAll(PDO::FETCH_ASSOC); $cat = self::daoToCategory($res); - if (isset($cat[0])) { return $cat[0]; } else { @@ -126,26 +118,26 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable if ($prePopulateFeeds) { $sql = 'SELECT c.id AS c_id, c.name AS c_name, ' . ($details ? 'f.* ' : 'f.id, f.name, f.url, f.website, f.priority, f.error, f.`cache_nbEntries`, f.`cache_nbUnreads`, f.ttl ') - . 'FROM `' . $this->prefix . 'category` c ' - . 'LEFT OUTER JOIN `' . $this->prefix . 'feed` f ON f.category=c.id ' + . 'FROM `_category` c ' + . 'LEFT OUTER JOIN `_feed` f ON f.category=c.id ' . 'WHERE f.priority >= :priority_normal ' . 'GROUP BY f.id, c_id ' . 'ORDER BY c.name, f.name'; - $stm = $this->bd->prepare($sql); - $stm->execute(array(':priority_normal' => FreshRSS_Feed::PRIORITY_NORMAL)); + $stm = $this->pdo->prepare($sql); + $stm->bindValue(':priority_normal', FreshRSS_Feed::PRIORITY_NORMAL, PDO::PARAM_INT); + $stm->execute(); return self::daoToCategoryPrepopulated($stm->fetchAll(PDO::FETCH_ASSOC)); } else { - $sql = 'SELECT * FROM `' . $this->prefix . 'category` ORDER BY name'; - $stm = $this->bd->prepare($sql); - $stm->execute(); + $sql = 'SELECT * FROM `_category` ORDER BY name'; + $stm = $this->pdo->query($sql); return self::daoToCategory($stm->fetchAll(PDO::FETCH_ASSOC)); } } public function getDefault() { - $sql = 'SELECT * FROM `' . $this->prefix . 'category` WHERE id=' . self::DEFAULTCATEGORYID; - $stm = $this->bd->prepare($sql); - + $sql = 'SELECT * FROM `_category` WHERE id=:id'; + $stm = $this->pdo->prepare($sql); + $stm->bindValue(':id', self::DEFAULTCATEGORYID, PDO::PARAM_INT); $stm->execute(); $res = $stm->fetchAll(PDO::FETCH_ASSOC); $cat = self::daoToCategory($res); @@ -167,12 +159,12 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable $cat = new FreshRSS_Category(_t('gen.short.default_category')); $cat->_id(self::DEFAULTCATEGORYID); - $sql = 'INSERT INTO `' . $this->prefix . 'category`(id, name) VALUES(?, ?)'; - if ($this->bd->dbType() === 'pgsql') { + $sql = 'INSERT INTO `_category`(id, name) VALUES(?, ?)'; + if ($this->pdo->dbType() === 'pgsql') { //Force call to nextval() - $sql .= ' RETURNING nextval(\'"' . $this->prefix . 'category_id_seq"\');'; + $sql .= " RETURNING nextval('`_category_id_seq`');"; } - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); $values = array( $cat->id(), @@ -180,7 +172,7 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable ); if ($stm && $stm->execute($values)) { - return $this->bd->lastInsertId('"' . $this->prefix . 'category_id_seq"'); + return $this->pdo->lastInsertId('`_category_id_seq`'); } else { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); Minz_Log::error('SQL error check default category: ' . json_encode($info)); @@ -191,31 +183,27 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable } public function count() { - $sql = 'SELECT COUNT(*) AS count FROM `' . $this->prefix . 'category`'; - $stm = $this->bd->prepare($sql); - $stm->execute(); + $sql = 'SELECT COUNT(*) AS count FROM `_category`'; + $stm = $this->pdo->query($sql); $res = $stm->fetchAll(PDO::FETCH_ASSOC); - return $res[0]['count']; } public function countFeed($id) { - $sql = 'SELECT COUNT(*) AS count FROM `' . $this->prefix . 'feed` WHERE category=?'; - $stm = $this->bd->prepare($sql); - $values = array($id); - $stm->execute($values); + $sql = 'SELECT COUNT(*) AS count FROM `_feed` WHERE category=:id'; + $stm = $this->pdo->prepare($sql); + $stm->bindParam(':id', $id, PDO::PARAM_INT); + $stm->execute(); $res = $stm->fetchAll(PDO::FETCH_ASSOC); - return $res[0]['count']; } public function countNotRead($id) { - $sql = 'SELECT COUNT(*) AS count FROM `' . $this->prefix . 'entry` e INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed=f.id WHERE category=? AND e.is_read=0'; - $stm = $this->bd->prepare($sql); - $values = array($id); - $stm->execute($values); + $sql = 'SELECT COUNT(*) AS count FROM `_entry` e INNER JOIN `_feed` f ON e.id_feed=f.id WHERE category=:id AND e.is_read=0'; + $stm = $this->pdo->prepare($sql); + $stm->bindParam(':id', $id, PDO::PARAM_INT); + $stm->execute(); $res = $stm->fetchAll(PDO::FETCH_ASSOC); - return $res[0]['count']; } diff --git a/app/Models/DatabaseDAO.php b/app/Models/DatabaseDAO.php index ec84da664..8046e1b5a 100644 --- a/app/Models/DatabaseDAO.php +++ b/app/Models/DatabaseDAO.php @@ -14,19 +14,44 @@ class FreshRSS_DatabaseDAO extends Minz_ModelPdo { //https://dev.mysql.com/doc/refman/8.0/en/innodb-restrictions.html const LENGTH_INDEX_UNICODE = 191; + public function create() { + require_once(APP_PATH . '/SQL/install.sql.' . $this->pdo->dbType() . '.php'); + $db = FreshRSS_Context::$system_conf->db; + + try { + $sql = sprintf(SQL_CREATE_DB, empty($db['base']) ? '' : $db['base']); + return $this->pdo->exec($sql) !== false; + } catch (PDOException $e) { + $_SESSION['bd_error'] = $e->getMessage(); + syslog(LOG_DEBUG, __method__ . ' warning: ' . $e->getMessage()); + return false; + } + } + + public function testConnection() { + try { + $sql = 'SELECT 1'; + $stm = $this->pdo->query($sql); + $res = $stm->fetchAll(PDO::FETCH_COLUMN, 0); + return $res != false; + } catch (PDOException $e) { + $_SESSION['bd_error'] = $e->getMessage(); + syslog(LOG_DEBUG, __method__ . ' warning: ' . $e->getMessage()); + return false; + } + } + public function tablesAreCorrect() { - $sql = 'SHOW TABLES'; - $stm = $this->bd->prepare($sql); - $stm->execute(); + $stm = $this->pdo->query('SHOW TABLES'); $res = $stm->fetchAll(PDO::FETCH_ASSOC); $tables = array( - $this->prefix . 'category' => false, - $this->prefix . 'feed' => false, - $this->prefix . 'entry' => false, - $this->prefix . 'entrytmp' => false, - $this->prefix . 'tag' => false, - $this->prefix . 'entrytag' => false, + $this->pdo->prefix() . 'category' => false, + $this->pdo->prefix() . 'feed' => false, + $this->pdo->prefix() . 'entry' => false, + $this->pdo->prefix() . 'entrytmp' => false, + $this->pdo->prefix() . 'tag' => false, + $this->pdo->prefix() . 'entrytag' => false, ); foreach ($res as $value) { $tables[array_pop($value)] = true; @@ -36,10 +61,8 @@ class FreshRSS_DatabaseDAO extends Minz_ModelPdo { } public function getSchema($table) { - $sql = 'DESC ' . $this->prefix . $table; - $stm = $this->bd->prepare($sql); - $stm->execute(); - + $sql = 'DESC `_' . $table . '`'; + $stm = $this->pdo->query($sql); return $this->listDaoToSchema($stm->fetchAll(PDO::FETCH_ASSOC)); } @@ -119,9 +142,9 @@ class FreshRSS_DatabaseDAO extends Minz_ModelPdo { $values = array($db['base']); if (!$all) { $sql .= ' AND table_name LIKE ?'; - $values[] = $this->prefix . '%'; + $values[] = $this->pdo->prefix() . '%'; } - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); $stm->execute($values); $res = $stm->fetchAll(PDO::FETCH_COLUMN, 0); return $res[0]; @@ -132,29 +155,23 @@ class FreshRSS_DatabaseDAO extends Minz_ModelPdo { $tables = array('category', 'feed', 'entry', 'entrytmp', 'tag', 'entrytag'); foreach ($tables as $table) { - $sql = 'OPTIMIZE TABLE `' . $this->prefix . $table . '`'; //MySQL - $stm = $this->bd->prepare($sql); - $ok &= $stm != false; - if ($stm) { - $ok &= $stm->execute(); - } + $sql = 'OPTIMIZE TABLE `_' . $table . '`'; //MySQL + $ok &= ($this->pdo->exec($sql) !== false); } return $ok; } public function ensureCaseInsensitiveGuids() { $ok = true; - if ($this->bd->dbType() === 'mysql') { + if ($this->pdo->dbType() === 'mysql') { include_once(APP_PATH . '/SQL/install.sql.mysql.php'); - if (defined('SQL_UPDATE_GUID_LATIN1_BIN')) { //FreshRSS 1.12 - try { - $sql = sprintf(SQL_UPDATE_GUID_LATIN1_BIN, $this->prefix); - $stm = $this->bd->prepare($sql); - $ok = $stm->execute(); - } catch (Exception $e) { - $ok = false; - Minz_Log::error(__METHOD__ . ' error: ' . $e->getMessage()); - } + + $ok = false; + try { + $ok = $this->pdo->exec(SQL_UPDATE_GUID_LATIN1_BIN) !== false; //FreshRSS 1.12 + } catch (Exception $e) { + $ok = false; + Minz_Log::error(__METHOD__ . ' error: ' . $e->getMessage()); } } return $ok; @@ -195,7 +212,7 @@ class FreshRSS_DatabaseDAO extends Minz_ModelPdo { $error = 'Error: SQLite import file is not readable: ' . $filename; } elseif ($clearFirst) { $userDAO->deleteUser(); - if ($this->bd->dbType() === 'sqlite') { + if ($this->pdo->dbType() === 'sqlite') { //We cannot just delete the .sqlite file otherwise PDO gets buggy. //SQLite is the only one with database-level optimization, instead of at table level. $this->optimize(); @@ -219,18 +236,17 @@ class FreshRSS_DatabaseDAO extends Minz_ModelPdo { try { $sqlite = new MinzPDOSQLite('sqlite:' . $filename); - $sqlite->exec('PRAGMA foreign_keys = ON;'); } catch (Exception $e) { $error = 'Error while initialising SQLite copy: ' . $e->getMessage(); return self::stdError($error); } Minz_ModelPdo::clean(); - $userDAOSQLite = new FreshRSS_UserDAO('', '', $sqlite); - $categoryDAOSQLite = new FreshRSS_CategoryDAO('', '', $sqlite); - $feedDAOSQLite = new FreshRSS_FeedDAOSQLite('', '', $sqlite); - $entryDAOSQLite = new FreshRSS_EntryDAOSQLite('', '', $sqlite); - $tagDAOSQLite = new FreshRSS_TagDAOSQLite('', '', $sqlite); + $userDAOSQLite = new FreshRSS_UserDAO('', $sqlite); + $categoryDAOSQLite = new FreshRSS_CategoryDAO('', $sqlite); + $feedDAOSQLite = new FreshRSS_FeedDAOSQLite('', $sqlite); + $entryDAOSQLite = new FreshRSS_EntryDAOSQLite('', $sqlite); + $tagDAOSQLite = new FreshRSS_TagDAOSQLite('', $sqlite); switch ($mode) { case self::SQLITE_EXPORT: diff --git a/app/Models/DatabaseDAOPGSQL.php b/app/Models/DatabaseDAOPGSQL.php index 8582b5719..60aceacc2 100644 --- a/app/Models/DatabaseDAOPGSQL.php +++ b/app/Models/DatabaseDAOPGSQL.php @@ -13,18 +13,18 @@ class FreshRSS_DatabaseDAOPGSQL extends FreshRSS_DatabaseDAOSQLite { $db = FreshRSS_Context::$system_conf->db; $dbowner = $db['user']; $sql = 'SELECT * FROM pg_catalog.pg_tables where tableowner=?'; - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); $values = array($dbowner); $stm->execute($values); $res = $stm->fetchAll(PDO::FETCH_ASSOC); $tables = array( - $this->prefix . 'category' => false, - $this->prefix . 'feed' => false, - $this->prefix . 'entry' => false, - $this->prefix . 'entrytmp' => false, - $this->prefix . 'tag' => false, - $this->prefix . 'entrytag' => false, + $this->pdo->prefix() . 'category' => false, + $this->pdo->prefix() . 'feed' => false, + $this->pdo->prefix() . 'entry' => false, + $this->pdo->prefix() . 'entrytmp' => false, + $this->pdo->prefix() . 'tag' => false, + $this->pdo->prefix() . 'entrytag' => false, ); foreach ($res as $value) { $tables[array_pop($value)] = true; @@ -35,8 +35,8 @@ class FreshRSS_DatabaseDAOPGSQL extends FreshRSS_DatabaseDAOSQLite { public function getSchema($table) { $sql = 'select column_name as field, data_type as type, column_default as default, is_nullable as null from INFORMATION_SCHEMA.COLUMNS where table_name = ?'; - $stm = $this->bd->prepare($sql); - $stm->execute(array($this->prefix . $table)); + $stm = $this->pdo->prepare($sql); + $stm->execute(array($this->pdo->prefix() . $table)); return $this->listDaoToSchema($stm->fetchAll(PDO::FETCH_ASSOC)); } @@ -53,7 +53,7 @@ class FreshRSS_DatabaseDAOPGSQL extends FreshRSS_DatabaseDAOSQLite { $db = FreshRSS_Context::$system_conf->db; $sql = 'SELECT pg_size_pretty(pg_database_size(?))'; $values = array($db['base']); - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); $stm->execute($values); $res = $stm->fetchAll(PDO::FETCH_COLUMN, 0); return $res[0]; @@ -64,12 +64,8 @@ class FreshRSS_DatabaseDAOPGSQL extends FreshRSS_DatabaseDAOSQLite { $tables = array('category', 'feed', 'entry', 'entrytmp', 'tag', 'entrytag'); foreach ($tables as $table) { - $sql = 'VACUUM `' . $this->prefix . $table . '`'; - $stm = $this->bd->prepare($sql); - $ok &= $stm != false; - if ($stm) { - $ok &= $stm->execute(); - } + $sql = 'VACUUM `_' . $table . '`'; + $ok &= ($this->pdo->exec($sql) !== false); } return $ok; } diff --git a/app/Models/DatabaseDAOSQLite.php b/app/Models/DatabaseDAOSQLite.php index a93a209b2..11900979e 100644 --- a/app/Models/DatabaseDAOSQLite.php +++ b/app/Models/DatabaseDAOSQLite.php @@ -6,17 +6,16 @@ class FreshRSS_DatabaseDAOSQLite extends FreshRSS_DatabaseDAO { public function tablesAreCorrect() { $sql = 'SELECT name FROM sqlite_master WHERE type="table"'; - $stm = $this->bd->prepare($sql); - $stm->execute(); + $stm = $this->pdo->query($sql); $res = $stm->fetchAll(PDO::FETCH_ASSOC); $tables = array( - 'category' => false, - 'feed' => false, - 'entry' => false, - 'entrytmp' => false, - 'tag' => false, - 'entrytag' => false, + $this->pdo->prefix() . 'category' => false, + $this->pdo->prefix() . 'feed' => false, + $this->pdo->prefix() . 'entry' => false, + $this->pdo->prefix() . 'entrytmp' => false, + $this->pdo->prefix() . 'tag' => false, + $this->pdo->prefix() . 'entrytag' => false, ); foreach ($res as $value) { $tables[$value['name']] = true; @@ -27,9 +26,7 @@ class FreshRSS_DatabaseDAOSQLite extends FreshRSS_DatabaseDAO { public function getSchema($table) { $sql = 'PRAGMA table_info(' . $table . ')'; - $stm = $this->bd->prepare($sql); - $stm->execute(); - + $stm = $this->pdo->query($sql); return $this->listDaoToSchema($stm->fetchAll(PDO::FETCH_ASSOC)); } @@ -61,11 +58,6 @@ class FreshRSS_DatabaseDAOSQLite extends FreshRSS_DatabaseDAO { } public function optimize() { - $sql = 'VACUUM'; - $stm = $this->bd->prepare($sql); - if ($stm) { - return $stm->execute(); - } - return false; + return $this->exec('VACUUM') !== false; } } diff --git a/app/Models/Entry.php b/app/Models/Entry.php index 3bb977283..d90f828bc 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -327,7 +327,7 @@ class FreshRSS_Entry extends Minz_Model { } $ch = curl_init(); - curl_setopt_array($ch, array( + curl_setopt_array($ch, [ CURLOPT_URL => $url, CURLOPT_REFERER => SimplePie_Misc::url_remove_credentials($url), CURLOPT_HTTPHEADER => array('Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'), @@ -337,13 +337,9 @@ class FreshRSS_Entry extends Minz_Model { //CURLOPT_FAILONERROR => true; CURLOPT_MAXREDIRS => 4, CURLOPT_RETURNTRANSFER => true, - )); - if (version_compare(PHP_VERSION, '5.6.0') >= 0 || ini_get('open_basedir') == '') { - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); //Keep option separated for open_basedir PHP bug 65646 - } - if (defined('CURLOPT_ENCODING')) { - curl_setopt($ch, CURLOPT_ENCODING, ''); //Enable all encodings - } + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_ENCODING => '', //Enable all encodings + ]); curl_setopt_array($ch, $system_conf->curl_options); if (isset($attributes['ssl_verify'])) { curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $attributes['ssl_verify'] ? 2 : 0); diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index b13c83d67..fbf160041 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -18,106 +18,22 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { return 'hex(' . $x . ')'; } - //TODO: Move the database auto-updates to DatabaseDAO - protected function addColumn($name) { - Minz_Log::warning('FreshRSS_EntryDAO::addColumn: ' . $name); - $hasTransaction = false; - try { - $stm = null; - if ($name === 'lastSeen') { //v1.1.1 - if (!$this->bd->inTransaction()) { - $this->bd->beginTransaction(); - $hasTransaction = true; - } - $stm = $this->bd->prepare('ALTER TABLE `' . $this->prefix . 'entry` ADD COLUMN `lastSeen` INT(11) DEFAULT 0'); - if ($stm && $stm->execute()) { - $stm = $this->bd->prepare('CREATE INDEX entry_lastSeen_index ON `' . $this->prefix . 'entry`(`lastSeen`);'); //"IF NOT EXISTS" does not exist in MySQL 5.7 - if ($stm && $stm->execute()) { - if ($hasTransaction) { - $this->bd->commit(); - } - return true; - } - } - if ($hasTransaction) { - $this->bd->rollBack(); - } - } elseif ($name === 'hash') { //v1.1.1 - $stm = $this->bd->prepare('ALTER TABLE `' . $this->prefix . 'entry` ADD COLUMN hash BINARY(16)'); - return $stm && $stm->execute(); - } - } catch (Exception $e) { - Minz_Log::error('FreshRSS_EntryDAO::addColumn error: ' . $e->getMessage()); - if ($hasTransaction) { - $this->bd->rollBack(); - } - } - return false; - } - - private $triedUpdateToUtf8mb4 = false; - - //TODO: Move the database auto-updates to DatabaseDAO - protected function updateToUtf8mb4() { - if ($this->triedUpdateToUtf8mb4) { - return false; - } - $this->triedUpdateToUtf8mb4 = true; - $db = FreshRSS_Context::$system_conf->db; - if ($this->bd->dbType() === 'mysql') { - include_once(APP_PATH . '/SQL/install.sql.mysql.php'); - if (defined('SQL_UPDATE_UTF8MB4')) { - Minz_Log::warning('Updating MySQL to UTF8MB4...'); //v1.5.0 - $hadTransaction = $this->bd->inTransaction(); - if ($hadTransaction) { - $this->bd->commit(); - } - $ok = false; - try { - $sql = sprintf(SQL_UPDATE_UTF8MB4, $this->prefix, $db['base']); - $stm = $this->bd->prepare($sql); - $ok = $stm->execute(); - } catch (Exception $e) { - Minz_Log::error('FreshRSS_EntryDAO::updateToUtf8mb4 error: ' . $e->getMessage()); - } - if ($hadTransaction) { - $this->bd->beginTransaction(); - //NB: Transaction not starting. Why? (tested on PHP 7.0.8-0ubuntu and MySQL 5.7.13-0ubuntu) - } - return $ok; - } - } - return false; - } - //TODO: Move the database auto-updates to DatabaseDAO protected function createEntryTempTable() { $ok = false; - $hadTransaction = $this->bd->inTransaction(); + $hadTransaction = $this->pdo->inTransaction(); if ($hadTransaction) { - $this->bd->commit(); + $this->pdo->commit(); } try { - require_once(APP_PATH . '/SQL/install.sql.' . $this->bd->dbType() . '.php'); + require_once(APP_PATH . '/SQL/install.sql.' . $this->pdo->dbType() . '.php'); Minz_Log::warning('SQL CREATE TABLE entrytmp...'); - if (defined('SQL_CREATE_TABLE_ENTRYTMP')) { - $sql = sprintf(SQL_CREATE_TABLE_ENTRYTMP, $this->prefix); - $stm = $this->bd->prepare($sql); - $ok = $stm && $stm->execute(); - } else { - global $SQL_CREATE_TABLE_ENTRYTMP; - $ok = !empty($SQL_CREATE_TABLE_ENTRYTMP); - foreach ($SQL_CREATE_TABLE_ENTRYTMP as $instruction) { - $sql = sprintf($instruction, $this->prefix); - $stm = $this->bd->prepare($sql); - $ok &= $stm && $stm->execute(); - } - } + $ok = $this->pdo->exec(SQL_CREATE_TABLE_ENTRYTMP) !== false; } catch (Exception $e) { Minz_Log::error('FreshRSS_EntryDAO::createEntryTempTable error: ' . $e->getMessage()); } if ($hadTransaction) { - $this->bd->beginTransaction(); + $this->pdo->beginTransaction(); } return $ok; } @@ -125,14 +41,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { //TODO: Move the database auto-updates to DatabaseDAO protected function autoUpdateDb($errorInfo) { if (isset($errorInfo[0])) { - if ($errorInfo[0] === FreshRSS_DatabaseDAO::ER_BAD_FIELD_ERROR) { - //autoAddColumn - foreach (array('lastSeen', 'hash') as $column) { - if (stripos($errorInfo[2], $column) !== false) { - return $this->addColumn($column); - } - } - } elseif ($errorInfo[0] === FreshRSS_DatabaseDAO::ER_BAD_TABLE_ERROR) { + if ($errorInfo[0] === FreshRSS_DatabaseDAO::ER_BAD_TABLE_ERROR) { if (stripos($errorInfo[2], 'tag') !== false) { $tagDAO = FreshRSS_Factory::createTagDao(); return $tagDAO->createTagTable(); //v1.12.0 @@ -141,11 +50,6 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } } } - if (isset($errorInfo[1])) { - if ($errorInfo[1] == FreshRSS_DatabaseDAO::ER_TRUNCATED_WRONG_VALUE_FOR_FIELD) { - return $this->updateToUtf8mb4(); //v1.5.0 - } - } return false; } @@ -153,7 +57,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { public function addEntry($valuesTmp, $useTmpTable = true) { if ($this->addEntryPrepared == null) { - $sql = 'INSERT INTO `' . $this->prefix . ($useTmpTable ? 'entrytmp' : 'entry') . '` (id, guid, title, author, ' + $sql = 'INSERT INTO `_' . ($useTmpTable ? 'entrytmp' : 'entry') . '` (id, guid, title, author, ' . ($this->isCompressed() ? 'content_bin' : 'content') . ', link, date, `lastSeen`, hash, is_read, is_favorite, id_feed, tags) ' . 'VALUES(:id, :guid, :title, :author, ' @@ -161,7 +65,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { . ', :link, :date, :last_seen, ' . $this->sqlHexDecode(':hash') . ', :is_read, :is_favorite, :id_feed, :tags)'; - $this->addEntryPrepared = $this->bd->prepare($sql); + $this->addEntryPrepared = $this->pdo->prepare($sql); } if ($this->addEntryPrepared) { $this->addEntryPrepared->bindParam(':id', $valuesTmp['id']); @@ -212,22 +116,26 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } public function commitNewEntries() { - $sql = 'SET @rank=(SELECT MAX(id) - COUNT(*) FROM `' . $this->prefix . 'entrytmp`); ' . //MySQL-specific - 'INSERT IGNORE INTO `' . $this->prefix . 'entry` - ( - id, guid, title, author, content_bin, link, date, `lastSeen`, hash, is_read, is_favorite, id_feed, tags - ) ' . - 'SELECT @rank:=@rank+1 AS id, guid, title, author, content_bin, link, date, `lastSeen`, hash, is_read, is_favorite, id_feed, tags - FROM `' . $this->prefix . 'entrytmp` - ORDER BY date; ' . - 'DELETE FROM `' . $this->prefix . 'entrytmp` WHERE id <= @rank;'; - $hadTransaction = $this->bd->inTransaction(); + $sql = <<<'SQL' +SET @rank=(SELECT MAX(id) - COUNT(*) FROM `_entrytmp`); + +INSERT IGNORE INTO `_entry` ( + id, guid, title, author, content_bin, link, date, `lastSeen`, + hash, is_read, is_favorite, id_feed, tags +) +SELECT @rank:=@rank+1 AS id, guid, title, author, content_bin, link, date, `lastSeen`, hash, is_read, is_favorite, id_feed, tags +FROM `_entrytmp` +ORDER BY date; + +DELETE FROM `_entrytmp` WHERE id <= @rank;'; +SQL; + $hadTransaction = $this->pdo->inTransaction(); if (!$hadTransaction) { - $this->bd->beginTransaction(); + $this->pdo->beginTransaction(); } - $result = $this->bd->exec($sql) !== false; + $result = $this->pdo->exec($sql) !== false; if (!$hadTransaction) { - $this->bd->commit(); + $this->pdo->commit(); } return $result; } @@ -240,7 +148,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } if ($this->updateEntryPrepared === null) { - $sql = 'UPDATE `' . $this->prefix . 'entry` ' + $sql = 'UPDATE `_entry` ' . 'SET title=:title, author=:author, ' . ($this->isCompressed() ? 'content_bin=COMPRESS(:content)' : 'content=:content') . ', link=:link, date=:date, `lastSeen`=:last_seen, ' @@ -248,7 +156,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { . ', ' . ($valuesTmp['is_read'] === null ? '' : 'is_read=:is_read, ') . 'tags=:tags ' . 'WHERE id_feed=:id_feed AND guid=:guid'; - $this->updateEntryPrepared = $this->bd->prepare($sql); + $this->updateEntryPrepared = $this->pdo->prepare($sql); } $valuesTmp['guid'] = substr($valuesTmp['guid'], 0, 760); @@ -309,12 +217,12 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { return 0; } FreshRSS_UserDAO::touch(); - $sql = 'UPDATE `' . $this->prefix . 'entry` ' + $sql = 'UPDATE `_entry` ' . 'SET is_favorite=? ' . 'WHERE id IN (' . str_repeat('?,', count($ids) - 1). '?)'; $values = array($is_favorite ? 1 : 0); $values = array_merge($values, $ids); - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); if ($stm && $stm->execute($values)) { return $stm->rowCount(); } else { @@ -336,11 +244,11 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { * @return boolean */ protected function updateCacheUnreads($catId = false, $feedId = false) { - $sql = 'UPDATE `' . $this->prefix . 'feed` f ' + $sql = 'UPDATE `_feed` f ' . 'LEFT OUTER JOIN (' . 'SELECT e.id_feed, ' . 'COUNT(*) AS nbUnreads ' - . 'FROM `' . $this->prefix . 'entry` e ' + . 'FROM `_entry` e ' . 'WHERE e.is_read=0 ' . 'GROUP BY e.id_feed' . ') x ON x.id_feed=f.id ' @@ -359,7 +267,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $sql .= ' f.category=?'; $values[] = $catId; } - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); if ($stm && $stm->execute($values)) { return true; } else { @@ -393,12 +301,12 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { return $affected; } - $sql = 'UPDATE `' . $this->prefix . 'entry` ' + $sql = 'UPDATE `_entry` ' . 'SET is_read=? ' . 'WHERE id IN (' . str_repeat('?,', count($ids) - 1). '?)'; $values = array($is_read ? 1 : 0); $values = array_merge($values, $ids); - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); if (!($stm && $stm->execute($values))) { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); Minz_Log::error('SQL error markRead: ' . $info[2]); @@ -410,12 +318,12 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } return $affected; } else { - $sql = 'UPDATE `' . $this->prefix . 'entry` e INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed=f.id ' + $sql = 'UPDATE `_entry` e INNER JOIN `_feed` f ON e.id_feed=f.id ' . 'SET e.is_read=?,' . 'f.`cache_nbUnreads`=f.`cache_nbUnreads`' . ($is_read ? '-' : '+') . '1 ' . 'WHERE e.id=? AND e.is_read=?'; $values = array($is_read ? 1 : 0, $ids, $is_read ? 0 : 1); - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); if ($stm && $stm->execute($values)) { return $stm->rowCount(); } else { @@ -454,7 +362,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { Minz_Log::debug('Calling markReadEntries(0) is deprecated!'); } - $sql = 'UPDATE `' . $this->prefix . 'entry` e INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed=f.id ' + $sql = 'UPDATE `_entry` e INNER JOIN `_feed` f ON e.id_feed=f.id ' . 'SET e.is_read=? ' . 'WHERE e.is_read <> ? AND e.id <= ?'; if ($onlyFavorites) { @@ -466,7 +374,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { list($searchValues, $search) = $this->sqlListEntriesWhere('e.', $filters, $state); - $stm = $this->bd->prepare($sql . $search); + $stm = $this->pdo->prepare($sql . $search); if (!($stm && $stm->execute(array_merge($values, $searchValues)))) { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); Minz_Log::error('SQL error markReadEntries: ' . $info[2]); @@ -497,14 +405,14 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { Minz_Log::debug('Calling markReadCat(0) is deprecated!'); } - $sql = 'UPDATE `' . $this->prefix . 'entry` e INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed=f.id ' + $sql = 'UPDATE `_entry` e INNER JOIN `_feed` f ON e.id_feed=f.id ' . 'SET e.is_read=? ' . 'WHERE f.category=? AND e.is_read <> ? AND e.id <= ?'; $values = array($is_read ? 1 : 0, $id, $is_read ? 1 : 0, $idMax); list($searchValues, $search) = $this->sqlListEntriesWhere('e.', $filters, $state); - $stm = $this->bd->prepare($sql . $search); + $stm = $this->pdo->prepare($sql . $search); if (!($stm && $stm->execute(array_merge($values, $searchValues)))) { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); Minz_Log::error('SQL error markReadCat: ' . $info[2]); @@ -534,39 +442,39 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $idMax = time() . '000000'; Minz_Log::debug('Calling markReadFeed(0) is deprecated!'); } - $this->bd->beginTransaction(); + $this->pdo->beginTransaction(); - $sql = 'UPDATE `' . $this->prefix . 'entry` ' + $sql = 'UPDATE `_entry` ' . 'SET is_read=? ' . 'WHERE id_feed=? AND is_read <> ? AND id <= ?'; $values = array($is_read ? 1 : 0, $id_feed, $is_read ? 1 : 0, $idMax); list($searchValues, $search) = $this->sqlListEntriesWhere('', $filters, $state); - $stm = $this->bd->prepare($sql . $search); + $stm = $this->pdo->prepare($sql . $search); if (!($stm && $stm->execute(array_merge($values, $searchValues)))) { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); Minz_Log::error('SQL error markReadFeed: ' . $info[2] . ' with SQL: ' . $sql . $search); - $this->bd->rollBack(); + $this->pdo->rollBack(); return false; } $affected = $stm->rowCount(); if ($affected > 0) { - $sql = 'UPDATE `' . $this->prefix . 'feed` ' + $sql = 'UPDATE `_feed` ' . 'SET `cache_nbUnreads`=`cache_nbUnreads`-' . $affected - . ' WHERE id=?'; - $values = array($id_feed); - $stm = $this->bd->prepare($sql); + . ' WHERE id=:id'; + $stm = $this->pdo->prepare($sql); + $stm->bindParam(':id', $id_feed, PDO::PARAM_INT); if (!($stm && $stm->execute($values))) { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); Minz_Log::error('SQL error markReadFeed cache: ' . $info[2]); - $this->bd->rollBack(); + $this->pdo->rollBack(); return false; } } - $this->bd->commit(); + $this->pdo->commit(); return $affected; } @@ -583,7 +491,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { Minz_Log::debug('Calling markReadTag(0) is deprecated!'); } - $sql = 'UPDATE `' . $this->prefix . 'entry` e INNER JOIN `' . $this->prefix . 'entrytag` et ON et.id_entry = e.id ' + $sql = 'UPDATE `_entry` e INNER JOIN `_entrytag` et ON et.id_entry = e.id ' . 'SET e.is_read = ? ' . 'WHERE ' . ($id == '' ? '' : 'et.id_tag = ? AND ') @@ -597,7 +505,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { list($searchValues, $search) = $this->sqlListEntriesWhere('e.', $filters, $state); - $stm = $this->bd->prepare($sql . $search); + $stm = $this->pdo->prepare($sql . $search); if (!($stm && $stm->execute(array_merge($values, $searchValues)))) { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); Minz_Log::error('SQL error markReadTag: ' . $info[2]); @@ -611,18 +519,20 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } public function cleanOldEntries($id_feed, $date_min, $keep = 15) { //Remember to call updateCachedValue($id_feed) or updateCachedValues() just after - $sql = 'DELETE FROM `' . $this->prefix . 'entry` ' - . 'WHERE id_feed=:id_feed AND id<=:id_max ' + $sql = 'DELETE FROM `_entry` ' + . 'WHERE id_feed=:id_feed1 AND id<=:id_max ' . 'AND is_favorite=0 ' //Do not remove favourites - . 'AND `lastSeen` < (SELECT maxLastSeen FROM (SELECT (MAX(e3.`lastSeen`)-99) AS maxLastSeen FROM `' . $this->prefix . 'entry` e3 WHERE e3.id_feed=:id_feed) recent) ' //Do not remove the most newly seen articles, plus a few seconds of tolerance - . 'AND id NOT IN (SELECT id_entry FROM `' . $this->prefix . 'entrytag`) ' //Do not purge tagged entries - . 'AND id NOT IN (SELECT id FROM (SELECT e2.id FROM `' . $this->prefix . 'entry` e2 WHERE e2.id_feed=:id_feed ORDER BY id DESC LIMIT :keep) keep)'; //Double select: MySQL doesn't support 'LIMIT & IN/ALL/ANY/SOME subquery' - $stm = $this->bd->prepare($sql); + . 'AND `lastSeen` < (SELECT maxLastSeen FROM (SELECT (MAX(e3.`lastSeen`)-99) AS maxLastSeen FROM `_entry` e3 WHERE e3.id_feed=:id_feed2) recent) ' //Do not remove the most newly seen articles, plus a few seconds of tolerance + . 'AND id NOT IN (SELECT id_entry FROM `_entrytag`) ' //Do not purge tagged entries + . 'AND id NOT IN (SELECT id FROM (SELECT e2.id FROM `_entry` e2 WHERE e2.id_feed=:id_feed3 ORDER BY id DESC LIMIT :keep) keep)'; //Double select: MySQL doesn't support 'LIMIT & IN/ALL/ANY/SOME subquery' + $stm = $this->pdo->prepare($sql); if ($stm) { $id_max = intval($date_min) . '000000'; - $stm->bindParam(':id_feed', $id_feed, PDO::PARAM_INT); $stm->bindParam(':id_max', $id_max, PDO::PARAM_STR); + $stm->bindParam(':id_feed1', $id_feed, PDO::PARAM_INT); + $stm->bindParam(':id_feed2', $id_feed, PDO::PARAM_INT); + $stm->bindParam(':id_feed3', $id_feed, PDO::PARAM_INT); $stm->bindParam(':keep', $keep, PDO::PARAM_INT); } @@ -642,9 +552,8 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $sql = 'SELECT id, guid, title, author, ' . ($this->isCompressed() ? 'UNCOMPRESS(content_bin) AS content' : 'content') . ', link, date, `lastSeen`, ' . $this->sqlHexEncode('hash') . ' AS hash, is_read, is_favorite, id_feed, tags ' - . 'FROM `' . $this->prefix . 'entry`'; - $stm = $this->bd->prepare($sql); - $stm->execute(); + . 'FROM `_entry`'; + $stm = $this->pdo->query($sql); while ($row = $stm->fetch(PDO::FETCH_ASSOC)) { yield $row; } @@ -655,15 +564,11 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $sql = 'SELECT id, guid, title, author, ' . ($this->isCompressed() ? 'UNCOMPRESS(content_bin) AS content' : 'content') . ', link, date, is_read, is_favorite, id_feed, tags ' - . 'FROM `' . $this->prefix . 'entry` WHERE id_feed=? AND guid=?'; - $stm = $this->bd->prepare($sql); - - $values = array( - $id_feed, - $guid, - ); - - $stm->execute($values); + . 'FROM `_entry` WHERE id_feed=:id_feed AND guid=:guid'; + $stm = $this->pdo->prepare($sql); + $stm->bindParam(':id_feed', $id_feed, PDO::PARAM_INT); + $stm->bindParam(':guid', $guid); + $stm->execute(); $res = $stm->fetchAll(PDO::FETCH_ASSOC); $entries = self::daoToEntries($res); return isset($entries[0]) ? $entries[0] : null; @@ -673,22 +578,21 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $sql = 'SELECT id, guid, title, author, ' . ($this->isCompressed() ? 'UNCOMPRESS(content_bin) AS content' : 'content') . ', link, date, is_read, is_favorite, id_feed, tags ' - . 'FROM `' . $this->prefix . 'entry` WHERE id=?'; - $stm = $this->bd->prepare($sql); - - $values = array($id); - - $stm->execute($values); + . 'FROM `_entry` WHERE id=:id'; + $stm = $this->pdo->prepare($sql); + $stm->bindParam(':id', $id, PDO::PARAM_INT); + $stm->execute(); $res = $stm->fetchAll(PDO::FETCH_ASSOC); $entries = self::daoToEntries($res); return isset($entries[0]) ? $entries[0] : null; } public function searchIdByGuid($id_feed, $guid) { - $sql = 'SELECT id FROM `' . $this->prefix . 'entry` WHERE id_feed=? AND guid=?'; - $stm = $this->bd->prepare($sql); - $values = array($id_feed, $guid); - $stm->execute($values); + $sql = 'SELECT id FROM `_entry` WHERE id_feed=:id_feed AND guid=:guid'; + $stm = $this->pdo->prepare($sql); + $stm->bindParam(':id_feed', $id_feed, PDO::PARAM_INT); + $stm->bindParam(':guid', $guid); + $stm->execute(); $res = $stm->fetchAll(PDO::FETCH_COLUMN, 0); return isset($res[0]) ? $res[0] : null; } @@ -872,7 +776,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $where .= '1=1 '; break; case 'ST': //Starred or tagged - $where .= 'e.is_favorite=1 OR EXISTS (SELECT et2.id_tag FROM `' . $this->prefix . 'entrytag` et2 WHERE et2.id_entry = e.id) '; + $where .= 'e.is_favorite=1 OR EXISTS (SELECT et2.id_tag FROM `_entrytag` et2 WHERE et2.id_entry = e.id) '; break; default: throw new FreshRSS_EntriesGetter_Exception('Bad type in Entry->listByType: [' . $type . ']!'); @@ -883,9 +787,9 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { return array(array_merge($values, $searchValues), 'SELECT ' . ($type === 'T' ? 'DISTINCT ' : '') - . 'e.id FROM `' . $this->prefix . 'entry` e ' - . 'INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed = f.id ' - . ($type === 't' || $type === 'T' ? 'INNER JOIN `' . $this->prefix . 'entrytag` et ON et.id_entry = e.id ' : '') + . 'e.id FROM `_entry` e ' + . 'INNER JOIN `_feed` f ON e.id_feed = f.id ' + . ($type === 't' || $type === 'T' ? 'INNER JOIN `_entrytag` et ON et.id_entry = e.id ' : '') . 'WHERE ' . $where . $search . 'ORDER BY e.id ' . $order @@ -898,13 +802,13 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $sql = 'SELECT e0.id, e0.guid, e0.title, e0.author, ' . ($this->isCompressed() ? 'UNCOMPRESS(content_bin) AS content' : 'content') . ', e0.link, e0.date, e0.is_read, e0.is_favorite, e0.id_feed, e0.tags ' - . 'FROM `' . $this->prefix . 'entry` e0 ' + . 'FROM `_entry` e0 ' . 'INNER JOIN (' . $sql . ') e2 ON e2.id=e0.id ' . 'ORDER BY e0.id ' . $order; - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); if ($stm && $stm->execute($values)) { return $stm; } else { @@ -931,11 +835,11 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $sql = 'SELECT id, guid, title, author, ' . ($this->isCompressed() ? 'UNCOMPRESS(content_bin) AS content' : 'content') . ', link, date, is_read, is_favorite, id_feed, tags ' - . 'FROM `' . $this->prefix . 'entry` ' + . 'FROM `_entry` ' . 'WHERE id IN (' . str_repeat('?,', count($ids) - 1). '?) ' . 'ORDER BY id ' . $order; - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); $stm->execute($ids); return self::daoToEntries($stm->fetchAll(PDO::FETCH_ASSOC)); } @@ -943,7 +847,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { public function listIdsWhere($type = 'a', $id = '', $state = FreshRSS_Entry::STATE_ALL, $order = 'DESC', $limit = 1, $firstId = '', $filters = null) { //For API list($values, $sql) = $this->sqlListWhere($type, $id, $state, $order, $limit, $firstId, $filters); - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); $stm->execute($values); return $stm->fetchAll(PDO::FETCH_COLUMN, 0); @@ -954,8 +858,8 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { return array(); } $guids = array_unique($guids); - $sql = 'SELECT guid, ' . $this->sqlHexEncode('hash') . ' AS hex_hash FROM `' . $this->prefix . 'entry` WHERE id_feed=? AND guid IN (' . str_repeat('?,', count($guids) - 1). '?)'; - $stm = $this->bd->prepare($sql); + $sql = 'SELECT guid, ' . $this->sqlHexEncode('hash') . ' AS hex_hash FROM `_entry` WHERE id_feed=? AND guid IN (' . str_repeat('?,', count($guids) - 1). '?)'; + $stm = $this->pdo->prepare($sql); $values = array($id_feed); $values = array_merge($values, $guids); if ($stm && $stm->execute($values)) { @@ -980,8 +884,8 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { if (count($guids) < 1) { return 0; } - $sql = 'UPDATE `' . $this->prefix . 'entry` SET `lastSeen`=? WHERE id_feed=? AND guid IN (' . str_repeat('?,', count($guids) - 1). '?)'; - $stm = $this->bd->prepare($sql); + $sql = 'UPDATE `_entry` SET `lastSeen`=? WHERE id_feed=? AND guid IN (' . str_repeat('?,', count($guids) - 1). '?)'; + $stm = $this->pdo->prepare($sql); if ($mtime <= 0) { $mtime = time(); } @@ -1001,68 +905,67 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } public function countUnreadRead() { - $sql = 'SELECT COUNT(e.id) AS count FROM `' . $this->prefix . 'entry` e INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed=f.id WHERE f.priority > 0' - . ' UNION SELECT COUNT(e.id) AS count FROM `' . $this->prefix . 'entry` e INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed=f.id WHERE f.priority > 0 AND e.is_read=0'; - $stm = $this->bd->prepare($sql); - if ($stm == false) { + $sql = 'SELECT COUNT(e.id) AS count FROM `_entry` e INNER JOIN `_feed` f ON e.id_feed=f.id WHERE f.priority > 0' + . ' UNION SELECT COUNT(e.id) AS count FROM `_entry` e INNER JOIN `_feed` f ON e.id_feed=f.id WHERE f.priority > 0 AND e.is_read=0'; + $stm = $this->pdo->query($sql); + if ($stm === false) { return false; } - $stm->execute(); $res = $stm->fetchAll(PDO::FETCH_COLUMN, 0); rsort($res); $all = empty($res[0]) ? 0 : $res[0]; $unread = empty($res[1]) ? 0 : $res[1]; return array('all' => $all, 'unread' => $unread, 'read' => $all - $unread); } + public function count($minPriority = null) { - $sql = 'SELECT COUNT(e.id) AS count FROM `' . $this->prefix . 'entry` e'; + $sql = 'SELECT COUNT(e.id) AS count FROM `_entry` e'; if ($minPriority !== null) { - $sql .= ' INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed=f.id'; + $sql .= ' INNER JOIN `_feed` f ON e.id_feed=f.id'; $sql .= ' WHERE f.priority > ' . intval($minPriority); } - $stm = $this->bd->prepare($sql); - $stm->execute(); + $stm = $this->pdo->query($sql); $res = $stm->fetchAll(PDO::FETCH_COLUMN, 0); return isset($res[0]) ? $res[0] : 0; } + public function countNotRead($minPriority = null) { - $sql = 'SELECT COUNT(e.id) AS count FROM `' . $this->prefix . 'entry` e'; + $sql = 'SELECT COUNT(e.id) AS count FROM `_entry` e'; if ($minPriority !== null) { - $sql .= ' INNER JOIN `' . $this->prefix . 'feed` f ON e.id_feed=f.id'; + $sql .= ' INNER JOIN `_feed` f ON e.id_feed=f.id'; } $sql .= ' WHERE e.is_read=0'; if ($minPriority !== null) { $sql .= ' AND f.priority > ' . intval($minPriority); } - $stm = $this->bd->prepare($sql); - $stm->execute(); + $stm = $this->pdo->query($sql); $res = $stm->fetchAll(PDO::FETCH_COLUMN, 0); return $res[0]; } public function countUnreadReadFavorites() { - $sql = <<prefix}entry` AS e1 - JOIN `{$this->prefix}feed` AS f1 ON e1.id_feed = f1.id - WHERE e1.is_favorite = 1 - AND f1.priority >= :priority_normal - UNION - SELECT COUNT(e2.id) AS c - , 2 AS o - FROM `{$this->prefix}entry` AS e2 - JOIN `{$this->prefix}feed` AS f2 ON e2.id_feed = f2.id - WHERE e2.is_favorite = 1 - AND e2.is_read = 0 - AND f2.priority >= :priority_normal - ) u + $sql = <<<'SQL' +SELECT c FROM ( + SELECT COUNT(e1.id) AS c, 1 AS o + FROM `_entry` AS e1 + JOIN `_feed` AS f1 ON e1.id_feed = f1.id + WHERE e1.is_favorite = 1 + AND f1.priority >= :priority_normal1 + UNION + SELECT COUNT(e2.id) AS c, 2 AS o + FROM `_entry` AS e2 + JOIN `_feed` AS f2 ON e2.id_feed = f2.id + WHERE e2.is_favorite = 1 + AND e2.is_read = 0 + AND f2.priority >= :priority_normal2 + ) u ORDER BY o SQL; - $stm = $this->bd->prepare($sql); - $stm->execute(array(':priority_normal' => FreshRSS_Feed::PRIORITY_NORMAL)); + $stm = $this->pdo->prepare($sql); + //Binding a value more than once is not standard and does not work with native prepared statements (e.g. MySQL) https://bugs.php.net/bug.php?id=40417 + $stm->bindValue(':priority_normal1', FreshRSS_Feed::PRIORITY_NORMAL, PDO::PARAM_INT); + $stm->bindValue(':priority_normal2', FreshRSS_Feed::PRIORITY_NORMAL, PDO::PARAM_INT); + $stm->execute(); $res = $stm->fetchAll(PDO::FETCH_COLUMN, 0); rsort($res); $all = empty($res[0]) ? 0 : $res[0]; diff --git a/app/Models/EntryDAOPGSQL.php b/app/Models/EntryDAOPGSQL.php index e90aa8332..9afea279f 100644 --- a/app/Models/EntryDAOPGSQL.php +++ b/app/Models/EntryDAOPGSQL.php @@ -35,25 +35,27 @@ class FreshRSS_EntryDAOPGSQL extends FreshRSS_EntryDAOSQLite { public function commitNewEntries() { $sql = 'DO $$ DECLARE -maxrank bigint := (SELECT MAX(id) FROM `' . $this->prefix . 'entrytmp`); -rank bigint := (SELECT maxrank - COUNT(*) FROM `' . $this->prefix . 'entrytmp`); +maxrank bigint := (SELECT MAX(id) FROM `_entrytmp`); +rank bigint := (SELECT maxrank - COUNT(*) FROM `_entrytmp`); BEGIN - INSERT INTO `' . $this->prefix . 'entry` (id, guid, title, author, content, link, date, `lastSeen`, hash, is_read, is_favorite, id_feed, tags) - (SELECT rank + row_number() OVER(ORDER BY date) AS id, guid, title, author, content, link, date, `lastSeen`, hash, is_read, is_favorite, id_feed, tags - FROM `' . $this->prefix . 'entrytmp` AS etmp + INSERT INTO `_entry` + (id, guid, title, author, content, link, date, `lastSeen`, hash, is_read, is_favorite, id_feed, tags) + (SELECT rank + row_number() OVER(ORDER BY date) AS id, guid, title, author, content, + link, date, `lastSeen`, hash, is_read, is_favorite, id_feed, tags + FROM `_entrytmp` AS etmp WHERE NOT EXISTS ( - SELECT 1 FROM `' . $this->prefix . 'entry` AS ereal + SELECT 1 FROM `_entry` AS ereal WHERE (etmp.id = ereal.id) OR (etmp.id_feed = ereal.id_feed AND etmp.guid = ereal.guid)) ORDER BY date); - DELETE FROM `' . $this->prefix . 'entrytmp` WHERE id <= maxrank; + DELETE FROM `_entrytmp` WHERE id <= maxrank; END $$;'; - $hadTransaction = $this->bd->inTransaction(); + $hadTransaction = $this->pdo->inTransaction(); if (!$hadTransaction) { - $this->bd->beginTransaction(); + $this->pdo->beginTransaction(); } - $result = $this->bd->exec($sql) !== false; + $result = $this->pdo->exec($sql) !== false; if (!$hadTransaction) { - $this->bd->commit(); + $this->pdo->commit(); } return $result; } diff --git a/app/Models/EntryDAOSQLite.php b/app/Models/EntryDAOSQLite.php index f53685e35..d9abefc4b 100644 --- a/app/Models/EntryDAOSQLite.php +++ b/app/Models/EntryDAOSQLite.php @@ -15,27 +15,19 @@ class FreshRSS_EntryDAOSQLite extends FreshRSS_EntryDAO { } protected function autoUpdateDb($errorInfo) { - if ($tableInfo = $this->bd->query("SELECT sql FROM sqlite_master where name='tag'")) { + if ($tableInfo = $this->pdo->query("SELECT sql FROM sqlite_master where name='tag'")) { $showCreate = $tableInfo->fetchColumn(); if (stripos($showCreate, 'tag') === false) { $tagDAO = FreshRSS_Factory::createTagDao(); return $tagDAO->createTagTable(); //v1.12.0 } } - if ($tableInfo = $this->bd->query("SELECT sql FROM sqlite_master where name='entrytmp'")) { + if ($tableInfo = $this->pdo->query("SELECT sql FROM sqlite_master where name='entrytmp'")) { $showCreate = $tableInfo->fetchColumn(); if (stripos($showCreate, 'entrytmp') === false) { return $this->createEntryTempTable(); //v1.7.0 } } - if ($tableInfo = $this->bd->query("SELECT sql FROM sqlite_master where name='entry'")) { - $showCreate = $tableInfo->fetchColumn(); - foreach (array('lastSeen', 'hash') as $column) { - if (stripos($showCreate, $column) === false) { - return $this->addColumn($column); - } - } - } return false; } @@ -44,27 +36,27 @@ class FreshRSS_EntryDAOSQLite extends FreshRSS_EntryDAO { DROP TABLE IF EXISTS `tmp`; CREATE TEMP TABLE `tmp` AS SELECT id, guid, title, author, content, link, date, `lastSeen`, hash, is_read, is_favorite, id_feed, tags - FROM `' . $this->prefix . 'entrytmp` + FROM `_entrytmp` ORDER BY date; -INSERT OR IGNORE INTO `' . $this->prefix . 'entry` +INSERT OR IGNORE INTO `_entry` (id, guid, title, author, content, link, date, `lastSeen`, hash, is_read, is_favorite, id_feed, tags) SELECT rowid + (SELECT MAX(id) - COUNT(*) FROM `tmp`) AS id, guid, title, author, content, link, date, `lastSeen`, hash, is_read, is_favorite, id_feed, tags FROM `tmp` ORDER BY date; -DELETE FROM `' . $this->prefix . 'entrytmp` WHERE id <= (SELECT MAX(id) FROM `tmp`); +DELETE FROM `_entrytmp` WHERE id <= (SELECT MAX(id) FROM `tmp`); DROP TABLE IF EXISTS `tmp`; '; - $hadTransaction = $this->bd->inTransaction(); + $hadTransaction = $this->pdo->inTransaction(); if (!$hadTransaction) { - $this->bd->beginTransaction(); + $this->pdo->beginTransaction(); } - $result = $this->bd->exec($sql) !== false; + $result = $this->pdo->exec($sql) !== false; if (!$result) { - Minz_Log::error('SQL error commitNewEntries: ' . json_encode($this->bd->errorInfo())); + Minz_Log::error('SQL error commitNewEntries: ' . json_encode($this->pdo->errorInfo())); } if (!$hadTransaction) { - $this->bd->commit(); + $this->pdo->commit(); } return $result; } @@ -74,10 +66,10 @@ DROP TABLE IF EXISTS `tmp`; } protected function updateCacheUnreads($catId = false, $feedId = false) { - $sql = 'UPDATE `' . $this->prefix . 'feed` ' + $sql = 'UPDATE `_feed` ' . 'SET `cache_nbUnreads`=(' - . 'SELECT COUNT(*) AS nbUnreads FROM `' . $this->prefix . 'entry` e ' - . 'WHERE e.id_feed=`' . $this->prefix . 'feed`.id AND e.is_read=0)'; + . 'SELECT COUNT(*) AS nbUnreads FROM `_entry` e ' + . 'WHERE e.id_feed=`_feed`.id AND e.is_read=0)'; $hasWhere = false; $values = array(); if ($feedId !== false) { @@ -92,7 +84,7 @@ DROP TABLE IF EXISTS `tmp`; $sql .= ' category=?'; $values[] = $catId; } - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); if ($stm && $stm->execute($values)) { return true; } else { @@ -126,30 +118,30 @@ DROP TABLE IF EXISTS `tmp`; return $affected; } } else { - $this->bd->beginTransaction(); - $sql = 'UPDATE `' . $this->prefix . 'entry` SET is_read=? WHERE id=? AND is_read=?'; + $this->pdo->beginTransaction(); + $sql = 'UPDATE `_entry` SET is_read=? WHERE id=? AND is_read=?'; $values = array($is_read ? 1 : 0, $ids, $is_read ? 0 : 1); - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); if (!($stm && $stm->execute($values))) { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); Minz_Log::error('SQL error markRead 1: ' . $info[2]); - $this->bd->rollBack(); + $this->pdo->rollBack(); return false; } $affected = $stm->rowCount(); if ($affected > 0) { - $sql = 'UPDATE `' . $this->prefix . 'feed` SET `cache_nbUnreads`=`cache_nbUnreads`' . ($is_read ? '-' : '+') . '1 ' - . 'WHERE id=(SELECT e.id_feed FROM `' . $this->prefix . 'entry` e WHERE e.id=?)'; + $sql = 'UPDATE `_feed` SET `cache_nbUnreads`=`cache_nbUnreads`' . ($is_read ? '-' : '+') . '1 ' + . 'WHERE id=(SELECT e.id_feed FROM `_entry` e WHERE e.id=?)'; $values = array($ids); - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); if (!($stm && $stm->execute($values))) { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); Minz_Log::error('SQL error markRead 2: ' . $info[2]); - $this->bd->rollBack(); + $this->pdo->rollBack(); return false; } } - $this->bd->commit(); + $this->pdo->commit(); return $affected; } } @@ -182,17 +174,17 @@ DROP TABLE IF EXISTS `tmp`; Minz_Log::debug('Calling markReadEntries(0) is deprecated!'); } - $sql = 'UPDATE `' . $this->prefix . 'entry` SET is_read = ? WHERE is_read <> ? AND id <= ?'; + $sql = 'UPDATE `_entry` SET is_read = ? WHERE is_read <> ? AND id <= ?'; if ($onlyFavorites) { $sql .= ' AND is_favorite=1'; } elseif ($priorityMin >= 0) { - $sql .= ' AND id_feed IN (SELECT f.id FROM `' . $this->prefix . 'feed` f WHERE f.priority > ' . intval($priorityMin) . ')'; + $sql .= ' AND id_feed IN (SELECT f.id FROM `_feed` f WHERE f.priority > ' . intval($priorityMin) . ')'; } $values = array($is_read ? 1 : 0, $is_read ? 1 : 0, $idMax); list($searchValues, $search) = $this->sqlListEntriesWhere('', $filters, $state); - $stm = $this->bd->prepare($sql . $search); + $stm = $this->pdo->prepare($sql . $search); if (!($stm && $stm->execute(array_merge($values, $searchValues)))) { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); Minz_Log::error('SQL error markReadEntries: ' . $info[2]); @@ -223,15 +215,15 @@ DROP TABLE IF EXISTS `tmp`; Minz_Log::debug('Calling markReadCat(0) is deprecated!'); } - $sql = 'UPDATE `' . $this->prefix . 'entry` ' + $sql = 'UPDATE `_entry` ' . 'SET is_read = ? ' . 'WHERE is_read <> ? AND id <= ? AND ' - . 'id_feed IN (SELECT f.id FROM `' . $this->prefix . 'feed` f WHERE f.category=?)'; + . 'id_feed IN (SELECT f.id FROM `_feed` f WHERE f.category=?)'; $values = array($is_read ? 1 : 0, $is_read ? 1 : 0, $idMax, $id); list($searchValues, $search) = $this->sqlListEntriesWhere('', $filters, $state); - $stm = $this->bd->prepare($sql . $search); + $stm = $this->pdo->prepare($sql . $search); if (!($stm && $stm->execute(array_merge($values, $searchValues)))) { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); Minz_Log::error('SQL error markReadCat: ' . $info[2]); @@ -257,10 +249,10 @@ DROP TABLE IF EXISTS `tmp`; Minz_Log::debug('Calling markReadTag(0) is deprecated!'); } - $sql = 'UPDATE `' . $this->prefix . 'entry` e ' + $sql = 'UPDATE `_entry` e ' . 'SET e.is_read = ? ' . 'WHERE e.is_read <> ? AND e.id <= ? AND ' - . 'e.id IN (SELECT et.id_entry FROM `' . $this->prefix . 'entrytag` et ' + . 'e.id IN (SELECT et.id_entry FROM `_entrytag` et ' . ($id == '' ? '' : 'WHERE et.id = ?') . ')'; $values = array($is_read ? 1 : 0, $is_read ? 1 : 0, $idMax); @@ -270,7 +262,7 @@ DROP TABLE IF EXISTS `tmp`; list($searchValues, $search) = $this->sqlListEntriesWhere('e.', $filters, $state); - $stm = $this->bd->prepare($sql . $search); + $stm = $this->pdo->prepare($sql . $search); if (!($stm && $stm->execute(array_merge($values, $searchValues)))) { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); Minz_Log::error('SQL error markReadTag: ' . $info[2]); diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 89989236c..8aee9d62f 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -153,18 +153,17 @@ class FreshRSS_Feed extends Minz_Model { return $this->nbNotRead; } public function faviconPrepare() { - global $favicons_dir; require_once(LIB_PATH . '/favicons.php'); $url = $this->website; if ($url == '') { $url = $this->url; } - $txt = $favicons_dir . $this->hash() . '.txt'; + $txt = FAVICONS_DIR . $this->hash() . '.txt'; if (!file_exists($txt)) { file_put_contents($txt, $url); } if (FreshRSS_Context::$isCli) { - $ico = $favicons_dir . $this->hash() . '.ico'; + $ico = FAVICONS_DIR . $this->hash() . '.ico'; $ico_mtime = @filemtime($ico); $txt_mtime = @filemtime($txt); if ($txt_mtime != false && @@ -701,7 +700,7 @@ class FreshRSS_Feed extends Minz_Model { file_put_contents($hubFilename, json_encode($hubJson)); } $ch = curl_init(); - curl_setopt_array($ch, array( + curl_setopt_array($ch, [ CURLOPT_URL => $hubJson['hub'], CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => http_build_query(array( @@ -712,13 +711,9 @@ class FreshRSS_Feed extends Minz_Model { )), CURLOPT_USERAGENT => FRESHRSS_USERAGENT, CURLOPT_MAXREDIRS => 10, - )); - if (version_compare(PHP_VERSION, '5.6.0') >= 0 || ini_get('open_basedir') == '') { - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); //Keep option separated for open_basedir PHP bug 65646 - } - if (defined('CURLOPT_ENCODING')) { - curl_setopt($ch, CURLOPT_ENCODING, ''); //Enable all encodings - } + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_ENCODING => '', //Enable all encodings + ]); $response = curl_exec($ch); $info = curl_getinfo($ch); diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index 1dad4a834..fc914eefc 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -3,14 +3,13 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { protected function addColumn($name) { - Minz_Log::warning('FreshRSS_FeedDAO::addColumn: ' . $name); + Minz_Log::warning(__method__ . ': ' . $name); try { if ($name === 'attributes') { //v1.11.0 - $stm = $this->bd->prepare('ALTER TABLE `' . $this->prefix . 'feed` ADD COLUMN attributes TEXT'); - return $stm && $stm->execute(); + return $this->pdo->exec('ALTER TABLE `_feed` ADD COLUMN attributes TEXT') !== false; } } catch (Exception $e) { - Minz_Log::error('FreshRSS_FeedDAO::addColumn error: ' . $e->getMessage()); + Minz_Log::error(__method__ . ' error: ' . $e->getMessage()); } return false; } @@ -30,7 +29,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { public function addFeed($valuesTmp) { $sql = ' - INSERT INTO `' . $this->prefix . 'feed` + INSERT INTO `_feed` ( url, category, @@ -48,7 +47,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); $valuesTmp['url'] = safe_ascii($valuesTmp['url']); $valuesTmp['website'] = safe_ascii($valuesTmp['website']); @@ -73,7 +72,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { ); if ($stm && $stm->execute($values)) { - return $this->bd->lastInsertId('"' . $this->prefix . 'feed_id_seq"'); + return $this->pdo->lastInsertId('`_feed_id_seq`'); } else { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); if ($this->autoUpdateDb($info)) { @@ -141,8 +140,8 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } $set = substr($set, 0, -2); - $sql = 'UPDATE `' . $this->prefix . 'feed` SET ' . $set . ' WHERE id=?'; - $stm = $this->bd->prepare($sql); + $sql = 'UPDATE `_feed` SET ' . $set . ' WHERE id=?'; + $stm = $this->pdo->prepare($sql); foreach ($valuesTmp as $v) { $values[] = $v; @@ -173,7 +172,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } public function updateLastUpdate($id, $inError = false, $mtime = 0) { //See also updateCachedValue() - $sql = 'UPDATE `' . $this->prefix . 'feed` ' + $sql = 'UPDATE `_feed` ' . 'SET `lastUpdate`=?, error=? ' . 'WHERE id=?'; $values = array( @@ -181,7 +180,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $inError ? 1 : 0, $id, ); - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); if ($stm && $stm->execute($values)) { return $stm->rowCount(); @@ -199,8 +198,8 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $newCat = $catDAO->getDefault(); } - $sql = 'UPDATE `' . $this->prefix . 'feed` SET category=? WHERE category=?'; - $stm = $this->bd->prepare($sql); + $sql = 'UPDATE `_feed` SET category=? WHERE category=?'; + $stm = $this->pdo->prepare($sql); $values = array( $newCat->id(), @@ -217,8 +216,8 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } public function deleteFeed($id) { - $sql = 'DELETE FROM `' . $this->prefix . 'feed` WHERE id=?'; - $stm = $this->bd->prepare($sql); + $sql = 'DELETE FROM `_feed` WHERE id=?'; + $stm = $this->pdo->prepare($sql); $values = array($id); @@ -231,8 +230,8 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } } public function deleteFeedByCategory($id) { - $sql = 'DELETE FROM `' . $this->prefix . 'feed` WHERE category=?'; - $stm = $this->bd->prepare($sql); + $sql = 'DELETE FROM `_feed` WHERE category=?'; + $stm = $this->pdo->prepare($sql); $values = array($id); @@ -248,17 +247,16 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { public function selectAll() { $sql = 'SELECT id, url, category, name, website, description, `lastUpdate`, priority, ' . '`pathEntries`, `httpAuth`, error, keep_history, ttl, attributes ' - . 'FROM `' . $this->prefix . 'feed`'; - $stm = $this->bd->prepare($sql); - $stm->execute(); + . 'FROM `_feed`'; + $stm = $this->pdo->query($sql); while ($row = $stm->fetch(PDO::FETCH_ASSOC)) { yield $row; } } public function searchById($id) { - $sql = 'SELECT * FROM `' . $this->prefix . 'feed` WHERE id=?'; - $stm = $this->bd->prepare($sql); + $sql = 'SELECT * FROM `_feed` WHERE id=?'; + $stm = $this->pdo->prepare($sql); $values = array($id); @@ -273,8 +271,8 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } } public function searchByUrl($url) { - $sql = 'SELECT * FROM `' . $this->prefix . 'feed` WHERE url=?'; - $stm = $this->bd->prepare($sql); + $sql = 'SELECT * FROM `_feed` WHERE url=?'; + $stm = $this->pdo->prepare($sql); $values = array($url); @@ -290,25 +288,21 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } public function listFeedsIds() { - $sql = 'SELECT id FROM `' . $this->prefix . 'feed`'; - $stm = $this->bd->prepare($sql); - $stm->execute(); + $sql = 'SELECT id FROM `_feed`'; + $stm = $this->pdo->query($sql); return $stm->fetchAll(PDO::FETCH_COLUMN, 0); } public function listFeeds() { - $sql = 'SELECT * FROM `' . $this->prefix . 'feed` ORDER BY name'; - $stm = $this->bd->prepare($sql); - $stm->execute(); - + $sql = 'SELECT * FROM `_feed` ORDER BY name'; + $stm = $this->pdo->query($sql); return self::daoToFeed($stm->fetchAll(PDO::FETCH_ASSOC)); } public function arrayFeedCategoryNames() { //For API - $sql = 'SELECT f.id, f.name, c.name as c_name FROM `' . $this->prefix . 'feed` f ' - . 'INNER JOIN `' . $this->prefix . 'category` c ON c.id = f.category'; - $stm = $this->bd->prepare($sql); - $stm->execute(); + $sql = 'SELECT f.id, f.name, c.name as c_name FROM `_feed` f ' + . 'INNER JOIN `_category` c ON c.id = f.category'; + $stm = $this->pdo->query($sql); $res = $stm->fetchAll(PDO::FETCH_ASSOC); $feedCategoryNames = array(); foreach ($res as $line) { @@ -326,13 +320,14 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { public function listFeedsOrderUpdate($defaultCacheDuration = 3600, $limit = 0) { $this->updateTTL(); $sql = 'SELECT id, url, name, website, `lastUpdate`, `pathEntries`, `httpAuth`, keep_history, ttl, attributes ' - . 'FROM `' . $this->prefix . 'feed` ' + . 'FROM `_feed` ' . ($defaultCacheDuration < 0 ? '' : 'WHERE ttl >= ' . FreshRSS_Feed::TTL_DEFAULT - . ' AND `lastUpdate` < (' . (time() + 60) . '-(CASE WHEN ttl=' . FreshRSS_Feed::TTL_DEFAULT . ' THEN ' . intval($defaultCacheDuration) . ' ELSE ttl END)) ') + . ' AND `lastUpdate` < (' . (time() + 60) + . '-(CASE WHEN ttl=' . FreshRSS_Feed::TTL_DEFAULT . ' THEN ' . intval($defaultCacheDuration) . ' ELSE ttl END)) ') . 'ORDER BY `lastUpdate` ' . ($limit < 1 ? '' : 'LIMIT ' . intval($limit)); - $stm = $this->bd->prepare($sql); - if ($stm && $stm->execute()) { + $stm = $this->pdo->query($sql); + if ($stm !== false) { return self::daoToFeed($stm->fetchAll(PDO::FETCH_ASSOC)); } else { $info = $stm == null ? array(0 => '', 1 => '', 2 => 'syntax error') : $stm->errorInfo(); @@ -345,8 +340,8 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } public function listByCategory($cat) { - $sql = 'SELECT * FROM `' . $this->prefix . 'feed` WHERE category=? ORDER BY name'; - $stm = $this->bd->prepare($sql); + $sql = 'SELECT * FROM `_feed` WHERE category=? ORDER BY name'; + $stm = $this->pdo->prepare($sql); $values = array($cat); @@ -356,8 +351,8 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } public function countEntries($id) { - $sql = 'SELECT COUNT(*) AS count FROM `' . $this->prefix . 'entry` WHERE id_feed=?'; - $stm = $this->bd->prepare($sql); + $sql = 'SELECT COUNT(*) AS count FROM `_entry` WHERE id_feed=?'; + $stm = $this->pdo->prepare($sql); $values = array($id); $stm->execute($values); $res = $stm->fetchAll(PDO::FETCH_ASSOC); @@ -366,8 +361,8 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } public function countNotRead($id) { - $sql = 'SELECT COUNT(*) AS count FROM `' . $this->prefix . 'entry` WHERE id_feed=? AND is_read=0'; - $stm = $this->bd->prepare($sql); + $sql = 'SELECT COUNT(*) AS count FROM `_entry` WHERE id_feed=? AND is_read=0'; + $stm = $this->pdo->prepare($sql); $values = array($id); $stm->execute($values); $res = $stm->fetchAll(PDO::FETCH_ASSOC); @@ -375,62 +370,51 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { return $res[0]['count']; } - public function updateCachedValue($id) { //For multiple feeds, call updateCachedValues() - $sql = 'UPDATE `' . $this->prefix . 'feed` ' //2 sub-requests with FOREIGN KEY(e.id_feed), INDEX(e.is_read) faster than 1 request with GROUP BY or CASE - . 'SET `cache_nbEntries`=(SELECT COUNT(e1.id) FROM `' . $this->prefix . 'entry` e1 WHERE e1.id_feed=`' . $this->prefix . 'feed`.id),' - . '`cache_nbUnreads`=(SELECT COUNT(e2.id) FROM `' . $this->prefix . 'entry` e2 WHERE e2.id_feed=`' . $this->prefix . 'feed`.id AND e2.is_read=0) ' - . 'WHERE id=?'; - $values = array($id); - $stm = $this->bd->prepare($sql); - - if ($stm && $stm->execute($values)) { - return $stm->rowCount(); - } else { - $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); - Minz_Log::error('SQL error updateCachedValue: ' . $info[2]); - return false; + public function updateCachedValues($id = null) { + //2 sub-requests with FOREIGN KEY(e.id_feed), INDEX(e.is_read) faster than 1 request with GROUP BY or CASE + $sql = 'UPDATE `_feed` ' + . 'SET `cache_nbEntries`=(SELECT COUNT(e1.id) FROM `_entry` e1 WHERE e1.id_feed=`_feed`.id),' + . '`cache_nbUnreads`=(SELECT COUNT(e2.id) FROM `_entry` e2 WHERE e2.id_feed=`_feed`.id AND e2.is_read=0)' + . ($id != null ? ' WHERE id=:id' : ''); + $stm = $this->pdo->prepare($sql); + if ($id != null) { + $stm->bindParam(':id', $id, PDO::PARAM_INT); } - } - public function updateCachedValues() { //For one single feed, call updateCachedValue($id) - $sql = 'UPDATE `' . $this->prefix . 'feed` ' - . 'SET `cache_nbEntries`=(SELECT COUNT(e1.id) FROM `' . $this->prefix . 'entry` e1 WHERE e1.id_feed=`' . $this->prefix . 'feed`.id),' - . '`cache_nbUnreads`=(SELECT COUNT(e2.id) FROM `' . $this->prefix . 'entry` e2 WHERE e2.id_feed=`' . $this->prefix . 'feed`.id AND e2.is_read=0)'; - $stm = $this->bd->prepare($sql); if ($stm && $stm->execute()) { return $stm->rowCount(); } else { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); - Minz_Log::error('SQL error updateCachedValues: ' . $info[2]); + Minz_Log::error('SQL error updateCachedValue: ' . $info[2]); return false; } } public function truncate($id) { - $sql = 'DELETE FROM `' . $this->prefix . 'entry` WHERE id_feed=?'; - $stm = $this->bd->prepare($sql); - $values = array($id); - $this->bd->beginTransaction(); - if (!($stm && $stm->execute($values))) { + $sql = 'DELETE FROM `_entry` WHERE id_feed=:id'; + $stm = $this->pdo->prepare($sql); + $stm->bindParam(':id', $id, PDO::PARAM_INT); + $this->pdo->beginTransaction(); + if (!($stm && $stm->execute())) { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); Minz_Log::error('SQL error truncate: ' . $info[2]); - $this->bd->rollBack(); + $this->pdo->rollBack(); return false; } $affected = $stm->rowCount(); - $sql = 'UPDATE `' . $this->prefix . 'feed` ' - . 'SET `cache_nbEntries`=0, `cache_nbUnreads`=0 WHERE id=?'; - $values = array($id); - $stm = $this->bd->prepare($sql); + $sql = 'UPDATE `_feed` ' + . 'SET `cache_nbEntries`=0, `cache_nbUnreads`=0 WHERE id=:id'; + $stm = $this->pdo->prepare($sql); + $stm->bindParam(':id', $id, PDO::PARAM_INT); if (!($stm && $stm->execute($values))) { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); Minz_Log::error('SQL error truncate: ' . $info[2]); - $this->bd->rollBack(); + $this->pdo->rollBack(); return false; } - $this->bd->commit(); + $this->pdo->commit(); return $affected; } @@ -479,19 +463,15 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } public function updateTTL() { - $sql = <<prefix}feed` - SET ttl = :new_value - WHERE ttl = :old_value -SQL; - $stm = $this->bd->prepare($sql); + $sql = 'UPDATE `_feed` SET ttl=:new_value WHERE ttl=:old_value'; + $stm = $this->pdo->prepare($sql); if (!($stm && $stm->execute(array(':new_value' => FreshRSS_Feed::TTL_DEFAULT, ':old_value' => -2)))) { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); Minz_Log::error('SQL warning updateTTL 1: ' . $info[2] . ' ' . $sql); - $sql2 = 'ALTER TABLE `' . $this->prefix . 'feed` ADD COLUMN ttl INT NOT NULL DEFAULT ' . FreshRSS_Feed::TTL_DEFAULT; //v0.7.3 - $stm = $this->bd->prepare($sql2); - if (!($stm && $stm->execute())) { + $sql2 = 'ALTER TABLE `_feed` ADD COLUMN ttl INT NOT NULL DEFAULT ' . FreshRSS_Feed::TTL_DEFAULT; //v0.7.3 + $stm = $this->pdo->query($sql2); + if ($stm === false) { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); Minz_Log::error('SQL error updateTTL 2: ' . $info[2] . ' ' . $sql2); } diff --git a/app/Models/FeedDAOSQLite.php b/app/Models/FeedDAOSQLite.php index 3c203b378..c56447df6 100644 --- a/app/Models/FeedDAOSQLite.php +++ b/app/Models/FeedDAOSQLite.php @@ -3,7 +3,7 @@ class FreshRSS_FeedDAOSQLite extends FreshRSS_FeedDAO { protected function autoUpdateDb($errorInfo) { - if ($tableInfo = $this->bd->query("PRAGMA table_info('feed')")) { + if ($tableInfo = $this->pdo->query("PRAGMA table_info('feed')")) { $columns = $tableInfo->fetchAll(PDO::FETCH_COLUMN, 1); foreach (array('attributes') as $column) { if (!in_array($column, $columns)) { diff --git a/app/Models/StatsDAO.php b/app/Models/StatsDAO.php index 67ada73f7..cbfa79c61 100644 --- a/app/Models/StatsDAO.php +++ b/app/Models/StatsDAO.php @@ -45,13 +45,11 @@ SELECT COUNT(1) AS total, COUNT(1) - SUM(e.is_read) AS count_unreads, SUM(e.is_read) AS count_reads, SUM(e.is_favorite) AS count_favorites -FROM `{$this->prefix}entry` AS e -, `{$this->prefix}feed` AS f +FROM `_entry` AS e, `_feed` AS f WHERE e.id_feed = f.id {$filter} SQL; - $stm = $this->bd->prepare($sql); - $stm->execute(); + $stm = $this->pdo->query($sql); $res = $stm->fetchAll(PDO::FETCH_ASSOC); return $res[0]; @@ -73,13 +71,12 @@ SQL; $sql = <<prefix}entry` +FROM `_entry` WHERE date >= {$oldest} AND date < {$midnight} GROUP BY day ORDER BY day ASC SQL; - $stm = $this->bd->prepare($sql); - $stm->execute(); + $stm = $this->pdo->query($sql); $res = $stm->fetchAll(PDO::FETCH_ASSOC); foreach ($res as $value) { @@ -143,14 +140,13 @@ SQL; $sql = <<prefix}entry` AS e +FROM `_entry` AS e {$restrict} GROUP BY period ORDER BY period ASC SQL; - $stm = $this->bd->prepare($sql); - $stm->execute(); + $stm = $this->pdo->query($sql); $res = $stm->fetchAll(PDO::FETCH_NAMED); $repartition = array(); @@ -207,11 +203,10 @@ SQL; SELECT COUNT(1) AS count , MIN(date) AS date_min , MAX(date) AS date_max -FROM `{$this->prefix}entry` AS e +FROM `_entry` AS e {$restrict} SQL; - $stm = $this->bd->prepare($sql); - $stm->execute(); + $stm = $this->pdo->query($sql); $res = $stm->fetch(PDO::FETCH_NAMED); $date_min = new \DateTime(); $date_min->setTimestamp($res['date_min']); @@ -251,14 +246,12 @@ SQL; $sql = <<prefix}category` AS c, -`{$this->prefix}feed` AS f +FROM `_category` AS c, `_feed` AS f WHERE c.id = f.category GROUP BY label ORDER BY data DESC SQL; - $stm = $this->bd->prepare($sql); - $stm->execute(); + $stm = $this->pdo->query($sql); $res = $stm->fetchAll(PDO::FETCH_ASSOC); return $res; @@ -274,16 +267,13 @@ SQL; $sql = <<prefix}category` AS c, -`{$this->prefix}feed` AS f, -`{$this->prefix}entry` AS e +FROM `_category` AS c, `_feed` AS f, `_entry` AS e WHERE c.id = f.category AND f.id = e.id_feed GROUP BY label ORDER BY data DESC SQL; - $stm = $this->bd->prepare($sql); - $stm->execute(); + $stm = $this->pdo->query($sql); $res = $stm->fetchAll(PDO::FETCH_ASSOC); return $res; @@ -300,17 +290,14 @@ SELECT f.id AS id , MAX(f.name) AS name , MAX(c.name) AS category , COUNT(e.id) AS count -FROM `{$this->prefix}category` AS c, -`{$this->prefix}feed` AS f, -`{$this->prefix}entry` AS e +FROM `_category` AS c, `_feed` AS f, `_entry` AS e WHERE c.id = f.category AND f.id = e.id_feed GROUP BY f.id ORDER BY count DESC LIMIT 10 SQL; - $stm = $this->bd->prepare($sql); - $stm->execute(); + $stm = $this->pdo->query($sql); return $stm->fetchAll(PDO::FETCH_ASSOC); } @@ -325,14 +312,12 @@ SELECT MAX(f.id) as id , MAX(f.name) AS name , MAX(date) AS last_date , COUNT(*) AS nb_articles -FROM `{$this->prefix}feed` AS f, -`{$this->prefix}entry` AS e +FROM `_feed` AS f, `_entry` AS e WHERE f.id = e.id_feed GROUP BY f.id ORDER BY name SQL; - $stm = $this->bd->prepare($sql); - $stm->execute(); + $stm = $this->pdo->query($sql); return $stm->fetchAll(PDO::FETCH_ASSOC); } diff --git a/app/Models/StatsDAOPGSQL.php b/app/Models/StatsDAOPGSQL.php index 1effbb64b..4a66068cb 100644 --- a/app/Models/StatsDAOPGSQL.php +++ b/app/Models/StatsDAOPGSQL.php @@ -47,14 +47,13 @@ class FreshRSS_StatsDAOPGSQL extends FreshRSS_StatsDAO { $sql = <<prefix}entry" AS e +FROM `_entry` AS e {$restrict} GROUP BY period ORDER BY period ASC SQL; - $stm = $this->bd->prepare($sql); - $stm->execute(); + $stm = $this->pdo->query($sql); $res = $stm->fetchAll(PDO::FETCH_NAMED); foreach ($res as $value) { diff --git a/app/Models/StatsDAOSQLite.php b/app/Models/StatsDAOSQLite.php index 6cfc20463..f96f8f479 100644 --- a/app/Models/StatsDAOSQLite.php +++ b/app/Models/StatsDAOSQLite.php @@ -15,14 +15,13 @@ class FreshRSS_StatsDAOSQLite extends FreshRSS_StatsDAO { $sql = <<prefix}entry` AS e +FROM `_entry` AS e {$restrict} GROUP BY period ORDER BY period ASC SQL; - $stm = $this->bd->prepare($sql); - $stm->execute(); + $stm = $this->pdo->query($sql); $res = $stm->fetchAll(PDO::FETCH_NAMED); $repartition = array(); diff --git a/app/Models/TagDAO.php b/app/Models/TagDAO.php index 11807fc32..8af3d5e34 100644 --- a/app/Models/TagDAO.php +++ b/app/Models/TagDAO.php @@ -8,36 +8,24 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { public function createTagTable() { $ok = false; - $hadTransaction = $this->bd->inTransaction(); + $hadTransaction = $this->pdo->inTransaction(); if ($hadTransaction) { - $this->bd->commit(); + $this->pdo->commit(); } try { - require_once(APP_PATH . '/SQL/install.sql.' . $this->bd->dbType() . '.php'); + require_once(APP_PATH . '/SQL/install.sql.' . $this->pdo->dbType() . '.php'); Minz_Log::warning('SQL ALTER GUID case sensitivity...'); $databaseDAO = FreshRSS_Factory::createDatabaseDAO(); $databaseDAO->ensureCaseInsensitiveGuids(); Minz_Log::warning('SQL CREATE TABLE tag...'); - if (defined('SQL_CREATE_TABLE_TAGS')) { - $sql = sprintf(SQL_CREATE_TABLE_TAGS, $this->prefix); - $stm = $this->bd->prepare($sql); - $ok = $stm && $stm->execute(); - } else { - global $SQL_CREATE_TABLE_TAGS; - $ok = !empty($SQL_CREATE_TABLE_TAGS); - foreach ($SQL_CREATE_TABLE_TAGS as $instruction) { - $sql = sprintf($instruction, $this->prefix); - $stm = $this->bd->prepare($sql); - $ok &= $stm && $stm->execute(); - } - } + $ok = $this->pdo->exec(SQL_CREATE_TABLE_TAGS) !== false; } catch (Exception $e) { Minz_Log::error('FreshRSS_EntryDAO::createTagTable error: ' . $e->getMessage()); } if ($hadTransaction) { - $this->bd->beginTransaction(); + $this->pdo->beginTransaction(); } return $ok; } @@ -54,10 +42,10 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } public function addTag($valuesTmp) { - $sql = 'INSERT INTO `' . $this->prefix . 'tag`(name, attributes) ' - . 'SELECT * FROM (SELECT TRIM(?), TRIM(?)) t2 ' //TRIM() to provide a type hint as text for PostgreSQL - . 'WHERE NOT EXISTS (SELECT 1 FROM `' . $this->prefix . 'category` WHERE name = TRIM(?))'; //No category of the same name - $stm = $this->bd->prepare($sql); + $sql = 'INSERT INTO `_tag`(name, attributes) ' + . 'SELECT * FROM (SELECT TRIM(?) as name, TRIM(?) as attributes) t2 ' //TRIM() gives a text type hint to PostgreSQL + . 'WHERE NOT EXISTS (SELECT 1 FROM `_category` WHERE name = TRIM(?))'; //No category of the same name + $stm = $this->pdo->prepare($sql); $valuesTmp['name'] = mb_strcut(trim($valuesTmp['name']), 0, 63, 'UTF-8'); $values = array( @@ -67,7 +55,7 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { ); if ($stm && $stm->execute($values)) { - return $this->bd->lastInsertId('"' . $this->prefix . 'tag_id_seq"'); + return $this->pdo->lastInsertId('`_tag_id_seq`'); } else { $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); Minz_Log::error('SQL error addTag: ' . $info[2]); @@ -88,9 +76,9 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } public function updateTag($id, $valuesTmp) { - $sql = 'UPDATE `' . $this->prefix . 'tag` SET name=?, attributes=? WHERE id=? ' - . 'AND NOT EXISTS (SELECT 1 FROM `' . $this->prefix . 'category` WHERE name = ?)'; //No category of the same name - $stm = $this->bd->prepare($sql); + $sql = 'UPDATE `_tag` SET name=?, attributes=? WHERE id=? ' + . 'AND NOT EXISTS (SELECT 1 FROM `_category` WHERE name = ?)'; //No category of the same name + $stm = $this->pdo->prepare($sql); $valuesTmp['name'] = mb_strcut(trim($valuesTmp['name']), 0, 63, 'UTF-8'); $values = array( @@ -124,8 +112,8 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { if ($id <= 0) { return false; } - $sql = 'DELETE FROM `' . $this->prefix . 'tag` WHERE id=?'; - $stm = $this->bd->prepare($sql); + $sql = 'DELETE FROM `_tag` WHERE id=?'; + $stm = $this->pdo->prepare($sql); $values = array($id); @@ -139,26 +127,24 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } public function selectAll() { - $sql = 'SELECT id, name, attributes FROM `' . $this->prefix . 'tag`'; - $stm = $this->bd->prepare($sql); - $stm->execute(); + $sql = 'SELECT id, name, attributes FROM `_tag`'; + $stm = $this->pdo->query($sql); while ($row = $stm->fetch(PDO::FETCH_ASSOC)) { yield $row; } } public function selectEntryTag() { - $sql = 'SELECT id_tag, id_entry FROM `' . $this->prefix . 'entrytag`'; - $stm = $this->bd->prepare($sql); - $stm->execute(); + $sql = 'SELECT id_tag, id_entry FROM `_entrytag`'; + $stm = $this->pdo->query($sql); while ($row = $stm->fetch(PDO::FETCH_ASSOC)) { yield $row; } } public function searchById($id) { - $sql = 'SELECT * FROM `' . $this->prefix . 'tag` WHERE id=?'; - $stm = $this->bd->prepare($sql); + $sql = 'SELECT * FROM `_tag` WHERE id=?'; + $stm = $this->pdo->prepare($sql); $values = array($id); $stm->execute($values); $res = $stm->fetchAll(PDO::FETCH_ASSOC); @@ -167,8 +153,8 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } public function searchByName($name) { - $sql = 'SELECT * FROM `' . $this->prefix . 'tag` WHERE name=?'; - $stm = $this->bd->prepare($sql); + $sql = 'SELECT * FROM `_tag` WHERE name=?'; + $stm = $this->pdo->prepare($sql); $values = array($name); $stm->execute($values); $res = $stm->fetchAll(PDO::FETCH_ASSOC); @@ -179,17 +165,17 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { public function listTags($precounts = false) { if ($precounts) { $sql = 'SELECT t.id, t.name, count(e.id) AS unreads ' - . 'FROM `' . $this->prefix . 'tag` t ' - . 'LEFT OUTER JOIN `' . $this->prefix . 'entrytag` et ON et.id_tag = t.id ' - . 'LEFT OUTER JOIN `' . $this->prefix . 'entry` e ON et.id_entry = e.id AND e.is_read = 0 ' + . 'FROM `_tag` t ' + . 'LEFT OUTER JOIN `_entrytag` et ON et.id_tag = t.id ' + . 'LEFT OUTER JOIN `_entry` e ON et.id_entry = e.id AND e.is_read = 0 ' . 'GROUP BY t.id ' . 'ORDER BY t.name'; } else { - $sql = 'SELECT * FROM `' . $this->prefix . 'tag` ORDER BY name'; + $sql = 'SELECT * FROM `_tag` ORDER BY name'; } - $stm = $this->bd->prepare($sql); - if ($stm && $stm->execute()) { + $stm = $this->pdo->query($sql); + if ($stm !== false) { return self::daoToTag($stm->fetchAll(PDO::FETCH_ASSOC)); } else { $info = $stm == null ? array(0 => '', 1 => '', 2 => 'syntax error') : $stm->errorInfo(); @@ -202,9 +188,9 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } public function count() { - $sql = 'SELECT COUNT(*) AS count FROM `' . $this->prefix . 'tag`'; - $stm = $this->bd->prepare($sql); - if ($stm && $stm->execute()) { + $sql = 'SELECT COUNT(*) AS count FROM `_tag`'; + $stm = $this->pdo->query($sql); + if ($stm !== false) { $res = $stm->fetchAll(PDO::FETCH_ASSOC); return $res[0]['count']; } else { @@ -218,8 +204,8 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } public function countEntries($id) { - $sql = 'SELECT COUNT(*) AS count FROM `' . $this->prefix . 'entrytag` WHERE id_tag=?'; - $stm = $this->bd->prepare($sql); + $sql = 'SELECT COUNT(*) AS count FROM `_entrytag` WHERE id_tag=?'; + $stm = $this->pdo->prepare($sql); $values = array($id); $stm->execute($values); $res = $stm->fetchAll(PDO::FETCH_ASSOC); @@ -227,10 +213,10 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } public function countNotRead($id) { - $sql = 'SELECT COUNT(*) AS count FROM `' . $this->prefix . 'entrytag` et ' - . 'INNER JOIN `' . $this->prefix . 'entry` e ON et.id_entry=e.id ' + $sql = 'SELECT COUNT(*) AS count FROM `_entrytag` et ' + . 'INNER JOIN `_entry` e ON et.id_entry=e.id ' . 'WHERE et.id_tag=? AND e.is_read=0'; - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); $values = array($id); $stm->execute($values); $res = $stm->fetchAll(PDO::FETCH_ASSOC); @@ -239,11 +225,11 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { public function tagEntry($id_tag, $id_entry, $checked = true) { if ($checked) { - $sql = 'INSERT ' . $this->sqlIgnore() . ' INTO `' . $this->prefix . 'entrytag`(id_tag, id_entry) VALUES(?, ?)'; + $sql = 'INSERT ' . $this->sqlIgnore() . ' INTO `_entrytag`(id_tag, id_entry) VALUES(?, ?)'; } else { - $sql = 'DELETE FROM `' . $this->prefix . 'entrytag` WHERE id_tag=? AND id_entry=?'; + $sql = 'DELETE FROM `_entrytag` WHERE id_tag=? AND id_entry=?'; } - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); $values = array($id_tag, $id_entry); if ($stm && $stm->execute($values)) { @@ -257,11 +243,11 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { public function getTagsForEntry($id_entry) { $sql = 'SELECT t.id, t.name, et.id_entry IS NOT NULL as checked ' - . 'FROM `' . $this->prefix . 'tag` t ' - . 'LEFT OUTER JOIN `' . $this->prefix . 'entrytag` et ON et.id_tag = t.id AND et.id_entry=? ' + . 'FROM `_tag` t ' + . 'LEFT OUTER JOIN `_entrytag` et ON et.id_tag = t.id AND et.id_entry=? ' . 'ORDER BY t.name'; - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); $values = array($id_entry); if ($stm && $stm->execute($values)) { @@ -283,8 +269,8 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { public function getTagsForEntries($entries) { $sql = 'SELECT et.id_entry, et.id_tag, t.name ' - . 'FROM `' . $this->prefix . 'tag` t ' - . 'INNER JOIN `' . $this->prefix . 'entrytag` et ON et.id_tag = t.id'; + . 'FROM `_tag` t ' + . 'INNER JOIN `_entrytag` et ON et.id_tag = t.id'; $values = array(); if (is_array($entries) && count($entries) > 0) { @@ -303,7 +289,7 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } } } - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); if ($stm && $stm->execute($values)) { return $stm->fetchAll(PDO::FETCH_ASSOC); diff --git a/app/Models/TagDAOSQLite.php b/app/Models/TagDAOSQLite.php index b1deb6c65..ca0fce7ca 100644 --- a/app/Models/TagDAOSQLite.php +++ b/app/Models/TagDAOSQLite.php @@ -7,7 +7,7 @@ class FreshRSS_TagDAOSQLite extends FreshRSS_TagDAO { } protected function autoUpdateDb($errorInfo) { - if ($tableInfo = $this->bd->query("SELECT sql FROM sqlite_master where name='tag'")) { + if ($tableInfo = $this->pdo->query("SELECT sql FROM sqlite_master where name='tag'")) { $showCreate = $tableInfo->fetchColumn(); if (stripos($showCreate, 'tag') === false) { return $this->createTagTable(); //v1.12.0 diff --git a/app/Models/UserDAO.php b/app/Models/UserDAO.php index 6292cc09f..7580de06e 100644 --- a/app/Models/UserDAO.php +++ b/app/Models/UserDAO.php @@ -1,43 +1,22 @@ bd->dbType() . '.php'); - - $currentLanguage = Minz_Translate::language(); + public function createUser($insertDefaultFeeds = false) { + require_once(APP_PATH . '/SQL/install.sql.' . $this->pdo->dbType() . '.php'); try { - if ($new_user_language != null) { - Minz_Translate::reset($new_user_language); - } - $ok = false; - if (defined('SQL_CREATE_TABLES')) { //E.g. MySQL - $sql = sprintf(SQL_CREATE_TABLES . SQL_CREATE_TABLE_ENTRYTMP . SQL_CREATE_TABLE_TAGS, $this->prefix, _t('gen.short.default_category')); - $stm = $this->bd->prepare($sql); - $ok = $stm && $stm->execute(); - } else { //E.g. SQLite - global $SQL_CREATE_TABLES, $SQL_CREATE_TABLE_ENTRYTMP, $SQL_CREATE_TABLE_TAGS; - if (is_array($SQL_CREATE_TABLES)) { - $instructions = array_merge($SQL_CREATE_TABLES, $SQL_CREATE_TABLE_ENTRYTMP, $SQL_CREATE_TABLE_TAGS); - $ok = !empty($instructions); - foreach ($instructions as $instruction) { - $sql = sprintf($instruction, $this->prefix, _t('gen.short.default_category')); - $stm = $this->bd->prepare($sql); - $ok &= ($stm && $stm->execute()); - } - } - } + $sql = SQL_CREATE_TABLES . SQL_CREATE_TABLE_ENTRYTMP . SQL_CREATE_TABLE_TAGS; + $ok = $this->pdo->exec($sql) !== false; //Note: Only exec() can take multiple statements safely. if ($ok && $insertDefaultFeeds) { $default_feeds = FreshRSS_Context::$system_conf->default_feeds; + $stm = $this->pdo->prepare(SQL_INSERT_FEED); foreach ($default_feeds as $feed) { - $sql = sprintf(SQL_INSERT_FEED, $this->prefix); - $stm = $this->bd->prepare($sql); - $parameters = array( + $parameters = [ ':url' => $feed['url'], ':name' => $feed['name'], ':website' => $feed['website'], ':description' => $feed['description'], - ); + ]; $ok &= ($stm && $stm->execute($parameters)); } } @@ -45,8 +24,6 @@ class FreshRSS_UserDAO extends Minz_ModelPdo { Minz_Log::error('Error while creating database for user: ' . $e->getMessage()); } - Minz_Translate::reset($currentLanguage); - if ($ok) { return true; } else { @@ -61,25 +38,9 @@ class FreshRSS_UserDAO extends Minz_ModelPdo { fwrite(STDERR, 'Deleting SQL data for user “' . $this->current_user . "”…\n"); } - require_once(APP_PATH . '/SQL/install.sql.' . $this->bd->dbType() . '.php'); + require_once(APP_PATH . '/SQL/install.sql.' . $this->pdo->dbType() . '.php'); - $ok = false; - if (defined('SQL_DROP_TABLES')) { //E.g. MySQL - $sql = sprintf(SQL_DROP_TABLES, $this->prefix); - $stm = $this->bd->prepare($sql); - $ok = $stm && $stm->execute(); - } else { //E.g. SQLite - global $SQL_DROP_TABLES; - if (is_array($SQL_DROP_TABLES)) { - $instructions = $SQL_DROP_TABLES; - $ok = !empty($instructions); - foreach ($instructions as $instruction) { - $sql = sprintf($instruction, $this->prefix); - $stm = $this->bd->prepare($sql); - $ok &= ($stm && $stm->execute()); - } - } - } + $ok = $this->pdo->exec(SQL_DROP_TABLES) !== false; if ($ok) { return true; diff --git a/app/SQL/install.sql.mysql.php b/app/SQL/install.sql.mysql.php index 0f396f701..328e8acc0 100644 --- a/app/SQL/install.sql.mysql.php +++ b/app/SQL/install.sql.mysql.php @@ -1,20 +1,22 @@ ' . FreshRSS_DatabaseDAO::LENGTH_INDEX_UNICODE . '; -ALTER TABLE `%1$scategory` MODIFY `name` VARCHAR(' . FreshRSS_DatabaseDAO::LENGTH_INDEX_UNICODE . ') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL; -OPTIMIZE TABLE `%1$scategory`; - -ALTER TABLE `%1$sfeed` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -UPDATE `%1$sfeed` SET name=SUBSTRING(name,1,' . FreshRSS_DatabaseDAO::LENGTH_INDEX_UNICODE . ') WHERE LENGTH(name) > ' . FreshRSS_DatabaseDAO::LENGTH_INDEX_UNICODE . '; -ALTER TABLE `%1$sfeed` MODIFY `name` VARCHAR(' . FreshRSS_DatabaseDAO::LENGTH_INDEX_UNICODE . ') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL; -ALTER TABLE `%1$sfeed` MODIFY `description` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -OPTIMIZE TABLE `%1$sfeed`; - -ALTER TABLE `%1$sentry` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `%1$sentry` MODIFY `title` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL; -ALTER TABLE `%1$sentry` MODIFY `author` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -ALTER TABLE `%1$sentry` MODIFY `tags` VARCHAR(1023) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -OPTIMIZE TABLE `%1$sentry`; -'); - -define('SQL_UPDATE_GUID_LATIN1_BIN', ' -- v1.12 -ALTER TABLE `%1$sentrytmp` MODIFY `guid` VARCHAR(760) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL; -ALTER TABLE `%1$sentry` MODIFY `guid` VARCHAR(760) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL; -'); +const SQL_UPDATE_GUID_LATIN1_BIN = <<<'SQL' +ALTER TABLE `_entrytmp` MODIFY `guid` VARCHAR(760) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL; -- v1.12 +ALTER TABLE `_entry` MODIFY `guid` VARCHAR(760) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL; +SQL; diff --git a/app/SQL/install.sql.pgsql.php b/app/SQL/install.sql.pgsql.php index ef08ca940..dfacc38e7 100644 --- a/app/SQL/install.sql.pgsql.php +++ b/app/SQL/install.sql.pgsql.php @@ -1,14 +1,15 @@ title; - $_SESSION['old_entries'] = param('old_entries', $user_default_config->old_entries); - $_SESSION['auth_type'] = param('auth_type', 'form'); - if (FreshRSS_user_Controller::checkUsername(param('default_user', ''))) { - $_SESSION['default_user'] = param('default_user', ''); - } - - $password_plain = param('passwordPlain', false); - if ($password_plain !== false && cryptAvailable()) { - $_SESSION['passwordHash'] = FreshRSS_user_Controller::hashPassword($password_plain); - } - - if (empty($_SESSION['old_entries']) || - empty($_SESSION['auth_type']) || - empty($_SESSION['default_user'])) { - return false; - } - - if ($_SESSION['auth_type'] === 'form' && empty($_SESSION['passwordHash'])) { - return false; - } - - $_SESSION['salt'] = generateSalt(); - if ((!ctype_digit($_SESSION['old_entries'])) ||($_SESSION['old_entries'] < 1)) { - $_SESSION['old_entries'] = $user_default_config->old_entries; - } - - $token = ''; - - $config_array = array( - 'language' => $_SESSION['language'], - 'theme' => $user_default_config->theme, - 'old_entries' => $_SESSION['old_entries'], - 'passwordHash' => $_SESSION['passwordHash'], - 'token' => $token, - ); - - // Create default user files but first, we delete previous data to - // avoid access right problems. - $user_dir = join_path(USERS_PATH, $_SESSION['default_user']); - $user_config_path = join_path($user_dir, 'config.php'); - - recursive_unlink($user_dir); - mkdir($user_dir); - file_put_contents($user_config_path, " $_SESSION['salt'], + $config_array = [ + 'salt' => generateSalt(), 'base_url' => $base_url, - 'title' => $_SESSION['title'], - 'default_user' => $_SESSION['default_user'], - 'auth_type' => $_SESSION['auth_type'], - 'db' => array( + 'default_user' => 'admin', + 'db' => [ 'type' => $_SESSION['bd_type'], 'host' => $_SESSION['bd_host'], 'user' => $_SESSION['bd_user'], 'password' => $_SESSION['bd_password'], 'base' => $_SESSION['bd_base'], 'prefix' => $_SESSION['bd_prefix'], - 'pdo_options' => array(), - ), + 'pdo_options' => [], + ], 'pubsubhubbub_enabled' => server_is_public($base_url), - ); + ]; + if (!empty($_SESSION['title'])) { + $config_array['title'] = $_SESSION['title']; + } + if (!empty($_SESSION['auth_type'])) { + $config_array['auth_type'] = $_SESSION['auth_type']; + } + + @unlink(DATA_PATH . '/config.php'); //To avoid access-rights problems + file_put_contents(DATA_PATH . '/config.php', "title; + $_SESSION['old_entries'] = param('old_entries', $user_default_config->old_entries); + $_SESSION['auth_type'] = param('auth_type', 'form'); + if (FreshRSS_user_Controller::checkUsername(param('default_user', ''))) { + $_SESSION['default_user'] = param('default_user', ''); + } + + if (empty($_SESSION['old_entries']) || + empty($_SESSION['auth_type']) || + empty($_SESSION['default_user'])) { + return false; + } + + $password_plain = param('passwordPlain', false); + if ($_SESSION['auth_type'] === 'form' && $password_plain == '') { + return false; + } + + Minz_Configuration::register('system', DATA_PATH . '/config.php', FRESHRSS_PATH . '/config.default.php'); + FreshRSS_Context::$system_conf = Minz_Configuration::get('system'); + Minz_Translate::init($_SESSION['language']); + + FreshRSS_Context::$system_conf->default_user = $_SESSION['default_user']; + FreshRSS_Context::$system_conf->save(); + + if ((!ctype_digit($_SESSION['old_entries'])) ||($_SESSION['old_entries'] < 1)) { + $_SESSION['old_entries'] = $user_default_config->old_entries; + } + + // Create default user files but first, we delete previous data to + // avoid access right problems. + recursive_unlink(USERS_PATH . '/' . $_SESSION['default_user']); + + $ok = false; + try { + $ok = FreshRSS_user_Controller::createUser( + $_SESSION['default_user'], + '', //TODO: Add e-mail + $password_plain, + '', + [ + 'language' => $_SESSION['language'], + 'old_entries' => $_SESSION['old_entries'], + ] + ); + } catch (Exception $e) { + $_SESSION['bd_error'] = $e->getMessage(); + $ok = false; + } + if (!$ok) { + return false; + } + + header('Location: index.php?step=4'); + } +} /*** VÉRIFICATIONS ***/ function checkStep() { @@ -297,29 +291,6 @@ function freshrss_already_installed() { } function checkStep2() { - $conf = !empty($_SESSION['old_entries']) && - !empty($_SESSION['default_user']); - - $form = ( - isset($_SESSION['auth_type']) && - ($_SESSION['auth_type'] != 'form' || !empty($_SESSION['passwordHash'])) - ); - - $defaultUser = empty($_POST['default_user']) ? null : $_POST['default_user']; - if ($defaultUser === null) { - $defaultUser = empty($_SESSION['default_user']) ? '' : $_SESSION['default_user']; - } - $data = is_writable(join_path(USERS_PATH, $defaultUser, 'config.php')); - - return array( - 'conf' => $conf ? 'ok' : 'ko', - 'form' => $form ? 'ok' : 'ko', - 'data' => $data ? 'ok' : 'ko', - 'all' => $conf && $form && $data ? 'ok' : 'ko' - ); -} - -function checkStep3() { $conf = is_writable(join_path(DATA_PATH, 'config.php')); $bd = isset($_SESSION['bd_type']) && @@ -331,61 +302,35 @@ function checkStep3() { isset($_SESSION['bd_error']); $conn = empty($_SESSION['bd_error']); - return array( + return [ 'bd' => $bd ? 'ok' : 'ko', 'conn' => $conn ? 'ok' : 'ko', 'conf' => $conf ? 'ok' : 'ko', - 'all' => $bd && $conn && $conf ? 'ok' : 'ko' - ); + 'all' => $bd && $conn && $conf ? 'ok' : 'ko', + ]; } -function checkDbUser(&$dbOptions) { - $ok = false; - $str = $dbOptions['dsn']; - $driver_options = $dbOptions['options']; - try { - $c = new PDO($str, $dbOptions['user'], $dbOptions['password'], $driver_options); - if (defined('SQL_CREATE_TABLES')) { - $sql = sprintf(SQL_CREATE_TABLES . SQL_CREATE_TABLE_ENTRYTMP . SQL_CREATE_TABLE_TAGS, - $dbOptions['prefix_user'], _t('gen.short.default_category')); - $stm = $c->prepare($sql); - $ok = $stm && $stm->execute(); - } else { - global $SQL_CREATE_TABLES, $SQL_CREATE_TABLE_ENTRYTMP, $SQL_CREATE_TABLE_TAGS; - $instructions = array_merge($SQL_CREATE_TABLES, $SQL_CREATE_TABLE_ENTRYTMP, $SQL_CREATE_TABLE_TAGS); - $ok = !empty($instructions); - foreach ($instructions as $instruction) { - $sql = sprintf($instruction, $dbOptions['prefix_user'], _t('gen.short.default_category')); - $stm = $c->prepare($sql); - $ok &= $stm && $stm->execute(); - } - } +function checkStep3() { + $conf = !empty($_SESSION['old_entries']) && + !empty($_SESSION['default_user']); - Minz_Configuration::register( - 'system', - join_path(DATA_PATH, 'config.php'), - join_path(FRESHRSS_PATH, 'config.default.php') - ); - $system_conf = Minz_Configuration::get('system'); - $default_feeds = $system_conf->default_feeds; - foreach ($default_feeds as $feed) { - $sql = sprintf(SQL_INSERT_FEED, $dbOptions['prefix_user']); - $stm = $c->prepare($sql); - $parameters = array( - ':url' => $feed['url'], - ':name' => $feed['name'], - ':website' => $feed['website'], - ':description' => $feed['description'], - ); - $ok &= ($stm && $stm->execute($parameters)); - } - } catch (PDOException $e) { - $ok = false; - $dbOptions['error'] = $e->getMessage(); + $form = isset($_SESSION['auth_type']); + + $defaultUser = empty($_POST['default_user']) ? null : $_POST['default_user']; + if ($defaultUser === null) { + $defaultUser = empty($_SESSION['default_user']) ? '' : $_SESSION['default_user']; } - return $ok; + $data = is_writable(join_path(USERS_PATH, $defaultUser, 'config.php')); + + return [ + 'conf' => $conf ? 'ok' : 'ko', + 'form' => $form ? 'ok' : 'ko', + 'data' => $data ? 'ok' : 'ko', + 'all' => $conf && $form && $data ? 'ok' : 'ko', + ]; } + /*** AFFICHAGE ***/ function printStep0() { $actual = Minz_Translate::language(); @@ -544,83 +489,15 @@ function printStep1() { } function printStep2() { - $user_default_config = Minz_Configuration::get('default_user'); -?> - -

- -

- - -
- - -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
- -
-
- tabindex="5" /> - -
- - -
-
- -
-
- - - - - -
-
-
- - +

- +

-
+
@@ -685,6 +562,74 @@ function printStep3() {
+
+
+ + + + + +
+
+
+ + +

+ +

+ + +
+ + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+
+ tabindex="5" /> + +
+ + +
+
+
@@ -763,8 +708,8 @@ case 5:
  • -
  • -
  • +
  • +
  • diff --git a/app/views/helpers/category/update.phtml b/app/views/helpers/category/update.phtml index a2ee3e2ef..b64bd786a 100644 --- a/app/views/helpers/category/update.phtml +++ b/app/views/helpers/category/update.phtml @@ -11,7 +11,10 @@
    - + category->id() == FreshRSS_CategoryDAO::DEFAULTCATEGORYID ? 'disabled="disabled"' : ''; + ?> />
    diff --git a/cli/do-install.php b/cli/do-install.php index fd5aa4a3c..dea5d235e 100755 --- a/cli/do-install.php +++ b/cli/do-install.php @@ -3,7 +3,7 @@ require(__DIR__ . '/_cli.php'); if (!file_exists(DATA_PATH . '/do-install.txt')) { - fail('FreshRSS looks to be already installed! Please use `./cli/reconfigure.php` instead.'); + fail('FreshRSS seems to be already installed! Please use `./cli/reconfigure.php` instead.'); } $params = array( @@ -82,10 +82,9 @@ if (file_put_contents(join_path(DATA_PATH, 'config.php'), fail('FreshRSS could not write configuration file!: ' . join_path(DATA_PATH, 'config.php')); } -$config['db']['default_user'] = $config['default_user']; -if (!checkDb($config['db'])) { +if (!checkDb()) { @unlink(join_path(DATA_PATH, 'config.php')); - fail('FreshRSS database error: ' . (empty($config['db']['error']) ? 'Unknown error' : $config['db']['error'])); + fail('FreshRSS database error: ' . (empty($_SESSION['bd_error']) ? 'Unknown error' : $_SESSION['bd_error'])); } echo '• Remember to create the default user: ', $config['default_user'] , "\n", diff --git a/lib/Minz/ModelPdo.php b/lib/Minz/ModelPdo.php index 4d5e47da9..3fabb73c8 100644 --- a/lib/Minz/ModelPdo.php +++ b/lib/Minz/ModelPdo.php @@ -6,45 +6,35 @@ /** * La classe Model_sql représente le modèle interragissant avec les bases de données - * Seul la connexion MySQL est prise en charge pour le moment */ class Minz_ModelPdo { /** * Partage la connexion à la base de données entre toutes les instances. */ - public static $useSharedBd = true; - private static $sharedBd = null; + public static $usesSharedPdo = true; + private static $sharedPdo = null; private static $sharedPrefix; private static $sharedCurrentUser; - /** - * $bd variable représentant la base de données - */ - protected $bd; - + protected $pdo; protected $current_user; - protected $prefix; /** * Créé la connexion à la base de données à l'aide des variables * HOST, BASE, USER et PASS définies dans le fichier de configuration */ - public function __construct($currentUser = null, $currentPrefix = null, $currentDb = null) { + public function __construct($currentUser = null, $currentPdo = null) { if ($currentUser === null) { $currentUser = Minz_Session::param('currentUser'); } - if ($currentPrefix !== null) { - $this->prefix = $currentPrefix; - } - if ($currentDb != null) { - $this->bd = $currentDb; + if ($currentPdo != null) { + $this->pdo = $currentPdo; return; } - if (self::$useSharedBd && self::$sharedBd != null && - ($currentUser == null || $currentUser === self::$sharedCurrentUser)) { - $this->bd = self::$sharedBd; - $this->prefix = self::$sharedPrefix; + if (self::$usesSharedPdo && self::$sharedPdo != null && + ($currentUser == '' || $currentUser === self::$sharedCurrentUser)) { + $this->pdo = self::$sharedPdo; $this->current_user = self::$sharedCurrentUser; return; } @@ -54,35 +44,39 @@ class Minz_ModelPdo { $conf = Minz_Configuration::get('system'); $db = $conf->db; - $driver_options = isset($conf->db['pdo_options']) && is_array($conf->db['pdo_options']) ? $conf->db['pdo_options'] : array(); + $driver_options = isset($db['pdo_options']) && is_array($db['pdo_options']) ? $db['pdo_options'] : []; $dbServer = parse_url('db://' . $db['host']); + $dsn = ''; try { switch ($db['type']) { case 'mysql': - $string = 'mysql:host=' . (empty($dbServer['host']) ? $db['host'] : $dbServer['host']) . ';dbname=' . $db['base'] . ';charset=utf8mb4'; + $dsn = 'mysql:host=' . (empty($dbServer['host']) ? $db['host'] : $dbServer['host']) . ';charset=utf8mb4'; + if (!empty($db['base'])) { + $dsn .= ';dbname=' . $db['base']; + } if (!empty($dbServer['port'])) { - $string .= ';port=' . $dbServer['port']; + $dsn .= ';port=' . $dbServer['port']; } $driver_options[PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET NAMES utf8mb4'; - $this->prefix = $db['prefix'] . $currentUser . '_'; - $this->bd = new MinzPDOMySql($string, $db['user'], $db['password'], $driver_options); - $this->bd->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false); + $this->pdo = new MinzPDOMySql($dsn, $db['user'], $db['password'], $driver_options); + $this->pdo->setPrefix($db['prefix'] . $currentUser . '_'); break; case 'sqlite': - $string = 'sqlite:' . join_path(DATA_PATH, 'users', $currentUser, 'db.sqlite'); - $this->prefix = ''; - $this->bd = new MinzPDOSQLite($string, $db['user'], $db['password'], $driver_options); - $this->bd->exec('PRAGMA foreign_keys = ON;'); + $dsn = 'sqlite:' . join_path(DATA_PATH, 'users', $currentUser, 'db.sqlite'); + $this->pdo = new MinzPDOSQLite($dsn, $db['user'], $db['password'], $driver_options); + $this->pdo->setPrefix(''); break; case 'pgsql': - $string = 'pgsql:host=' . (empty($dbServer['host']) ? $db['host'] : $dbServer['host']) . ';dbname=' . $db['base']; + $dsn = 'pgsql:host=' . (empty($dbServer['host']) ? $db['host'] : $dbServer['host']); + if (!empty($db['base'])) { + $dsn .= ';dbname=' . $db['base']; + } if (!empty($dbServer['port'])) { - $string .= ';port=' . $dbServer['port']; + $dsn .= ';port=' . $dbServer['port']; } - $this->prefix = $db['prefix'] . $currentUser . '_'; - $this->bd = new MinzPDOPGSQL($string, $db['user'], $db['password'], $driver_options); - $this->bd->exec("SET NAMES 'UTF8';"); + $this->pdo = new MinzPDOPGSQL($dsn, $db['user'], $db['password'], $driver_options); + $this->pdo->setPrefix($db['prefix'] . $currentUser . '_'); break; default: throw new Minz_PDOConnectionException( @@ -91,69 +85,86 @@ class Minz_ModelPdo { ); break; } - self::$sharedBd = $this->bd; - self::$sharedPrefix = $this->prefix; + self::$sharedPdo = $this->pdo; } catch (Exception $e) { throw new Minz_PDOConnectionException( - $string, + $dsn, $db['user'], Minz_Exception::ERROR ); } } public function beginTransaction() { - $this->bd->beginTransaction(); + $this->pdo->beginTransaction(); } public function inTransaction() { - return $this->bd->inTransaction(); + return $this->pdo->inTransaction(); } public function commit() { - $this->bd->commit(); + $this->pdo->commit(); } public function rollBack() { - $this->bd->rollBack(); + $this->pdo->rollBack(); } public static function clean() { - self::$sharedBd = null; + self::$sharedPdo = null; self::$sharedCurrentUser = ''; - self::$sharedPrefix = ''; } } abstract class MinzPDO extends PDO { - private static function check($statement) { + public function __construct($dsn, $username = null, $passwd = null, $options = null) { + parent::__construct($dsn, $username, $passwd, $options); + $this->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); + } + + abstract public function dbType(); + + private $prefix = ''; + public function prefix() { return $this->prefix; } + public function setPrefix($prefix) { $this->prefix = $prefix; } + + private function autoPrefix($sql) { + return str_replace('`_', '`' . $this->prefix, $sql); + } + + protected function preSql($statement) { if (preg_match('/^(?:UPDATE|INSERT|DELETE)/i', $statement)) { invalidateHttpCache(); } + return $this->autoPrefix($statement); } - protected function compatibility($statement) { - return $statement; + public function lastInsertId($name = null) { + if ($name != null) { + $name = $this->preSql($name); + } + return parent::lastInsertId($name); } - abstract public function dbType(); - public function prepare($statement, $driver_options = array()) { - MinzPDO::check($statement); - $statement = $this->compatibility($statement); + $statement = $this->preSql($statement); return parent::prepare($statement, $driver_options); } public function exec($statement) { - MinzPDO::check($statement); - $statement = $this->compatibility($statement); + $statement = $this->preSql($statement); return parent::exec($statement); } public function query($statement) { - MinzPDO::check($statement); - $statement = $this->compatibility($statement); + $statement = $this->preSql($statement); return parent::query($statement); } } class MinzPDOMySql extends MinzPDO { + public function __construct($dsn, $username = null, $passwd = null, $options = null) { + parent::__construct($dsn, $username, $passwd, $options); + $this->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false); + } + public function dbType() { return 'mysql'; } @@ -164,6 +175,11 @@ class MinzPDOMySql extends MinzPDO { } class MinzPDOSQLite extends MinzPDO { + public function __construct($dsn, $username = null, $passwd = null, $options = null) { + parent::__construct($dsn, $username, $passwd, $options); + $this->exec('PRAGMA foreign_keys = ON;'); + } + public function dbType() { return 'sqlite'; } @@ -174,11 +190,17 @@ class MinzPDOSQLite extends MinzPDO { } class MinzPDOPGSQL extends MinzPDO { + public function __construct($dsn, $username = null, $passwd = null, $options = null) { + parent::__construct($dsn, $username, $passwd, $options); + $this->exec("SET NAMES 'UTF8';"); + } + public function dbType() { return 'pgsql'; } - protected function compatibility($statement) { + protected function preSql($statement) { + $statement = parent::preSql($statement); return str_replace(array('`', ' LIKE '), array('"', ' ILIKE '), $statement); } } diff --git a/lib/favicons.php b/lib/favicons.php index 7a2d1187e..bc82b57b9 100644 --- a/lib/favicons.php +++ b/lib/favicons.php @@ -1,6 +1,6 @@ true, CURLOPT_TIMEOUT => 15, CURLOPT_USERAGENT => FRESHRSS_USERAGENT, CURLOPT_MAXREDIRS => 10, - )); - if (version_compare(PHP_VERSION, '5.6.0') >= 0 || ini_get('open_basedir') == '') { - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); //Keep option separated for open_basedir PHP bug 65646 - } - if (defined('CURLOPT_ENCODING')) { - curl_setopt($ch, CURLOPT_ENCODING, ''); //Enable all encodings - } + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_ENCODING => '', //Enable all encodings + ]); curl_setopt_array($ch, $curlOptions); $response = curl_exec($ch); $info = curl_getinfo($ch); @@ -89,7 +85,6 @@ function searchFavicon(&$url) { } function download_favicon($url, $dest) { - global $default_favicon; $url = trim($url); $favicon = searchFavicon($url); if ($favicon == '') { @@ -109,5 +104,5 @@ function download_favicon($url, $dest) { } } return ($favicon != '' && file_put_contents($dest, $favicon)) || - @copy($default_favicon, $dest); + @copy(DEFAULT_FAVICON, $dest); } diff --git a/lib/lib_install.php b/lib/lib_install.php index 17defccf6..ed361eb39 100644 --- a/lib/lib_install.php +++ b/lib/lib_install.php @@ -78,69 +78,24 @@ function generateSalt() { return sha1(uniqid(mt_rand(), true).implode('', stat(__FILE__))); } -function checkDb(&$dbOptions) { - $dsn = ''; - $driver_options = null; - prepareSyslog(); - try { - switch ($dbOptions['type']) { - case 'mysql': - include_once(APP_PATH . '/SQL/install.sql.mysql.php'); - $driver_options = array( - PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4' - ); - try { // on ouvre une connexion juste pour créer la base si elle n'existe pas - $dsn = 'mysql:host=' . $dbOptions['host'] . ';'; - $c = new PDO($dsn, $dbOptions['user'], $dbOptions['password'], $driver_options); - $sql = sprintf(SQL_CREATE_DB, $dbOptions['base']); - $res = $c->query($sql); - } catch (PDOException $e) { - syslog(LOG_DEBUG, 'FreshRSS MySQL warning: ' . $e->getMessage()); - } - // on écrase la précédente connexion en sélectionnant la nouvelle BDD - $dsn = 'mysql:host=' . $dbOptions['host'] . ';dbname=' . $dbOptions['base']; - break; - case 'sqlite': - include_once(APP_PATH . '/SQL/install.sql.sqlite.php'); - $path = join_path(USERS_PATH, $dbOptions['default_user']); - if (!is_dir($path)) { - mkdir($path); - } - $dsn = 'sqlite:' . join_path($path, 'db.sqlite'); - $driver_options = array( - PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, - ); - break; - case 'pgsql': - include_once(APP_PATH . '/SQL/install.sql.pgsql.php'); - $driver_options = array( - PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, - ); - try { // on ouvre une connexion juste pour créer la base si elle n'existe pas - $dsn = 'pgsql:host=' . $dbOptions['host'] . ';dbname=postgres'; - $c = new PDO($dsn, $dbOptions['user'], $dbOptions['password'], $driver_options); - $sql = sprintf(SQL_CREATE_DB, $dbOptions['base']); - $res = $c->query($sql); - } catch (PDOException $e) { - syslog(LOG_DEBUG, 'FreshRSS PostgreSQL warning: ' . $e->getMessage()); - } - // on écrase la précédente connexion en sélectionnant la nouvelle BDD - $dsn = 'pgsql:host=' . $dbOptions['host'] . ';dbname=' . $dbOptions['base']; - break; - default: - return false; - } - - $c = new PDO($dsn, $dbOptions['user'], $dbOptions['password'], $driver_options); - $res = $c->query('SELECT 1'); - } catch (PDOException $e) { - $dsn = ''; - syslog(LOG_DEBUG, 'FreshRSS SQL warning: ' . $e->getMessage()); - $dbOptions['error'] = $e->getMessage(); +function checkDb() { + $conf = FreshRSS_Context::$system_conf; + $db = $conf->db; + if (empty($db['pdo_options'])) { + $db['pdo_options'] = []; } - $dbOptions['dsn'] = $dsn; - $dbOptions['options'] = $driver_options; - return $dsn != ''; + $db['pdo_options'][PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION; + $dbBase = isset($db['base']) ? $db['base'] : ''; + + $db['base'] = ''; //First connection without database name to create the database + Minz_ModelPdo::$usesSharedPdo = false; + $databaseDAO = FreshRSS_Factory::createDatabaseDAO(); + $databaseDAO->create(); + + $db['base'] = $dbBase; //New connection with the database name + $databaseDAO = FreshRSS_Factory::createDatabaseDAO(); + Minz_ModelPdo::$usesSharedPdo = true; + return $databaseDAO->testConnection(); } function deleteInstall() { diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 1bba60c36..854126b54 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -535,17 +535,16 @@ function _i($icon, $url_only = false) { } -$SHORTCUT_KEYS = array( //No const for < PHP 5.6 compatibility +const SHORTCUT_KEYS = [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'F1', 'F2', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'Backspace', 'Delete', 'End', 'Enter', 'Escape', 'Home', 'Insert', 'PageDown', 'PageUp', 'Space', 'Tab', - ); + ]; function validateShortcutList($shortcuts) { - global $SHORTCUT_KEYS; $legacy = array( 'down' => 'ArrowDown', 'left' => 'ArrowLeft', 'page_down' => 'PageDown', 'page_up' => 'PageUp', 'right' => 'ArrowRight', 'up' => 'ArrowUp', @@ -554,17 +553,17 @@ function validateShortcutList($shortcuts) { $shortcuts_ok = array(); foreach ($shortcuts as $key => $value) { - if (in_array($value, $SHORTCUT_KEYS)) { + if (in_array($value, SHORTCUT_KEYS)) { $shortcuts_ok[$key] = $value; } elseif (isset($legacy[$value])) { $shortcuts_ok[$key] = $legacy[$value]; } else { //Case-insensitive search if ($upper === null) { - $upper = array_map('strtoupper', $SHORTCUT_KEYS); + $upper = array_map('strtoupper', SHORTCUT_KEYS); } $i = array_search(strtoupper($value), $upper); if ($i !== false) { - $shortcuts_ok[$key] = $SHORTCUT_KEYS[$i]; + $shortcuts_ok[$key] = SHORTCUT_KEYS[$i]; } } } diff --git a/p/api/fever.php b/p/api/fever.php index b81646928..30b85dafd 100644 --- a/p/api/fever.php +++ b/p/api/fever.php @@ -95,7 +95,7 @@ class FeverDAO extends Minz_ModelPdo $sql = 'SELECT id, guid, title, author, ' . ($entryDAO->isCompressed() ? 'UNCOMPRESS(content_bin) AS content' : 'content') . ', link, date, is_read, is_favorite, id_feed ' - . 'FROM `' . $this->prefix . 'entry` WHERE'; + . 'FROM `_entry` WHERE'; if (!empty($entry_ids)) { $bindEntryIds = $this->bindParamArray('id', $entry_ids, $values); @@ -120,7 +120,7 @@ class FeverDAO extends Minz_ModelPdo $sql .= $order; $sql .= ' LIMIT 50'; - $stm = $this->bd->prepare($sql); + $stm = $this->pdo->prepare($sql); $stm->execute($values); $result = $stm->fetchAll(PDO::FETCH_ASSOC); diff --git a/p/api/greader.php b/p/api/greader.php index b6777796a..77e498524 100644 --- a/p/api/greader.php +++ b/p/api/greader.php @@ -76,12 +76,6 @@ function multiplePosts($name) { //https://bugs.php.net/bug.php?id=51633 return $result; } -class MyPDO extends Minz_ModelPdo { - function prepare($sql) { - return $this->bd->prepare(str_replace('%_', $this->prefix, $sql)); - } -} - function debugInfo() { if (function_exists('getallheaders')) { $ALL_HEADERS = getallheaders(); @@ -239,9 +233,8 @@ function userInfo() { //https://github.com/theoldreader/api#user-info function tagList() { header('Content-Type: application/json; charset=UTF-8'); - $pdo = new MyPDO(); - $stm = $pdo->prepare('SELECT c.name FROM `%_category` c'); - $stm->execute(); + $model = new Minz_ModelPdo(); + $stm = $model->pdo->query('SELECT c.name FROM `_category` c'); $res = $stm->fetchAll(PDO::FETCH_COLUMN, 0); $tags = array( @@ -277,10 +270,11 @@ function tagList() { function subscriptionList() { header('Content-Type: application/json; charset=UTF-8'); - $pdo = new MyPDO(); - $stm = $pdo->prepare('SELECT f.id, f.name, f.url, f.website, c.id as c_id, c.name as c_name FROM `%_feed` f - INNER JOIN `%_category` c ON c.id = f.category AND f.priority >= :priority_normal'); - $stm->execute(array(':priority_normal' => FreshRSS_Feed::PRIORITY_NORMAL)); + $model = new Minz_ModelPdo(); + $stm = $model->pdo->prepare('SELECT f.id, f.name, f.url, f.website, c.id as c_id, c.name as c_name FROM `_feed` f + INNER JOIN `_category` c ON c.id = f.category AND f.priority >= :priority_normal'); + $stm->bindValue(':priority_normal', FreshRSS_Feed::PRIORITY_NORMAL, PDO::PARAM_INT); + $stm->execute(); $res = $stm->fetchAll(PDO::FETCH_ASSOC); $salt = FreshRSS_Context::$system_conf->salt; diff --git a/p/f.php b/p/f.php index b68109cd5..9947539c3 100644 --- a/p/f.php +++ b/p/f.php @@ -5,13 +5,11 @@ require(LIB_PATH . '/favicons.php'); require(LIB_PATH . '/http-conditional.php'); function show_default_favicon($cacheSeconds = 3600) { - global $default_favicon; - header('Content-Disposition: inline; filename="default_favicon.ico"'); - $default_mtime = @filemtime($default_favicon); + $default_mtime = @filemtime(DEFAULT_FAVICON); if (!httpConditional($default_mtime, $cacheSeconds, 2)) { - readfile($default_favicon); + readfile(DEFAULT_FAVICON); } } @@ -20,8 +18,8 @@ if (!ctype_xdigit($id)) { $id = '0'; } -$txt = $favicons_dir . $id . '.txt'; -$ico = $favicons_dir . $id . '.ico'; +$txt = FAVICONS_DIR . $id . '.txt'; +$ico = FAVICONS_DIR . $id . '.ico'; $ico_mtime = @filemtime($ico); $txt_mtime = @filemtime($txt); -- cgit v1.2.3 From ef00513a816ae8f902d1ad5b1163ee81a3f26c46 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 29 Sep 2019 17:55:08 +0200 Subject: Quick fix: API PDO visibility bug (#2545) Introduced in https://github.com/FreshRSS/FreshRSS/pull/2522 --- p/api/greader.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'p') diff --git a/p/api/greader.php b/p/api/greader.php index 77e498524..24c43128b 100644 --- a/p/api/greader.php +++ b/p/api/greader.php @@ -76,6 +76,10 @@ function multiplePosts($name) { //https://bugs.php.net/bug.php?id=51633 return $result; } +class MyPDO extends Minz_ModelPdo { + public $pdo; +} + function debugInfo() { if (function_exists('getallheaders')) { $ALL_HEADERS = getallheaders(); @@ -233,7 +237,7 @@ function userInfo() { //https://github.com/theoldreader/api#user-info function tagList() { header('Content-Type: application/json; charset=UTF-8'); - $model = new Minz_ModelPdo(); + $model = new MyPDO(); $stm = $model->pdo->query('SELECT c.name FROM `_category` c'); $res = $stm->fetchAll(PDO::FETCH_COLUMN, 0); @@ -270,7 +274,7 @@ function tagList() { function subscriptionList() { header('Content-Type: application/json; charset=UTF-8'); - $model = new Minz_ModelPdo(); + $model = new MyPDO(); $stm = $model->pdo->prepare('SELECT f.id, f.name, f.url, f.website, c.id as c_id, c.name as c_name FROM `_feed` f INNER JOIN `_category` c ON c.id = f.category AND f.priority >= :priority_normal'); $stm->bindValue(':priority_normal', FreshRSS_Feed::PRIORITY_NORMAL, PDO::PARAM_INT); -- cgit v1.2.3 From ec5f7ad5542b74f9488580d1763d6ed376a63728 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 1 Oct 2019 18:12:48 +0200 Subject: Workaround for Firefox favicon glitch (#2543) Observed in Firefox 69: the favicon is sometimes refreshed with an old favicon that does not have the number of unread items on it. Seems to depend on load speed. --- p/scripts/main.js | 1 + 1 file changed, 1 insertion(+) (limited to 'p') diff --git a/p/scripts/main.js b/p/scripts/main.js index c51d91c8e..e414ab90e 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -1465,6 +1465,7 @@ function init_afterDOM() { init_posts(); init_nav_entries(); init_notifs_html5(); + setTimeout(faviconNbUnread, 1000); setInterval(refreshUnreads, 120000); } -- cgit v1.2.3 From b20fddc330932c55945534f9a219d81aefaf62c0 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 9 Oct 2019 23:37:47 +0200 Subject: Fix API i18n (#2565) Fix https://github.com/FreshRSS/FreshRSS/issues/2564 --- p/api/fever.php | 3 +++ p/api/greader.php | 3 +++ 2 files changed, 6 insertions(+) (limited to 'p') diff --git a/p/api/fever.php b/p/api/fever.php index 30b85dafd..94d3a3b3d 100644 --- a/p/api/fever.php +++ b/p/api/fever.php @@ -165,9 +165,12 @@ class FeverAPI $user_conf = get_user_configuration($username); if ($user_conf != null && $feverKey === $user_conf->feverKey) { FreshRSS_Context::$user_conf = $user_conf; + Minz_Translate::init(FreshRSS_Context::$user_conf->language); $this->entryDAO = FreshRSS_Factory::createEntryDao(); $this->feedDAO = FreshRSS_Factory::createFeedDao(); return true; + } else { + Minz_Translate::init(); } Minz_Log::error('Fever API: Reset API password for user: ' . $username, API_LOG); Minz_Log::error('Fever API: Please reset your API password!'); diff --git a/p/api/greader.php b/p/api/greader.php index 24c43128b..66888b0ef 100644 --- a/p/api/greader.php +++ b/p/api/greader.php @@ -916,6 +916,9 @@ $user = authorizationToUser(); FreshRSS_Context::$user_conf = null; if ($user !== '') { FreshRSS_Context::$user_conf = get_user_configuration($user); + Minz_Translate::init(FreshRSS_Context::$user_conf->language); +} else { + Minz_Translate::init(); } Minz_Session::_param('currentUser', $user); -- cgit v1.2.3 From 9dccfd23f41b7a30a8ab2bf90d9846f5030e0408 Mon Sep 17 00:00:00 2001 From: Offerel <14041522+Offerel@users.noreply.github.com> Date: Tue, 15 Oct 2019 11:37:44 +0200 Subject: Fix for broken reading view icon in Firefox (#2569) --- p/themes/Swage/icons/view-reader.svg | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'p') diff --git a/p/themes/Swage/icons/view-reader.svg b/p/themes/Swage/icons/view-reader.svg index f8f9e7af5..afb82adf7 100644 --- a/p/themes/Swage/icons/view-reader.svg +++ b/p/themes/Swage/icons/view-reader.svg @@ -1,6 +1 @@ - - - - - - + \ No newline at end of file -- cgit v1.2.3 From ab4c3891ba27604d3b0f3bd79ad0f697c92ce246 Mon Sep 17 00:00:00 2001 From: Offerel <14041522+Offerel@users.noreply.github.com> Date: Wed, 16 Oct 2019 08:16:04 +0200 Subject: Fix for broken read icon in Firefox (#2571) * Fix for broken reading view icon in Firefox * Update CREDITS.md * Update CREDITS.md * Fix for broken read icon in Firefox --- CREDITS.md | 1 + p/themes/Swage/icons/read.svg | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'p') diff --git a/CREDITS.md b/CREDITS.md index d0fc05fcb..176a003f3 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -52,6 +52,7 @@ People are sorted by name so please keep this order. * [Nicolas Elie](https://github.com/nicolaselie): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=nicolaselie) * [Nicolas Frandeboeuf](https://github.com/nicofrand): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=nicofrand), [Web](https://nicofrand.ey) * [Nicolas Lœuillet](https://github.com/nicosomb): [contributions](https://github.com/FreshRSS/documentation/commits?author=nicosomb), [Web](http://www.loeuillet.org/) +* [Offerel](https://github.com/Offerel): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:Offerel) * [Olivier Dossmann](https://github.com/blankoworld): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=blankoworld), [Web](https://olivier.dossmann.net) * [Patrick Crandol](https://github.com/pattems): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:pattems) * [Paulius Šukys](https://github.com/psukys): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:psukys), [Web](http://sukys.eu) diff --git a/p/themes/Swage/icons/read.svg b/p/themes/Swage/icons/read.svg index 86f3e60f3..4ab272b39 100644 --- a/p/themes/Swage/icons/read.svg +++ b/p/themes/Swage/icons/read.svg @@ -1,5 +1 @@ - - - - - + \ No newline at end of file -- cgit v1.2.3 From 21936c1373d0ac7c90b32ddd766d1373c991326e Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 20 Oct 2019 22:10:24 +0200 Subject: Comply with LibreJS (#2576) https://www.gnu.org/software/librejs/ https://addons.mozilla.org/firefox/addon/librejs/ Did not touch jquery.min.js because it is a third party script, which is regularly updated, and the add-on does not seem to block it enough to break our statitics page, which remains usable. --- p/scripts/api.js | 2 ++ p/scripts/bcrypt.min.js | 2 ++ p/scripts/category.js | 2 ++ p/scripts/extra.js | 2 ++ p/scripts/flotr2.min.js | 2 ++ p/scripts/global_view.js | 2 ++ p/scripts/install.js | 2 ++ p/scripts/main.js | 2 ++ p/scripts/repartition.js | 2 ++ p/scripts/stats.js | 2 ++ 10 files changed, 20 insertions(+) (limited to 'p') diff --git a/p/scripts/api.js b/p/scripts/api.js index 841b16a6a..f9dcabf01 100644 --- a/p/scripts/api.js +++ b/p/scripts/api.js @@ -1,3 +1,4 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0 "use strict"; /* jshint esversion:6, strict:global */ @@ -60,3 +61,4 @@ check(jsonVars.fever + '?api', function next(result1) { }); } }); +// @license-end diff --git a/p/scripts/bcrypt.min.js b/p/scripts/bcrypt.min.js index 23d2a73aa..28c7a6b47 100644 --- a/p/scripts/bcrypt.min.js +++ b/p/scripts/bcrypt.min.js @@ -1,3 +1,4 @@ +// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7&dn=apache-2.0.txt Apache-2.0 /* bcrypt.js (c) 2013 Daniel Wirtz Released under the Apache License, Version 2.0 @@ -55,3 +56,4 @@ e[b++]=c>>12|224,e[b++]=c>>6&63|128),e[b++]=c&63|128);return e},x="./ABCDEFGHIJK 18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953, 1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296, 2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462],C=[1332899944,1700884034,1701343084,1684370003,1668446532,1869963892];m.encodeBase64=p;m.decodeBase64=q;return m}); +// @license-end diff --git a/p/scripts/category.js b/p/scripts/category.js index 86d8542f1..c01b1fdd7 100644 --- a/p/scripts/category.js +++ b/p/scripts/category.js @@ -1,3 +1,4 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0 "use strict"; /* globals context */ /* jshint esversion:6, strict:global */ @@ -143,3 +144,4 @@ if (document.readyState && document.readyState !== 'loading') { init_draggable(); }, false); } +// @license-end diff --git a/p/scripts/extra.js b/p/scripts/extra.js index c0d0c89e1..bba2e8e2b 100644 --- a/p/scripts/extra.js +++ b/p/scripts/extra.js @@ -1,3 +1,4 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0 "use strict"; /* globals context, openNotification, xmlHttpRequestJson */ /* jshint esversion:6, strict:global */ @@ -239,3 +240,4 @@ if (document.readyState && document.readyState !== 'loading') { init_extra(); }, false); } +// @license-end diff --git a/p/scripts/flotr2.min.js b/p/scripts/flotr2.min.js index c3601e827..527cb2fd2 100644 --- a/p/scripts/flotr2.min.js +++ b/p/scripts/flotr2.min.js @@ -1,3 +1,4 @@ +// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat /*! * bean.js - copyright Jacob Thornton 2011 * https://github.com/fat/bean @@ -25,3 +26,4 @@ * Flot: https://github.com/flot/flot (original fork) */ (function(){var e=this,t=this.Flotr,n;n={_:_,bean:bean,isIphone:/iphone/i.test(navigator.userAgent),isIE:navigator.appVersion.indexOf("MSIE")!=-1?parseFloat(navigator.appVersion.split("MSIE")[1]):!1,graphTypes:{},plugins:{},addType:function(e,t){n.graphTypes[e]=t,n.defaultOptions[e]=t.options||{},n.defaultOptions.defaultType=n.defaultOptions.defaultType||e},addPlugin:function(e,t){n.plugins[e]=t,n.defaultOptions[e]=t.options||{}},draw:function(e,t,r,i){return i=i||n.Graph,new i(e,t,r)},merge:function(e,t){var r,i,s=t||{};for(r in e)i=e[r],i&&typeof i=="object"?i.constructor===Array?s[r]=this._.clone(i):i.constructor!==RegExp&&!this._.isElement(i)&&!i.jquery?s[r]=n.merge(i,t?t[r]:undefined):s[r]=i:s[r]=i;return s},clone:function(e){return n.merge(e,{})},getTickSize:function(e,t,r,i){var s=(r-t)/e,o=n.getMagnitude(s),u=10,a=s/o;return a<1.5?u=1:a<2.25?u=2:a<3?u=i===0?2:2.5:a<7.5&&(u=5),u*o},defaultTickFormatter:function(e,t){return e+""},defaultTrackFormatter:function(e){return"("+e.x+", "+e.y+")"},engineeringNotation:function(e,t,n){var r=["Y","Z","E","P","T","G","M","k",""],i=["y","z","a","f","p","n","µ","m",""],s=r.length;n=n||1e3,t=Math.pow(10,t||2);if(e===0)return 0;if(e>1)while(s--&&e>=n)e/=n;else{r=i,s=r.length;while(s--&&e<1)e*=n}return Math.round(e*t)/t+r[s]},getMagnitude:function(e){return Math.pow(10,Math.floor(Math.log(e)/Math.LN10))},toPixel:function(e){return Math.floor(e)+.5},toRad:function(e){return-e*(Math.PI/180)},floorInBase:function(e,t){return t*Math.floor(e/t)},drawText:function(e,t,r,i,s){if(!e.fillText){e.drawText(t,r,i,s);return}s=this._.extend({size:n.defaultOptions.fontSize,color:"#000000",textAlign:"left",textBaseline:"bottom",weight:1,angle:0},s),e.save(),e.translate(r,i),e.rotate(s.angle),e.fillStyle=s.color,e.font=(s.weight>1?"bold ":"")+s.size*1.3+"px sans-serif",e.textAlign=s.textAlign,e.textBaseline=s.textBaseline,e.fillText(t,0,0),e.restore()},getBestTextAlign:function(e,t){return t=t||{textAlign:"center",textBaseline:"middle"},e+=n.getTextAngleFromAlign(t),Math.abs(Math.cos(e))>.01&&(t.textAlign=Math.cos(e)>0?"right":"left"),Math.abs(Math.sin(e))>.01&&(t.textBaseline=Math.sin(e)>0?"top":"bottom"),t},alignTable:{"right middle":0,"right top":Math.PI/4,"center top":Math.PI/2,"left top":3*(Math.PI/4),"left middle":Math.PI,"left bottom":-3*(Math.PI/4),"center bottom":-Math.PI/2,"right bottom":-Math.PI/4,"center middle":0},getTextAngleFromAlign:function(e){return n.alignTable[e.textAlign+" "+e.textBaseline]||0},noConflict:function(){return e.Flotr=t,this}},e.Flotr=n})(),Flotr.defaultOptions={colors:["#00A8F0","#C0D800","#CB4B4B","#4DA74D","#9440ED"],ieBackgroundColor:"#FFFFFF",title:null,subtitle:null,shadowSize:4,defaultType:null,HtmlText:!0,fontColor:"#545454",fontSize:7.5,resolution:1,parseFloat:!0,preventDefault:!0,xaxis:{ticks:null,minorTicks:null,showLabels:!0,showMinorLabels:!1,labelsAngle:0,title:null,titleAngle:0,noTicks:5,minorTickFreq:null,tickFormatter:Flotr.defaultTickFormatter,tickDecimals:null,min:null,max:null,autoscale:!1,autoscaleMargin:0,color:null,mode:"normal",timeFormat:null,timeMode:"UTC",timeUnit:"millisecond",scaling:"linear",base:Math.E,titleAlign:"center",margin:!0},x2axis:{},yaxis:{ticks:null,minorTicks:null,showLabels:!0,showMinorLabels:!1,labelsAngle:0,title:null,titleAngle:90,noTicks:5,minorTickFreq:null,tickFormatter:Flotr.defaultTickFormatter,tickDecimals:null,min:null,max:null,autoscale:!1,autoscaleMargin:0,color:null,scaling:"linear",base:Math.E,titleAlign:"center",margin:!0},y2axis:{titleAngle:270},grid:{color:"#545454",backgroundColor:null,backgroundImage:null,watermarkAlpha:.4,tickColor:"#DDDDDD",labelMargin:3,verticalLines:!0,minorVerticalLines:null,horizontalLines:!0,minorHorizontalLines:null,outlineWidth:1,outline:"nsew",circular:!1},mouse:{track:!1,trackAll:!1,position:"se",relative:!1,trackFormatter:Flotr.defaultTrackFormatter,margin:5,lineColor:"#FF3F19",trackDecimals:1,sensibility:2,trackY:!0,radius:3,fillColor:null,fillOpacity:.4}},function(){function t(e,t,n,r){this.rgba=["r","g","b","a"];var i=4;while(-1<--i)this[this.rgba[i]]=arguments[i]||(i==3?1:0);this.normalize()}var e=Flotr._,n={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]};t.prototype={scale:function(t,n,r,i){var s=4;while(-1<--s)e.isUndefined(arguments[s])||(this[this.rgba[s]]*=arguments[s]);return this.normalize()},alpha:function(t){return!e.isUndefined(t)&&!e.isNull(t)&&(this.a=t),this.normalize()},clone:function(){return new t(this.r,this.b,this.g,this.a)},limit:function(e,t,n){return Math.max(Math.min(e,n),t)},normalize:function(){var e=this.limit;return this.r=e(parseInt(this.r,10),0,255),this.g=e(parseInt(this.g,10),0,255),this.b=e(parseInt(this.b,10),0,255),this.a=e(this.a,0,1),this},distance:function(e){if(!e)return;e=new t.parse(e);var n=0,r=3;while(-1<--r)n+=Math.abs(this[this.rgba[r]]-e[this.rgba[r]]);return n},toString:function(){return this.a>=1?"rgb("+[this.r,this.g,this.b].join(",")+")":"rgba("+[this.r,this.g,this.b,this.a].join(",")+")"},contrast:function(){var e=1-(.299*this.r+.587*this.g+.114*this.b)/255;return e<.5?"#000000":"#ffffff"}},e.extend(t,{parse:function(e){if(e instanceof t)return e;var r;if(r=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(e))return new t(parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16));if(r=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(e))return new t(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10));if(r=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(e))return new t(parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16));if(r=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(e))return new t(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10),parseFloat(r[4]));if(r=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(e))return new t(parseFloat(r[1])*2.55,parseFloat(r[2])*2.55,parseFloat(r[3])*2.55);if(r=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(e))return new t(parseFloat(r[1])*2.55,parseFloat(r[2])*2.55,parseFloat(r[3])*2.55,parseFloat(r[4]));var i=(e+"").replace(/^\s*([\S\s]*?)\s*$/,"$1").toLowerCase();return i=="transparent"?new t(255,255,255,0):(r=n[i])?new t(r[0],r[1],r[2]):new t(0,0,0,0)},processColor:function(n,r){var i=r.opacity;if(!n)return"rgba(0, 0, 0, 0)";if(n instanceof t)return n.alpha(i).toString();if(e.isString(n))return t.parse(n).alpha(i).toString();var s=n.colors?n:{colors:n};if(!r.ctx)return e.isArray(s.colors)?t.parse(e.isArray(s.colors[0])?s.colors[0][1]:s.colors[0]).alpha(i).toString():"rgba(0, 0, 0, 0)";s=e.extend({start:"top",end:"bottom"},s),/top/i.test(s.start)&&(r.x1=0),/left/i.test(s.start)&&(r.y1=0),/bottom/i.test(s.end)&&(r.x2=0),/right/i.test(s.end)&&(r.y2=0);var o,u,a,f=r.ctx.createLinearGradient(r.x1,r.y1,r.x2,r.y2);for(o=0;o=h)break}h=i[v][0],p=i[v][1],p=="year"&&(h=Flotr.getTickSize(s.noTicks*r.year,a,f,0),h==.5&&(p="month",h=6)),e.tickUnit=p,e.tickSize=h;var g=h*r[p];m=new Date(a);switch(p){case"millisecond":y("Milliseconds");break;case"second":y("Seconds");break;case"minute":y("Minutes");break;case"hour":y("Hours");break;case"month":y("Month");break;case"year":y("FullYear")}g>=r.second&&t(m,"Milliseconds",o,0),g>=r.minute&&t(m,"Seconds",o,0),g>=r.hour&&t(m,"Minutes",o,0),g>=r.day&&t(m,"Hours",o,0),g>=r.day*4&&t(m,"Date",o,1),g>=r.year&&t(m,"Month",o,0);var b=0,w=NaN,E;do{E=w,w=m.getTime(),c.push({v:w/u,label:d(w/u,e)});if(p=="month")if(h<1){t(m,"Date",o,1);var S=m.getTime();t(m,"Month",o,n(m,"Month",o)+1);var x=m.getTime();m.setTime(w+b*r.hour+(x-S)*h),b=n(m,"Hours",o),t(m,"Hours",o,0)}else t(m,"Month",o,n(m,"Month",o)+h);else p=="year"?t(m,"FullYear",o,n(m,"FullYear",o)+h):m.setTime(w+g)}while(w0)return{x:t.touches[0].pageX,y:t.touches[0].pageY};if(!e._.isUndefined(t.changedTouches)&&t.changedTouches.length>0)return{x:t.changedTouches[0].pageX,y:t.changedTouches[0].pageY};if(t.pageX||t.pageY)return{x:t.pageX,y:t.pageY};if(t.clientX||t.clientY){var n=document,r=n.body,i=n.documentElement;return{x:t.clientX+r.scrollLeft+i.scrollLeft,y:t.clientY+r.scrollTop+i.scrollTop}}}}}(),function(){var e=Flotr,t=e.DOM,n=e._,r=function(e){this.o=e};r.prototype={dimensions:function(e,t,n,r){return e?this.o.html?this.html(e,this.o.element,n,r):this.canvas(e,t):{width:0,height:0}},canvas:function(t,n){if(!this.o.textEnabled)return;n=n||{};var r=this.measureText(t,n),i=r.width,s=n.size||e.defaultOptions.fontSize,o=n.angle||0,u=Math.cos(o),a=Math.sin(o),f=2,l=6,c;return c={width:Math.abs(u*i)+Math.abs(a*s)+f,height:Math.abs(a*i)+Math.abs(u*s)+l},c},html:function(e,n,r,i){var s=t.create("div");return t.setStyles(s,{position:"absolute",top:"-10000px"}),t.insert(s,'
    '+e+"
    "),t.insert(this.o.element,s),t.size(s)},measureText:function(t,r){var i=this.o.ctx,s;return!i.fillText||e.isIphone&&i.measure?{width:i.measure(t,r)}:(r=n.extend({size:e.defaultOptions.fontSize,weight:1,angle:0},r),i.save(),i.font=(r.weight>1?"bold ":"")+r.size*1.3+"px sans-serif",s=i.measureText(t),i.restore(),s)}},Flotr.Text=r}(),function(){function i(e,n,r){return t.observe.apply(this,arguments),this._handles.push(arguments),this}var e=Flotr.DOM,t=Flotr.EventAdapter,n=Flotr._,r=Flotr;Graph=function(e,i,s){this._setEl(e),this._initMembers(),this._initPlugins(),t.fire(this.el,"flotr:beforeinit",[this]),this.data=i,this.series=r.Series.getSeries(i),this._initOptions(s),this._initGraphTypes(),this._initCanvas(),this._text=new r.Text({element:this.el,ctx:this.ctx,html:this.options.HtmlText,textEnabled:this.textEnabled}),t.fire(this.el,"flotr:afterconstruct",[this]),this._initEvents(),this.findDataRanges(),this.calculateSpacing(),this.draw(n.bind(function(){t.fire(this.el,"flotr:afterinit",[this])},this))},Graph.prototype={destroy:function(){t.fire(this.el,"flotr:destroy"),n.each(this._handles,function(e){t.stopObserving.apply(this,e)}),this._handles=[],this.el.graph=null},observe:i,_observe:i,processColor:function(e,t){var i={x1:0,y1:0,x2:this.plotWidth,y2:this.plotHeight,opacity:1,ctx:this.ctx};return n.extend(i,t),r.Color.processColor(e,i)},findDataRanges:function(){var e=this.axes,t,i,s;n.each(this.series,function(e){s=e.getRange(),s&&(t=e.xaxis,i=e.yaxis,t.datamin=Math.min(s.xmin,t.datamin),t.datamax=Math.max(s.xmax,t.datamax),i.datamin=Math.min(s.ymin,i.datamin),i.datamax=Math.max(s.ymax,i.datamax),t.used=t.used||s.xused,i.used=i.used||s.yused)},this),!e.x.used&&!e.x2.used&&(e.x.used=!0),!e.y.used&&!e.y2.used&&(e.y.used=!0),n.each(e,function(e){e.calculateRange()});var o=n.keys(r.graphTypes),u=!1;n.each(this.series,function(e){if(e.hide)return;n.each(o,function(t){e[t]&&e[t].show&&(this.extendRange(t,e),u=!0)},this),u||this.extendRange(this.options.defaultType,e)},this)},extendRange:function(e,t){this[e].extendRange&&this[e].extendRange(t,t.data,t[e],this[e]),this[e].extendYRange&&this[e].extendYRange(t.yaxis,t.data,t[e],this[e]),this[e].extendXRange&&this[e].extendXRange(t.xaxis,t.data,t[e],this[e])},calculateSpacing:function(){var e=this.axes,t=this.options,r=this.series,i=t.grid.labelMargin,s=this._text,o=e.x,u=e.x2,a=e.y,f=e.y2,l=t.grid.outlineWidth,c,h,p,d;n.each(e,function(e){e.calculateTicks(),e.calculateTextDimensions(s,t)}),d=s.dimensions(t.title,{size:t.fontSize*1.5},"font-size:1em;font-weight:bold;","flotr-title"),this.titleHeight=d.height,d=s.dimensions(t.subtitle,{size:t.fontSize},"font-size:smaller;","flotr-subtitle"),this.subtitleHeight=d.height;for(h=0;h1&&(this.multitouches=n.touches),t.fire(e,"flotr:mousedown",[event,this]),this.observe(document,"touchend",r)},this)),this.observe(this.overlay,"touchmove",n.bind(function(n){var r=this.getEventPosition(n);this.options.preventDefault&&n.preventDefault(),i=!0,this.multitouches||n.touches&&n.touches.length>1?this.multitouches=n.touches:s||t.fire(e,"flotr:mousemove",[event,r,this]),this.lastMousePos=r},this))):this.observe(this.overlay,"mousedown",n.bind(this.mouseDownHandler,this)).observe(e,"mousemove",n.bind(this.mouseMoveHandler,this)).observe(this.overlay,"click",n.bind(this.clickHandler,this)).observe(e,"mouseout",function(n){t.fire(e,"flotr:mouseout",n)})},_initCanvas:function(){function l(i,s){return i||(i=e.create("canvas"),typeof FlashCanvas!="undefined"&&typeof i.getContext=="function"&&(FlashCanvas.initElement(i),this.isFlashCanvas=!0),i.className="flotr-"+s,i.style.cssText="position:absolute;left:0px;top:0px;",e.insert(t,i)),n.each(a,function(t,n){e.show(i);if(s=="canvas"&&i.getAttribute(n)===t)return;i.setAttribute(n,t*r.resolution),i.style[n]=t+"px"}),i.context_=null,i}function c(e){window.G_vmlCanvasManager&&window.G_vmlCanvasManager.initElement(e);var t=e.getContext("2d");return window.G_vmlCanvasManager||t.scale(r.resolution,r.resolution),t}var t=this.el,r=this.options,i=t.children,s=[],o,u,a,f;for(u=i.length;u--;)o=i[u],!this.canvas&&o.className==="flotr-canvas"?this.canvas=o:!this.overlay&&o.className==="flotr-overlay"?this.overlay=o:s.push(o);for(u=s.length;u--;)t.removeChild(s[u]);e.setStyles(t,{position:"relative"}),a={},a.width=t.clientWidth,a.height=t.clientHeight;if(a.width<=0||a.height<=0||r.resolution<=0)throw"Invalid dimensions for plot, width = "+a.width+", height = "+a.height+", resolution = "+r.resolution;this.canvas=l(this.canvas,"canvas"),this.overlay=l(this.overlay,"overlay"),this.ctx=c(this.canvas),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.octx=c(this.overlay),this.octx.clearRect(0,0,this.overlay.width,this.overlay.height),this.canvasHeight=a.height,this.canvasWidth=a.width,this.textEnabled=!!this.ctx.drawText||!!this.ctx.fillText},_initPlugins:function(){n.each(r.plugins,function(e,t){n.each(e.callbacks,function(e,t){this.observe(this.el,t,n.bind(e,this))},this),this[t]=r.clone(e),n.each(this[t],function(e,r){n.isFunction(e)&&(this[t][r]=n.bind(e,this))},this)},this)},_initOptions:function(e){var i=r.clone(r.defaultOptions);i.x2axis=n.extend(n.clone(i.xaxis),i.x2axis),i.y2axis=n.extend(n.clone(i.yaxis),i.y2axis),this.options=r.merge(e||{},i),this.options.grid.minorVerticalLines===null&&this.options.xaxis.scaling==="logarithmic"&&(this.options.grid.minorVerticalLines=!0),this.options.grid.minorHorizontalLines===null&&this.options.yaxis.scaling==="logarithmic"&&(this.options.grid.minorHorizontalLines=!0),t.fire(this.el,"flotr:afterinitoptions",[this]),this.axes=r.Axis.getAxes(this.options);var s=[],o=[],u=this.series.length,a=this.series.length,f=this.options.colors,l=[],c=0,h,p,d,v;for(p=a-1;p>-1;--p)h=this.series[p].color,h&&(--a,n.isNumber(h)?s.push(h):l.push(r.Color.parse(h)));for(p=s.length-1;p>-1;--p)a=Math.max(a,s[p]+1);for(p=0;o.length=f.length&&(p=0,++c)}for(p=0,d=0;p10?t.minorTickFreq=0:o-u>5?t.minorTickFreq=2:t.minorTickFreq=5)}else e.tickSize=Flotr.getTickSize(t.noTicks,n,r,t.tickDecimals);e.min=n,e.max=r,t.min===null&&t.autoscale&&(e.min-=e.tickSize*i,e.min<0&&e.datamin>=0&&(e.min=0),e.min=e.tickSize*Math.floor(e.min/e.tickSize)),t.max===null&&t.autoscale&&(e.max+=e.tickSize*i,e.max>0&&e.datamax<=0&&e.datamax!=e.datamin&&(e.max=0),e.max=e.tickSize*Math.ceil(e.max/e.tickSize)),e.min==e.max&&(e.max=e.min+1)},calculateTextDimensions:function(e,t){var n="",r,i;if(this.options.showLabels)for(i=0;in.length&&(n=this.ticks[i].label);this.maxLabel=e.dimensions(n,{size:t.fontSize,angle:Flotr.toRad(this.options.labelsAngle)},"font-size:smaller;","flotr-grid-label"),this.titleSize=e.dimensions(this.options.title,{size:t.fontSize*1.2,angle:Flotr.toRad(this.options.titleAngle)},"font-weight:bold;","flotr-axis-title")},_cleanUserTicks:function(t,n){var r=this,i=this.options,s,o,u,a;e.isFunction(t)&&(t=t({min:r.min,max:r.max}));for(o=0;o1?a[1]:i.tickFormatter(s,{min:r.min,max:r.max})):(s=a,u=i.tickFormatter(s,{min:this.min,max:this.max})),n[o]={v:s,label:u}},_calculateTimeTicks:function(){this.ticks=Flotr.Date.generator(this)},_calculateLogTicks:function(){var e=this,t=e.options,n,r,s=Math.log(e.max);t.base!=Math.E&&(s/=Math.log(t.base)),s=Math.ceil(s);var o=Math.log(e.min);t.base!=Math.E&&(o/=Math.log(t.base)),o=Math.ceil(o);for(i=o;ii&&(i=a,o=!0)),f!==null&&(fs&&(s=f,u=!0));return{xmin:n,xmax:i,ymin:r,ymax:s,xused:o,yused:u}}},e.extend(t,{getSeries:function(n){return e.map(n,function(n){var r;return n.data?(r=new t,e.extend(r,n)):r=new t({data:n}),r})}}),Flotr.Series=t}(),Flotr.addType("lines",{options:{show:!1,lineWidth:2,fill:!1,fillBorder:!1,fillColor:null,fillOpacity:.4,steps:!1,stacked:!1},stack:{values:[]},draw:function(e){var t=e.context,n=e.lineWidth,r=e.shadowSize,i;t.save(),t.lineJoin="round",r&&(t.lineWidth=r/2,i=n/2+t.lineWidth/2,t.strokeStyle="rgba(0,0,0,0.1)",this.plot(e,i+r/2,!1),t.strokeStyle="rgba(0,0,0,0.2)",this.plot(e,i,!1)),t.lineWidth=n,t.strokeStyle=e.color,this.plot(e,0,!0),t.restore()},plot:function(e,t,n){function S(){!t&&e.fill&&d&&(v=o(d[0]),r.fillStyle=e.fillStyle,r.lineTo(m,p),r.lineTo(v,p),r.lineTo(v,u(d[1])),r.fill(),e.fillBorder&&r.stroke())}var r=e.context,i=e.width,s=e.height,o=e.xScale,u=e.yScale,a=e.data,f=e.stacked?this.stack:!1,l=a.length-1,c=null,h=null,p=u(0),d=null,v,m,g,y,b,w,E;if(l<1)return;r.beginPath();for(E=0;E0&&a[E][1]!==null&&(r.stroke(),S(),d=null,r.closePath(),r.beginPath());continue}v=o(a[E][0]),m=o(a[E+1][0]),d===null&&(d=a[E]),f?(b=f.values[a[E][0]]||0,w=f.values[a[E+1][0]]||f.values[a[E][0]]||0,g=u(a[E][1]+b),y=u(a[E+1][1]+w),n&&(a[E].y0=b,f.values[a[E][0]]=a[E][1]+b,E==l-1&&(a[E+1].y0=w,f.values[a[E+1][0]]=a[E+1][1]+w))):(g=u(a[E][1]),y=u(a[E+1][1]));if(g>s&&y>s||g<0&&y<0||v<0&&m<0||v>i&&m>i)continue;(c!=v||h!=g+t)&&r.moveTo(v,g+t),c=m,h=y+t,e.steps?(r.lineTo(c+t/2,g+t),r.lineTo(c+t/2,h)):r.lineTo(c,h)}(!e.fill||e.fill&&!e.fillBorder)&&r.stroke(),S(),r.closePath()},extendYRange:function(e,t,n,r){var i=e.options;if(n.stacked&&(!i.max&&i.max!==0||!i.min&&i.min!==0)){var s=e.max,o=e.min,u=r.positiveSums||{},a=r.negativeSums||{},f,l;for(l=0;l0?(u[f]=(u[f]||0)+t[l][1],s=Math.max(s,u[f])):(a[f]=(a[f]||0)+t[l][1],o=Math.min(o,a[f]));r.negativeSums=a,r.positiveSums=u,e.max=s,e.min=o}n.steps&&(this.hit=function(e){var t=e.data,n=e.args,r=e.yScale,i=n[0],s=t.length,o=n[1],u=e.xInverse(i.relX),a=i.relY,f;for(f=0;f=t[f][0]&&u<=t[f+1][0]){Math.abs(r(t[f][1])-a)<8&&(o.x=t[f][0],o.y=t[f][1],o.index=f,o.seriesIndex=e.index);break}},this.drawHit=function(e){var t=e.context,n=e.args,r=e.data,i=e.xScale,s=n.index,o=i(n.x),u=e.yScale(n.y),a;r.length-1>s&&(a=e.xScale(r[s+1][0]),t.save(),t.strokeStyle=e.color,t.lineWidth=e.lineWidth,t.beginPath(),t.moveTo(o,u),t.lineTo(a,u),t.stroke(),t.closePath(),t.restore())},this.clearHit=function(e){var t=e.context,n=e.args,r=e.data,i=e.xScale,s=e.lineWidth,o=n.index,u=i(n.x),a=e.yScale(n.y),f;r.length-1>o&&(f=e.xScale(r[o+1][0]),t.clearRect(u-s,a-s,f-u+2*s,2*s))})}}),Flotr.addType("bars",{options:{show:!1,lineWidth:2,barWidth:1,fill:!0,fillColor:null,fillOpacity:.4,horizontal:!1,stacked:!1,centered:!0,topPadding:.1,grouped:!1},stack:{positive:[],negative:[],_positive:[],_negative:[]},draw:function(e){var t=e.context;this.current+=1,t.save(),t.lineJoin="miter",t.lineWidth=e.lineWidth,t.strokeStyle=e.color,e.fill&&(t.fillStyle=e.fillStyle),this.plot(e),t.restore()},plot:function(e){var t=e.data,n=e.context,r=e.shadowSize,i,s,o,u,a,f;if(t.length<1)return;this.translate(n,e.horizontal);for(i=0;i0?o.positive:o.negative,p=d[c]||p,d[c]=p+h),v=f(c-a),m=f(c+i-a),g=l(h+p),y=l(p),y<0&&(y=0),e===null||t===null?null:{x:c,y:h,xScale:f,yScale:l,top:g,left:Math.min(v,m)-u/2,width:Math.abs(m-v)-u,height:y-g}},hit:function(e){var t=e.data,n=e.args,r=n[0],i=n[1],s=e.xInverse(r.relX),o=e.yInverse(r.relY),u=this.getBarGeometry(s,o,e),a=u.width/2,f=u.left,l=u.y,c,h;for(h=t.length;h--;)c=this.getBarGeometry(t[h][0],t[h][1],e),(l>0&&lc.y)&&Math.abs(f-c.left)0?(f[c]=(f[c]||0)+h,o=Math.max(o,f[c])):(l[c]=(l[c]||0)+h,s=Math.min(s,l[c]));(a==1&&u||a==-1&&!u)&&n.topPadding&&(e.max===e.datamax||n.stacked&&this.stackMax!==o)&&(o+=n.topPadding*(o-s)),this.stackMin=s,this.stackMax=o,this.negativeSums=l,this.positiveSums=f,e.max=o,e.min=s}}),Flotr.addType("bubbles",{options:{show:!1,lineWidth:2,fill:!0,fillOpacity:.4,baseRadius:2},draw:function(e){var t=e.context,n=e.shadowSize;t.save(),t.lineWidth=e.lineWidth,t.fillStyle="rgba(0,0,0,0.05)",t.strokeStyle="rgba(0,0,0,0.05)",this.plot(e,n/2),t.strokeStyle="rgba(0,0,0,0.1)",this.plot(e,n/4),t.strokeStyle=e.color,t.fillStyle=e.fillStyle,this.plot(e),t.restore()},plot:function(e,t){var n=e.data,r=e.context,i,s,o,u,a;t=t||0;for(s=0;sg?"downFillColor":"upFillColor"],e.fill&&!e.barcharts&&(n.fillStyle="rgba(0,0,0,0.05)",n.fillRect(y+o,x+o,b-y,S-x),n.save(),n.globalAlpha=e.fillOpacity,n.fillStyle=l,n.fillRect(y,x+u,b-y,S-x),n.restore());if(u||a)h=Math.floor((y+b)/2)+f,n.strokeStyle=l,n.beginPath(),e.barcharts?(n.moveTo(h,Math.floor(E+u)),n.lineTo(h,Math.floor(w+u)),T=dv&&ag&&fs.max||yo.max)continue;vs.max&&(m=s.max,s.lastSerie!=e&&(p=!1)),go.max&&(y=o.max,o.lastSerie!=e&&(p=!1)),r&&(u.beginPath(),u.moveTo(s.d2p(v),o.d2p(g)+n),u.lineTo(s.d2p(v),o.d2p(y)+n),u.lineTo(s.d2p(m),o.d2p(y)+n),u.lineTo(s.d2p(m),o.d2p(g)+n),u.fill(),u.closePath()),e.gantt.lineWidth&&(h||d||p)&&(u.beginPath(),u.moveTo(s.d2p(v),o.d2p(g)+n),u[h?"lineTo":"moveTo"](s.d2p(v),o.d2p(y)+n),u[p?"lineTo":"moveTo"](s.d2p(m),o.d2p(y)+n),u[d?"lineTo":"moveTo"](s.d2p(m),o.d2p(g)+n),u.stroke(),u.closePath())}},plotShadows:function(e,t,n){var r=e.data;if(r.length<1)return;var i,s,o,u,a=e.xaxis,f=e.yaxis,l=this.ctx,c=this.options.shadowSize;for(i=0;ia.max||vf.max)continue;ha.max&&(p=a.max),df.max&&(v=f.max);var m=a.d2p(p)-a.d2p(h)-(a.d2p(p)+c<=this.plotWidth?0:c),g=f.d2p(d)-f.d2p(v)-(f.d2p(d)+c<=this.plotHeight?0:c);l.fillStyle="rgba(0,0,0,0.05)",l.fillRect(Math.min(a.d2p(h)+c,this.plotWidth),Math.min(f.d2p(v)+c,this.plotHeight),m,g)}},extendXRange:function(e){if(e.options.max===null){var t=e.min,n=e.max,r,i,s,o,u,a={},f={},l=null;for(r=0;rt&&(t=e.max+o.barWidth)}}e.lastSerie=f,e.max=t,e.min=n,e.tickSize=Flotr.getTickSize(e.options.noTicks,n,t,e.options.tickDecimals)}}}),function(){function e(e){return typeof e=="object"&&e.constructor&&(Image?!0:e.constructor===Image)}Flotr.defaultMarkerFormatter=function(e){return Math.round(e.y*100)/100+""},Flotr.addType("markers",{options:{show:!1,lineWidth:1,color:"#000000",fill:!1,fillColor:"#FFFFFF",fillOpacity:.4,stroke:!1,position:"ct",verticalMargin:0,labelFormatter:Flotr.defaultMarkerFormatter,fontSize:Flotr.defaultOptions.fontSize,stacked:!1,stackingType:"b",horizontal:!1},stack:{positive:[],negative:[],values:[]},draw:function(e){function h(e,t){return o=r.negative[e]||0,s=r.positive[e]||0,t>0?(r.positive[e]=o+t,o+t):(r.negative[e]=s+t,s+t)}var t=e.data,n=e.context,r=e.stacked?e.stack:!1,i=e.stackingType,s,o,u,a,f,l,c;n.save(),n.lineJoin="round",n.lineWidth=e.lineWidth,n.strokeStyle="rgba(0,0,0,0.5)",n.fillStyle=e.fillStyle;for(a=0;a0?"top":"bottom",C,k,L;n.save(),n.translate(u/2,o/2),n.scale(1,v),k=Math.cos(b)*a,L=Math.sin(b)*a,i>0&&(this.plotSlice(k+i,L+i,h,g,y,n),l&&(n.fillStyle="rgba(0,0,0,0.1)",n.fill())),this.plotSlice(k,L,h,g,y,n),l&&(n.fillStyle=c,n.fill()),n.lineWidth=r,n.strokeStyle=f,n.stroke(),C={size:e.fontSize*1.2,color:e.fontColor,weight:1.5},w&&(e.htmlText||!e.textEnabled?(divStyle="position:absolute;"+N+":"+(o/2+(N==="top"?x:-x))+"px;",divStyle+=T+":"+(u/2+(T==="right"?-S:S))+"px;",d.push('
    ',w,"
    ")):(C.textAlign=T,C.textBaseline=N,Flotr.drawText(n,w,S,x,C)));if(e.htmlText||!e.textEnabled){var A=Flotr.DOM.node('
    ');Flotr.DOM.insert(A,d.join("")),Flotr.DOM.insert(e.element,A)}n.restore(),this.startAngle=y,this.slices=this.slices||[],this.slices.push({radius:h,x:k,y:L,explode:a,start:g,end:y})},plotSlice:function(e,t,n,r,i,s){s.beginPath(),s.moveTo(e,t),s.arc(e,t,n,r,i,!1),s.lineTo(e,t),s.closePath()},hit:function(e){var t=e.data[0],n=e.args,r=e.index,i=n[0],s=n[1],o=this.slices[r],u=i.relX-e.width/2,a=i.relY-e.height/2,f=Math.sqrt(u*u+a*a),l=Math.atan(a/u),c=Math.PI*2,h=o.explode||e.explode,p=o.start%c,d=o.end%c,v=e.epsilon;u<0?l+=Math.PI:u>0&&a<0&&(l+=c),fh&&(l>p&&ld&&(lp)||p===d&&(o.start===o.end&&Math.abs(l-p)v))&&(s.x=t[0],s.y=t[1],s.sAngle=p,s.eAngle=d,s.index=0,s.seriesIndex=r,s.fraction=t[1]/this.total)},drawHit:function(e){var t=e.context,n=this.slices[e.args.seriesIndex];t.save(),t.translate(e.width/2,e.height/2),this.plotSlice(n.x,n.y,n.radius,n.start,n.end,t),t.stroke(),t.restore()},clearHit:function(e){var t=e.context,n=this.slices[e.args.seriesIndex],r=2*e.lineWidth,i=n.radius+r;t.save(),t.translate(e.width/2,e.height/2),t.clearRect(n.x-i,n.y-i,2*i+r,2*i+r),t.restore()},extendYRange:function(e,t){this.total=(this.total||0)+t[0][1]}})}(),Flotr.addType("points",{options:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#FFFFFF",fillOpacity:1,hitRadius:null},draw:function(e){var t=e.context,n=e.lineWidth,r=e.shadowSize;t.save(),r>0&&(t.lineWidth=r/2,t.strokeStyle="rgba(0,0,0,0.1)",this.plot(e,r/2+t.lineWidth/2),t.strokeStyle="rgba(0,0,0,0.2)",this.plot(e,t.lineWidth/2)),t.lineWidth=e.lineWidth,t.strokeStyle=e.color,e.fill&&(t.fillStyle=e.fillStyle),this.plot(e),t.restore()},plot:function(e,t){var n=e.data,r=e.context,i=e.xScale,s=e.yScale,o,u,a;for(o=n.length-1;o>-1;--o){a=n[o][1];if(a===null)continue;u=i(n[o][0]),a=s(a);if(u<0||u>e.width||a<0||a>e.height)continue;r.beginPath(),t?r.arc(u,a+t,e.radius,0,Math.PI,!1):(r.arc(u,a,e.radius,0,2*Math.PI,!0),e.fill&&r.fill()),r.stroke(),r.closePath()}}}),Flotr.addType("radar",{options:{show:!1,lineWidth:2,fill:!0,fillOpacity:.4,radiusRatio:.9,sensibility:2},draw:function(e){var t=e.context,n=e.shadowSize;t.save(),t.translate(e.width/2,e.height/2),t.lineWidth=e.lineWidth,t.fillStyle="rgba(0,0,0,0.05)",t.strokeStyle="rgba(0,0,0,0.05)",this.plot(e,n/2),t.strokeStyle="rgba(0,0,0,0.1)",this.plot(e,n/4),t.strokeStyle=e.color,t.fillStyle=e.fillStyle,this.plot(e),t.restore()},plot:function(e,t){var n=e.data,r=e.context,i=Math.min(e.height,e.width)*e.radiusRatio/2,s=2*Math.PI/n.length,o=-Math.PI/2,u,a;t=t||0,r.beginPath();for(u=0;uthis.plotWidth||t.relY>this.plotHeight){this.el.style.cursor=null,e.removeClass(this.el,"flotr-crosshair");return}r.hideCursor&&(this.el.style.cursor="none",e.addClass(this.el,"flotr-crosshair")),n.save(),n.strokeStyle=r.color,n.lineWidth=1,n.beginPath(),r.mode.indexOf("x")!=-1&&(n.moveTo(s,i.top),n.lineTo(s,i.top+this.plotHeight)),r.mode.indexOf("y")!=-1&&(n.moveTo(i.left,o),n.lineTo(i.left+this.plotWidth,o)),n.stroke(),n.restore()},clearCrosshair:function(){var e=this.plotOffset,t=this.lastMousePos,n=this.octx;t&&(n.clearRect(Math.round(t.relX)+e.left,e.top,1,this.plotHeight+1),n.clearRect(e.left,Math.round(t.relY)+e.top,this.plotWidth+1,1))}})}(),function(){function n(e,t,n,r,i,s){var o="image/"+e,u=n.getImageData(0,0,r,i),a=new Image;return n.save(),n.globalCompositeOperation="destination-over",n.fillStyle=s,n.fillRect(0,0,r,i),a.src=t.toDataURL(o),n.restore(),n.clearRect(0,0,r,i),n.putImageData(u,0,0),a}var e=Flotr.DOM,t=Flotr._;Flotr.addPlugin("download",{saveImage:function(r,i,s,o){var u=this.options.grid,a;if(Flotr.isIE&&Flotr.isIE<9)return a=""+this.canvas.firstChild.innerHTML+"",window.open().document.write(a);if(r!=="jpeg"&&r!=="png")return;a=n(r,this.canvas,this.ctx,this.canvasWidth,this.canvasHeight,u&&u.backgroundColor||"#ffffff");if(!t.isElement(a)||!o)return window.open(a.src);this.download.restoreCanvas(),e.hide(this.canvas),e.hide(this.overlay),e.setStyles({position:"absolute"}),e.insert(this.el,a),this.saveImageElement=a},restoreCanvas:function(){e.show(this.canvas),e.show(this.overlay),this.saveImageElement&&this.el.removeChild(this.saveImageElement),this.saveImageElement=null}})}(),function(){var e=Flotr.EventAdapter,t=Flotr._;Flotr.addPlugin("graphGrid",{callbacks:{"flotr:beforedraw":function(){this.graphGrid.drawGrid()},"flotr:afterdraw":function(){this.graphGrid.drawOutline()}},drawGrid:function(){function v(e){for(p=0;p=c.max||(e==c.min||e==c.max)&&i.outlineWidth)return;r(Math.floor(c.d2p(e))+n.lineWidth/2)})}function g(e){n.moveTo(e,0),n.lineTo(e,f)}function y(e){n.moveTo(0,e),n.lineTo(l,e)}var n=this.ctx,r=this.options,i=r.grid,s=i.verticalLines,o=i.horizontalLines,u=i.minorVerticalLines,a=i.minorHorizontalLines,f=this.plotHeight,l=this.plotWidth,c,h,p,d;(s||u||o||a)&&e.fire(this.el,"flotr:beforegrid",[this.axes.x,this.axes.y,r,this]),n.save(),n.lineWidth=1,n.strokeStyle=i.tickColor;if(i.circular){n.translate(this.plotOffset.left+l/2,this.plotOffset.top+f/2);var b=Math.min(f,l)*r.radar.radiusRatio/2,w=this.axes.x.ticks.length,S=2*(Math.PI/w),x=-Math.PI/2;n.beginPath(),c=this.axes.y,o&&v(c.ticks),a&&v(c.minorTicks),s&&t.times(w,function(e){n.moveTo(0,0),n.lineTo(Math.cos(e*S+x)*b,Math.sin(e*S+x)*b)}),n.stroke()}else n.translate(this.plotOffset.left,this.plotOffset.top),i.backgroundColor&&(n.fillStyle=this.processColor(i.backgroundColor,{x1:0,y1:0,x2:l,y2:f}),n.fillRect(0,0,l,f)),n.beginPath(),c=this.axes.x,s&&m(c.ticks,g),u&&m(c.minorTicks,g),c=this.axes.y,o&&m(c.ticks,y),a&&m(c.minorTicks,y),n.stroke();n.restore(),(s||u||o||a)&&e.fire(this.el,"flotr:aftergrid",[this.axes.x,this.axes.y,r,this])},drawOutline:function(){var e=this,t=e.options,n=t.grid,r=n.outline,s=e.ctx,o=n.backgroundImage,u=e.plotOffset,a=u.left,f=u.top,l=e.plotWidth,c=e.plotHeight,h,p,d,v,m,g;if(!n.outlineWidth)return;s.save();if(n.circular){s.translate(a+l/2,f+c/2);var y=Math.min(c,l)*t.radar.radiusRatio/2,b=this.axes.x.ticks.length,w=2*(Math.PI/b),E=-Math.PI/2;s.beginPath(),s.lineWidth=n.outlineWidth,s.strokeStyle=n.color,s.lineJoin="round";for(i=0;i<=b;++i)s[i===0?"moveTo":"lineTo"](Math.cos(i*w+E)*y,Math.sin(i*w+E)*y);s.stroke()}else{s.translate(a,f);var S=n.outlineWidth,x=.5-S+(S+1)%2/2,T="lineTo",N="moveTo";s.lineWidth=S,s.strokeStyle=n.color,s.lineJoin="miter",s.beginPath(),s.moveTo(x,x),l-=S/2%1,c+=S/2,s[r.indexOf("n")!==-1?T:N](l,x),s[r.indexOf("e")!==-1?T:N](l,c),s[r.indexOf("s")!==-1?T:N](x,c),s[r.indexOf("w")!==-1?T:N](x,x),s.stroke(),s.closePath()}s.restore(),o&&(d=o.src||o,v=(parseInt(o.left,10)||0)+u.left,m=(parseInt(o.top,10)||0)+u.top,p=new Image,p.onload=function(){s.save(),o.alpha&&(s.globalAlpha=o.alpha),s.globalCompositeOperation="destination-over",s.drawImage(p,0,0,p.width,p.height,v,m,l,c),s.restore()},p.src=d)}})}(),function(){var e=Flotr.DOM,t=Flotr._,n=Flotr,r="opacity:0.7;background-color:#000;color:#fff;position:absolute;padding:2px 8px;-moz-border-radius:4px;border-radius:4px;white-space:nowrap;";Flotr.addPlugin("hit",{callbacks:{"flotr:mousemove":function(e,t){this.hit.track(t)},"flotr:click":function(e){var n=this.hit.track(e);n&&!t.isUndefined(n.index)&&(e.hit=n)},"flotr:mouseout":function(e){e.relatedTarget!==this.mouseTrack&&this.hit.clearHit()},"flotr:destroy":function(){this.options.mouse.container&&e.remove(this.mouseTrack),this.mouseTrack=null}},track:function(e){if(this.options.mouse.track||t.any(this.series,function(e){return e.mouse&&e.mouse.track}))return this.hit.hit(e)},executeOnType:function(e,r,i){function u(e,u){t.each(t.keys(n.graphTypes),function(t){e[t]&&e[t].show&&!e.hide&&this[t][r]&&(o=this.getOptions(e,t),o.fill=!!e.mouse.fillColor,o.fillStyle=this.processColor(e.mouse.fillColor||"#ffffff",{opacity:e.mouse.fillOpacity}),o.color=e.mouse.lineColor,o.context=this.octx,o.index=u,i&&(o.args=i),this[t][r].call(this[t],o),s=!0)},this)}var s=!1,o;return t.isArray(e)||(e=[e]),t.each(e,u,this),s},drawHit:function(e){var t=this.octx,n=e.series;if(n.mouse.lineColor){t.save(),t.lineWidth=n.points?n.points.lineWidth:1,t.strokeStyle=n.mouse.lineColor,t.fillStyle=this.processColor(n.mouse.fillColor||"#ffffff",{opacity:n.mouse.fillOpacity}),t.translate(this.plotOffset.left,this.plotOffset.top);if(!this.hit.executeOnType(n,"drawHit",e)){var r=e.xaxis,i=e.yaxis;t.beginPath(),t.arc(r.d2p(e.x),i.d2p(e.y),n.points.hitRadius||n.points.radius||n.mouse.radius,0,2*Math.PI,!0),t.fill(),t.stroke(),t.closePath()}t.restore(),this.clip(t)}this.prevHit=e},clearHit:function(){var t=this.prevHit,n=this.octx,r=this.plotOffset;n.save(),n.translate(r.left,r.top);if(t){if(!this.hit.executeOnType(t.series,"clearHit",this.prevHit)){var i=t.series,s=i.points?i.points.lineWidth:1;offset=(i.points.hitRadius||i.points.radius||i.mouse.radius)+s,n.clearRect(t.xaxis.d2p(t.x)-offset,t.yaxis.d2p(t.y)-offset,offset*2,offset*2)}e.hide(this.mouseTrack),this.prevHit=null}n.restore()},hit:function(e){var n=this.options,r=this.prevHit,i,s,o,u,a,f,l,c,h;if(this.series.length===0)return;h={relX:e.relX,relY:e.relY,absX:e.absX,absY:e.absY,series:this.series};if(n.mouse.trackY&&!n.mouse.trackAll&&this.hit.executeOnType(this.series,"hit",[e,h])&&!t.isUndefined(h.seriesIndex))a=this.series[h.seriesIndex],h.series=a,h.mouse=a.mouse,h.xaxis=a.xaxis,h.yaxis=a.yaxis;else{i=this.hit.closest(e);if(i){i=n.mouse.trackY?i.point:i.x,u=i.seriesIndex,a=this.series[u],l=a.xaxis,c=a.yaxis,s=2*a.mouse.sensibility;if(n.mouse.trackAll||i.distanceXl.xaxis.max)continue;p=Math.abs(g-v),d=Math.abs(y-m),h=p*p+d*d,h
    '),this.mouseTrack=c,e.insert(b||this.el,c));if(!g||g<0)g=0;a&&a.toFixed&&(a=a.toFixed(g)),f&&f.toFixed&&(f=f.toFixed(g)),T=n.mouse.trackFormatter({x:a,y:f,series:n.series,index:n.index,nearest:n,fraction:n.fraction});if(t.isNull(T)||t.isUndefined(T)){e.hide(c);return}c.innerHTML=T,e.show(c);if(!o)return;x=e.size(c),b&&(S=e.position(this.el),w=S.top,E=S.left);if(!n.mouse.relative)i+="top:",o.charAt(0)=="n"?i+=w+u+m:o.charAt(0)=="s"&&(i+=w-u+m+this.plotHeight-x.height),i+="px;bottom:auto;left:",o.charAt(1)=="e"?i+=E-u+p+this.plotWidth-x.width:o.charAt(1)=="w"&&(i+=E+u+p),i+="px;right:auto;";else if(s.pie&&s.pie.show){var N={x:this.plotWidth/2,y:this.plotHeight/2},C=Math.min(this.canvasWidth,this.canvasHeight)*s.pie.sizeRatio/2,k=n.sAngle=5||Math.abs(e.second.y-e.first.y)>=5}})}(),function(){var e=Flotr.DOM;Flotr.addPlugin("labels",{callbacks:{"flotr:afterdraw":function(){this.labels.draw()}},draw:function(){function b(e,t,r){var i=r?t.minorTicks:t.ticks,s=t.orientation===1,u=t.n===1,l,h;l={color:t.options.color||d.grid.color,angle:Flotr.toRad(t.options.labelsAngle),textBaseline:"middle"};for(c=0;c(s?e.plotWidth:e.plotHeight))continue;Flotr.drawText(v,n.label,l(e,s,o,a),h(e,s,o,a),u),!s&&!o&&(v.save(),v.strokeStyle=u.color,v.beginPath(),v.moveTo(e.plotOffset.left+e.plotWidth-8,e.plotOffset.top+t.d2p(n.v)),v.lineTo(e.plotOffset.left+e.plotWidth,e.plotOffset.top+t.d2p(n.v)),v.stroke(),v.restore())}}function E(e,t){var r=t.orientation===1,i=t.n===1,o="",u,a,f,l=e.plotOffset;!r&&!i&&(v.save(),v.strokeStyle=t.options.color||d.grid.color,v.beginPath());if(t.options.showLabels&&(i?!0:t.used))for(c=0;c(r?e.canvasWidth:e.canvasHeight))continue;f=l.top+(r?(i?1:-1)*(e.plotHeight+d.grid.labelMargin):t.d2p(n.v)-t.maxLabel.height/2),u=r?l.left+t.d2p(n.v)-s/2:0,o="",c===0?o=" first":c===t.ticks.length-1&&(o=" last"),o+=r?" flotr-grid-label-x":" flotr-grid-label-y",h+=['
    '+n.label+"
    "].join(" "),!r&&!i&&(v.moveTo(l.left+e.plotWidth-8,l.top+t.d2p(n.v)),v.lineTo(l.left+e.plotWidth,l.top+t.d2p(n.v)))}}var t,n,r,i,s,o,u,a,f,l,c,h="",p=0,d=this.options,v=this.ctx,m=this.axes,g={size:d.fontSize};for(c=0;c-1;--p){if(!n[p].label||n[p].hide)continue;d=s.labelFormatter(n[p].label),E=Math.max(E,this._text.measureText(d,S).width)}var x=Math.round(m+y*3+E),T=Math.round(f*(y+g)+y);!h&&h!==0&&(h=.1);if(!i.HtmlText&&this.textEnabled&&!s.container){l.charAt(0)=="s"&&(w=r.top+this.plotHeight-(c+T)),l.charAt(0)=="c"&&(w=r.top+this.plotHeight/2-(c+T/2)),l.charAt(1)=="e"&&(b=r.left+this.plotWidth-(c+x)),v=this.processColor(s.backgroundColor,{opacity:h}),a.fillStyle=v,a.fillRect(b,w,x,T),a.strokeStyle=s.labelBoxBorderColor,a.strokeRect(Flotr.toPixel(b),Flotr.toPixel(w),x,T);var N=b+y,C=w+y;for(p=0;p":""),u=!0);var k=n[p],L=s.labelBoxWidth,A=s.labelBoxHeight;d=s.labelFormatter(k.label),v="background-color:"+(k.bars&&k.bars.show&&k.bars.fillColor&&k.bars.fill?k.bars.fillColor:k.color)+";",o.push('','
    ','
    ','
    ',"
    ","
    ","",'',d,"")}u&&o.push("");if(o.length>0){var O=''+o.join("")+"
    ";if(s.container)O=e.node(O),this.legend.markup=O,e.insert(s.container,O);else{var M={position:"absolute",zIndex:"2",border:"1px solid "+s.labelBoxBorderColor};l.charAt(0)=="n"?(M.top=c+r.top+"px",M.bottom="auto"):l.charAt(0)=="c"?(M.top=c+(this.plotHeight-T)/2+"px",M.bottom="auto"):l.charAt(0)=="s"&&(M.bottom=c+r.bottom+"px",M.top="auto"),l.charAt(1)=="e"?(M.right=c+r.right+"px",M.left="auto"):l.charAt(1)=="w"&&(M.left=c+r.left+"px",M.right="auto");var P=e.create("div"),H;P.className="flotr-legend",e.setStyles(P,M),e.insert(P,O),e.insert(this.el,P);if(!h)return;var B=s.backgroundColor||i.grid.backgroundColor||"#ffffff";t.extend(M,e.size(P),{backgroundColor:B,zIndex:"",border:""}),M.width+="px",M.height+="px",P=e.create("div"),P.className="flotr-legend-bg",e.setStyles(P,M),e.opacity(P,h),e.insert(P," "),e.insert(this.el,P)}}}}}})}(),function(){function e(e){if(this.options.spreadsheet.tickFormatter)return this.options.spreadsheet.tickFormatter(e);var t=n.find(this.axes.x.ticks,function(t){return t.v==e});return t?t.label:e}var t=Flotr.DOM,n=Flotr._;Flotr.addPlugin("spreadsheet",{options:{show:!1,tabGraphLabel:"Graph",tabDataLabel:"Data",toolbarDownload:"Download CSV",toolbarSelectAll:"Select all",csvFileSeparator:",",decimalSeparator:".",tickFormatter:null,initialTab:"graph"},callbacks:{"flotr:afterconstruct":function(){if(!this.options.spreadsheet.show)return;var e=this.spreadsheet,n=t.node('
    '),r=t.node('
    '+this.options.spreadsheet.tabGraphLabel+"
    "),i=t.node('
    '+this.options.spreadsheet.tabDataLabel+"
    "),s;e.tabsContainer=n,e.tabs={graph:r,data:i},t.insert(n,r),t.insert(n,i),t.insert(this.el,n),s=t.size(i).height+2,this.plotOffset.bottom+=s,t.setStyles(n,{top:this.canvasHeight-s+"px"}),this.observe(r,"click",function(){e.showTab("graph")}).observe(i,"click",function(){e.showTab("data")}),this.options.spreadsheet.initialTab!=="graph"&&e.showTab(this.options.spreadsheet.initialTab)}},loadDataGrid:function(){if(this.seriesData)return this.seriesData;var e=this.series,t={};return n.each(e,function(e,r){n.each(e.data,function(e){var n=e[0],s=e[1],o=t[n];if(o)o[r+1]=s;else{var u=[];u[0]=n,u[r+1]=s,t[n]=u}})}),this.seriesData=n.sortBy(t,function(e,t){return parseInt(t,10)}),this.seriesData},constructDataGrid:function(){if(this.spreadsheet.datagrid)return this.spreadsheet.datagrid;var r=this.series,i=this.spreadsheet.loadDataGrid(),s=[""],o,u,a,f=[''];f.push(""),n.each(r,function(e,t){f.push('"),s.push("")}),f.push(""),n.each(i,function(t){f.push(""),n.times(r.length+1,function(r){var i="td",s=t[r],o=n.isUndefined(s)?"":Math.round(s*1e5)/1e5;if(r===0){i="th";var u=e.call(this,o);u&&(o=u)}f.push("<"+i+(i=="th"?' scope="row"':"")+">"+o+"")},this),f.push("")},this),s.push(""),a=t.node(f.join("")),o=t.node('"),u=t.node('"),this.observe(o,"click",n.bind(this.spreadsheet.downloadCSV,this)).observe(u,"click",n.bind(this.spreadsheet.selectAllData,this));var l=t.node('
    ');t.insert(l,o),t.insert(l,u);var c=this.canvasHeight-t.size(this.spreadsheet.tabsContainer).height-2,h=t.node('
    ');return t.insert(h,l),t.insert(h,a),t.insert(this.el,h),this.spreadsheet.datagrid=a,this.spreadsheet.container=h,a},showTab:function(e){if(this.spreadsheet.activeTab===e)return;switch(e){case"graph":t.hide(this.spreadsheet.container),t.removeClass(this.spreadsheet.tabs.data,"selected"),t.addClass(this.spreadsheet.tabs.graph,"selected");break;case"data":this.spreadsheet.datagrid||this.spreadsheet.constructDataGrid(),t.show(this.spreadsheet.container),t.addClass(this.spreadsheet.tabs.data,"selected"),t.removeClass(this.spreadsheet.tabs.graph,"selected");break;default:throw"Illegal tab name: "+e}this.spreadsheet.activeTab=e},selectAllData:function(){if(this.spreadsheet.tabs){var e,t,n,r,i=this.spreadsheet.constructDataGrid();return this.spreadsheet.showTab("data"),setTimeout(function(){(n=i.ownerDocument)&&(r=n.defaultView)&&r.getSelection&&n.createRange&&(e=window.getSelection())&&e.removeAllRanges?(t=n.createRange(),t.selectNode(i),e.removeAllRanges(),e.addRange(t)):document.body&&document.body.createTextRange&&(t=document.body.createTextRange())&&(t.moveToElementText(i),t.select())},0),!0}return!1},downloadCSV:function(){var t="",r=this.series,i=this.options,s=this.spreadsheet.loadDataGrid(),o=encodeURIComponent(i.spreadsheet.csvFileSeparator);if(i.spreadsheet.decimalSeparator===i.spreadsheet.csvFileSeparator)throw"The decimal separator is the same as the column separator ("+i.spreadsheet.decimalSeparator+")";n.each(r,function(e,n){t+=o+'"'+(e.label||String.fromCharCode(65+n)).replace(/\"/g,'\\"')+'"'}),t+="%0D%0A",t+=n.reduce(s,function(t,n){var r=e.call(this,n[0])||"";r='"'+(r+"").replace(/\"/g,'\\"')+'"';var s=n.slice(1).join(o);return i.spreadsheet.decimalSeparator!=="."&&(s=s.replace(/\./g,i.spreadsheet.decimalSeparator)),t+r+o+s+"%0D%0A"},"",this),Flotr.isIE&&Flotr.isIE<9?(t=t.replace(new RegExp(o,"g"),decodeURIComponent(o)).replace(/%0A/g,"\n").replace(/%0D/g,"\r"),window.open().document.write(t)):window.open("data:text/csv,"+t)}})}(),function(){var e=Flotr.DOM;Flotr.addPlugin("titles",{callbacks:{"flotr:afterdraw":function(){this.titles.drawTitles()}},drawTitles:function(){var t,n=this.options,r=n.grid.labelMargin,i=this.ctx,s=this.axes;if(!n.HtmlText&&this.textEnabled){var o={size:n.fontSize,color:n.grid.color,textAlign:"center"};n.subtitle&&Flotr.drawText(i,n.subtitle,this.plotOffset.left+this.plotWidth/2,this.titleHeight+this.subtitleHeight-2,o),o.weight=1.5,o.size*=1.5,n.title&&Flotr.drawText(i,n.title,this.plotOffset.left+this.plotWidth/2,this.titleHeight-2,o),o.weight=1.8,o.size*=.8,s.x.options.title&&s.x.used&&(o.textAlign=s.x.options.titleAlign||"center",o.textBaseline="top",o.angle=Flotr.toRad(s.x.options.titleAngle),o=Flotr.getBestTextAlign(o.angle,o),Flotr.drawText(i,s.x.options.title,this.plotOffset.left+this.plotWidth/2,this.plotOffset.top+s.x.maxLabel.height+this.plotHeight+2*r,o)),s.x2.options.title&&s.x2.used&&(o.textAlign=s.x2.options.titleAlign||"center",o.textBaseline="bottom",o.angle=Flotr.toRad(s.x2.options.titleAngle),o=Flotr.getBestTextAlign(o.angle,o),Flotr.drawText(i,s.x2.options.title,this.plotOffset.left+this.plotWidth/2,this.plotOffset.top-s.x2.maxLabel.height-2*r,o)),s.y.options.title&&s.y.used&&(o.textAlign=s.y.options.titleAlign||"right",o.textBaseline="middle",o.angle=Flotr.toRad(s.y.options.titleAngle),o=Flotr.getBestTextAlign(o.angle,o),Flotr.drawText(i,s.y.options.title,this.plotOffset.left-s.y.maxLabel.width-2*r,this.plotOffset.top+this.plotHeight/2,o)),s.y2.options.title&&s.y2.used&&(o.textAlign=s.y2.options.titleAlign||"left",o.textBaseline="middle",o.angle=Flotr.toRad(s.y2.options.titleAngle),o=Flotr.getBestTextAlign(o.angle,o),Flotr.drawText(i,s.y2.options.title,this.plotOffset.left+this.plotWidth+s.y2.maxLabel.width+2*r,this.plotOffset.top+this.plotHeight/2,o))}else{t=[],n.title&&t.push('
    ',n.title,"
    "),n.subtitle&&t.push('
    ',n.subtitle,"
    "),t.push(""),t.push('
    '),s.x.options.title&&s.x.used&&t.push('
    ',s.x.options.title,"
    "),s.x2.options.title&&s.x2.used&&t.push('
    ',s.x2.options.title,"
    "),s.y.options.title&&s.y.used&&t.push('
    ',s.y.options.title,"
    "),s.y2.options.title&&s.y2.used&&t.push('
    ',s.y2.options.title,"
    "),t=t.join("");var u=e.create("div");e.setStyles({color:n.grid.color}),u.className="flotr-titles",e.insert(this.el,u),e.insert(u,t)}}})}(); +// @license-end diff --git a/p/scripts/global_view.js b/p/scripts/global_view.js index b1581614a..bc4a48b91 100644 --- a/p/scripts/global_view.js +++ b/p/scripts/global_view.js @@ -1,3 +1,4 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0 "use strict"; /* globals context, init_load_more, init_posts, init_stream */ /* jshint esversion:6, strict:global */ @@ -110,3 +111,4 @@ if (document.readyState && document.readyState !== 'loading') { init_all_global_view(); }, false); } +// @license-end diff --git a/p/scripts/install.js b/p/scripts/install.js index 967d27627..ccf3b6bb0 100644 --- a/p/scripts/install.js +++ b/p/scripts/install.js @@ -1,3 +1,4 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0 "use strict"; /* jshint globalstrict: true */ @@ -71,3 +72,4 @@ var confirms = document.getElementsByClassName('confirm'); for (var i = 0 ; i < confirms.length ; i++) { confirms[i].addEventListener('click', ask_confirmation); } +// @license-end diff --git a/p/scripts/main.js b/p/scripts/main.js index e414ab90e..361bed02a 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -1,3 +1,4 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0 "use strict"; /* jshint esversion:6, strict:global */ @@ -1486,3 +1487,4 @@ if (document.readyState && document.readyState !== 'loading') { init_afterDOM(); }, false); } +// @license-end diff --git a/p/scripts/repartition.js b/p/scripts/repartition.js index e71fa71c4..8837c687b 100644 --- a/p/scripts/repartition.js +++ b/p/scripts/repartition.js @@ -1,3 +1,4 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0 "use strict"; /* globals Flotr, numberFormat */ /* jshint esversion:6, strict:global */ @@ -70,3 +71,4 @@ function initStats() { } initStats(); +// @license-end diff --git a/p/scripts/stats.js b/p/scripts/stats.js index b47188d77..54ea0e4de 100644 --- a/p/scripts/stats.js +++ b/p/scripts/stats.js @@ -1,3 +1,4 @@ +// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0 "use strict"; /* globals Flotr, numberFormat */ /* jshint esversion:6, strict:global */ @@ -57,3 +58,4 @@ function initStats() { }); } initStats(); +// @license-end -- cgit v1.2.3 From cc0db9af4f980829faa4bf0960617807b32fb4fa Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Wed, 23 Oct 2019 00:52:15 +0200 Subject: Feature/new archiving (#2335) * Change archiving config page layout I've changed some wording and moved actions into a maintenance section. * Update purge action Now we have more control on the purge action. The configuration allows us to choose what to keep and what to discard in a more precise way. At the moment, the configuration applies for all feeds. * Add purge configuration on feed level Now the extend purge configuration is available on feed level. It is stored as attributes and will be used in the purge action. * Update purge action Now the purge action uses the feed configuration if it exists and defaults on user configuration if not. * Add empty option in period list * Fix configuration warnings * Add archiving configuration on categories See #2369 * Add user info back * Add explanations in UI * Fixes for SQLite + error + misc. * Fix invalid feed reference * Short array syntax Only for new code, so far * Fix prefix error * Query performance, default values Work in progress * Fix default values and confirm before leaving Form cancel and confirm changes before leaving were broken. And start taking advantage of the short echo syntax `` as we have moved to PHP 5.4+ * More work * Tuning SQL * Fix MariaDB + performance issue * SQL performance * Fix SQLite bug * Fix some attributes JSON encoding bugs Especially for SQLite export/import * More uniform, fix bugs More uniform between global, category, feed settings * Drop special cases for old articles during refresh Instead will use lastSeen date with the new archiving logic. This was generating problems anyway https://github.com/FreshRSS/FreshRSS/issues/2154 * Draft drop index keep_history Not needed anymore * MySQL typo Now properly tested with MySQL, PostgreSQL, SQLite * More work for legacy values Important to avoid overriding user's preference and risking deleting data erroneously * Fix PHP 7.3 / 7.4 warnings @aledeg "Trying to use values of type null, bool, int, float or resource as an array (such as $null["key"]) will now generate a notice. " https://php.net/migration74.incompatible * Reintroduce min articles and take care of legacy parameters * A few changes forgotten * Draft of migration + DROP of feed.keep_history * Fix several errors And give up using const for SQL to allow multiple database types (and we cannot redefine a const) * Add keep_min to categories + factorise archiving logic * Legacy fix * Fix bug yield from * Minor: Use JSON_UNESCAPED_SLASHE for attributes And make more uniform * Fix sign and missing variable * Fine tune the logic --- app/Controllers/configureController.php | 43 +++++++++- app/Controllers/entryController.php | 20 +---- app/Controllers/feedController.php | 24 +----- app/Controllers/subscriptionController.php | 58 +++++++++++++- app/Models/Category.php | 24 ++++++ app/Models/CategoryDAO.php | 122 ++++++++++++++++++++++++++--- app/Models/CategoryDAOSQLite.php | 17 ++++ app/Models/ConfigurationSetter.php | 10 --- app/Models/Context.php | 19 +++++ app/Models/DatabaseDAO.php | 12 +-- app/Models/DatabaseDAOSQLite.php | 2 +- app/Models/EntryDAO.php | 65 ++++++++++----- app/Models/Factory.php | 8 +- app/Models/Feed.php | 38 ++++++--- app/Models/FeedDAO.php | 20 ++--- app/Models/FeedDAOSQLite.php | 2 +- app/Models/Tag.php | 2 +- app/Models/TagDAO.php | 14 +++- app/Models/UserDAO.php | 11 ++- app/SQL/install.sql.mysql.php | 21 +++-- app/SQL/install.sql.pgsql.php | 19 +++-- app/SQL/install.sql.sqlite.php | 17 ++-- app/i18n/cz/conf.php | 12 ++- app/i18n/cz/gen.php | 7 ++ app/i18n/cz/sub.php | 3 +- app/i18n/de/conf.php | 12 ++- app/i18n/de/gen.php | 7 ++ app/i18n/de/sub.php | 3 +- app/i18n/en/conf.php | 12 ++- app/i18n/en/gen.php | 7 ++ app/i18n/en/sub.php | 3 +- app/i18n/es/conf.php | 12 ++- app/i18n/es/gen.php | 7 ++ app/i18n/es/sub.php | 3 +- app/i18n/fr/conf.php | 12 ++- app/i18n/fr/gen.php | 7 ++ app/i18n/fr/sub.php | 3 +- app/i18n/he/conf.php | 12 ++- app/i18n/he/gen.php | 7 ++ app/i18n/he/sub.php | 3 +- app/i18n/it/conf.php | 12 ++- app/i18n/it/gen.php | 7 ++ app/i18n/it/sub.php | 3 +- app/i18n/kr/conf.php | 12 ++- app/i18n/kr/gen.php | 7 ++ app/i18n/kr/sub.php | 3 +- app/i18n/nl/conf.php | 16 +++- app/i18n/nl/gen.php | 7 ++ app/i18n/nl/sub.php | 3 +- app/i18n/oc/conf.php | 11 ++- app/i18n/oc/gen.php | 7 ++ app/i18n/oc/sub.php | 3 +- app/i18n/pt-br/conf.php | 12 ++- app/i18n/pt-br/gen.php | 7 ++ app/i18n/pt-br/sub.php | 3 +- app/i18n/ru/conf.php | 14 +++- app/i18n/ru/gen.php | 7 ++ app/i18n/ru/sub.php | 3 +- app/i18n/sk/conf.php | 2 +- app/i18n/sk/sub.php | 2 +- app/i18n/tr/conf.php | 12 ++- app/i18n/tr/gen.php | 7 ++ app/i18n/tr/sub.php | 3 +- app/i18n/zh-cn/conf.php | 12 ++- app/i18n/zh-cn/gen.php | 7 ++ app/i18n/zh-cn/sub.php | 3 +- app/install.php | 20 +---- app/views/configure/archiving.phtml | 110 ++++++++++++++++++++------ app/views/helpers/category/update.phtml | 116 +++++++++++++++++++++++++++ app/views/helpers/feed/update.phtml | 113 ++++++++++++++++++++++++-- cli/_update-or-create-user.php | 4 +- config-user.default.php | 10 ++- lib/Minz/Request.php | 6 ++ lib/lib_rss.php | 6 +- p/scripts/category.js | 23 ++++++ p/scripts/extra.js | 38 ++++++--- p/themes/base-theme/template.css | 3 + phpcs.xml | 5 -- 78 files changed, 1062 insertions(+), 277 deletions(-) create mode 100644 app/Models/CategoryDAOSQLite.php (limited to 'p') diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index 85ca9da39..b38d3289a 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -196,9 +196,31 @@ class FreshRSS_configure_Controller extends Minz_ActionController { */ public function archivingAction() { if (Minz_Request::isPost()) { - FreshRSS_Context::$user_conf->old_entries = Minz_Request::param('old_entries', 3); - FreshRSS_Context::$user_conf->keep_history_default = Minz_Request::param('keep_history_default', 0); + if (!Minz_Request::paramBoolean('enable_keep_max')) { + $keepMax = false; + } elseif (!$keepMax = Minz_Request::param('keep_max')) { + $keepMax = FreshRSS_Feed::ARCHIVING_RETENTION_COUNT_LIMIT; + } + if ($enableRetentionPeriod = Minz_Request::paramBoolean('enable_keep_period')) { + $keepPeriod = FreshRSS_Feed::ARCHIVING_RETENTION_PERIOD; + if (is_numeric(Minz_Request::param('keep_period_count')) && preg_match('/^PT?1[YMWDH]$/', Minz_Request::param('keep_period_unit'))) { + $keepPeriod = str_replace('1', Minz_Request::param('keep_period_count'), Minz_Request::param('keep_period_unit')); + } + } else { + $keepPeriod = false; + } + FreshRSS_Context::$user_conf->ttl_default = Minz_Request::param('ttl_default', FreshRSS_Feed::TTL_DEFAULT); + FreshRSS_Context::$user_conf->archiving = [ + 'keep_period' => $keepPeriod, + 'keep_max' => $keepMax, + 'keep_min' => Minz_Request::param('keep_min_default', 0), + 'keep_favourites' => Minz_Request::paramBoolean('keep_favourites'), + 'keep_labels' => Minz_Request::paramBoolean('keep_labels'), + 'keep_unreads' => Minz_Request::paramBoolean('keep_unreads'), + ]; + FreshRSS_Context::$user_conf->keep_history_default = null; //Legacy < FreshRSS 1.15 + FreshRSS_Context::$user_conf->old_entries = null; //Legacy < FreshRSS 1.15 FreshRSS_Context::$user_conf->save(); invalidateHttpCache(); @@ -206,7 +228,20 @@ class FreshRSS_configure_Controller extends Minz_ActionController { array('c' => 'configure', 'a' => 'archiving')); } - Minz_View::prependTitle(_t('conf.archiving.title') . ' · '); + $volatile = [ + 'enable_keep_period' => false, + 'keep_period_count' => '3', + 'keep_period_unit' => 'P1M', + ]; + $keepPeriod = FreshRSS_Context::$user_conf->archiving['keep_period']; + if (preg_match('/^PT?(?P\d+)[YMWDH]$/', $keepPeriod, $matches)) { + $volatile = [ + 'enable_keep_period' => true, + 'keep_period_count' => $matches['count'], + 'keep_period_unit' => str_replace($matches['count'], 1, $keepPeriod), + ]; + } + FreshRSS_Context::$user_conf->volatile = $volatile; $entryDAO = FreshRSS_Factory::createEntryDao(); $this->view->nb_total = $entryDAO->count(); @@ -217,6 +252,8 @@ class FreshRSS_configure_Controller extends Minz_ActionController { if (FreshRSS_Auth::hasAccess('admin')) { $this->view->size_total = $databaseDAO->size(true); } + + Minz_View::prependTitle(_t('conf.archiving.title') . ' · '); } /** diff --git a/app/Controllers/entryController.php b/app/Controllers/entryController.php index 0215128f4..7881cb3ec 100755 --- a/app/Controllers/entryController.php +++ b/app/Controllers/entryController.php @@ -181,32 +181,20 @@ class FreshRSS_entry_Controller extends Minz_ActionController { public function purgeAction() { @set_time_limit(300); - $nb_month_old = max(FreshRSS_Context::$user_conf->old_entries, 1); - $date_min = time() - (3600 * 24 * 30 * $nb_month_old); - - $entryDAO = FreshRSS_Factory::createEntryDao(); $feedDAO = FreshRSS_Factory::createFeedDao(); $feeds = $feedDAO->listFeeds(); $nb_total = 0; invalidateHttpCache(); - foreach ($feeds as $feed) { - $feed_history = $feed->keepHistory(); - if (FreshRSS_Feed::KEEP_HISTORY_DEFAULT === $feed_history) { - $feed_history = FreshRSS_Context::$user_conf->keep_history_default; - } + $feedDAO->beginTransaction(); - if ($feed_history >= 0) { - $nb = $entryDAO->cleanOldEntries($feed->id(), $date_min, $feed_history); - if ($nb > 0) { - $nb_total += $nb; - Minz_Log::debug($nb . ' old entries cleaned in feed [' . $feed->url(false) . ']'); - } - } + foreach ($feeds as $feed) { + $nb_total += $feed->cleanOldEntries(); } $feedDAO->updateCachedValues(); + $feedDAO->commit(); $databaseDAO = FreshRSS_Factory::createDatabaseDAO(); $databaseDAO->minorDbMaintenance(); diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index ea07d96e4..aabeb80ff 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -267,10 +267,6 @@ class FreshRSS_feed_Controller extends Minz_ActionController { $maxFeeds = 10; } - // Calculate date of oldest entries we accept in DB. - $nb_month_old = max(FreshRSS_Context::$user_conf->old_entries, 1); - $date_min = time() - (3600 * 24 * 30 * $nb_month_old); - // WebSub (PubSubHubbub) support $pubsubhubbubEnabledGeneral = FreshRSS_Context::$system_conf->pubsubhubbub_enabled; $pshbMinAge = time() - (3600 * 24); //TODO: Make a configuration. @@ -323,12 +319,6 @@ class FreshRSS_feed_Controller extends Minz_ActionController { continue; } - $feed_history = $feed->keepHistory(); - if ($isNewFeed) { - $feed_history = FreshRSS_Feed::KEEP_HISTORY_INFINITE; - } elseif (FreshRSS_Feed::KEEP_HISTORY_DEFAULT === $feed_history) { - $feed_history = FreshRSS_Context::$user_conf->keep_history_default; - } $needFeedCacheRefresh = false; // We want chronological order and SimplePie uses reverse order. @@ -376,15 +366,9 @@ class FreshRSS_feed_Controller extends Minz_ActionController { } $entryDAO->updateEntry($entry->toArray()); } - } elseif ($feed_history == 0 && $entry_date < $date_min) { - // This entry should not be added considering configuration and date. - $oldGuids[] = $entry->guid(); } else { $id = uTimeString(); $entry->_id($id); - if ($entry_date < $date_min) { - $entry->_isRead(true); //Old article that was not in database. Probably an error, so mark as read - } $entry->applyFilterActions(); @@ -413,17 +397,13 @@ class FreshRSS_feed_Controller extends Minz_ActionController { $entryDAO->updateLastSeen($feed->id(), $oldGuids, $mtime); } - if ($feed_history >= 0 && mt_rand(0, 30) === 1) { - // TODO: move this function in web cron when available (see entry::purge) - // Remove old entries once in 30. + if (mt_rand(0, 30) === 1) { // Remove old entries once in 30. if (!$entryDAO->inTransaction()) { $entryDAO->beginTransaction(); } - - $nb = $entryDAO->cleanOldEntries($feed->id(), $date_min, max($feed_history, count($entries) + 10)); + $nb = $feed->cleanOldEntries(); if ($nb > 0) { $needFeedCacheRefresh = true; - Minz_Log::debug($nb . ' old entries cleaned in feed [' . $feed->url(false) . ']'); } } diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php index f6d5e9457..f9497f0be 100644 --- a/app/Controllers/subscriptionController.php +++ b/app/Controllers/subscriptionController.php @@ -121,6 +121,32 @@ class FreshRSS_subscription_Controller extends Minz_ActionController { $feed->_attributes('timeout', null); } + if (Minz_Request::paramBoolean('use_default_purge_options')) { + $feed->_attributes('archiving', null); + } else { + if (!Minz_Request::paramBoolean('enable_keep_max')) { + $keepMax = false; + } elseif (!$keepMax = Minz_Request::param('keep_max')) { + $keepMax = FreshRSS_Feed::ARCHIVING_RETENTION_COUNT_LIMIT; + } + if ($enableRetentionPeriod = Minz_Request::paramBoolean('enable_keep_period')) { + $keepPeriod = FreshRSS_Feed::ARCHIVING_RETENTION_PERIOD; + if (is_numeric(Minz_Request::param('keep_period_count')) && preg_match('/^PT?1[YMWDH]$/', Minz_Request::param('keep_period_unit'))) { + $keepPeriod = str_replace(1, Minz_Request::param('keep_period_count'), Minz_Request::param('keep_period_unit')); + } + } else { + $keepPeriod = false; + } + $feed->_attributes('archiving', [ + 'keep_period' => $keepPeriod, + 'keep_max' => $keepMax, + 'keep_min' => intval(Minz_Request::param('keep_min', 0)), + 'keep_favourites' => Minz_Request::paramBoolean('keep_favourites'), + 'keep_labels' => Minz_Request::paramBoolean('keep_labels'), + 'keep_unreads' => Minz_Request::paramBoolean('keep_unreads'), + ]); + } + $feed->_filtersAction('read', preg_split('/[\n\r]+/', Minz_Request::param('filteractions_read', ''))); $values = array( @@ -132,7 +158,6 @@ class FreshRSS_subscription_Controller extends Minz_ActionController { 'pathEntries' => Minz_Request::param('path_entries', ''), 'priority' => intval(Minz_Request::param('priority', FreshRSS_Feed::PRIORITY_MAIN_STREAM)), 'httpAuth' => $httpAuth, - 'keep_history' => intval(Minz_Request::param('keep_history', FreshRSS_Feed::KEEP_HISTORY_DEFAULT)), 'ttl' => $ttl * ($mute ? -1 : 1), 'attributes' => $feed->attributes(), ); @@ -165,9 +190,36 @@ class FreshRSS_subscription_Controller extends Minz_ActionController { $this->view->category = $category; if (Minz_Request::isPost()) { - $values = array( + if (Minz_Request::paramBoolean('use_default_purge_options')) { + $category->_attributes('archiving', null); + } else { + if (!Minz_Request::paramBoolean('enable_keep_max')) { + $keepMax = false; + } elseif (!$keepMax = Minz_Request::param('keep_max')) { + $keepMax = FreshRSS_Feed::ARCHIVING_RETENTION_COUNT_LIMIT; + } + if ($enableRetentionPeriod = Minz_Request::paramBoolean('enable_keep_period')) { + $keepPeriod = FreshRSS_Feed::ARCHIVING_RETENTION_PERIOD; + if (is_numeric(Minz_Request::param('keep_period_count')) && preg_match('/^PT?1[YMWDH]$/', Minz_Request::param('keep_period_unit'))) { + $keepPeriod = str_replace(1, Minz_Request::param('keep_period_count'), Minz_Request::param('keep_period_unit')); + } + } else { + $keepPeriod = false; + } + $category->_attributes('archiving', [ + 'keep_period' => $keepPeriod, + 'keep_max' => $keepMax, + 'keep_min' => intval(Minz_Request::param('keep_min', 0)), + 'keep_favourites' => Minz_Request::paramBoolean('keep_favourites'), + 'keep_labels' => Minz_Request::paramBoolean('keep_labels'), + 'keep_unreads' => Minz_Request::paramBoolean('keep_unreads'), + ]); + } + + $values = [ 'name' => Minz_Request::param('name', ''), - ); + 'attributes' => $category->attributes(), + ]; invalidateHttpCache(); diff --git a/app/Models/Category.php b/app/Models/Category.php index 29c0e586b..a0ee1ddaa 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -8,6 +8,7 @@ class FreshRSS_Category extends Minz_Model { private $feeds = null; private $hasFeedsWithError = false; private $isDefault = false; + private $attributes = []; public function __construct($name = '', $feeds = null) { $this->_name($name); @@ -68,6 +69,14 @@ class FreshRSS_Category extends Minz_Model { return $this->hasFeedsWithError; } + public function attributes($key = '') { + if ($key == '') { + return $this->attributes; + } else { + return isset($this->attributes[$key]) ? $this->attributes[$key] : null; + } + } + public function _id($id) { $this->id = $id; if ($id == FreshRSS_CategoryDAO::DEFAULTCATEGORYID) { @@ -87,4 +96,19 @@ class FreshRSS_Category extends Minz_Model { $this->feeds = $values; } + + public function _attributes($key, $value) { + if ($key == '') { + if (is_string($value)) { + $value = json_decode($value, true); + } + if (is_array($value)) { + $this->attributes = $value; + } + } elseif ($value === null) { + unset($this->attributes[$key]); + } else { + $this->attributes[$key] = $value; + } + } } diff --git a/app/Models/CategoryDAO.php b/app/Models/CategoryDAO.php index dd49b542d..1b8717e83 100644 --- a/app/Models/CategoryDAO.php +++ b/app/Models/CategoryDAO.php @@ -4,15 +4,81 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable const DEFAULTCATEGORYID = 1; + protected function addColumn($name) { + Minz_Log::warning(__method__ . ': ' . $name); + try { + if ('attributes' === $name) { //v1.15.0 + $ok = $this->pdo->exec('ALTER TABLE `_category` ADD COLUMN attributes TEXT') !== false; + + $stm = $this->pdo->query('SELECT * FROM `_feed`'); + $feeds = $stm->fetchAll(PDO::FETCH_ASSOC); + + $stm = $this->pdo->prepare('UPDATE `_feed` SET attributes = :attributes WHERE id = :id'); + foreach ($feeds as $feed) { + if (empty($feed['keep_history']) || empty($feed['id'])) { + continue; + } + $keepHistory = $feed['keep_history']; + $attributes = empty($feed['attributes']) ? [] : json_decode($feed['attributes'], true); + if (is_string($attributes)) { //Legacy risk of double-encoding + $attributes = json_decode($attributes, true); + } + if (!is_array($attributes)) { + $attributes = []; + } + if ($keepHistory > 0) { + $attributes['archiving']['keep_min'] = intval($keepHistory); + } elseif ($keepHistory == -1) { //Infinite + $attributes['archiving']['keep_period'] = false; + $attributes['archiving']['keep_max'] = false; + $attributes['archiving']['keep_min'] = false; + } else { + continue; + } + $stm->bindValue(':id', $feed['id'], PDO::PARAM_INT); + $stm->bindValue(':attributes', json_encode($attributes, JSON_UNESCAPED_SLASHES)); + $stm->execute(); + } + + if ($this->pdo->dbType() !== 'sqlite') { //SQLite does not support DROP COLUMN + $this->pdo->exec('ALTER TABLE `_feed` DROP COLUMN keep_history'); + } else { + $this->pdo->exec('DROP INDEX IF EXISTS feed_keep_history_index'); //SQLite at least drop index + } + return $ok; + } + } catch (Exception $e) { + Minz_Log::error(__method__ . ': ' . $e->getMessage()); + } + return false; + } + + protected function autoUpdateDb($errorInfo) { + if (isset($errorInfo[0])) { + if ($errorInfo[0] === FreshRSS_DatabaseDAO::ER_BAD_FIELD_ERROR || $errorInfo[0] === FreshRSS_DatabaseDAOPGSQL::UNDEFINED_COLUMN) { + foreach (['attributes'] as $column) { + if (stripos($errorInfo[2], $column) !== false) { + return $this->addColumn($column); + } + } + } + } + return false; + } + public function addCategory($valuesTmp) { - $sql = 'INSERT INTO `_category`(name) ' - . 'SELECT * FROM (SELECT TRIM(?)) c2 ' //TRIM() to provide a type hint as text for PostgreSQL + $sql = 'INSERT INTO `_category`(name, attributes) ' + . 'SELECT * FROM (SELECT TRIM(?), ?) c2 ' //TRIM() to provide a type hint as text for PostgreSQL . 'WHERE NOT EXISTS (SELECT 1 FROM `_tag` WHERE name = TRIM(?))'; //No tag of the same name $stm = $this->pdo->prepare($sql); $valuesTmp['name'] = mb_strcut(trim($valuesTmp['name']), 0, FreshRSS_DatabaseDAO::LENGTH_INDEX_UNICODE, 'UTF-8'); + if (!isset($valuesTmp['attributes'])) { + $valuesTmp['attributes'] = []; + } $values = array( $valuesTmp['name'], + is_string($valuesTmp['attributes']) ? $valuesTmp['attributes'] : json_encode($valuesTmp['attributes'], JSON_UNESCAPED_SLASHES), $valuesTmp['name'], ); @@ -20,7 +86,10 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable return $this->pdo->lastInsertId('`_category_id_seq`'); } else { $info = $stm == null ? $this->pdo->errorInfo() : $stm->errorInfo(); - Minz_Log::error('SQL error addCategory: ' . $info[2]); + if ($this->autoUpdateDb($info)) { + return $this->addCategory($valuesTmp); + } + Minz_Log::error('SQL error addCategory: ' . json_encode($info)); return false; } } @@ -39,13 +108,17 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable } public function updateCategory($id, $valuesTmp) { - $sql = 'UPDATE `_category` SET name=? WHERE id=? ' + $sql = 'UPDATE `_category` SET name=?, attributes=? WHERE id=? ' . 'AND NOT EXISTS (SELECT 1 FROM `_tag` WHERE name = ?)'; //No tag of the same name $stm = $this->pdo->prepare($sql); $valuesTmp['name'] = mb_strcut(trim($valuesTmp['name']), 0, FreshRSS_DatabaseDAO::LENGTH_INDEX_UNICODE, 'UTF-8'); + if (!isset($valuesTmp['attributes'])) { + $valuesTmp['attributes'] = []; + } $values = array( $valuesTmp['name'], + is_string($valuesTmp['attributes']) ? $valuesTmp['attributes'] : json_encode($valuesTmp['attributes'], JSON_UNESCAPED_SLASHES), $id, $valuesTmp['name'], ); @@ -54,7 +127,10 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable return $stm->rowCount(); } else { $info = $stm == null ? $this->pdo->errorInfo() : $stm->errorInfo(); - Minz_Log::error('SQL error updateCategory: ' . $info[2]); + if ($this->autoUpdateDb($info)) { + return $this->updateCategory($valuesTmp); + } + Minz_Log::error('SQL error updateCategory: ' . json_encode($info)); return false; } } @@ -70,16 +146,27 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable return $stm->rowCount(); } else { $info = $stm == null ? $this->pdo->errorInfo() : $stm->errorInfo(); - Minz_Log::error('SQL error deleteCategory: ' . $info[2]); + Minz_Log::error('SQL error deleteCategory: ' . json_encode($info)); return false; } } public function selectAll() { - $sql = 'SELECT id, name FROM `_category`'; + $sql = 'SELECT id, name, attributes FROM `_category`'; $stm = $this->pdo->query($sql); - while ($row = $stm->fetch(PDO::FETCH_ASSOC)) { - yield $row; + if ($stm != false) { + while ($row = $stm->fetch(PDO::FETCH_ASSOC)) { + yield $row; + } + } else { + $info = $this->pdo->errorInfo(); + if ($this->autoUpdateDb($info)) { + foreach ($this->selectAll() as $category) { // `yield from` requires PHP 7+ + yield $category; + } + } + Minz_Log::error(__method__ . ' error: ' . json_encode($info)); + return false; } } @@ -116,7 +203,7 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable public function listCategories($prePopulateFeeds = true, $details = false) { if ($prePopulateFeeds) { - $sql = 'SELECT c.id AS c_id, c.name AS c_name, ' + $sql = 'SELECT c.id AS c_id, c.name AS c_name, c.attributes AS c_attributes, ' . ($details ? 'f.* ' : 'f.id, f.name, f.url, f.website, f.priority, f.error, f.`cache_nbEntries`, f.`cache_nbUnreads`, f.ttl ') . 'FROM `_category` c ' . 'LEFT OUTER JOIN `_feed` f ON f.category=c.id ' @@ -124,9 +211,17 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable . 'GROUP BY f.id, c_id ' . 'ORDER BY c.name, f.name'; $stm = $this->pdo->prepare($sql); - $stm->bindValue(':priority_normal', FreshRSS_Feed::PRIORITY_NORMAL, PDO::PARAM_INT); - $stm->execute(); - return self::daoToCategoryPrepopulated($stm->fetchAll(PDO::FETCH_ASSOC)); + $values = [ ':priority_normal' => FreshRSS_Feed::PRIORITY_NORMAL ]; + if ($stm && $stm->execute($values)) { + return self::daoToCategoryPrepopulated($stm->fetchAll(PDO::FETCH_ASSOC)); + } else { + $info = $stm == null ? $this->pdo->errorInfo() : $stm->errorInfo(); + if ($this->autoUpdateDb($info)) { + return $this->listCategories($prePopulateFeeds, $details); + } + Minz_Log::error('SQL error listCategories: ' . json_encode($info)); + return false; + } } else { $sql = 'SELECT * FROM `_category` ORDER BY name'; $stm = $this->pdo->query($sql); @@ -282,6 +377,7 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable $dao['name'] ); $cat->_id($dao['id']); + $cat->_attributes('', isset($dao['attributes']) ? $dao['attributes'] : ''); $cat->_isDefault(static::DEFAULTCATEGORYID === intval($dao['id'])); $list[$key] = $cat; } diff --git a/app/Models/CategoryDAOSQLite.php b/app/Models/CategoryDAOSQLite.php new file mode 100644 index 000000000..e32545c90 --- /dev/null +++ b/app/Models/CategoryDAOSQLite.php @@ -0,0 +1,17 @@ +pdo->query("PRAGMA table_info('category')")) { + $columns = $tableInfo->fetchAll(PDO::FETCH_COLUMN, 1); + foreach (['attributes'] as $column) { + if (!in_array($column, $columns)) { + return $this->addColumn($column); + } + } + } + return false; + } + +} diff --git a/app/Models/ConfigurationSetter.php b/app/Models/ConfigurationSetter.php index 963d37e2b..b1d271f41 100644 --- a/app/Models/ConfigurationSetter.php +++ b/app/Models/ConfigurationSetter.php @@ -79,11 +79,6 @@ class FreshRSS_ConfigurationSetter { $data['html5_notif_timeout'] = $value >= 0 ? $value : 0; } - private function _keep_history_default(&$data, $value) { - $value = intval($value); - $data['keep_history_default'] = $value >= FreshRSS_Feed::KEEP_HISTORY_INFINITE ? $value : 0; - } - // It works for system config too! private function _language(&$data, $value) { $value = strtolower($value); @@ -94,11 +89,6 @@ class FreshRSS_ConfigurationSetter { $data['language'] = $value; } - private function _old_entries(&$data, $value) { - $value = intval($value); - $data['old_entries'] = $value > 0 ? $value : 3; - } - private function _passwordHash(&$data, $value) { $data['passwordHash'] = ctype_graph($value) && (strlen($value) >= 60) ? $value : ''; } diff --git a/app/Models/Context.php b/app/Models/Context.php index 95dc47c8c..878b72c69 100644 --- a/app/Models/Context.php +++ b/app/Models/Context.php @@ -51,6 +51,25 @@ class FreshRSS_Context { // Init configuration. self::$system_conf = Minz_Configuration::get('system'); self::$user_conf = Minz_Configuration::get('user'); + + //Legacy + $oldEntries = (int)FreshRSS_Context::$user_conf->param('old_entries', 0); + if ($oldEntries > 0) { //Freshrss < 1.15 + $archiving['keep_period'] = 'P' . $oldEntries . 'M'; + } + + $keepMin = (int)FreshRSS_Context::$user_conf->param('keep_history_default', -5); + if ($keepMin != 0 && $keepMin > -5) { //Freshrss < 1.15 + $archiving = FreshRSS_Context::$user_conf->archiving; + if ($keepMin > 0) { + $archiving['keep_min'] = $keepMin; + } elseif ($keepMin == -1) { //Infinite + $archiving['keep_period'] = false; + $archiving['keep_max'] = false; + $archiving['keep_min'] = false; + } + FreshRSS_Context::$user_conf->archiving = $archiving; + } } /** diff --git a/app/Models/DatabaseDAO.php b/app/Models/DatabaseDAO.php index f6cd2f756..a36b469b1 100644 --- a/app/Models/DatabaseDAO.php +++ b/app/Models/DatabaseDAO.php @@ -15,11 +15,11 @@ class FreshRSS_DatabaseDAO extends Minz_ModelPdo { const LENGTH_INDEX_UNICODE = 191; public function create() { - require_once(APP_PATH . '/SQL/install.sql.' . $this->pdo->dbType() . '.php'); + require(APP_PATH . '/SQL/install.sql.' . $this->pdo->dbType() . '.php'); $db = FreshRSS_Context::$system_conf->db; try { - $sql = sprintf(SQL_CREATE_DB, empty($db['base']) ? '' : $db['base']); + $sql = sprintf($SQL_CREATE_DB, empty($db['base']) ? '' : $db['base']); return $this->pdo->exec($sql) !== false; } catch (PDOException $e) { $_SESSION['bd_error'] = $e->getMessage(); @@ -86,7 +86,7 @@ class FreshRSS_DatabaseDAO extends Minz_ModelPdo { public function feedIsCorrect() { return $this->checkTable('feed', array( 'id', 'url', 'category', 'name', 'website', 'description', 'lastUpdate', - 'priority', 'pathEntries', 'httpAuth', 'error', 'keep_history', 'ttl', 'attributes', + 'priority', 'pathEntries', 'httpAuth', 'error', 'ttl', 'attributes', 'cache_nbEntries', 'cache_nbUnreads', )); } @@ -164,11 +164,11 @@ class FreshRSS_DatabaseDAO extends Minz_ModelPdo { public function ensureCaseInsensitiveGuids() { $ok = true; if ($this->pdo->dbType() === 'mysql') { - include_once(APP_PATH . '/SQL/install.sql.mysql.php'); + include(APP_PATH . '/SQL/install.sql.mysql.php'); $ok = false; try { - $ok = $this->pdo->exec(SQL_UPDATE_GUID_LATIN1_BIN) !== false; //FreshRSS 1.12 + $ok = $this->pdo->exec($SQL_UPDATE_GUID_LATIN1_BIN) !== false; //FreshRSS 1.12 } catch (Exception $e) { $ok = false; Minz_Log::error(__METHOD__ . ' error: ' . $e->getMessage()); @@ -243,7 +243,7 @@ class FreshRSS_DatabaseDAO extends Minz_ModelPdo { Minz_ModelPdo::clean(); $userDAOSQLite = new FreshRSS_UserDAO('', $sqlite); - $categoryDAOSQLite = new FreshRSS_CategoryDAO('', $sqlite); + $categoryDAOSQLite = new FreshRSS_CategoryDAOSQLite('', $sqlite); $feedDAOSQLite = new FreshRSS_FeedDAOSQLite('', $sqlite); $entryDAOSQLite = new FreshRSS_EntryDAOSQLite('', $sqlite); $tagDAOSQLite = new FreshRSS_TagDAOSQLite('', $sqlite); diff --git a/app/Models/DatabaseDAOSQLite.php b/app/Models/DatabaseDAOSQLite.php index b1473ab09..413e7ee09 100644 --- a/app/Models/DatabaseDAOSQLite.php +++ b/app/Models/DatabaseDAOSQLite.php @@ -66,6 +66,6 @@ class FreshRSS_DatabaseDAOSQLite extends FreshRSS_DatabaseDAO { } public function optimize() { - return $this->exec('VACUUM') !== false; + return $this->pdo->exec('VACUUM') !== false; } } diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index 5ff3a5b70..6a8a25b3e 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -26,9 +26,9 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $this->pdo->commit(); } try { - require_once(APP_PATH . '/SQL/install.sql.' . $this->pdo->dbType() . '.php'); + require(APP_PATH . '/SQL/install.sql.' . $this->pdo->dbType() . '.php'); Minz_Log::warning('SQL CREATE TABLE entrytmp...'); - $ok = $this->pdo->exec(SQL_CREATE_TABLE_ENTRYTMP . SQL_CREATE_INDEX_ENTRY_1) !== false; + $ok = $this->pdo->exec($SQL_CREATE_TABLE_ENTRYTMP . $SQL_CREATE_INDEX_ENTRY_1) !== false; } catch (Exception $ex) { Minz_Log::error(__method__ . ' error: ' . $ex->getMessage()); } @@ -544,32 +544,57 @@ SQL; return $affected; } - public function cleanOldEntries($id_feed, $date_min, $keep = 15) { //Remember to call updateCachedValue($id_feed) or updateCachedValues() just after - $sql = 'DELETE FROM `_entry` ' - . 'WHERE id_feed=:id_feed1 AND id<=:id_max ' - . 'AND is_favorite=0 ' //Do not remove favourites - . 'AND `lastSeen` < (SELECT maxLastSeen FROM (SELECT (MAX(e3.`lastSeen`)-99) AS maxLastSeen FROM `_entry` e3 WHERE e3.id_feed=:id_feed2) recent) ' //Do not remove the most newly seen articles, plus a few seconds of tolerance - . 'AND id NOT IN (SELECT id_entry FROM `_entrytag`) ' //Do not purge tagged entries - . 'AND id NOT IN (SELECT id FROM (SELECT e2.id FROM `_entry` e2 WHERE e2.id_feed=:id_feed3 ORDER BY id DESC LIMIT :keep) keep)'; //Double select: MySQL doesn't support 'LIMIT & IN/ALL/ANY/SOME subquery' - $stm = $this->pdo->prepare($sql); + public function cleanOldEntries($id_feed, $options = []) { //Remember to call updateCachedValue($id_feed) or updateCachedValues() just after + $sql = 'DELETE FROM `_entry` WHERE id_feed = :id_feed1'; //No alias for MySQL / MariaDB + $params = []; + $params[':id_feed1'] = $id_feed; - if ($stm) { - $id_max = intval($date_min) . '000000'; - $stm->bindParam(':id_max', $id_max, PDO::PARAM_STR); - $stm->bindParam(':id_feed1', $id_feed, PDO::PARAM_INT); - $stm->bindParam(':id_feed2', $id_feed, PDO::PARAM_INT); - $stm->bindParam(':id_feed3', $id_feed, PDO::PARAM_INT); - $stm->bindParam(':keep', $keep, PDO::PARAM_INT); + //==Exclusions== + if (!empty($options['keep_favourites'])) { + $sql .= ' AND is_favorite = 0'; + } + if (!empty($options['keep_unreads'])) { + $sql .= ' AND is_read = 1'; + } + if (!empty($options['keep_labels'])) { + $sql .= ' AND NOT EXISTS (SELECT 1 FROM `_entrytag` WHERE id_entry = id)'; + } + if (!empty($options['keep_min']) && $options['keep_min'] > 0) { + $sql .= ' AND `lastSeen` < (SELECT e2.`lastSeen` FROM `_entry` e2 WHERE e2.id_feed = :id_feed2' + . ' ORDER BY e2.`lastSeen` DESC LIMIT 1 OFFSET :keep_min)'; + $params[':id_feed2'] = $id_feed; + $params[':keep_min'] = (int)$options['keep_min']; } + //Keep at least the articles seen at the last refresh + $sql .= ' AND `lastSeen` < (SELECT MAX(e3.`lastSeen`) FROM `_entry` e3 WHERE e3.id_feed = :id_feed3)'; + $params[':id_feed3'] = $id_feed; + + //==Inclusions== + $sql .= ' AND (1=0'; + if (!empty($options['keep_period'])) { + $sql .= ' OR `lastSeen` < :max_last_seen'; + $now = new DateTime('now'); + $now->sub(new DateInterval($options['keep_period'])); + $params[':max_last_seen'] = $now->format('U'); + } + if (!empty($options['keep_max']) && $options['keep_max'] > 0) { + $sql .= ' OR `lastSeen` <= (SELECT e4.`lastSeen` FROM `_entry` e4 WHERE e4.id_feed = :id_feed4' + . ' ORDER BY e4.`lastSeen` DESC LIMIT 1 OFFSET :keep_max)'; + $params[':id_feed4'] = $id_feed; + $params[':keep_max'] = (int)$options['keep_max']; + } + $sql .= ')'; + + $stm = $this->pdo->prepare($sql); - if ($stm && $stm->execute()) { + if ($stm && $stm->execute($params)) { return $stm->rowCount(); } else { $info = $stm == null ? $this->pdo->errorInfo() : $stm->errorInfo(); if ($this->autoUpdateDb($info)) { - return $this->cleanOldEntries($id_feed, $date_min, $keep); + return $this->cleanOldEntries($id_feed, $options); } - Minz_Log::error('SQL error cleanOldEntries: ' . $info[2]); + Minz_Log::error(__method__ . ' error:' . json_encode($info)); return false; } } diff --git a/app/Models/Factory.php b/app/Models/Factory.php index 6f2ca2217..69885c205 100644 --- a/app/Models/Factory.php +++ b/app/Models/Factory.php @@ -7,7 +7,13 @@ class FreshRSS_Factory { } public static function createCategoryDao($username = null) { - return new FreshRSS_CategoryDAO($username); + $conf = Minz_Configuration::get('system'); + switch ($conf->db['type']) { + case 'sqlite': + return new FreshRSS_CategoryDAOSQLite($username); + default: + return new FreshRSS_CategoryDAO($username); + } } public static function createFeedDao($username = null) { diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 8aee9d62f..0a45a1f4c 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -7,8 +7,8 @@ class FreshRSS_Feed extends Minz_Model { const TTL_DEFAULT = 0; - const KEEP_HISTORY_DEFAULT = -2; - const KEEP_HISTORY_INFINITE = -1; + const ARCHIVING_RETENTION_COUNT_LIMIT = 10000; + const ARCHIVING_RETENTION_PERIOD = 'P3M'; private $id = 0; private $url; @@ -24,9 +24,8 @@ class FreshRSS_Feed extends Minz_Model { private $pathEntries = ''; private $httpAuth = ''; private $error = false; - private $keep_history = self::KEEP_HISTORY_DEFAULT; private $ttl = self::TTL_DEFAULT; - private $attributes = array(); + private $attributes = []; private $mute = false; private $hash = null; private $lockPath = ''; @@ -110,9 +109,6 @@ class FreshRSS_Feed extends Minz_Model { public function inError() { return $this->error; } - public function keepHistory() { - return $this->keep_history; - } public function ttl() { return $this->ttl; } @@ -230,12 +226,6 @@ class FreshRSS_Feed extends Minz_Model { public function _error($value) { $this->error = (bool)$value; } - public function _keepHistory($value) { - $value = intval($value); - $value = min($value, 1000000); - $value = max($value, self::KEEP_HISTORY_DEFAULT); - $this->keep_history = $value; - } public function _ttl($value) { $value = intval($value); $value = min($value, 100000000); @@ -469,6 +459,28 @@ class FreshRSS_Feed extends Minz_Model { $this->entries = $entries; } + public function cleanOldEntries() { //Remember to call updateCachedValue($id_feed) or updateCachedValues() just after + $archiving = $this->attributes('archiving'); + if ($archiving == null) { + $catDAO = FreshRSS_Factory::createCategoryDao(); + $category = $catDAO->searchById($this->category()); + $archiving = $category == null ? null : $category->attributes('archiving'); + if ($archiving == null) { + $archiving = FreshRSS_Context::$user_conf->archiving; + } + } + if (is_array($archiving)) { + $entryDAO = FreshRSS_Factory::createEntryDao(); + $nb = $entryDAO->cleanOldEntries($this->id(), $archiving); + if ($nb > 0) { + $needFeedCacheRefresh = true; + Minz_Log::debug($nb . ' entries cleaned in feed [' . $this->url(false) . '] with: ' . json_encode($archiving)); + } + return $nb; + } + return false; + } + protected function cacheFilename() { return CACHE_PATH . '/' . md5($this->url) . '.spc'; } diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index d4a91c145..fa0001df7 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -17,7 +17,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { protected function autoUpdateDb($errorInfo) { if (isset($errorInfo[0])) { if ($errorInfo[0] === FreshRSS_DatabaseDAO::ER_BAD_FIELD_ERROR || $errorInfo[0] === FreshRSS_DatabaseDAOPGSQL::UNDEFINED_COLUMN) { - foreach (array('attributes') as $column) { + foreach (['attributes'] as $column) { if (stripos($errorInfo[2], $column) !== false) { return $this->addColumn($column); } @@ -41,12 +41,11 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { `pathEntries`, `httpAuth`, error, - keep_history, ttl, attributes ) VALUES - (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; + (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; $stm = $this->pdo->prepare($sql); $valuesTmp['url'] = safe_ascii($valuesTmp['url']); @@ -54,6 +53,9 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { if (!isset($valuesTmp['pathEntries'])) { $valuesTmp['pathEntries'] = ''; } + if (!isset($valuesTmp['attributes'])) { + $valuesTmp['attributes'] = []; + } $values = array( substr($valuesTmp['url'], 0, 511), @@ -66,9 +68,8 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { mb_strcut($valuesTmp['pathEntries'], 0, 511, 'UTF-8'), base64_encode($valuesTmp['httpAuth']), isset($valuesTmp['error']) ? intval($valuesTmp['error']) : 0, - isset($valuesTmp['keep_history']) ? intval($valuesTmp['keep_history']) : FreshRSS_Feed::KEEP_HISTORY_DEFAULT, isset($valuesTmp['ttl']) ? intval($valuesTmp['ttl']) : FreshRSS_Feed::TTL_DEFAULT, - isset($valuesTmp['attributes']) ? json_encode($valuesTmp['attributes']) : '', + is_string($valuesTmp['attributes']) ? $valuesTmp['attributes'] : json_encode($valuesTmp['attributes'], JSON_UNESCAPED_SLASHES), ); if ($stm && $stm->execute($values)) { @@ -135,7 +136,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { if ($key === 'httpAuth') { $valuesTmp[$key] = base64_encode($v); } elseif ($key === 'attributes') { - $valuesTmp[$key] = json_encode($v); + $valuesTmp[$key] = is_string($valuesTmp[$key]) ? $valuesTmp[$key] : json_encode($valuesTmp[$key], JSON_UNESCAPED_SLASHES); } } $set = substr($set, 0, -2); @@ -246,7 +247,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { public function selectAll() { $sql = 'SELECT id, url, category, name, website, description, `lastUpdate`, priority, ' - . '`pathEntries`, `httpAuth`, error, keep_history, ttl, attributes ' + . '`pathEntries`, `httpAuth`, error, ttl, attributes ' . 'FROM `_feed`'; $stm = $this->pdo->query($sql); while ($row = $stm->fetch(PDO::FETCH_ASSOC)) { @@ -319,7 +320,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { */ public function listFeedsOrderUpdate($defaultCacheDuration = 3600, $limit = 0) { $this->updateTTL(); - $sql = 'SELECT id, url, name, website, `lastUpdate`, `pathEntries`, `httpAuth`, keep_history, ttl, attributes ' + $sql = 'SELECT id, url, name, website, `lastUpdate`, `pathEntries`, `httpAuth`, ttl, attributes ' . 'FROM `_feed` ' . ($defaultCacheDuration < 0 ? '' : 'WHERE ttl >= ' . FreshRSS_Feed::TTL_DEFAULT . ' AND `lastUpdate` < (' . (time() + 60) @@ -407,7 +408,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { . 'SET `cache_nbEntries`=0, `cache_nbUnreads`=0 WHERE id=:id'; $stm = $this->pdo->prepare($sql); $stm->bindParam(':id', $id, PDO::PARAM_INT); - if (!($stm && $stm->execute($values))) { + if (!($stm && $stm->execute())) { $info = $stm == null ? $this->pdo->errorInfo() : $stm->errorInfo(); Minz_Log::error('SQL error truncate: ' . $info[2]); $this->pdo->rollBack(); @@ -448,7 +449,6 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $myFeed->_pathEntries(isset($dao['pathEntries']) ? $dao['pathEntries'] : ''); $myFeed->_httpAuth(isset($dao['httpAuth']) ? base64_decode($dao['httpAuth']) : ''); $myFeed->_error(isset($dao['error']) ? $dao['error'] : 0); - $myFeed->_keepHistory(isset($dao['keep_history']) ? $dao['keep_history'] : FreshRSS_Feed::KEEP_HISTORY_DEFAULT); $myFeed->_ttl(isset($dao['ttl']) ? $dao['ttl'] : FreshRSS_Feed::TTL_DEFAULT); $myFeed->_attributes('', isset($dao['attributes']) ? $dao['attributes'] : ''); $myFeed->_nbNotRead(isset($dao['cache_nbUnreads']) ? $dao['cache_nbUnreads'] : 0); diff --git a/app/Models/FeedDAOSQLite.php b/app/Models/FeedDAOSQLite.php index c56447df6..0f685867a 100644 --- a/app/Models/FeedDAOSQLite.php +++ b/app/Models/FeedDAOSQLite.php @@ -5,7 +5,7 @@ class FreshRSS_FeedDAOSQLite extends FreshRSS_FeedDAO { protected function autoUpdateDb($errorInfo) { if ($tableInfo = $this->pdo->query("PRAGMA table_info('feed')")) { $columns = $tableInfo->fetchAll(PDO::FETCH_COLUMN, 1); - foreach (array('attributes') as $column) { + foreach (['attributes'] as $column) { if (!in_array($column, $columns)) { return $this->addColumn($column); } diff --git a/app/Models/Tag.php b/app/Models/Tag.php index 3eb989cc1..0d50e356c 100644 --- a/app/Models/Tag.php +++ b/app/Models/Tag.php @@ -3,7 +3,7 @@ class FreshRSS_Tag extends Minz_Model { private $id = 0; private $name; - private $attributes = array(); + private $attributes = []; private $nbEntries = -1; private $nbUnread = -1; diff --git a/app/Models/TagDAO.php b/app/Models/TagDAO.php index 9c0f591c9..5882eee76 100644 --- a/app/Models/TagDAO.php +++ b/app/Models/TagDAO.php @@ -13,14 +13,14 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $this->pdo->commit(); } try { - require_once(APP_PATH . '/SQL/install.sql.' . $this->pdo->dbType() . '.php'); + require(APP_PATH . '/SQL/install.sql.' . $this->pdo->dbType() . '.php'); Minz_Log::warning('SQL ALTER GUID case sensitivity...'); $databaseDAO = FreshRSS_Factory::createDatabaseDAO(); $databaseDAO->ensureCaseInsensitiveGuids(); Minz_Log::warning('SQL CREATE TABLE tag...'); - $ok = $this->pdo->exec(SQL_CREATE_TABLE_TAGS) !== false; + $ok = $this->pdo->exec($SQL_CREATE_TABLE_TAGS) !== false; } catch (Exception $e) { Minz_Log::error('FreshRSS_EntryDAO::createTagTable error: ' . $e->getMessage()); } @@ -48,9 +48,12 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $stm = $this->pdo->prepare($sql); $valuesTmp['name'] = mb_strcut(trim($valuesTmp['name']), 0, 63, 'UTF-8'); + if (!isset($valuesTmp['attributes'])) { + $valuesTmp['attributes'] = []; + } $values = array( $valuesTmp['name'], - isset($valuesTmp['attributes']) ? json_encode($valuesTmp['attributes']) : '', + is_string($valuesTmp['attributes']) ? $valuesTmp['attributes'] : json_encode($valuesTmp['attributes'], JSON_UNESCAPED_SLASHES), $valuesTmp['name'], ); @@ -81,9 +84,12 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable { $stm = $this->pdo->prepare($sql); $valuesTmp['name'] = mb_strcut(trim($valuesTmp['name']), 0, 63, 'UTF-8'); + if (!isset($valuesTmp['attributes'])) { + $valuesTmp['attributes'] = []; + } $values = array( $valuesTmp['name'], - isset($valuesTmp['attributes']) ? json_encode($valuesTmp['attributes']) : '', + is_string($valuesTmp['attributes']) ? $valuesTmp['attributes'] : json_encode($valuesTmp['attributes'], JSON_UNESCAPED_SLASHES), $id, $valuesTmp['name'], ); diff --git a/app/Models/UserDAO.php b/app/Models/UserDAO.php index 8e7e977d0..4e824cf01 100644 --- a/app/Models/UserDAO.php +++ b/app/Models/UserDAO.php @@ -2,14 +2,14 @@ class FreshRSS_UserDAO extends Minz_ModelPdo { public function createUser($insertDefaultFeeds = false) { - require_once(APP_PATH . '/SQL/install.sql.' . $this->pdo->dbType() . '.php'); + require(APP_PATH . '/SQL/install.sql.' . $this->pdo->dbType() . '.php'); try { - $sql = SQL_CREATE_TABLES . SQL_CREATE_TABLE_ENTRYTMP . SQL_CREATE_TABLE_TAGS; + $sql = $SQL_CREATE_TABLES . $SQL_CREATE_TABLE_ENTRYTMP . $SQL_CREATE_TABLE_TAGS; $ok = $this->pdo->exec($sql) !== false; //Note: Only exec() can take multiple statements safely. if ($ok && $insertDefaultFeeds) { $default_feeds = FreshRSS_Context::$system_conf->default_feeds; - $stm = $this->pdo->prepare(SQL_INSERT_FEED); + $stm = $this->pdo->prepare($SQL_INSERT_FEED); foreach ($default_feeds as $feed) { $parameters = [ ':url' => $feed['url'], @@ -38,9 +38,8 @@ class FreshRSS_UserDAO extends Minz_ModelPdo { fwrite(STDERR, 'Deleting SQL data for user “' . $this->current_user . "”…\n"); } - require_once(APP_PATH . '/SQL/install.sql.' . $this->pdo->dbType() . '.php'); - - $ok = $this->pdo->exec(SQL_DROP_TABLES) !== false; + require(APP_PATH . '/SQL/install.sql.' . $this->pdo->dbType() . '.php'); + $ok = $this->pdo->exec($SQL_DROP_TABLES) !== false; if ($ok) { return true; diff --git a/app/SQL/install.sql.mysql.php b/app/SQL/install.sql.mysql.php index 87b5d1989..1eabfae8b 100644 --- a/app/SQL/install.sql.mysql.php +++ b/app/SQL/install.sql.mysql.php @@ -1,12 +1,13 @@ array( '_' => 'Archivace', - 'advanced' => 'Pokročilé', 'delete_after' => 'Smazat články starší než', + 'exception' => 'Purge exception', //TODO - Translation 'help' => 'Více možností je dostupných v nastavení jednotlivých kanálů', - 'keep_history_by_feed' => 'Zachovat tento minimální počet článků v každém kanálu', + 'keep_favourites' => 'Never delete favourites', //TODO - Translation + 'keep_min_by_feed' => 'Zachovat tento minimální počet článků v každém kanálu', + 'keep_labels' => 'Never delete labels', //TODO - Translation + 'keep_unreads' => 'Never delete unreads', //TODO - Translation + 'maintenance' => 'Maintenance', //TODO - Translation 'optimize' => 'Optimalizovat databázi', 'optimize_help' => 'Občasná údržba zmenší velikost databáze', + 'policy' => 'Purge policy', //TODO - Translation + 'policy_warning' => 'If no purge policy is selected, every article will be kept.', //TODO - Translation 'purge_now' => 'Vyčistit nyní', + 'keep_max' => 'Maximum number of articles to keep', //TODO - Translation + 'keep_period' => 'Maximum age of articles to keep', //TODO - Translation 'title' => 'Archivace', 'ttl' => 'Neaktualizovat častěji než', ), diff --git a/app/i18n/cz/gen.php b/app/i18n/cz/gen.php index c6dabd555..de1456187 100644 --- a/app/i18n/cz/gen.php +++ b/app/i18n/cz/gen.php @@ -162,6 +162,13 @@ return array( 'nothing_to_load' => 'Žádné nové články', 'previous' => 'Předchozí', ), + 'period' => array( + 'days' => 'days', //TODO - Translation + 'hours' => 'hours', //TODO - Translation + 'months' => 'months', //TODO - Translation + 'weeks' => 'weeks', //TODO - Translation + 'years' => 'years', //TODO - Translation + ), 'share' => array( 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', diff --git a/app/i18n/cz/sub.php b/app/i18n/cz/sub.php index b2bdf416b..eaaff9acd 100644 --- a/app/i18n/cz/sub.php +++ b/app/i18n/cz/sub.php @@ -13,6 +13,7 @@ return array( 'category' => array( '_' => 'Kategorie', 'add' => 'Přidat kategorii', + 'archiving' => 'Archivace', 'empty' => 'Vyprázdit kategorii', 'information' => 'Informace', 'new' => 'Nová kategorie', @@ -40,7 +41,7 @@ return array( 'help' => 'Write one search filter per line.', //TODO - Translation ), 'information' => 'Informace', - 'keep_history' => 'Zachovat tento minimální počet článků', + 'keep_min' => 'Zachovat tento minimální počet článků', 'moved_category_deleted' => 'Po smazání kategorie budou v ní obsažené kanály automaticky přesunuty do %s.', 'mute' => 'mute', //TODO - Translation 'no_selected' => 'Nejsou označeny žádné kanály.', diff --git a/app/i18n/de/conf.php b/app/i18n/de/conf.php index 99225da9c..89bbfc10e 100644 --- a/app/i18n/de/conf.php +++ b/app/i18n/de/conf.php @@ -3,13 +3,21 @@ return array( 'archiving' => array( '_' => 'Archivierung', - 'advanced' => 'Erweitert', 'delete_after' => 'Entferne Artikel nach', + 'exception' => 'Purge exception', //TODO - Translation 'help' => 'Weitere Optionen sind in den Einstellungen der individuellen Feeds verfügbar.', - 'keep_history_by_feed' => 'Minimale Anzahl an Artikeln, die pro Feed behalten werden', + 'keep_favourites' => 'Never delete favourites', //TODO - Translation + 'keep_min_by_feed' => 'Minimale Anzahl an Artikeln, die pro Feed behalten werden', + 'keep_labels' => 'Never delete labels', //TODO - Translation + 'keep_unreads' => 'Never delete unreads', //TODO - Translation + 'maintenance' => 'Maintenance', //TODO - Translation 'optimize' => 'Datenbank optimieren', 'optimize_help' => 'Sollte gelegentlich durchgeführt werden, um die Größe der Datenbank zu reduzieren.', + 'policy' => 'Purge policy', //TODO - Translation + 'policy_warning' => 'If no purge policy is selected, every article will be kept.', //TODO - Translation 'purge_now' => 'Jetzt bereinigen', + 'keep_max' => 'Maximum number of articles to keep', //TODO - Translation + 'keep_period' => 'Maximum age of articles to keep', //TODO - Translation 'title' => 'Archivierung', 'ttl' => 'Aktualisiere automatisch nicht öfter als', ), diff --git a/app/i18n/de/gen.php b/app/i18n/de/gen.php index 6cc791d5e..e2dd2a251 100644 --- a/app/i18n/de/gen.php +++ b/app/i18n/de/gen.php @@ -162,6 +162,13 @@ return array( 'nothing_to_load' => 'Es gibt keine weiteren Artikel', 'previous' => 'Vorherige', ), + 'period' => array( + 'days' => 'days', //TODO - Translation + 'hours' => 'hours', //TODO - Translation + 'months' => 'months', //TODO - Translation + 'weeks' => 'weeks', //TODO - Translation + 'years' => 'years', //TODO - Translation + ), 'share' => array( 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', diff --git a/app/i18n/de/sub.php b/app/i18n/de/sub.php index abc01b954..1227b5559 100644 --- a/app/i18n/de/sub.php +++ b/app/i18n/de/sub.php @@ -13,6 +13,7 @@ return array( 'category' => array( '_' => 'Kategorie', 'add' => 'Eine Kategorie hinzufügen', + 'archiving' => 'Archivierung', 'empty' => 'Leere Kategorie', 'information' => 'Information', 'new' => 'Neue Kategorie', @@ -40,7 +41,7 @@ return array( 'help' => 'Write one search filter per line.', //TODO - Translation ), 'information' => 'Information', - 'keep_history' => 'Minimale Anzahl an Artikeln, die behalten wird', + 'keep_min' => 'Minimale Anzahl an Artikeln, die behalten wird', 'moved_category_deleted' => 'Wenn Sie eine Kategorie entfernen, werden deren Feeds automatisch in die Kategorie %s eingefügt.', 'mute' => 'Stumm schalten', 'no_selected' => 'Kein Feed ausgewählt.', diff --git a/app/i18n/en/conf.php b/app/i18n/en/conf.php index 1078c736c..2d4e06550 100644 --- a/app/i18n/en/conf.php +++ b/app/i18n/en/conf.php @@ -3,13 +3,21 @@ return array( 'archiving' => array( '_' => 'Archiving', - 'advanced' => 'Advanced', 'delete_after' => 'Remove articles after', + 'exception' => 'Purge exception', 'help' => 'More options are available in the individual feed settings', - 'keep_history_by_feed' => 'Minimum number of articles to keep by feed', + 'keep_favourites' => 'Never delete favourites', + 'keep_min_by_feed' => 'Minimum number of articles to keep by feed', + 'keep_labels' => 'Never delete labels', + 'keep_unreads' => 'Never delete unreads', + 'maintenance' => 'Maintenance', 'optimize' => 'Optimise database', 'optimize_help' => 'Do occasionally to reduce the size of the database', + 'policy' => 'Purge policy', + 'policy_warning' => 'If no purge policy is selected, every article will be kept.', 'purge_now' => 'Purge now', + 'keep_max' => 'Maximum number of articles to keep', + 'keep_period' => 'Maximum age of articles to keep', 'title' => 'Archiving', 'ttl' => 'Do not automatically refresh more often than', ), diff --git a/app/i18n/en/gen.php b/app/i18n/en/gen.php index a6ddcbb60..fc1bd587a 100644 --- a/app/i18n/en/gen.php +++ b/app/i18n/en/gen.php @@ -163,6 +163,13 @@ return array( 'nothing_to_load' => 'There are no more articles', 'previous' => 'Previous', ), + 'period' => array( + 'days' => 'days', + 'hours' => 'hours', + 'months' => 'months', + 'weeks' => 'weeks', + 'years' => 'years', + ), 'share' => array( 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', diff --git a/app/i18n/en/sub.php b/app/i18n/en/sub.php index fde01f9df..04ca793ec 100644 --- a/app/i18n/en/sub.php +++ b/app/i18n/en/sub.php @@ -13,6 +13,7 @@ return array( 'category' => array( '_' => 'Category', 'add' => 'Add a category', + 'archiving' => 'Archiving', 'empty' => 'Empty category', 'information' => 'Information', 'new' => 'New category', @@ -40,7 +41,7 @@ return array( 'help' => 'Write one search filter per line.', ), 'information' => 'Information', - 'keep_history' => 'Minimum number of articles to keep', + 'keep_min' => 'Minimum number of articles to keep', 'moved_category_deleted' => 'When you delete a category, its feeds are automatically classified under %s.', 'mute' => 'mute', 'no_selected' => 'No feed selected.', diff --git a/app/i18n/es/conf.php b/app/i18n/es/conf.php index 6aaad8d13..7a93a87de 100755 --- a/app/i18n/es/conf.php +++ b/app/i18n/es/conf.php @@ -3,13 +3,21 @@ return array( 'archiving' => array( '_' => 'Archivo', - 'advanced' => 'Avanzado', 'delete_after' => 'Eliminar artículos tras', + 'exception' => 'Purge exception', //TODO - Translation 'help' => 'Hay más opciones disponibles en los ajustes de la fuente', - 'keep_history_by_feed' => 'Número mínimo de artículos a conservar por fuente', + 'keep_favourites' => 'Never delete favourites', //TODO - Translation + 'keep_min_by_feed' => 'Número mínimo de artículos a conservar por fuente', + 'keep_labels' => 'Never delete labels', //TODO - Translation + 'keep_unreads' => 'Never delete unreads', //TODO - Translation + 'maintenance' => 'Maintenance', //TODO - Translation 'optimize' => 'Optimizar la base de datos', 'optimize_help' => 'Ejecuta la optimización de vez en cuando para reducir el tamaño de la base de datos', + 'policy' => 'Purge policy', //TODO - Translation + 'policy_warning' => 'If no purge policy is selected, every article will be kept.', //TODO - Translation 'purge_now' => 'Limpiar ahora', + 'keep_max' => 'Maximum number of articles to keep', //TODO - Translation + 'keep_period' => 'Maximum age of articles to keep', //TODO - Translation 'title' => 'Archivo', 'ttl' => 'No actualizar automáticamente más de', ), diff --git a/app/i18n/es/gen.php b/app/i18n/es/gen.php index 4affecc51..538ddc8fe 100755 --- a/app/i18n/es/gen.php +++ b/app/i18n/es/gen.php @@ -162,6 +162,13 @@ return array( 'nothing_to_load' => 'No hay más artículos', 'previous' => 'Anterior', ), + 'period' => array( + 'days' => 'days', //TODO - Translation + 'hours' => 'hours', //TODO - Translation + 'months' => 'months', //TODO - Translation + 'weeks' => 'weeks', //TODO - Translation + 'years' => 'years', //TODO - Translation + ), 'share' => array( 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', diff --git a/app/i18n/es/sub.php b/app/i18n/es/sub.php index 7d33c59fa..96be76c6c 100755 --- a/app/i18n/es/sub.php +++ b/app/i18n/es/sub.php @@ -13,6 +13,7 @@ return array( 'category' => array( '_' => 'Categoría', 'add' => 'Añadir a la categoría', + 'archiving' => 'Archivo', 'empty' => 'Vaciar categoría', 'information' => 'Información', 'new' => 'Nueva categoría', @@ -40,7 +41,7 @@ return array( 'help' => 'Write one search filter per line.', //TODO - Translation ), 'information' => 'Información', - 'keep_history' => 'Número mínimo de artículos a conservar', + 'keep_min' => 'Número mínimo de artículos a conservar', 'moved_category_deleted' => 'Al borrar una categoría todas sus fuentes pasan automáticamente a la categoría %s.', 'mute' => 'mute', //TODO - Translation 'no_selected' => 'No hay funentes seleccionadas.', diff --git a/app/i18n/fr/conf.php b/app/i18n/fr/conf.php index dcd623b5a..020c94085 100644 --- a/app/i18n/fr/conf.php +++ b/app/i18n/fr/conf.php @@ -3,13 +3,21 @@ return array( 'archiving' => array( '_' => 'Archivage', - 'advanced' => 'Avancé', 'delete_after' => 'Supprimer les articles après', + 'exception' => 'Exception de nettoyage', 'help' => 'D’autres options sont disponibles dans la configuration individuelle des flux.', - 'keep_history_by_feed' => 'Nombre minimum d’articles à conserver par flux', + 'keep_favourites' => 'Ne jamais supprimer les articles favoris', + 'keep_min_by_feed' => 'Nombre minimum d’articles à conserver par flux', + 'keep_labels' => 'Ne jamais supprimer les articles étiquetés', + 'keep_unreads' => 'Ne jamais supprimer les articles non lus', + 'maintenance' => 'Maintenance', 'optimize' => 'Optimiser la base de données', 'optimize_help' => 'À faire de temps en temps pour réduire la taille de la BDD', + 'policy' => 'Politique de nettoyage', + 'policy_warning' => 'Si aucune politique de nettoyage n’est sélectionnée, tous les articles seront conservés.', 'purge_now' => 'Purger maintenant', + 'keep_max' => 'Nombre maximum d’articles à conserver', + 'keep_period' => 'Âge maximum des articles à conserver', 'title' => 'Archivage', 'ttl' => 'Ne pas automatiquement rafraîchir plus souvent que', ), diff --git a/app/i18n/fr/gen.php b/app/i18n/fr/gen.php index 01b66d316..a6875dd05 100644 --- a/app/i18n/fr/gen.php +++ b/app/i18n/fr/gen.php @@ -162,6 +162,13 @@ return array( 'nothing_to_load' => 'Fin des articles', 'previous' => 'Précédent', ), + 'period' => array( + 'days' => 'jours', + 'hours' => 'heures', + 'months' => 'mois', + 'weeks' => 'semaines', + 'years' => 'années', + ), 'share' => array( 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', diff --git a/app/i18n/fr/sub.php b/app/i18n/fr/sub.php index df44150c2..d09a19e5a 100644 --- a/app/i18n/fr/sub.php +++ b/app/i18n/fr/sub.php @@ -13,6 +13,7 @@ return array( 'category' => array( '_' => 'Catégorie', 'add' => 'Ajouter une catégorie', + 'archiving' => 'Archivage', 'empty' => 'Catégorie vide', 'information' => 'Informations', 'new' => 'Nouvelle catégorie', @@ -40,7 +41,7 @@ return array( 'help' => 'Écrivez une recherche par ligne.', ), 'information' => 'Informations', - 'keep_history' => 'Nombre minimum d’articles à conserver', + 'keep_min' => 'Nombre minimum d’articles à conserver', 'moved_category_deleted' => 'Lors de la suppression d’une catégorie, ses flux seront automatiquement classés dans %s.', 'mute' => 'muet', 'no_selected' => 'Aucun flux sélectionné.', diff --git a/app/i18n/he/conf.php b/app/i18n/he/conf.php index 7e764b944..b987f21f4 100644 --- a/app/i18n/he/conf.php +++ b/app/i18n/he/conf.php @@ -3,13 +3,21 @@ return array( 'archiving' => array( '_' => 'ארכוב', - 'advanced' => 'מתקדם', 'delete_after' => 'מחיקת מאמרים לאחר', + 'exception' => 'Purge exception', //TODO - Translation 'help' => 'אפשרויות נוספות זמינות בזרמים ספציפיים', - 'keep_history_by_feed' => 'Minimum number of articles to keep by feed', //TODO - Translation + 'keep_favourites' => 'Never delete favourites', //TODO - Translation + 'keep_min_by_feed' => 'Minimum number of articles to keep by feed', + 'keep_labels' => 'Never delete labels', //TODO - Translation + 'keep_unreads' => 'Never delete unreads', //TODO - Translation + 'maintenance' => 'Maintenance', //TODO - Translation 'optimize' => 'מיטוב בסיס הנתונים', 'optimize_help' => 'ביצוע לעיתים קרובות על מנת למטב את בסיס הנתונים', + 'policy' => 'Purge policy', //TODO - Translation + 'policy_warning' => 'If no purge policy is selected, every article will be kept.', //TODO - Translation 'purge_now' => 'ניקוי עכשיו', + 'keep_max' => 'Maximum number of articles to keep', //TODO - Translation + 'keep_period' => 'Maximum age of articles to keep', //TODO - Translation 'title' => 'ארכוב', 'ttl' => 'אין לרענן אוטומטית יותר מ', ), diff --git a/app/i18n/he/gen.php b/app/i18n/he/gen.php index 158f11e5b..34e6d77de 100644 --- a/app/i18n/he/gen.php +++ b/app/i18n/he/gen.php @@ -162,6 +162,13 @@ return array( 'nothing_to_load' => 'אין מאמרים נוספים', 'previous' => 'הקודם', ), + 'period' => array( + 'days' => 'days', //TODO - Translation + 'hours' => 'hours', //TODO - Translation + 'months' => 'months', //TODO - Translation + 'weeks' => 'weeks', //TODO - Translation + 'years' => 'years', //TODO - Translation + ), 'share' => array( 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', diff --git a/app/i18n/he/sub.php b/app/i18n/he/sub.php index 8a629defb..15965d9e2 100644 --- a/app/i18n/he/sub.php +++ b/app/i18n/he/sub.php @@ -13,6 +13,7 @@ return array( 'category' => array( '_' => 'קטגוריה', 'add' => 'הוספת קטגוריה', + 'archiving' => 'ארכוב', 'empty' => 'Empty category', //TODO - Translation 'information' => 'מידע', 'new' => 'קטגוריה חדשה', @@ -40,7 +41,7 @@ return array( 'help' => 'Write one search filter per line.', //TODO - Translation ), 'information' => 'מידע', - 'keep_history' => 'מסםר מינימלי של מאמרים לשמור', + 'keep_min' => 'מסםר מינימלי של מאמרים לשמור', 'moved_category_deleted' => 'כאשר הקטגוריה נמחקת ההזנות שבתוכה אוטומטית מקוטלגות תחת %s.', 'mute' => 'mute', //TODO - Translation 'no_selected' => 'אף הזנה לא נבחרה.', diff --git a/app/i18n/it/conf.php b/app/i18n/it/conf.php index f06302c72..4bdaad33d 100644 --- a/app/i18n/it/conf.php +++ b/app/i18n/it/conf.php @@ -3,13 +3,21 @@ return array( 'archiving' => array( '_' => 'Archiviazione', - 'advanced' => 'Avanzate', 'delete_after' => 'Rimuovi articoli dopo', + 'exception' => 'Purge exception', //TODO - Translation 'help' => 'Altre opzioni sono disponibili nelle impostazioni dei singoli feed', - 'keep_history_by_feed' => 'Numero minimo di articoli da mantenere per feed', + 'keep_favourites' => 'Never delete favourites', //TODO - Translation + 'keep_min_by_feed' => 'Numero minimo di articoli da mantenere per feed', + 'keep_labels' => 'Never delete labels', //TODO - Translation + 'keep_unreads' => 'Never delete unreads', //TODO - Translation + 'maintenance' => 'Maintenance', //TODO - Translation 'optimize' => 'Ottimizza database', 'optimize_help' => 'Da fare occasionalmente per ridurre le dimensioni del database', + 'policy' => 'Purge policy', //TODO - Translation + 'policy_warning' => 'If no purge policy is selected, every article will be kept.', //TODO - Translation 'purge_now' => 'Cancella ora', + 'keep_max' => 'Maximum number of articles to keep', //TODO - Translation + 'keep_period' => 'Maximum age of articles to keep', //TODO - Translation 'title' => 'Archiviazione', 'ttl' => 'Non effettuare aggiornamenti per più di', ), diff --git a/app/i18n/it/gen.php b/app/i18n/it/gen.php index 604cc6941..50d4b4e6c 100644 --- a/app/i18n/it/gen.php +++ b/app/i18n/it/gen.php @@ -162,6 +162,13 @@ return array( 'nothing_to_load' => 'Non ci sono altri articoli', 'previous' => 'Precedente', ), + 'period' => array( + 'days' => 'days', //TODO - Translation + 'hours' => 'hours', //TODO - Translation + 'months' => 'months', //TODO - Translation + 'weeks' => 'weeks', //TODO - Translation + 'years' => 'years', //TODO - Translation + ), 'share' => array( 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', diff --git a/app/i18n/it/sub.php b/app/i18n/it/sub.php index 50738d9e3..22cd36986 100644 --- a/app/i18n/it/sub.php +++ b/app/i18n/it/sub.php @@ -13,6 +13,7 @@ return array( 'category' => array( '_' => 'Categoria', 'add' => 'Aggiungi una categoria', + 'archiving' => 'Archiviazione', 'empty' => 'Categoria vuota', 'information' => 'Informazioni', 'new' => 'Nuova categoria', @@ -40,7 +41,7 @@ return array( 'help' => 'Write one search filter per line.', //TODO - Translation ), 'information' => 'Informazioni', - 'keep_history' => 'Numero minimo di articoli da mantenere', + 'keep_min' => 'Numero minimo di articoli da mantenere', 'moved_category_deleted' => 'Cancellando una categoria i feed al suo interno verranno classificati automaticamente come %s.', 'mute' => 'mute', //TODO - Translation 'no_selected' => 'Nessun feed selezionato.', diff --git a/app/i18n/kr/conf.php b/app/i18n/kr/conf.php index 397d57418..1e77d0098 100644 --- a/app/i18n/kr/conf.php +++ b/app/i18n/kr/conf.php @@ -3,13 +3,21 @@ return array( 'archiving' => array( '_' => '보관', - 'advanced' => '고급 설정', 'delete_after' => '다음 기간보다 오래된 글 삭제', + 'exception' => 'Purge exception', //TODO - Translation 'help' => '더 자세한 옵션은 개별 피드 설정에 있습니다', - 'keep_history_by_feed' => '피드별 최소 유지 글 개수', + 'keep_favourites' => 'Never delete favourites', //TODO - Translation + 'keep_min_by_feed' => '피드별 최소 유지 글 개수', + 'keep_labels' => 'Never delete labels', //TODO - Translation + 'keep_unreads' => 'Never delete unreads', //TODO - Translation + 'maintenance' => 'Maintenance', //TODO - Translation 'optimize' => '데이터베이스 최적화', 'optimize_help' => '데이터베이스 크기를 줄이기 위해 가끔씩 수행해주세요', + 'policy' => 'Purge policy', //TODO - Translation + 'policy_warning' => 'If no purge policy is selected, every article will be kept.', //TODO - Translation 'purge_now' => '지금 삭제', + 'keep_max' => 'Maximum number of articles to keep', //TODO - Translation + 'keep_period' => 'Maximum age of articles to keep', //TODO - Translation 'title' => '보관', 'ttl' => '다음 시간이 지나기 전에 새로고침 금지', ), diff --git a/app/i18n/kr/gen.php b/app/i18n/kr/gen.php index 55fea3d66..fdc95d431 100644 --- a/app/i18n/kr/gen.php +++ b/app/i18n/kr/gen.php @@ -162,6 +162,13 @@ return array( 'nothing_to_load' => '더 이상 글이 없습니다', 'previous' => '이전', ), + 'period' => array( + 'days' => 'days', //TODO - Translation + 'hours' => 'hours', //TODO - Translation + 'months' => 'months', //TODO - Translation + 'weeks' => 'weeks', //TODO - Translation + 'years' => 'years', //TODO - Translation + ), 'share' => array( 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', diff --git a/app/i18n/kr/sub.php b/app/i18n/kr/sub.php index f8eccfa27..2586395f2 100644 --- a/app/i18n/kr/sub.php +++ b/app/i18n/kr/sub.php @@ -13,6 +13,7 @@ return array( 'category' => array( '_' => '카테고리', 'add' => '카테고리 추가', + 'archiving' => '보관', 'empty' => '빈 카테고리', 'information' => '정보', 'new' => '새 카테고리', @@ -40,7 +41,7 @@ return array( 'help' => 'Write one search filter per line.', //TODO - Translation ), 'information' => '정보', - 'keep_history' => '최소 유지 글 개수', + 'keep_min' => '최소 유지 글 개수', 'moved_category_deleted' => '카테고리를 삭제하면, 해당 카테고리 아래에 있던 피드들은 자동적으로 %s 아래로 분류됩니다.', 'mute' => '무기한 새로고침 금지', 'no_selected' => '선택된 피드가 없습니다.', diff --git a/app/i18n/nl/conf.php b/app/i18n/nl/conf.php index ec219d051..22302ccc0 100644 --- a/app/i18n/nl/conf.php +++ b/app/i18n/nl/conf.php @@ -1,15 +1,23 @@ array( '_' => 'Archivering', - 'advanced' => 'Geavanceerd', 'delete_after' => 'Verwijder artikelen na', + 'exception' => 'Purge exception', //TODO - Translation 'help' => 'Meer opties zijn beschikbaar in de persoonlijke stroom instellingen', - 'keep_history_by_feed' => 'Minimum aantal te behouden artikelen in de feed', - 'optimize' => 'Optimaliseer database', + 'keep_favourites' => 'Never delete favourites', //TODO - Translation + 'keep_min_by_feed' => 'Minimum aantal te behouden artikelen in de feed', + 'keep_labels' => 'Never delete labels', //TODO - Translation + 'keep_unreads' => 'Never delete unreads', //TODO - Translation + 'maintenance' => 'Maintenance', //TODO - Translation + 'optimize' => 'Optimaliseer database', //TODO - Translation 'optimize_help' => 'Doe dit zo af en toe om de omvang van de database te verkleinen', + 'policy' => 'Purge policy', //TODO - Translation + 'policy_warning' => 'If no purge policy is selected, every article will be kept.', //TODO - Translation 'purge_now' => 'Schoon nu op', + 'keep_max' => 'Maximum number of articles to keep', //TODO - Translation + 'keep_period' => 'Maximum age of articles to keep', //TODO - Translation 'title' => 'Archivering', 'ttl' => 'Vernieuw niet automatisch meer dan', ), diff --git a/app/i18n/nl/gen.php b/app/i18n/nl/gen.php index 0dcb3010a..4854e806e 100644 --- a/app/i18n/nl/gen.php +++ b/app/i18n/nl/gen.php @@ -162,6 +162,13 @@ return array( 'nothing_to_load' => 'Er zijn geen artikelen meer', 'previous' => 'Vorige', ), + 'period' => array( + 'days' => 'days', //TODO - Translation + 'hours' => 'hours', //TODO - Translation + 'months' => 'months', //TODO - Translation + 'weeks' => 'weeks', //TODO - Translation + 'years' => 'years', //TODO - Translation + ), 'share' => array( 'email' => 'Email', 'Known' => 'Known-gebaseerde sites', diff --git a/app/i18n/nl/sub.php b/app/i18n/nl/sub.php index 8ceb5aa28..6b498132f 100644 --- a/app/i18n/nl/sub.php +++ b/app/i18n/nl/sub.php @@ -13,6 +13,7 @@ return array( 'category' => array( '_' => 'Categorie', 'add' => 'Voeg categorie toe', + 'archiving' => 'Archiveren', 'empty' => 'Lege categorie', 'information' => 'Informatie', 'new' => 'Nieuwe categorie', @@ -40,7 +41,7 @@ return array( 'help' => 'Voer één zoekfilter per lijn in.', ), 'information' => 'Informatie', - 'keep_history' => 'Minimum aantal artikelen om te houden', + 'keep_min' => 'Minimum aantal artikelen om te houden', 'moved_category_deleted' => 'Als u een categorie verwijderd, worden de feeds automatisch geclassificeerd onder %s.', 'mute' => 'demp', 'no_selected' => 'Geen feed geselecteerd.', diff --git a/app/i18n/oc/conf.php b/app/i18n/oc/conf.php index 76c41911e..e8de3b089 100644 --- a/app/i18n/oc/conf.php +++ b/app/i18n/oc/conf.php @@ -5,11 +5,20 @@ return array( '_' => 'Archius', 'advanced' => 'Avançat', 'delete_after' => 'Levar los articles aprèp', + 'exception' => 'Purge exception', //TODO - Translation 'help' => 'Mai d’opcions son disponiblas dins la configuracion individuala dels fluxes', - 'keep_history_by_feed' => 'Nombre minimum d’articles de servar per flux', + 'keep_favourites' => 'Never delete favourites', //TODO - Translation + 'keep_min_by_feed' => 'Nombre minimum d’articles de servar per flux', + 'keep_labels' => 'Never delete labels', //TODO - Translation + 'keep_unreads' => 'Never delete unreads', //TODO - Translation + 'maintenance' => 'Maintenance', //TODO - Translation 'optimize' => 'Optimizar la basa de donada', 'optimize_help' => 'De far de temps en temps per redusir la talha de la basa de donadas', + 'policy' => 'Purge policy', //TODO - Translation + 'policy_warning' => 'If no purge policy is selected, every article will be kept.', //TODO - Translation 'purge_now' => 'Purgar ara', + 'keep_max' => 'Maximum number of articles to keep', //TODO - Translation + 'keep_period' => 'Maximum age of articles to keep', //TODO - Translation 'title' => 'Archius', 'ttl' => 'Actualizar pas automaticament mai sovent que', ), diff --git a/app/i18n/oc/gen.php b/app/i18n/oc/gen.php index 7ab56368f..928377997 100644 --- a/app/i18n/oc/gen.php +++ b/app/i18n/oc/gen.php @@ -162,6 +162,13 @@ return array( 'nothing_to_load' => 'I a pas mai d’articles', 'previous' => 'Precedent', ), + 'period' => array( + 'days' => 'days', //TODO - Translation + 'hours' => 'hours', //TODO - Translation + 'months' => 'months', //TODO - Translation + 'weeks' => 'weeks', //TODO - Translation + 'years' => 'years', //TODO - Translation + ), 'share' => array( 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', diff --git a/app/i18n/oc/sub.php b/app/i18n/oc/sub.php index eae9dff29..0f465d7ca 100644 --- a/app/i18n/oc/sub.php +++ b/app/i18n/oc/sub.php @@ -12,6 +12,7 @@ return array( 'category' => array( '_' => 'Categoria', 'add' => 'Ajustar una categoria', + 'archiving' => 'Archivar', 'empty' => 'Categoria voida', 'information' => 'Informacions', 'new' => 'Nòva categoria', @@ -39,7 +40,7 @@ return array( 'help' => 'Escrivètz una recèrca per linha.', ), 'information' => 'Informacions', - 'keep_history' => 'Nombre minimum d’articles de servar', + 'keep_min' => 'Nombre minimum d’articles de servar', 'moved_category_deleted' => 'Quand escafatz una categoria, sos fluxes son automaticament classats dins %s.', 'mute' => 'mut', 'no_selected' => 'Cap de flux pas seleccionat.', diff --git a/app/i18n/pt-br/conf.php b/app/i18n/pt-br/conf.php index eb067e58a..5e43cc373 100644 --- a/app/i18n/pt-br/conf.php +++ b/app/i18n/pt-br/conf.php @@ -3,13 +3,21 @@ return array( 'archiving' => array( '_' => 'Arquivar', - 'advanced' => 'Avançado', 'delete_after' => 'Remover artigos depois', + 'exception' => 'Purge exception', //TODO - Translation 'help' => 'Mais opções estão disponíveis nas configurações individuais do feed', - 'keep_history_by_feed' => 'Número mínimo de artigos para deixar no feed', + 'keep_favourites' => 'Never delete favourites', //TODO - Translation + 'keep_min_by_feed' => 'Número mínimo de artigos para deixar no feed', + 'keep_labels' => 'Never delete labels', //TODO - Translation + 'keep_unreads' => 'Never delete unreads', //TODO - Translation + 'maintenance' => 'Maintenance', //TODO - Translation 'optimize' => 'Otimizar banco de dados', 'optimize_help' => 'Faça ocasionalmente para reduzir o tamanho do banco de dados', + 'policy' => 'Purge policy', //TODO - Translation + 'policy_warning' => 'If no purge policy is selected, every article will be kept.', //TODO - Translation 'purge_now' => 'Purge agora', + 'keep_max' => 'Maximum number of articles to keep', //TODO - Translation + 'keep_period' => 'Maximum age of articles to keep', //TODO - Translation 'title' => 'Arquivar', 'ttl' => 'Não atualize automaticamente mais frequente que', ), diff --git a/app/i18n/pt-br/gen.php b/app/i18n/pt-br/gen.php index b327937d5..0e7f367ee 100644 --- a/app/i18n/pt-br/gen.php +++ b/app/i18n/pt-br/gen.php @@ -162,6 +162,13 @@ return array( 'nothing_to_load' => 'Não há mais artigos', 'previous' => 'Anterior', ), + 'period' => array( + 'days' => 'days', //TODO - Translation + 'hours' => 'hours', //TODO - Translation + 'months' => 'months', //TODO - Translation + 'weeks' => 'weeks', //TODO - Translation + 'years' => 'years', //TODO - Translation + ), 'share' => array( 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', diff --git a/app/i18n/pt-br/sub.php b/app/i18n/pt-br/sub.php index d4bea33c4..c4c28bd6c 100644 --- a/app/i18n/pt-br/sub.php +++ b/app/i18n/pt-br/sub.php @@ -13,6 +13,7 @@ return array( 'category' => array( '_' => 'Categoria', 'add' => 'Adicionar uma categoria', + 'archiving' => 'Arquivar', 'empty' => 'Categoria vazia', 'information' => 'Informações', 'new' => 'Nova categoria', @@ -40,7 +41,7 @@ return array( 'help' => 'Write one search filter per line.', //TODO - Translation ), 'information' => 'Informações', - 'keep_history' => 'Número mínimo de artigos para manter', + 'keep_min' => 'Número mínimo de artigos para manter', 'moved_category_deleted' => 'Quando você deleta uma categoria, seus feeds são automaticamente classificados como %s.', 'mute' => 'mute', //TODO - Translation 'no_selected' => 'Nenhum feed selecionado.', diff --git a/app/i18n/ru/conf.php b/app/i18n/ru/conf.php index af6f3b5f6..7a80587f8 100644 --- a/app/i18n/ru/conf.php +++ b/app/i18n/ru/conf.php @@ -3,13 +3,21 @@ return array( 'archiving' => array( '_' => 'Архивация', - 'advanced' => 'Продвинутые настройки', 'delete_after' => 'Удалять статьи после', + 'exception' => 'Purge exception', //TODO - Translation 'help' => 'Каждую подписку можно настроить более гибко', - 'keep_history_by_feed' => 'Minimum number of articles to keep by feed', //TODO - Translation + 'keep_favourites' => 'Never delete favourites', //TODO - Translation + 'keep_min_by_feed' => 'Minimum number of articles to keep by feed', //TODO - Translation + 'keep_labels' => 'Never delete labels', //TODO - Translation + 'keep_unreads' => 'Never delete unreads', //TODO - Translation + 'maintenance' => 'Maintenance', //TODO - Translation 'optimize' => 'Оптимизировать базу данных', - 'optimize_help' => 'To do occasionally to reduce the size of the database', //TODO - Translation + 'optimize_help' => 'To do occasionally to reduce the size of the database', //TODO - Translation + 'policy' => 'Purge policy', //TODO - Translation + 'policy_warning' => 'If no purge policy is selected, every article will be kept.', //TODO - Translation 'purge_now' => 'Очистить сейчас', + 'keep_max' => 'Maximum number of articles to keep', //TODO - Translation + 'keep_period' => 'Maximum age of articles to keep', //TODO - Translation 'title' => 'Архивация', 'ttl' => 'Не обновлять чаще чем', ), diff --git a/app/i18n/ru/gen.php b/app/i18n/ru/gen.php index cc1d7e00e..5200a7005 100644 --- a/app/i18n/ru/gen.php +++ b/app/i18n/ru/gen.php @@ -162,6 +162,13 @@ return array( 'nothing_to_load' => 'There are no more articles', //TODO - Translation 'previous' => 'Previous', //TODO - Translation ), + 'period' => array( + 'days' => 'days', //TODO - Translation + 'hours' => 'hours', //TODO - Translation + 'months' => 'months', //TODO - Translation + 'weeks' => 'weeks', //TODO - Translation + 'years' => 'years', //TODO - Translation + ), 'share' => array( 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', diff --git a/app/i18n/ru/sub.php b/app/i18n/ru/sub.php index a2c4e4690..f4bda385d 100644 --- a/app/i18n/ru/sub.php +++ b/app/i18n/ru/sub.php @@ -13,6 +13,7 @@ return array( 'category' => array( '_' => 'Category', //TODO - Translation 'add' => 'Add a category', //TODO - Translation + 'archiving' => 'Archivage', //TODO - Translation 'empty' => 'Empty category', //TODO - Translation 'information' => 'Information', //TODO - Translation 'new' => 'New category', //TODO - Translation @@ -40,7 +41,7 @@ return array( 'help' => 'Write one search filter per line.', //TODO - Translation ), 'information' => 'Information', //TODO - Translation - 'keep_history' => 'Minimum number of articles to keep', //TODO - Translation + 'keep_min' => 'Minimum number of articles to keep', //TODO - Translation 'moved_category_deleted' => 'When you delete a category, its feeds are automatically classified under %s.', //TODO - Translation 'mute' => 'mute', //TODO - Translation 'no_selected' => 'No feed selected.', //TODO - Translation diff --git a/app/i18n/sk/conf.php b/app/i18n/sk/conf.php index f704fd4be..2e2289b79 100644 --- a/app/i18n/sk/conf.php +++ b/app/i18n/sk/conf.php @@ -6,7 +6,7 @@ return array( 'advanced' => 'Pokročilé', 'delete_after' => 'Vymazať články po', 'help' => 'Viac možností nájdete v nastaveniach kanála', - 'keep_history_by_feed' => 'Minimálny počet článkov kanála na zachovanie', + 'keep_min_by_feed' => 'Minimálny počet článkov kanála na zachovanie', 'optimize' => 'Optimalizovať databázu', 'optimize_help' => 'Občas vykonajte na zmenšenie veľkosti databázy', 'purge_now' => 'Vyčistiť teraz', diff --git a/app/i18n/sk/sub.php b/app/i18n/sk/sub.php index 4dcd09f57..2167e1817 100644 --- a/app/i18n/sk/sub.php +++ b/app/i18n/sk/sub.php @@ -40,7 +40,7 @@ return array( 'help' => 'Napíšte jeden výraz hľadania na riadok.', ), 'information' => 'Informácia', - 'keep_history' => 'Minimálny počet článkov na uchovanie', + 'keep_min' => 'Minimálny počet článkov na uchovanie', 'moved_category_deleted' => 'Keď vymažete kategóriu, jej kanály sa automaticky zaradia pod %s.', 'mute' => 'stíšiť', 'no_selected' => 'Nevybrali ste kanál.', diff --git a/app/i18n/tr/conf.php b/app/i18n/tr/conf.php index 2bf1e8a6a..c8ea78efa 100644 --- a/app/i18n/tr/conf.php +++ b/app/i18n/tr/conf.php @@ -3,13 +3,21 @@ return array( 'archiving' => array( '_' => 'Arşiv', - 'advanced' => 'Gelişmiş', 'delete_after' => 'Makelelerin tutulacağı süre', + 'exception' => 'Purge exception', //TODO - Translation 'help' => 'Akış ayarlarında daha çok ayar bulabilirsiniz', - 'keep_history_by_feed' => 'Akışta en az tutulacak makale sayısı', + 'keep_favourites' => 'Never delete favourites', //TODO - Translation + 'keep_min_by_feed' => 'Akışta en az tutulacak makale sayısı', + 'keep_labels' => 'Never delete labels', //TODO - Translation + 'keep_unreads' => 'Never delete unreads', //TODO - Translation + 'maintenance' => 'Maintenance', //TODO - Translation 'optimize' => 'Veritabanı optimize et', 'optimize_help' => 'Bu işlem bazen veritabanı boyutunu düşürmeye yardımcı olur', + 'policy' => 'Purge policy', //TODO - Translation + 'policy_warning' => 'If no purge policy is selected, every article will be kept.', //TODO - Translation 'purge_now' => 'Şimdi temizle', + 'keep_max' => 'Maximum number of articles to keep', //TODO - Translation + 'keep_period' => 'Maximum age of articles to keep', //TODO - Translation 'title' => 'Arşiv', 'ttl' => 'Şu süreden sık otomatik yenileme yapma', ), diff --git a/app/i18n/tr/gen.php b/app/i18n/tr/gen.php index 5e361affb..ccc5b9ee6 100644 --- a/app/i18n/tr/gen.php +++ b/app/i18n/tr/gen.php @@ -162,6 +162,13 @@ return array( 'nothing_to_load' => 'Başka makale yok', 'previous' => 'Önceki', ), + 'period' => array( + 'days' => 'days', //TODO - Translation + 'hours' => 'hours', //TODO - Translation + 'months' => 'months', //TODO - Translation + 'weeks' => 'weeks', //TODO - Translation + 'years' => 'years', //TODO - Translation + ), 'share' => array( 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', diff --git a/app/i18n/tr/sub.php b/app/i18n/tr/sub.php index 858d15758..f6f40d3f7 100644 --- a/app/i18n/tr/sub.php +++ b/app/i18n/tr/sub.php @@ -13,6 +13,7 @@ return array( 'category' => array( '_' => 'Kategori', 'add' => 'Kategori ekle', + 'archiving' => 'Arşiv', 'empty' => 'Boş kategori', 'information' => 'Bilgi', 'new' => 'Yeni kategori', @@ -40,7 +41,7 @@ return array( 'help' => 'Write one search filter per line.', //TODO - Translation ), 'information' => 'Bilgi', - 'keep_history' => 'En az tutulacak makale sayısı', + 'keep_min' => 'En az tutulacak makale sayısı', 'moved_category_deleted' => 'Bir kategoriyi silerseniz, içerisindeki akışlar %s içerisine yerleşir.', 'mute' => 'mute', //TODO - Translation 'no_selected' => 'Hiçbir akış seçilmedi.', diff --git a/app/i18n/zh-cn/conf.php b/app/i18n/zh-cn/conf.php index 2960cd6b1..a7404bc58 100644 --- a/app/i18n/zh-cn/conf.php +++ b/app/i18n/zh-cn/conf.php @@ -3,13 +3,21 @@ return array( 'archiving' => array( '_' => '存档', - 'advanced' => '高级', 'delete_after' => '文章保留', + 'exception' => 'Purge exception', //TODO - Translation 'help' => '详细选项位于单独的 RSS 源设置', - 'keep_history_by_feed' => '至少保存的文章数', + 'keep_favourites' => 'Never delete favourites', //TODO - Translation + 'keep_min_by_feed' => '至少保存的文章数', + 'keep_labels' => 'Never delete labels', //TODO - Translation + 'keep_unreads' => 'Never delete unreads', //TODO - Translation + 'maintenance' => 'Maintenance', //TODO - Translation 'optimize' => '优化数据库', 'optimize_help' => '偶尔执行优化可以减少数据库大小', + 'policy' => 'Purge policy', //TODO - Translation + 'policy_warning' => 'If no purge policy is selected, every article will be kept.', //TODO - Translation 'purge_now' => '立即清除', + 'keep_max' => 'Maximum number of articles to keep', //TODO - Translation + 'keep_period' => 'Maximum age of articles to keep', //TODO - Translation 'title' => '存档', 'ttl' => '最小自动更新时间', ), diff --git a/app/i18n/zh-cn/gen.php b/app/i18n/zh-cn/gen.php index 7ae156573..31817260e 100644 --- a/app/i18n/zh-cn/gen.php +++ b/app/i18n/zh-cn/gen.php @@ -162,6 +162,13 @@ return array( 'nothing_to_load' => '没有更多文章了', 'previous' => '上一页', ), + 'period' => array( + 'days' => 'days', //TODO - Translation + 'hours' => 'hours', //TODO - Translation + 'months' => 'months', //TODO - Translation + 'weeks' => 'weeks', //TODO - Translation + 'years' => 'years', //TODO - Translation + ), 'share' => array( 'blogotext' => 'Blogotext', 'diaspora' => 'Diaspora*', diff --git a/app/i18n/zh-cn/sub.php b/app/i18n/zh-cn/sub.php index bf517756b..f6f3a0f7a 100644 --- a/app/i18n/zh-cn/sub.php +++ b/app/i18n/zh-cn/sub.php @@ -13,6 +13,7 @@ return array( 'category' => array( '_' => '分类', 'add' => '添加分类', + 'archiving' => '存档', 'empty' => '空分类', 'information' => '信息', 'new' => '新分类', @@ -40,7 +41,7 @@ return array( 'help' => 'Write one search filter per line.', //TODO - Translation ), 'information' => '信息', - 'keep_history' => '至少保存的文章数', + 'keep_min' => '至少保存的文章数', 'moved_category_deleted' => '删除分类时,其中的 RSS 源会自动归类到 %s', 'mute' => '暂停', 'no_selected' => '未选择 RSS 源。', diff --git a/app/install.php b/app/install.php index 366fb0cfc..f8bc6dd4e 100644 --- a/app/install.php +++ b/app/install.php @@ -86,7 +86,6 @@ function saveStep1() { // Then, we set $_SESSION vars $_SESSION['title'] = $system_conf->title; $_SESSION['auth_type'] = $system_conf->auth_type; - $_SESSION['old_entries'] = $user_conf->old_entries; $_SESSION['default_user'] = $current_user; $_SESSION['passwordHash'] = $user_conf->passwordHash; @@ -184,14 +183,12 @@ function saveStep3() { if (!empty($_POST)) { $system_default_config = Minz_Configuration::get('default_system'); $_SESSION['title'] = $system_default_config->title; - $_SESSION['old_entries'] = param('old_entries', $user_default_config->old_entries); $_SESSION['auth_type'] = param('auth_type', 'form'); if (FreshRSS_user_Controller::checkUsername(param('default_user', ''))) { $_SESSION['default_user'] = param('default_user', ''); } - if (empty($_SESSION['old_entries']) || - empty($_SESSION['auth_type']) || + if (empty($_SESSION['auth_type']) || empty($_SESSION['default_user'])) { return false; } @@ -208,10 +205,6 @@ function saveStep3() { FreshRSS_Context::$system_conf->default_user = $_SESSION['default_user']; FreshRSS_Context::$system_conf->save(); - if ((!ctype_digit($_SESSION['old_entries'])) ||($_SESSION['old_entries'] < 1)) { - $_SESSION['old_entries'] = $user_default_config->old_entries; - } - // Create default user files but first, we delete previous data to // avoid access right problems. recursive_unlink(USERS_PATH . '/' . $_SESSION['default_user']); @@ -225,7 +218,6 @@ function saveStep3() { '', [ 'language' => $_SESSION['language'], - 'old_entries' => $_SESSION['old_entries'], ] ); } catch (Exception $e) { @@ -317,8 +309,7 @@ function checkStep2() { } function checkStep3() { - $conf = !empty($_SESSION['old_entries']) && - !empty($_SESSION['default_user']); + $conf = !empty($_SESSION['default_user']); $form = isset($_SESSION['auth_type']); @@ -593,13 +584,6 @@ function printStep3() { -
    - -
    - -
    -
    -
    diff --git a/app/views/configure/archiving.phtml b/app/views/configure/archiving.phtml index 09be55fd9..0387a2b96 100644 --- a/app/views/configure/archiving.phtml +++ b/app/views/configure/archiving.phtml @@ -8,23 +8,6 @@

    -
    - -
    - -   -
    -
    -
    - -
    - () -
    -
    @@ -47,6 +30,76 @@
    +

    + +

    + +
    + +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    @@ -55,9 +108,9 @@
    -
    + + -
    @@ -66,21 +119,30 @@
    -
    -
    - size_total); ?> +
    + -
    +
    + +
    - + + +
    + +
    + size_total); ?> +
    +
    +
    diff --git a/app/views/helpers/category/update.phtml b/app/views/helpers/category/update.phtml index b64bd786a..31482f163 100644 --- a/app/views/helpers/category/update.phtml +++ b/app/views/helpers/category/update.phtml @@ -33,5 +33,121 @@
    + + + category->attributes('archiving'); + if (empty($archiving)) { + $archiving = [ 'default' => true ]; + } else { + $archiving['default'] = false; + } + $volatile = [ + 'enable_keep_period' => false, + 'keep_period_count' => '3', + 'keep_period_unit' => 'P1M', + ]; + if (!empty($archiving['keep_period'])) { + if (preg_match('/^PT?(?P\d+)[YMWDH]$/', $archiving['keep_period'], $matches)) { + $volatile['enable_keep_period'] = true; + $volatile['keep_period_count'] = $matches['count']; + $volatile['keep_period_unit'] = str_replace($matches['count'], '1', $archiving['keep_period']); + } + } + //Defaults + if (!isset($archiving['keep_max'])) { + $archiving['keep_max'] = false; + } + if (!isset($archiving['keep_favourites'])) { + $archiving['keep_favourites'] = true; + } + if (!isset($archiving['keep_labels'])) { + $archiving['keep_labels'] = true; + } + if (!isset($archiving['keep_unreads'])) { + $archiving['keep_unreads'] = false; + } + if (!isset($archiving['keep_min'])) { + $archiving['keep_min'] = 50; + } + ?> + +

    + +

    + +
    + +
    + +
    +
    + + + + + + +
    +
    + + +
    +
    diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml index 620806d7b..84461ed03 100644 --- a/app/views/helpers/feed/update.phtml +++ b/app/views/helpers/feed/update.phtml @@ -78,6 +78,7 @@
    +
    + feed->attributes('archiving'); + if (empty($archiving)) { + $archiving = [ 'default' => true ]; + } else { + $archiving['default'] = false; + } + $volatile = [ + 'enable_keep_period' => false, + 'keep_period_count' => '3', + 'keep_period_unit' => 'P1M', + ]; + if (!empty($archiving['keep_period'])) { + if (preg_match('/^PT?(?P\d+)[YMWDH]$/', $archiving['keep_period'], $matches)) { + $volatile['enable_keep_period'] = true; + $volatile['keep_period_count'] = $matches['count']; + $volatile['keep_period_unit'] = str_replace($matches['count'], '1', $archiving['keep_period']); + } + } + //Defaults + if (!isset($archiving['keep_max'])) { + $archiving['keep_max'] = false; + } + if (!isset($archiving['keep_min'])) { + $archiving['keep_min'] = 50; + } + if (!isset($archiving['keep_favourites'])) { + $archiving['keep_favourites'] = true; + } + if (!isset($archiving['keep_labels'])) { + $archiving['keep_labels'] = true; + } + if (!isset($archiving['keep_unreads'])) { + $archiving['keep_unreads'] = false; + } + ?> + +

    + +

    +
    - +
    - +
    + + + + + + +
    @@ -143,6 +243,7 @@
    +
    diff --git a/cli/_update-or-create-user.php b/cli/_update-or-create-user.php index eda597f19..43b86a4a9 100644 --- a/cli/_update-or-create-user.php +++ b/cli/_update-or-create-user.php @@ -45,8 +45,8 @@ $values = array( 'language' => strParam('language'), 'mail_login' => strParam('email'), 'token' => strParam('token'), - 'old_entries' => intParam('purge_after_months'), - 'keep_history_default' => intParam('feed_min_articles_default'), + 'old_entries' => intParam('purge_after_months'), //TODO: Update with new mechanism + 'keep_history_default' => intParam('feed_min_articles_default'), //TODO: Update with new mechanism 'ttl_default' => intParam('feed_ttl_default'), 'since_hours_posts_per_rss' => intParam('since_hours_posts_per_rss'), 'min_posts_per_rss' => intParam('min_posts_per_rss'), diff --git a/config-user.default.php b/config-user.default.php index 950bef045..5b49d689a 100644 --- a/config-user.default.php +++ b/config-user.default.php @@ -5,8 +5,14 @@ # override. return array ( 'language' => 'en', - 'old_entries' => 3, - 'keep_history_default' => 50, + 'archiving' => [ + 'keep_period' => 'P3M', + 'keep_max' => 200, + 'keep_min' => 50, + 'keep_favourites' => true, + 'keep_labels' => true, + 'keep_unreads' => false, + ], 'ttl_default' => 3600, 'mail_login' => '', 'email_validation_token' => '', diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php index 01feece52..9235f873a 100644 --- a/lib/Minz/Request.php +++ b/lib/Minz/Request.php @@ -52,6 +52,12 @@ class Minz_Request { } return null; } + public static function paramBoolean($key) { + if (null === $value = self::paramTernary($key)) { + return false; + } + return $value; + } public static function defaultControllerName() { return self::$default_controller_name; } diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 854126b54..2a230e6f8 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -300,7 +300,11 @@ function invalidateHttpCache($username = '') { Minz_Session::_param('touch', uTimeString()); $username = Minz_Session::param('currentUser', '_'); } - return touch(join_path(DATA_PATH, 'users', $username, 'log.txt')); + $ok = @touch(DATA_PATH . '/users/' . $username . '/log.txt'); + if (!$ok) { + //TODO: Display notification error on front-end + } + return $ok; } function listUsers() { diff --git a/p/scripts/category.js b/p/scripts/category.js index c01b1fdd7..c5d36e900 100644 --- a/p/scripts/category.js +++ b/p/scripts/category.js @@ -137,11 +137,34 @@ function init_draggable() { }; } +function archiving() { + const slider = document.getElementById('slider'); + slider.addEventListener('change', function (e) { + if (e.target.id === 'use_default_purge_options') { + slider.querySelectorAll('.archiving').forEach(function (element) { + element.hidden = e.target.checked; + }); + } + }); + slider.addEventListener('click', function (e) { + if (e.target.closest('button[type=reset]')) { + const archiving = document.getElementById('use_default_purge_options'); + if (archiving) { + slider.querySelectorAll('.archiving').forEach(function (element) { + element.hidden = archiving.getAttribute('data-leave-validation') == 1; + }); + } + } + }); +} + if (document.readyState && document.readyState !== 'loading') { init_draggable(); + archiving(); } else if (document.addEventListener) { document.addEventListener('DOMContentLoaded', function () { init_draggable(); + archiving(); }, false); } // @license-end diff --git a/p/scripts/extra.js b/p/scripts/extra.js index bba2e8e2b..1fd8a19de 100644 --- a/p/scripts/extra.js +++ b/p/scripts/extra.js @@ -184,12 +184,32 @@ function init_slider_observers() { }; closer.onclick = function (ev) { - closer.classList.remove('active'); - slider.classList.remove('active'); - return false; + if (data_leave_validation() || confirm(context.i18n.confirmation_default)) { + slider.querySelectorAll('form').forEach(function (f) { f.reset(); }); + closer.classList.remove('active'); + slider.classList.remove('active'); + return true; + } else { + return false; + } }; } +function data_leave_validation() { + const ds = document.querySelectorAll('[data-leave-validation]'); + for (let i = ds.length - 1; i >= 0; i--) { + const input = ds[i]; + if (input.type === 'checkbox' || input.type === 'radio') { + if (input.checked != input.getAttribute('data-leave-validation')) { + return false; + } + } else if (input.value != input.getAttribute('data-leave-validation')) { + return false; + } + } + return true; +} + function init_configuration_alert() { window.onsubmit = function (e) { window.hasSubmit = true; @@ -198,16 +218,8 @@ function init_configuration_alert() { if (window.hasSubmit) { return; } - const ds = document.querySelectorAll('[data-leave-validation]'); - for (let i = ds.length - 1; i >= 0; i--) { - const input = ds[i]; - if (input.type === 'checkbox' || input.type === 'radio') { - if (input.checked != input.getAttribute('data-leave-validation')) { - return false; - } - } else if (input.value != input.getAttribute('data-leave-validation')) { - return false; - } + if (!data_leave_validation()) { + return false; } }; } diff --git a/p/themes/base-theme/template.css b/p/themes/base-theme/template.css index 889d33c4e..2d76c9b4d 100644 --- a/p/themes/base-theme/template.css +++ b/p/themes/base-theme/template.css @@ -101,6 +101,9 @@ label { input { width: 180px; } +input[type=number] { + width: 6em; +} textarea, input[type="file"], diff --git a/phpcs.xml b/phpcs.xml index c69f53ea4..fba5624a8 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -3,8 +3,6 @@ Created with the PHP Coding Standard Generator. https://edorian.github.com/php-coding-standard-generator/ - ./static - ./vendor ./lib/SimplePie/ ./lib/PHPMailer/ ./lib/http-conditional.php @@ -28,9 +26,6 @@ ./app/install.php ./tests/app/ - - ./app/SQL/install.sql.mysql.php - ./app/SQL/install.sql.pgsql.php -- cgit v1.2.3 From fdfd8ce9be182943e73d20ec3bff4d560c5b7503 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 23 Oct 2019 02:12:49 +0200 Subject: Workaround for MySQL limitation 1093 (#2586) * Workaround for MySQL limitation 1093 https://github.com/FreshRSS/FreshRSS/pull/2335#issuecomment-545194606 including minor Travis fixes --- app/Models/CategoryDAO.php | 2 +- app/Models/EntryDAO.php | 14 +++++++++----- lib/lib_rss.php | 4 ++-- p/themes/base-theme/template.css | 1 + 4 files changed, 13 insertions(+), 8 deletions(-) (limited to 'p') diff --git a/app/Models/CategoryDAO.php b/app/Models/CategoryDAO.php index 1b8717e83..210830640 100644 --- a/app/Models/CategoryDAO.php +++ b/app/Models/CategoryDAO.php @@ -166,7 +166,7 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable } } Minz_Log::error(__method__ . ' error: ' . json_encode($info)); - return false; + yield false; } } diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index 6a8a25b3e..99e99f463 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -560,13 +560,16 @@ SQL; $sql .= ' AND NOT EXISTS (SELECT 1 FROM `_entrytag` WHERE id_entry = id)'; } if (!empty($options['keep_min']) && $options['keep_min'] > 0) { - $sql .= ' AND `lastSeen` < (SELECT e2.`lastSeen` FROM `_entry` e2 WHERE e2.id_feed = :id_feed2' - . ' ORDER BY e2.`lastSeen` DESC LIMIT 1 OFFSET :keep_min)'; + //Double SELECT for MySQL workaround ERROR 1093 (HY000) + $sql .= ' AND `lastSeen` < (SELECT `lastSeen`' + . ' FROM (SELECT e2.`lastSeen` FROM `_entry` e2 WHERE e2.id_feed = :id_feed2' + . ' ORDER BY e2.`lastSeen` DESC LIMIT 1 OFFSET :keep_min) last_seen2)'; $params[':id_feed2'] = $id_feed; $params[':keep_min'] = (int)$options['keep_min']; } //Keep at least the articles seen at the last refresh - $sql .= ' AND `lastSeen` < (SELECT MAX(e3.`lastSeen`) FROM `_entry` e3 WHERE e3.id_feed = :id_feed3)'; + $sql .= ' AND `lastSeen` < (SELECT maxlastseen' + . ' FROM (SELECT MAX(e3.`lastSeen`) AS maxlastseen FROM `_entry` e3 WHERE e3.id_feed = :id_feed3) last_seen3)'; $params[':id_feed3'] = $id_feed; //==Inclusions== @@ -578,8 +581,9 @@ SQL; $params[':max_last_seen'] = $now->format('U'); } if (!empty($options['keep_max']) && $options['keep_max'] > 0) { - $sql .= ' OR `lastSeen` <= (SELECT e4.`lastSeen` FROM `_entry` e4 WHERE e4.id_feed = :id_feed4' - . ' ORDER BY e4.`lastSeen` DESC LIMIT 1 OFFSET :keep_max)'; + $sql .= ' OR `lastSeen` <= (SELECT `lastSeen`' + . ' FROM (SELECT e4.`lastSeen` FROM `_entry` e4 WHERE e4.id_feed = :id_feed4' + . ' ORDER BY e4.`lastSeen` DESC LIMIT 1 OFFSET :keep_max) last_seen4)'; $params[':id_feed4'] = $id_feed; $params[':keep_max'] = (int)$options['keep_max']; } diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 2a230e6f8..f4b5c68e6 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -301,9 +301,9 @@ function invalidateHttpCache($username = '') { $username = Minz_Session::param('currentUser', '_'); } $ok = @touch(DATA_PATH . '/users/' . $username . '/log.txt'); - if (!$ok) { + //if (!$ok) { //TODO: Display notification error on front-end - } + //} return $ok; } diff --git a/p/themes/base-theme/template.css b/p/themes/base-theme/template.css index 2d76c9b4d..ebceea526 100644 --- a/p/themes/base-theme/template.css +++ b/p/themes/base-theme/template.css @@ -101,6 +101,7 @@ label { input { width: 180px; } + input[type=number] { width: 6em; } -- cgit v1.2.3 From 7d9574e6f2b1a331c9ab0a1b05e88ba3699313f8 Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Sun, 27 Oct 2019 21:59:36 +0100 Subject: [fix] Origine unread CSS style (#2611) Fixes #2604. --- p/themes/Origine/origine.css | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'p') diff --git a/p/themes/Origine/origine.css b/p/themes/Origine/origine.css index b4416b6a6..7e826dd5f 100644 --- a/p/themes/Origine/origine.css +++ b/p/themes/Origine/origine.css @@ -782,14 +782,17 @@ a.btn { } .flux.not_read { - background: #fff3ed; border-left: 2px solid #ff5300; } -.flux.not_read:not(.current):hover .item.title { +.flux.not_read:not(.current) { background: #fff3ed; } +.flux.not_read:not(.current):hover .item.title { + background: inherit; +} + .flux.favorite { background: #fff6da; border-left: 2px solid #ffc300; -- cgit v1.2.3 From 2d3f7e717921d14ec37a8b2ca8c03d5819ed49fd Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Mon, 28 Oct 2019 09:58:52 +0100 Subject: Fix unread styles (#2612) * [fix] Flat unread CSS style Same as #2611. * [fix] Origine-Compact unread CSS style Same as #2611. * [fix] Swage unread CSS style Same as #2611. --- p/themes/Flat/flat.css | 7 +++++-- p/themes/Origine-compact/origine-compact.css | 7 +++++-- p/themes/Swage/swage.css | 6 +++--- p/themes/Swage/swage.scss | 4 +++- 4 files changed, 16 insertions(+), 8 deletions(-) (limited to 'p') diff --git a/p/themes/Flat/flat.css b/p/themes/Flat/flat.css index 887ba0ac4..f7159b46f 100644 --- a/p/themes/Flat/flat.css +++ b/p/themes/Flat/flat.css @@ -791,14 +791,17 @@ a.btn { } .flux.not_read { - background: #fff3ed; border-left-color: #ff5300; } -.flux.not_read:not(.current):hover .item.title { +.flux.not_read:not(.current) { background: #fff3ed; } +.flux.not_read:not(.current):hover .item.title { + background: inherit; +} + .flux.favorite { background: #fff6da; border-left-color: #ffc300; diff --git a/p/themes/Origine-compact/origine-compact.css b/p/themes/Origine-compact/origine-compact.css index c0e538d74..af8e66d17 100644 --- a/p/themes/Origine-compact/origine-compact.css +++ b/p/themes/Origine-compact/origine-compact.css @@ -825,12 +825,15 @@ a.btn, } .flux.not_read { + border-left-color: #ff5300; +} + +.flux.not_read:not(.current) { background: #fff3ed; - border-left: 2px solid #ff5300; } .flux.not_read:not(.current):hover .item.title { - background: #fff3ed; + background: inherit; } .flux.favorite { diff --git a/p/themes/Swage/swage.css b/p/themes/Swage/swage.css index c59fafba4..6528d2305 100644 --- a/p/themes/Swage/swage.css +++ b/p/themes/Swage/swage.css @@ -585,10 +585,10 @@ form th { .flux:hover:not(.current):hover .item.title, .flux .current:not(.current):hover .item.title { background: #fff; } - .flux.not_read { + .flux.not_read:not(.current) { + background: #fff3ed; } + .flux.not_read:not(.current):hover .item.title { background: #fff3ed; } - .flux.not_read:not(.current):hover .item.title { - background: #fff3ed; } .flux.favorite { background: #fff6da; } .flux.favorite:not(.current):hover .item.title { diff --git a/p/themes/Swage/swage.scss b/p/themes/Swage/swage.scss index 1671890b3..9c2702fc0 100644 --- a/p/themes/Swage/swage.scss +++ b/p/themes/Swage/swage.scss @@ -929,7 +929,9 @@ form { } &.not_read { - background: $color_unread; + &:not(.current) { + background: $color_unread; + } &:not(.current):hover .item.title { background: $color_unread; -- cgit v1.2.3
     '+(e.label||String.fromCharCode(65+t))+"