From 70d06ca7591da5e7f09cde942c72b52f7af06ba4 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 25 Jul 2019 16:55:27 +0200 Subject: [PATCH 01/98] Start 1.14.4-dev --- CHANGELOG.md | 4 ++++ constants.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f33712f73..92a941280 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # FreshRSS changelog +## 2019-XX-XX FreshRSS 1.14.4-dev + + + ## 2019-07-25 FreshRSS 1.14.3 * UI diff --git a/constants.php b/constants.php index 2a31f71d5..76a320616 100644 --- a/constants.php +++ b/constants.php @@ -2,7 +2,7 @@ //NB: Do not edit; use ./constants.local.php instead. // -define('FRESHRSS_VERSION', '1.14.3'); +define('FRESHRSS_VERSION', '1.14.4-dev'); define('FRESHRSS_WEBSITE', 'https://freshrss.org'); define('FRESHRSS_WIKI', 'https://freshrss.github.io/FreshRSS/'); From e99e4353d48cecc9c780f6bb5d45dea1401fc7d6 Mon Sep 17 00:00:00 2001 From: Gaurav Thakur Date: Tue, 30 Jul 2019 20:04:04 +0530 Subject: [PATCH 02/98] Remove Google+ support as it is dead. (#2464) --- app/i18n/cz/conf.php | 1 - app/i18n/cz/gen.php | 1 - app/i18n/de/conf.php | 1 - app/i18n/de/gen.php | 1 - app/i18n/en/conf.php | 1 - app/i18n/en/gen.php | 1 - app/i18n/es/conf.php | 1 - app/i18n/es/gen.php | 1 - app/i18n/fr/conf.php | 1 - app/i18n/fr/gen.php | 1 - app/i18n/he/conf.php | 1 - app/i18n/he/gen.php | 1 - app/i18n/it/conf.php | 1 - app/i18n/it/gen.php | 1 - app/i18n/kr/conf.php | 1 - app/i18n/kr/gen.php | 1 - app/i18n/nl/conf.php | 1 - app/i18n/nl/gen.php | 1 - app/i18n/oc/conf.php | 1 - app/i18n/oc/gen.php | 1 - app/i18n/pt-br/conf.php | 1 - app/i18n/pt-br/gen.php | 1 - app/i18n/ru/conf.php | 1 - app/i18n/ru/gen.php | 1 - app/i18n/tr/conf.php | 1 - app/i18n/tr/gen.php | 1 - app/i18n/zh-cn/conf.php | 1 - app/i18n/zh-cn/gen.php | 1 - app/shares.php | 6 ------ cli/i18n/ignore/en.php | 2 -- cli/i18n/ignore/fr.php | 2 -- cli/i18n/ignore/kr.php | 2 -- cli/i18n/ignore/nl.php | 2 -- cli/i18n/ignore/oc.php | 2 -- cli/i18n/ignore/zh-cn.php | 2 -- 35 files changed, 46 deletions(-) diff --git a/app/i18n/cz/conf.php b/app/i18n/cz/conf.php index a2618e310..ce3a4e418 100644 --- a/app/i18n/cz/conf.php +++ b/app/i18n/cz/conf.php @@ -133,7 +133,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Email', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'more_information' => 'Více informací', 'print' => 'Tisk', 'remove' => 'Remove sharing method', //TODO - Translation diff --git a/app/i18n/cz/gen.php b/app/i18n/cz/gen.php index 08fce0280..f1a412252 100644 --- a/app/i18n/cz/gen.php +++ b/app/i18n/cz/gen.php @@ -165,7 +165,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Email', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'gnusocial' => 'GNU social', 'jdh' => 'Journal du hacker', 'Known' => 'Known based sites', diff --git a/app/i18n/de/conf.php b/app/i18n/de/conf.php index 40209576e..b73d76f72 100644 --- a/app/i18n/de/conf.php +++ b/app/i18n/de/conf.php @@ -133,7 +133,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'E-Mail', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'more_information' => 'Weitere Informationen', 'print' => 'Drucken', 'remove' => 'Entferne Teilen-Dienst', diff --git a/app/i18n/de/gen.php b/app/i18n/de/gen.php index c02a55b2c..93bd62d41 100644 --- a/app/i18n/de/gen.php +++ b/app/i18n/de/gen.php @@ -165,7 +165,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'E-Mail', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'gnusocial' => 'GNU social', 'jdh' => 'Journal du hacker', 'Known' => 'Known-Seite (https://withknown.com)', diff --git a/app/i18n/en/conf.php b/app/i18n/en/conf.php index fde78f5b5..b21061513 100644 --- a/app/i18n/en/conf.php +++ b/app/i18n/en/conf.php @@ -133,7 +133,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Email', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'more_information' => 'More information', 'print' => 'Print', 'remove' => 'Remove sharing method', diff --git a/app/i18n/en/gen.php b/app/i18n/en/gen.php index 32f5ee02e..733290c7c 100644 --- a/app/i18n/en/gen.php +++ b/app/i18n/en/gen.php @@ -165,7 +165,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Email', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'gnusocial' => 'GNU social', 'jdh' => 'Journal du hacker', 'Known' => 'Known based sites', diff --git a/app/i18n/es/conf.php b/app/i18n/es/conf.php index b7d87f375..612d81a1b 100755 --- a/app/i18n/es/conf.php +++ b/app/i18n/es/conf.php @@ -133,7 +133,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Email', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'more_information' => 'Más información', 'print' => 'Print', 'remove' => 'Remove sharing method', //TODO - Translation diff --git a/app/i18n/es/gen.php b/app/i18n/es/gen.php index db36e5f5b..16c8267a6 100755 --- a/app/i18n/es/gen.php +++ b/app/i18n/es/gen.php @@ -165,7 +165,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Email', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'gnusocial' => 'GNU social', 'jdh' => 'Journal du hacker', 'Known' => 'Known based sites', diff --git a/app/i18n/fr/conf.php b/app/i18n/fr/conf.php index ef29a360e..5d1bb1a90 100644 --- a/app/i18n/fr/conf.php +++ b/app/i18n/fr/conf.php @@ -133,7 +133,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Courriel', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'more_information' => 'Plus d’informations', 'print' => 'Print', 'remove' => 'Supprimer la méthode de partage', diff --git a/app/i18n/fr/gen.php b/app/i18n/fr/gen.php index 86d8461e6..d99e42fca 100644 --- a/app/i18n/fr/gen.php +++ b/app/i18n/fr/gen.php @@ -165,7 +165,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Courriel', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'gnusocial' => 'GNU social', 'jdh' => 'Journal du hacker', 'Known' => 'Sites basés sur Known', diff --git a/app/i18n/he/conf.php b/app/i18n/he/conf.php index 1eb447911..08769aeb0 100644 --- a/app/i18n/he/conf.php +++ b/app/i18n/he/conf.php @@ -133,7 +133,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'דואר אלקטרוני', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'more_information' => 'מידע נוסף', 'print' => 'הדפסה', 'remove' => 'Remove sharing method', //TODO - Translation diff --git a/app/i18n/he/gen.php b/app/i18n/he/gen.php index cf4a1fcda..13084fda0 100644 --- a/app/i18n/he/gen.php +++ b/app/i18n/he/gen.php @@ -165,7 +165,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'דואר אלקטרוני', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'gnusocial' => 'GNU social', 'jdh' => 'Journal du hacker', 'Known' => 'Known based sites', diff --git a/app/i18n/it/conf.php b/app/i18n/it/conf.php index df4a5ebeb..c66644446 100644 --- a/app/i18n/it/conf.php +++ b/app/i18n/it/conf.php @@ -133,7 +133,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Email', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'more_information' => 'Ulteriori informazioni', 'print' => 'Stampa', 'remove' => 'Remove sharing method', //TODO - Translation diff --git a/app/i18n/it/gen.php b/app/i18n/it/gen.php index 9cc40ffe3..4f6f7e36f 100644 --- a/app/i18n/it/gen.php +++ b/app/i18n/it/gen.php @@ -165,7 +165,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Email', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'gnusocial' => 'GNU social', 'jdh' => 'Journal du hacker', 'Known' => 'Siti basati su Known', diff --git a/app/i18n/kr/conf.php b/app/i18n/kr/conf.php index acd4c40c1..0307ac455 100644 --- a/app/i18n/kr/conf.php +++ b/app/i18n/kr/conf.php @@ -133,7 +133,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => '메일', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'more_information' => '자세한 정보', 'print' => '인쇄', 'remove' => '공유 방법 삭제', diff --git a/app/i18n/kr/gen.php b/app/i18n/kr/gen.php index f7855c499..72b95fa6e 100644 --- a/app/i18n/kr/gen.php +++ b/app/i18n/kr/gen.php @@ -165,7 +165,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => '메일', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'gnusocial' => 'GNU social', 'jdh' => 'Journal du hacker', 'Known' => 'Known based sites', diff --git a/app/i18n/nl/conf.php b/app/i18n/nl/conf.php index fa84ae184..aed4e352e 100644 --- a/app/i18n/nl/conf.php +++ b/app/i18n/nl/conf.php @@ -133,7 +133,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Email', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'more_information' => 'Meer informatie', 'print' => 'Afdrukken', 'remove' => 'Deelmethode verwijderen', diff --git a/app/i18n/nl/gen.php b/app/i18n/nl/gen.php index bdf2e0abd..c7c97d1e0 100644 --- a/app/i18n/nl/gen.php +++ b/app/i18n/nl/gen.php @@ -165,7 +165,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Email', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'gnusocial' => 'GNU social', 'jdh' => 'Journal du hacker', 'Known' => 'Known based sites', diff --git a/app/i18n/oc/conf.php b/app/i18n/oc/conf.php index 1596950ea..2f08bfc1c 100644 --- a/app/i18n/oc/conf.php +++ b/app/i18n/oc/conf.php @@ -133,7 +133,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Corrièl', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'more_information' => 'Mai d’informacions', 'print' => 'Imprimir', 'remove' => 'Suprimir lo metòde de partatge', diff --git a/app/i18n/oc/gen.php b/app/i18n/oc/gen.php index 7f9793283..1fa1358ff 100644 --- a/app/i18n/oc/gen.php +++ b/app/i18n/oc/gen.php @@ -165,7 +165,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Corrièl', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'gnusocial' => 'GNU social', 'jdh' => 'Journal du hacker', 'Known' => 'Sites basats sus Known', diff --git a/app/i18n/pt-br/conf.php b/app/i18n/pt-br/conf.php index 8f5eb7746..e4da7a729 100644 --- a/app/i18n/pt-br/conf.php +++ b/app/i18n/pt-br/conf.php @@ -133,7 +133,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Email', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'more_information' => 'Mais informação', 'print' => 'Imprimir', 'remove' => 'Remove sharing method', //TODO - Translation diff --git a/app/i18n/pt-br/gen.php b/app/i18n/pt-br/gen.php index 46ae53eb4..2d2b5f1a4 100644 --- a/app/i18n/pt-br/gen.php +++ b/app/i18n/pt-br/gen.php @@ -165,7 +165,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Email', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'gnusocial' => 'GNU social', 'jdh' => 'Journal du hacker', 'Known' => 'Known based sites', diff --git a/app/i18n/ru/conf.php b/app/i18n/ru/conf.php index 841477964..cea7c2f63 100644 --- a/app/i18n/ru/conf.php +++ b/app/i18n/ru/conf.php @@ -133,7 +133,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Email', //TODO - Translation 'facebook' => 'Facebook', - 'g+' => 'Google+', 'more_information' => 'More information', //TODO - Translation 'print' => 'Print', //TODO - Translation 'remove' => 'Remove sharing method', //TODO - Translation diff --git a/app/i18n/ru/gen.php b/app/i18n/ru/gen.php index b55c6b667..f28e5adad 100644 --- a/app/i18n/ru/gen.php +++ b/app/i18n/ru/gen.php @@ -165,7 +165,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Email', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'gnusocial' => 'GNU social', 'jdh' => 'Journal du hacker', 'Known' => 'Known based sites', diff --git a/app/i18n/tr/conf.php b/app/i18n/tr/conf.php index 6c57d39da..16ff8b7d5 100644 --- a/app/i18n/tr/conf.php +++ b/app/i18n/tr/conf.php @@ -133,7 +133,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Email', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'more_information' => 'Daha fazla bilgi', 'print' => 'Yazdır', 'remove' => 'Remove sharing method', //TODO - Translation diff --git a/app/i18n/tr/gen.php b/app/i18n/tr/gen.php index a84c39f20..e167f5a09 100644 --- a/app/i18n/tr/gen.php +++ b/app/i18n/tr/gen.php @@ -165,7 +165,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Email', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'gnusocial' => 'GNU social', 'jdh' => 'Journal du hacker', 'Known' => 'Known based sites', diff --git a/app/i18n/zh-cn/conf.php b/app/i18n/zh-cn/conf.php index 216e4590a..21f9a920c 100644 --- a/app/i18n/zh-cn/conf.php +++ b/app/i18n/zh-cn/conf.php @@ -133,7 +133,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Email', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'more_information' => '更多信息', 'print' => '打印', 'remove' => '删除分享方式', diff --git a/app/i18n/zh-cn/gen.php b/app/i18n/zh-cn/gen.php index 11d4efdb3..bef5744b6 100644 --- a/app/i18n/zh-cn/gen.php +++ b/app/i18n/zh-cn/gen.php @@ -165,7 +165,6 @@ return array( 'diaspora' => 'Diaspora*', 'email' => 'Email', 'facebook' => 'Facebook', - 'g+' => 'Google+', 'gnusocial' => 'GNU social', 'jdh' => 'Journal du hacker', 'Known' => '基于 Known 的站点', diff --git a/app/shares.php b/app/shares.php index 4f7fde3ed..80e8235af 100644 --- a/app/shares.php +++ b/app/shares.php @@ -75,12 +75,6 @@ return array( 'form' => 'simple', 'method' => 'GET', ), - 'g+' => array( - 'url' => 'https://plus.google.com/share?url=~LINK~', - 'transform' => array('rawurlencode'), - 'form' => 'simple', - 'method' => 'GET', - ), 'facebook' => array( 'url' => 'https://www.facebook.com/sharer.php?u=~LINK~&t=~TITLE~', 'transform' => array('rawurlencode'), diff --git a/cli/i18n/ignore/en.php b/cli/i18n/ignore/en.php index e231afdda..d1ab44b60 100644 --- a/cli/i18n/ignore/en.php +++ b/cli/i18n/ignore/en.php @@ -67,7 +67,6 @@ return array( 'conf.sharing.diaspora', 'conf.sharing.email', 'conf.sharing.facebook', - 'conf.sharing.g+', 'conf.sharing.print', 'conf.sharing.shaarli', 'conf.sharing.twitter', @@ -88,7 +87,6 @@ return array( 'gen.share.diaspora', 'gen.share.email', 'gen.share.facebook', - 'gen.share.g+', 'gen.share.movim', 'gen.share.print', 'gen.share.shaarli', diff --git a/cli/i18n/ignore/fr.php b/cli/i18n/ignore/fr.php index 0ac2e8758..16528d28c 100644 --- a/cli/i18n/ignore/fr.php +++ b/cli/i18n/ignore/fr.php @@ -8,7 +8,6 @@ return array( 'conf.sharing.blogotext', 'conf.sharing.diaspora', 'conf.sharing.facebook', - 'conf.sharing.g+', 'conf.sharing.print', 'conf.sharing.shaarli', 'conf.sharing.twitter', @@ -35,7 +34,6 @@ return array( 'gen.share.blogotext', 'gen.share.diaspora', 'gen.share.facebook', - 'gen.share.g+', 'gen.share.movim', 'gen.share.shaarli', 'gen.share.twitter', diff --git a/cli/i18n/ignore/kr.php b/cli/i18n/ignore/kr.php index bbccb2d7d..3c4ea84b8 100644 --- a/cli/i18n/ignore/kr.php +++ b/cli/i18n/ignore/kr.php @@ -4,7 +4,6 @@ return array( 'conf.sharing.blogotext', 'conf.sharing.diaspora', 'conf.sharing.facebook', - 'conf.sharing.g+', 'conf.sharing.shaarli', 'conf.sharing.twitter', 'conf.sharing.wallabag', @@ -39,7 +38,6 @@ return array( 'gen.share.blogotext', 'gen.share.diaspora', 'gen.share.facebook', - 'gen.share.g+', 'gen.share.gnusocial', 'gen.share.jdh', 'gen.share.linkedin', diff --git a/cli/i18n/ignore/nl.php b/cli/i18n/ignore/nl.php index 4013bc89e..6d28d68ed 100644 --- a/cli/i18n/ignore/nl.php +++ b/cli/i18n/ignore/nl.php @@ -5,7 +5,6 @@ return array( 'conf.sharing.diaspora', 'conf.sharing.email', 'conf.sharing.facebook', - 'conf.sharing.g+', 'conf.sharing.print', 'conf.sharing.shaarli', 'conf.sharing.twitter', @@ -31,7 +30,6 @@ return array( 'gen.share.diaspora', 'gen.share.facebook', 'gen.share.email', - 'gen.share.g+', 'gen.share.mastodon', 'gen.share.movim', 'gen.share.print', diff --git a/cli/i18n/ignore/oc.php b/cli/i18n/ignore/oc.php index 6413fc5f0..04a4ad68e 100644 --- a/cli/i18n/ignore/oc.php +++ b/cli/i18n/ignore/oc.php @@ -8,7 +8,6 @@ return array( 'conf.sharing.blogotext', 'conf.sharing.diaspora', 'conf.sharing.facebook', - 'conf.sharing.g+', 'conf.sharing.print', 'conf.sharing.shaarli', 'conf.sharing.twitter', @@ -36,7 +35,6 @@ return array( 'gen.share.blogotext', 'gen.share.diaspora', 'gen.share.facebook', - 'gen.share.g+', 'gen.share.movim', 'gen.share.shaarli', 'gen.share.twitter', diff --git a/cli/i18n/ignore/zh-cn.php b/cli/i18n/ignore/zh-cn.php index d55071d10..a1468a0b1 100644 --- a/cli/i18n/ignore/zh-cn.php +++ b/cli/i18n/ignore/zh-cn.php @@ -5,7 +5,6 @@ return array( 'conf.sharing.diaspora', 'conf.sharing.email', 'conf.sharing.facebook', - 'conf.sharing.g+', 'conf.sharing.shaarli', 'conf.sharing.twitter', 'conf.sharing.wallabag', @@ -27,7 +26,6 @@ return array( 'gen.share.diaspora', 'gen.share.email', 'gen.share.facebook', - 'gen.share.g+', 'gen.share.gnusocial', 'gen.share.jdh', 'gen.share.linkedin', From 005b77e076610050b0a4e7c82da23a00bc79ce3d Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Tue, 30 Jul 2019 20:47:52 +0200 Subject: [PATCH 03/98] [CI] Fix PHP 5.4 and 5.5 (#2470) The PHP 5.4 and 5.5 archives recently started failing, also see https://travis-ci.community/t/php-5-4-and-5-5-archives-missing/3723 Setting them to use the Trusty images restores their functionality. --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 82f50f1ae..76e890bba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,5 @@ language: php php: - - 5.4 - - 5.5 - 5.6 - 7.0 - 7.1 @@ -35,6 +33,11 @@ matrix: # 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" + dist: trusty - php: "7.2" env: CHECK_TRANSLATION=yes VALIDATE_STANDARD=no - language: node_js From f5fbc0c7f08efd616a4d24985916d88a846d1723 Mon Sep 17 00:00:00 2001 From: koocotte Date: Wed, 31 Jul 2019 13:48:06 +0200 Subject: [PATCH 04/98] Patch for #2460: Run on Apache 2.4+ without mod_access_compat (#2461) * Update .htaccess * Update htaccess for apache2.4 * Update htaccess for apache2.4 * Update htaccess for apache2.4 --- app/.htaccess | 14 +++++++++++--- cli/.htaccess | 14 +++++++++++--- data/.htaccess | 14 +++++++++++--- lib/.htaccess | 14 +++++++++++--- 4 files changed, 44 insertions(+), 12 deletions(-) diff --git a/app/.htaccess b/app/.htaccess index 9e768397d..32eca30f7 100644 --- a/app/.htaccess +++ b/app/.htaccess @@ -1,3 +1,11 @@ -Order Allow,Deny -Deny from all -Satisfy all +# Apache 2.2 + + Order Allow,Deny + Deny from all + Satisfy all + + +# Apache 2.4 + + Require all denied + diff --git a/cli/.htaccess b/cli/.htaccess index 9e768397d..32eca30f7 100644 --- a/cli/.htaccess +++ b/cli/.htaccess @@ -1,3 +1,11 @@ -Order Allow,Deny -Deny from all -Satisfy all +# Apache 2.2 + + Order Allow,Deny + Deny from all + Satisfy all + + +# Apache 2.4 + + Require all denied + diff --git a/data/.htaccess b/data/.htaccess index 9e768397d..32eca30f7 100644 --- a/data/.htaccess +++ b/data/.htaccess @@ -1,3 +1,11 @@ -Order Allow,Deny -Deny from all -Satisfy all +# Apache 2.2 + + Order Allow,Deny + Deny from all + Satisfy all + + +# Apache 2.4 + + Require all denied + diff --git a/lib/.htaccess b/lib/.htaccess index 9e768397d..32eca30f7 100644 --- a/lib/.htaccess +++ b/lib/.htaccess @@ -1,3 +1,11 @@ -Order Allow,Deny -Deny from all -Satisfy all +# Apache 2.2 + + Order Allow,Deny + Deny from all + Satisfy all + + +# Apache 2.4 + + Require all denied + From 7533676ae75b3c09178d4e99bbbf6bee30d13100 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 31 Jul 2019 13:49:29 +0200 Subject: [PATCH 05/98] Add support for images to the ext.php endpoint (#2465) --- p/ext.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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(); From 89427e45e5413d400b1398710785df6d0c7153ee Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 31 Jul 2019 13:52:20 +0200 Subject: [PATCH 06/98] Clean access checks on userController (#2471) The access was checked several times in some actions and had incoherent behaviours. Also, the `firstAction` condition was a bit tricky to understand. This PR duplicates conditions across all the controller actions and remove the `firstAction` which becomes useless. --- app/Controllers/userController.php | 42 ++++++++++++------------------ 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/app/Controllers/userController.php b/app/Controllers/userController.php index 6d0fced5b..bf9084930 100644 --- a/app/Controllers/userController.php +++ b/app/Controllers/userController.php @@ -8,22 +8,6 @@ class FreshRSS_user_Controller extends Minz_ActionController { // so do not use a too high cost const BCRYPT_COST = 9; - /** - * This action is called before every other action in that class. It is - * the common boiler plate for every action. It is triggered by the - * underlying framework. - * - * @todo clean up the access condition. - */ - public function firstAction() { - if (!FreshRSS_Auth::hasAccess() && !( - Minz_Request::actionName() === 'create' && - !max_registrations_reached() - )) { - Minz_Error::error(403); - } - } - public static function hashPassword($passwordPlain) { if (!function_exists('password_hash')) { include_once(LIB_PATH . '/password_compat.php'); @@ -126,6 +110,10 @@ class FreshRSS_user_Controller extends Minz_ActionController { * This action displays the user profile page. */ public function profileAction() { + if (!FreshRSS_Auth::hasAccess()) { + Minz_Error::error(403); + } + Minz_View::prependTitle(_t('conf.profile.title') . ' · '); Minz_View::appendScript(Minz_Url::display('/scripts/bcrypt.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/bcrypt.min.js'))); @@ -226,10 +214,11 @@ class FreshRSS_user_Controller extends Minz_ActionController { * @todo handle r redirection in Minz_Request::forward directly? */ public function createAction() { - if (Minz_Request::isPost() && ( - FreshRSS_Auth::hasAccess('admin') || - !max_registrations_reached() - )) { + if (!FreshRSS_Auth::hasAccess('admin') && max_registrations_reached()) { + Minz_Error::error(403); + } + + if (Minz_Request::isPost()) { $new_user_name = Minz_Request::param('new_user_name'); $passwordPlain = Minz_Request::param('new_user_passwordPlain', '', true); $new_user_language = Minz_Request::param('new_user_language', FreshRSS_Context::$user_conf->language); @@ -296,17 +285,18 @@ class FreshRSS_user_Controller extends Minz_ActionController { */ public function deleteAction() { $username = Minz_Request::param('username'); + $self_deletion = Minz_Session::param('currentUser', '_') === $username; + + if (!FreshRSS_Auth::hasAccess('admin') && !$self_deletion) { + Minz_Error::error(403); + } + $redirect_url = urldecode(Minz_Request::param('r', false, true)); if (!$redirect_url) { $redirect_url = array('c' => 'user', 'a' => 'manage'); } - $self_deletion = Minz_Session::param('currentUser', '_') === $username; - - if (Minz_Request::isPost() && ( - FreshRSS_Auth::hasAccess('admin') || - $self_deletion - )) { + if (Minz_Request::isPost()) { $ok = true; if ($ok && $self_deletion) { // We check the password if it's a self-destruction From 49e1a2c579757994ae4ed5994339bd58a09238db Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Fri, 2 Aug 2019 11:40:57 +0200 Subject: [PATCH 07/98] Allow to change the view layout (#2467) The `_useLayout` function is marked as deprecated, replaced by a more powerful `_layout` function. --- app/Controllers/entryController.php | 2 +- app/Controllers/extensionController.php | 2 +- app/Controllers/feedController.php | 2 +- app/Controllers/importExportController.php | 2 +- app/Controllers/indexController.php | 2 +- app/Controllers/javascriptController.php | 2 +- app/Controllers/subscriptionController.php | 4 +-- app/Controllers/tagController.php | 4 +-- lib/Minz/View.php | 37 +++++++++++++++++----- 9 files changed, 39 insertions(+), 18 deletions(-) diff --git a/app/Controllers/entryController.php b/app/Controllers/entryController.php index 9c5ee2616..0215128f4 100755 --- a/app/Controllers/entryController.php +++ b/app/Controllers/entryController.php @@ -17,7 +17,7 @@ class FreshRSS_entry_Controller extends Minz_ActionController { // If ajax request, we do not print layout $this->ajax = Minz_Request::param('ajax'); if ($this->ajax) { - $this->view->_useLayout(false); + $this->view->_layout(false); Minz_Request::_param('ajax'); } } diff --git a/app/Controllers/extensionController.php b/app/Controllers/extensionController.php index 806e5a696..9a523e0ad 100644 --- a/app/Controllers/extensionController.php +++ b/app/Controllers/extensionController.php @@ -80,7 +80,7 @@ class FreshRSS_extension_Controller extends Minz_ActionController { */ public function configureAction() { if (Minz_Request::param('ajax')) { - $this->view->_useLayout(false); + $this->view->_layout(false); } else { $this->indexAction(); $this->view->change_view('extension', 'index'); diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 862bb10fb..c2c0cce37 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -530,7 +530,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController { ); Minz_Session::_param('notification', $notif); // No layout in ajax request. - $this->view->_useLayout(false); + $this->view->_layout(false); } else { // Redirect to the main page with correct notification. if ($updated_feeds === 1) { diff --git a/app/Controllers/importExportController.php b/app/Controllers/importExportController.php index 1d7176929..51fec75eb 100644 --- a/app/Controllers/importExportController.php +++ b/app/Controllers/importExportController.php @@ -773,7 +773,7 @@ class FreshRSS_importExport_Controller extends Minz_ActionController { if (!Minz_Request::isPost()) { Minz_Request::forward(array('c' => 'importExport', 'a' => 'index'), true); } - $this->view->_useLayout(false); + $this->view->_layout(false); $nb_files = 0; try { diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index f536113dd..4023492d2 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -155,7 +155,7 @@ class FreshRSS_index_Controller extends Minz_ActionController { // No layout for RSS output. $this->view->url = PUBLIC_TO_INDEX_PATH . '/' . (empty($_SERVER['QUERY_STRING']) ? '' : '?' . $_SERVER['QUERY_STRING']); $this->view->rss_title = FreshRSS_Context::$name . ' | ' . Minz_View::title(); - $this->view->_useLayout(false); + $this->view->_layout(false); header('Content-Type: application/rss+xml; charset=utf-8'); } diff --git a/app/Controllers/javascriptController.php b/app/Controllers/javascriptController.php index d56da9cbb..c84e5483b 100755 --- a/app/Controllers/javascriptController.php +++ b/app/Controllers/javascriptController.php @@ -2,7 +2,7 @@ class FreshRSS_javascript_Controller extends Minz_ActionController { public function firstAction() { - $this->view->_useLayout(false); + $this->view->_layout(false); } public function actualizeAction() { diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php index 79da39751..f6d5e9457 100644 --- a/app/Controllers/subscriptionController.php +++ b/app/Controllers/subscriptionController.php @@ -74,7 +74,7 @@ class FreshRSS_subscription_Controller extends Minz_ActionController { */ public function feedAction() { if (Minz_Request::param('ajax')) { - $this->view->_useLayout(false); + $this->view->_layout(false); } $feedDAO = FreshRSS_Factory::createFeedDao(); @@ -152,7 +152,7 @@ class FreshRSS_subscription_Controller extends Minz_ActionController { } public function categoryAction() { - $this->view->_useLayout(false); + $this->view->_layout(false); $categoryDAO = FreshRSS_Factory::createCategoryDao(); diff --git a/app/Controllers/tagController.php b/app/Controllers/tagController.php index 106e0afa8..ba9efe2fc 100644 --- a/app/Controllers/tagController.php +++ b/app/Controllers/tagController.php @@ -16,7 +16,7 @@ class FreshRSS_tag_Controller extends Minz_ActionController { // If ajax request, we do not print layout $this->ajax = Minz_Request::param('ajax'); if ($this->ajax) { - $this->view->_useLayout(false); + $this->view->_layout(false); Minz_Request::_param('ajax'); } } @@ -70,7 +70,7 @@ class FreshRSS_tag_Controller extends Minz_ActionController { } public function getTagsForEntryAction() { - $this->view->_useLayout(false); + $this->view->_layout(false); header('Content-Type: application/json; charset=UTF-8'); header('Cache-Control: private, no-cache, no-store, must-revalidate'); $id_entry = Minz_Request::param('id_entry', 0); diff --git a/lib/Minz/View.php b/lib/Minz/View.php index d6bf6ea2c..6f044c98e 100644 --- a/lib/Minz/View.php +++ b/lib/Minz/View.php @@ -9,11 +9,11 @@ */ class Minz_View { const VIEWS_PATH_NAME = '/views'; - const LAYOUT_PATH_NAME = '/layout'; - const LAYOUT_FILENAME = '/layout.phtml'; + const LAYOUT_PATH_NAME = '/layout/'; + const LAYOUT_DEFAULT = 'layout'; private $view_filename = ''; - private $use_layout = true; + private $layout_filename = ''; private static $base_pathnames = array(APP_PATH); private static $title = ''; @@ -30,6 +30,7 @@ class Minz_View { $this->change_view(Minz_Request::controllerName(), Minz_Request::actionName()); + $this->_layout(self::LAYOUT_DEFAULT); $conf = Minz_Configuration::get('system'); self::$title = $conf->title; } @@ -58,7 +59,7 @@ class Minz_View { * Construit la vue */ public function build () { - if ($this->use_layout) { + if ($this->layout_filename !== '') { $this->buildLayout (); } else { $this->render (); @@ -92,7 +93,9 @@ class Minz_View { */ public function buildLayout () { header('Content-Type: text/html; charset=UTF-8'); - $this->includeFile(self::LAYOUT_PATH_NAME . self::LAYOUT_FILENAME); + if (!$this->includeFile($this->layout_filename)) { + Minz_Log::notice('File not found: `' . $this->layout_filename . '`'); + } } /** @@ -137,11 +140,29 @@ class Minz_View { } /** - * Permet de choisir si on souhaite utiliser le layout - * @param $use true si on souhaite utiliser le layout, false sinon + * Choose the current view layout. + * @param $layout the layout name to use, false to use no layouts. + */ + public function _layout($layout) { + if ($layout) { + $this->layout_filename = self::LAYOUT_PATH_NAME . $layout . '.phtml'; + } else { + $this->layout_filename = ''; + } + } + + /** + * [deprecated] Choose if we want to use the layout or not. + * Please use the `_layout` function instead. + * @param $use true if we want to use the layout, false else */ public function _useLayout ($use) { - $this->use_layout = $use; + Minz_Log::warning('Minz_View::_useLayout is deprecated, it will be removed in a future version. Please use Minz_View::_layout instead.'); + if ($use) { + $this->_layout(self::LAYOUT_DEFAULT); + } else { + $this->_layout(false); + } } /** From cb318740851672292227b7376434451684ae0360 Mon Sep 17 00:00:00 2001 From: Joris Kinable Date: Wed, 14 Aug 2019 15:16:06 +0200 Subject: [PATCH 08/98] 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 +++ .../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(-) 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; ?>
  • ✇ feed->name(); ?>
  • -
  • entry->title(); ?>
  • +
  • entry->title(); ?>
    + entry->authors(); + if (is_array($authors)): + $first = true; + foreach ($authors as $author): + echo $first ? $author : ', ' . $author; + $first = false; + endforeach; + endif; + ?>
  • entry->date(); ?> 
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; From c82aff177e53685c66d1bd1ab41a893bef29caef Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 14 Aug 2019 15:25:28 +0200 Subject: [PATCH 09/98] fix: Generate correct htaccess in cli/prepare (#2480) Bug introduced in https://github.com/FreshRSS/FreshRSS/pull/2461 --- cli/prepare.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cli/prepare.php b/cli/prepare.php index 81fb53f85..7e8ea051d 100755 --- a/cli/prepare.php +++ b/cli/prepare.php @@ -28,9 +28,17 @@ if (!is_file(DATA_PATH . '/config.php')) { } file_put_contents(DATA_PATH . '/.htaccess', -"Order Allow,Deny\n" . -"Deny from all\n" . -"Satisfy all\n" +"# Apache 2.2\n" . +"\n" . +" Order Allow,Deny\n" . +" Deny from all\n" . +" Satisfy all\n" . +"\n" . +"\n" . +"# Apache 2.4\n" . +"\n" . +" Require all denied\n" . +"\n" ); accessRights(); From 7fd88adeb081e2996cad48225bf0c74cfe8b90ef Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 14 Aug 2019 22:19:24 +0200 Subject: [PATCH 10/98] Add hooks to ExtensionManager (#2482) Hooks allow to: - add items in menus - perform new actions at the end of FreshRSS initialization --- app/FreshRSS.php | 2 ++ app/layout/aside_configure.phtml | 3 ++ app/layout/header.phtml | 6 ++++ .../en/developers/03_Backend/05_Extensions.md | 20 +++++++---- lib/Minz/ExtensionManager.php | 35 ++++++++++++++++++- 5 files changed, 58 insertions(+), 8 deletions(-) diff --git a/app/FreshRSS.php b/app/FreshRSS.php index 8f614c538..d578beac4 100644 --- a/app/FreshRSS.php +++ b/app/FreshRSS.php @@ -53,6 +53,8 @@ class FreshRSS extends Minz_FrontController { $ext_list = FreshRSS_Context::$user_conf->extensions_enabled; Minz_ExtensionManager::enableByList($ext_list); } + + Minz_ExtensionManager::callHook('freshrss_init'); } private static function initAuth() { diff --git a/app/layout/aside_configure.phtml b/app/layout/aside_configure.phtml index 94f5b1f6c..747858f4e 100644 --- a/app/layout/aside_configure.phtml +++ b/app/layout/aside_configure.phtml @@ -25,6 +25,8 @@
  • + +
  • @@ -47,5 +49,6 @@
  • + diff --git a/app/layout/header.phtml b/app/layout/header.phtml index 410ac1ff0..380575254 100644 --- a/app/layout/header.phtml +++ b/app/layout/header.phtml @@ -66,6 +66,8 @@ if (FreshRSS_Auth::accessNeedsAction()) {
  • + +
  • @@ -76,11 +78,15 @@ if (FreshRSS_Auth::accessNeedsAction()) { disable_update) { ?>
  • + +
  • + +
  • _content('

    Hello World

    ' . $entry->content()); return $entry; } -} +} ``` + The following events are available: -- `entry_before_display` (`function($entry) -> Entry | null`) : will be executed every time an entry is rendered. The entry itself (instance of FreshRSS_Entry) will be passed as parameter. -- `entry_before_insert` (`function($entry) -> Entry | null`) : will be executed when a feed is refreshed and new entries will be imported into the database. The new entry (instance of FreshRSS_Entry) will be passed as parameter. -- `feed_before_insert` (`function($feed) -> Feed | null`) : will be executed when a new feed is imported into the database. The new feed (instance of FreshRSS_Feed) will be passed as parameter. -- `post_update` (`function(none) -> none`) : **TODO** add documentation -- `simplepie_before_init` (`function($simplePie, $feed) -> none`) : **TODO** add documentation +- `entry_before_display` (`function($entry) -> Entry | null`): will be executed every time an entry is rendered. The entry itself (instance of FreshRSS\_Entry) will be passed as parameter. +- `entry_before_insert` (`function($entry) -> Entry | null`): will be executed when a feed is refreshed and new entries will be imported into the database. The new entry (instance of FreshRSS\_Entry) will be passed as parameter. +- `feed_before_insert` (`function($feed) -> Feed | null`): will be executed when a new feed is imported into the database. The new feed (instance of FreshRSS\_Feed) will be passed as parameter. +- `freshrss_init` (`function() -> none`): will be executed at the end of the initialization of FreshRSS, useful to initialize components or to do additional access checks +- `menu_admin_entry` (`function() -> string`): add an entry at the end of the "Administration" menu, the returned string must be valid HTML (e.g. `
  • New entry
  • `) +- `menu_configuration_entry` (`function() -> string`): add an entry at the end of the "Configuration" menu, the returned string must be valid HTML (e.g. `
  • New entry
  • `) +- `menu_other_entry` (`function() -> string`): add an entry at the end of the header dropdown menu (i.e. after the "About" entry), the returned string must be valid HTML (e.g. `
  • New entry
  • `) +- `nav_reading_modes` (`function($reading_modes) -> array | null`): **TODO** add documentation +- `post_update` (`function(none) -> none`): **TODO** add documentation +- `simplepie_before_init` (`function($simplePie, $feed) -> none`): **TODO** add documentation ### Writing your own configure.phtml -When you want to support user configurations for your extension or simply display some information, you have to create the `configure.phtml` file. +When you want to support user configurations for your extension or simply display some information, you have to create the `configure.phtml` file. **TODO** diff --git a/lib/Minz/ExtensionManager.php b/lib/Minz/ExtensionManager.php index b086c4001..2240b7642 100644 --- a/lib/Minz/ExtensionManager.php +++ b/lib/Minz/ExtensionManager.php @@ -27,14 +27,30 @@ class Minz_ExtensionManager { 'list' => array(), 'signature' => 'OneToOne', ), - 'post_update' => array( // function(none) -> none + 'freshrss_init' => array( // function() -> none 'list' => array(), 'signature' => 'NoneToNone', ), + 'menu_admin_entry' => array( // function() -> string + 'list' => array(), + 'signature' => 'NoneToString', + ), + 'menu_configuration_entry' => array( // function() -> string + 'list' => array(), + 'signature' => 'NoneToString', + ), + 'menu_other_entry' => array( // function() -> string + 'list' => array(), + 'signature' => 'NoneToString', + ), 'nav_reading_modes' => array( // function($readingModes = array) -> array | null 'list' => array(), 'signature' => 'OneToOne', ), + 'post_update' => array( // function(none) -> none + 'list' => array(), + 'signature' => 'NoneToNone', + ), 'simplepie_before_init' => array( // function($simplePie, $feed) -> none 'list' => array(), 'signature' => 'PassArguments', @@ -306,6 +322,23 @@ class Minz_ExtensionManager { return $result; } + /** + * Call a hook which takes no argument and returns a string. + * + * The result is concatenated between each hook and the final string is + * returned. + * + * @param string $hook_name is the hook to call. + * @return a concatenated string, result of the call to all the hooks. + */ + private static function callNoneToString($hook_name) { + $result = ''; + foreach (self::$hook_list[$hook_name]['list'] as $function) { + $result = $result . call_user_func($function); + } + return $result; + } + /** * Call a hook which takes no argument and returns nothing. * From 20c38d7083b188a70ac78362cc6af4c521a479c3 Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Wed, 14 Aug 2019 22:29:28 +0200 Subject: [PATCH 11/98] [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 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,E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AQ;;EAQnB,cAAK;IACD,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,eAAe;EAE5B,gBAAO;IACH,MAAM,EAAE,aAAa;IAErB,qBAAI;MACP,MAAM,EAAE,CAAC;MACT,OAAO,EAAE,eAAe;MAExB,8BAAU;QACN,OAAO,EAAE,eAAe;EAI7B,iBAAQ;IACJ,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,GAAG;IAEd,wBAAM;MAET,SAAS,EAAE,GAAG;MACd,KAAK,EAAE,IAAI;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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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;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; } From de26531178c61c98dcb7b7634c9e5891c302f615 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Thu, 15 Aug 2019 17:19:12 +0200 Subject: [PATCH 12/98] tec: Provide a Minz_Mailer class (#2476) * Add Minz_View::_path method (replace change_view) The `_path` method is more powerful since it allows to choose the file extension. It is also Minz_Request-agnostic, which is useful to reuse the Minz_View class in other places. `change_view` is now deprecated and a warning is logged if we use it. * Provide a Minz_Mailer to send emails It uses PHPMailer under the hood and only supports PHP >= 5.5 --- README.fr.md | 1 + README.md | 1 + app/Controllers/extensionController.php | 2 +- app/Controllers/updateController.php | 2 +- config.default.php | 18 + lib/Minz/ActionController.php | 4 +- lib/Minz/Mailer.php | 117 + lib/Minz/View.php | 21 +- lib/PHPMailer/Exception.php | 39 + lib/PHPMailer/PHPMailer.php | 4502 +++++++++++++++++++++++ lib/PHPMailer/SMTP.php | 1326 +++++++ phpcs.xml | 1 + 12 files changed, 6023 insertions(+), 11 deletions(-) create mode 100644 lib/Minz/Mailer.php create mode 100644 lib/PHPMailer/Exception.php create mode 100644 lib/PHPMailer/PHPMailer.php create mode 100644 lib/PHPMailer/SMTP.php diff --git a/README.fr.md b/README.fr.md index 157979f93..f2e13e0f9 100644 --- a/README.fr.md +++ b/README.fr.md @@ -213,6 +213,7 @@ Tout client supportant une API de type Fever ; Sélection : * [jQuery](https://jquery.com/) * [lib_opml](https://github.com/marienfressinaud/lib_opml) * [flotr2](http://www.humblesoftware.com/flotr2) +* [PHPMailer](https://github.com/PHPMailer/PHPMailer) ## Uniquement pour certaines options ou configurations * [bcrypt.js](https://github.com/dcodeIO/bcrypt.js) diff --git a/README.md b/README.md index b91571e3e..e0f5d6519 100644 --- a/README.md +++ b/README.md @@ -213,6 +213,7 @@ Supported clients are: * [jQuery](https://jquery.com/) * [lib_opml](https://github.com/marienfressinaud/lib_opml) * [flotr2](http://www.humblesoftware.com/flotr2) +* [PHPMailer](https://github.com/PHPMailer/PHPMailer) ## Only for some options or configurations * [bcrypt.js](https://github.com/dcodeIO/bcrypt.js) diff --git a/app/Controllers/extensionController.php b/app/Controllers/extensionController.php index 9a523e0ad..68bd90f4c 100644 --- a/app/Controllers/extensionController.php +++ b/app/Controllers/extensionController.php @@ -83,7 +83,7 @@ class FreshRSS_extension_Controller extends Minz_ActionController { $this->view->_layout(false); } else { $this->indexAction(); - $this->view->change_view('extension', 'index'); + $this->view->_path('extension/index.phtml'); } $ext_name = urldecode(Minz_Request::param('e')); diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index 2be644c85..ebe5e4cc8 100644 --- a/app/Controllers/updateController.php +++ b/app/Controllers/updateController.php @@ -89,7 +89,7 @@ class FreshRSS_update_Controller extends Minz_ActionController { } public function checkAction() { - $this->view->change_view('update', 'index'); + $this->view->_path('update/index.phtml'); if (file_exists(UPDATE_FILENAME)) { // There is already an update file to apply: we don't need to check diff --git a/config.default.php b/config.default.php index 49f0cf1af..4c2ffa849 100644 --- a/config.default.php +++ b/config.default.php @@ -144,6 +144,24 @@ return array( ), + # Configuration to send emails. Be aware that PHP < 5.5 are not supported. + # These options are basically a mapping of the PHPMailer class attributes + # from the PHPMailer library. + # + # See http://phpmailer.github.io/PHPMailer/classes/PHPMailer.PHPMailer.PHPMailer.html#properties + 'mailer' => 'mail', // 'mail' or 'smtp' + 'smtp' => array( + 'hostname' => '', // the domain used in the Message-ID header + 'host' => 'localhost', // the SMTP server address + 'port' => 25, + 'auth' => false, + 'auth_type' => '', // 'CRAM-MD5', 'LOGIN', 'PLAIN', 'XOAUTH2' or '' + 'username' => '', + 'password' => '', + 'secure' => '', // '', 'ssl' or 'tls' + 'from' => 'noreply@localhost', + ), + # List of enabled FreshRSS extensions. 'extensions_enabled' => array( 'Tumblr-GDPR' => true, diff --git a/lib/Minz/ActionController.php b/lib/Minz/ActionController.php index 232a4ef9b..123b9054c 100644 --- a/lib/Minz/ActionController.php +++ b/lib/Minz/ActionController.php @@ -14,7 +14,9 @@ class Minz_ActionController { * Constructeur */ public function __construct () { - $this->view = new Minz_View (); + $this->view = new Minz_View(); + $view_path = Minz_Request::controllerName() . '/' . Minz_Request::actionName() . '.phtml'; + $this->view->_path($view_path); $this->view->attributeParams (); } diff --git a/lib/Minz/Mailer.php b/lib/Minz/Mailer.php new file mode 100644 index 000000000..0e88f71d9 --- /dev/null +++ b/lib/Minz/Mailer.php @@ -0,0 +1,117 @@ +view->foo = 'bar'). + * + * The view file is not determined automatically, so you have to select one + * with, for instance: + * + * ``` + * $this->view->_path('user_mailer/email_need_validation.txt') + * ``` + * + * Minz_Mailer uses the PHPMailer library under the hood. The latter requires + * PHP >= 5.5 to work. If you instantiate a Minz_Mailer with PHP < 5.5, a + * warning will be logged. + * + * The email is sent by calling the `mail` method. + */ +class Minz_Mailer { + /** + * The view attached to the mailer. + * You should set its file with `$this->view->_path($path)` + * + * @var Minz_View + */ + protected $view; + + /** + * Constructor. + * + * If PHP version is < 5.5, a warning is logged. + */ + public function __construct () { + if (version_compare(PHP_VERSION, '5.5') < 0) { + Minz_Log::warning('Minz_Mailer cannot be used with a version of PHP < 5.5.'); + } + + $this->view = new Minz_View(); + $this->view->_layout(false); + $this->view->attributeParams(); + + $conf = Minz_Configuration::get('system'); + $this->mailer = $conf->mailer; + $this->smtp_config = $conf->smtp; + + // According to https://github.com/PHPMailer/PHPMailer/wiki/SMTP-Debugging#debug-levels + // we should not use debug level above 2 unless if we have big trouble + // to connect. + if ($conf->environment === 'development') { + $this->debug_level = 2; + } else { + $this->debug_level = 0; + } + } + + /** + * Send an email. + * + * @param string $to The recipient of the email + * @param string $subject The subject of the email + * + * @return bool true on success, false if a SMTP error happens + */ + public function mail($to, $subject) { + ob_start(); + $this->view->render(); + $body = ob_get_contents(); + ob_end_clean(); + + $mail = new PHPMailer(true); + try { + // Server settings + $mail->SMTPDebug = $this->debug_level; + $mail->Debugoutput = 'error_log'; + + if ($this->mailer === 'smtp') { + $mail->isSMTP(); + $mail->Hostname = $this->smtp_config['hostname']; + $mail->Host = $this->smtp_config['host']; + $mail->SMTPAuth = $this->smtp_config['auth']; + $mail->Username = $this->smtp_config['username']; + $mail->Password = $this->smtp_config['password']; + $mail->SMTPSecure = $this->smtp_config['secure']; + $mail->Port = $this->smtp_config['port']; + } else { + $mail->isMail(); + } + + // Recipients + $mail->setFrom($this->smtp_config['from']); + $mail->addAddress($to); + + // Content + $mail->isHTML(false); + $mail->CharSet = 'utf-8'; + $mail->Subject = $subject; + $mail->Body = $body; + + $mail->send(); + return true; + } catch (Exception $e) { + Minz_Log::error('Minz_Mailer cannot send a message: ' . $mail->ErrorInfo); + return false; + } + } +} diff --git a/lib/Minz/View.php b/lib/Minz/View.php index 6f044c98e..5b6676690 100644 --- a/lib/Minz/View.php +++ b/lib/Minz/View.php @@ -26,22 +26,27 @@ class Minz_View { * Constructeur * Détermine si on utilise un layout ou non */ - public function __construct () { - $this->change_view(Minz_Request::controllerName(), - Minz_Request::actionName()); - + public function __construct() { $this->_layout(self::LAYOUT_DEFAULT); $conf = Minz_Configuration::get('system'); self::$title = $conf->title; } /** - * Change le fichier de vue en fonction d'un controller / action + * [deprecated] Change the view file based on controller and action. */ public function change_view($controller_name, $action_name) { - $this->view_filename = self::VIEWS_PATH_NAME . '/' - . $controller_name . '/' - . $action_name . '.phtml'; + Minz_Log::warning('Minz_View::change_view is deprecated, it will be removed in a future version. Please use Minz_View::_path instead.'); + $this->_path($controller_name. '/' . $action_name . '.phtml'); + } + + /** + * Change the view file based on a pathname relative to VIEWS_PATH_NAME. + * + * @param string $path the new path + */ + public function _path($path) { + $this->view_filename = self::VIEWS_PATH_NAME . '/' . $path; } /** diff --git a/lib/PHPMailer/Exception.php b/lib/PHPMailer/Exception.php new file mode 100644 index 000000000..9a05dec3c --- /dev/null +++ b/lib/PHPMailer/Exception.php @@ -0,0 +1,39 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2017 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +/** + * PHPMailer exception handler. + * + * @author Marcus Bointon + */ +class Exception extends \Exception +{ + /** + * Prettify error message output. + * + * @return string + */ + public function errorMessage() + { + return '' . htmlspecialchars($this->getMessage()) . "
    \n"; + } +} diff --git a/lib/PHPMailer/PHPMailer.php b/lib/PHPMailer/PHPMailer.php new file mode 100644 index 000000000..52104924d --- /dev/null +++ b/lib/PHPMailer/PHPMailer.php @@ -0,0 +1,4502 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2017 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +/** + * PHPMailer - PHP email creation and transport class. + * + * @author Marcus Bointon (Synchro/coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + */ +class PHPMailer +{ + const CHARSET_ISO88591 = 'iso-8859-1'; + const CHARSET_UTF8 = 'utf-8'; + + const CONTENT_TYPE_PLAINTEXT = 'text/plain'; + const CONTENT_TYPE_TEXT_CALENDAR = 'text/calendar'; + const CONTENT_TYPE_TEXT_HTML = 'text/html'; + const CONTENT_TYPE_MULTIPART_ALTERNATIVE = 'multipart/alternative'; + const CONTENT_TYPE_MULTIPART_MIXED = 'multipart/mixed'; + const CONTENT_TYPE_MULTIPART_RELATED = 'multipart/related'; + + const ENCODING_7BIT = '7bit'; + const ENCODING_8BIT = '8bit'; + const ENCODING_BASE64 = 'base64'; + const ENCODING_BINARY = 'binary'; + const ENCODING_QUOTED_PRINTABLE = 'quoted-printable'; + + /** + * Email priority. + * Options: null (default), 1 = High, 3 = Normal, 5 = low. + * When null, the header is not set at all. + * + * @var int + */ + public $Priority; + + /** + * The character set of the message. + * + * @var string + */ + public $CharSet = self::CHARSET_ISO88591; + + /** + * The MIME Content-type of the message. + * + * @var string + */ + public $ContentType = self::CONTENT_TYPE_PLAINTEXT; + + /** + * The message encoding. + * Options: "8bit", "7bit", "binary", "base64", and "quoted-printable". + * + * @var string + */ + public $Encoding = self::ENCODING_8BIT; + + /** + * Holds the most recent mailer error message. + * + * @var string + */ + public $ErrorInfo = ''; + + /** + * The From email address for the message. + * + * @var string + */ + public $From = 'root@localhost'; + + /** + * The From name of the message. + * + * @var string + */ + public $FromName = 'Root User'; + + /** + * The envelope sender of the message. + * This will usually be turned into a Return-Path header by the receiver, + * and is the address that bounces will be sent to. + * If not empty, will be passed via `-f` to sendmail or as the 'MAIL FROM' value over SMTP. + * + * @var string + */ + public $Sender = ''; + + /** + * The Subject of the message. + * + * @var string + */ + public $Subject = ''; + + /** + * An HTML or plain text message body. + * If HTML then call isHTML(true). + * + * @var string + */ + public $Body = ''; + + /** + * The plain-text message body. + * This body can be read by mail clients that do not have HTML email + * capability such as mutt & Eudora. + * Clients that can read HTML will view the normal Body. + * + * @var string + */ + public $AltBody = ''; + + /** + * An iCal message part body. + * Only supported in simple alt or alt_inline message types + * To generate iCal event structures, use classes like EasyPeasyICS or iCalcreator. + * + * @see http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/ + * @see http://kigkonsult.se/iCalcreator/ + * + * @var string + */ + public $Ical = ''; + + /** + * The complete compiled MIME message body. + * + * @var string + */ + protected $MIMEBody = ''; + + /** + * The complete compiled MIME message headers. + * + * @var string + */ + protected $MIMEHeader = ''; + + /** + * Extra headers that createHeader() doesn't fold in. + * + * @var string + */ + protected $mailHeader = ''; + + /** + * Word-wrap the message body to this number of chars. + * Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance. + * + * @see static::STD_LINE_LENGTH + * + * @var int + */ + public $WordWrap = 0; + + /** + * Which method to use to send mail. + * Options: "mail", "sendmail", or "smtp". + * + * @var string + */ + public $Mailer = 'mail'; + + /** + * The path to the sendmail program. + * + * @var string + */ + public $Sendmail = '/usr/sbin/sendmail'; + + /** + * Whether mail() uses a fully sendmail-compatible MTA. + * One which supports sendmail's "-oi -f" options. + * + * @var bool + */ + public $UseSendmailOptions = true; + + /** + * The email address that a reading confirmation should be sent to, also known as read receipt. + * + * @var string + */ + public $ConfirmReadingTo = ''; + + /** + * The hostname to use in the Message-ID header and as default HELO string. + * If empty, PHPMailer attempts to find one with, in order, + * $_SERVER['SERVER_NAME'], gethostname(), php_uname('n'), or the value + * 'localhost.localdomain'. + * + * @var string + */ + public $Hostname = ''; + + /** + * An ID to be used in the Message-ID header. + * If empty, a unique id will be generated. + * You can set your own, but it must be in the format "", + * as defined in RFC5322 section 3.6.4 or it will be ignored. + * + * @see https://tools.ietf.org/html/rfc5322#section-3.6.4 + * + * @var string + */ + public $MessageID = ''; + + /** + * The message Date to be used in the Date header. + * If empty, the current date will be added. + * + * @var string + */ + public $MessageDate = ''; + + /** + * SMTP hosts. + * Either a single hostname or multiple semicolon-delimited hostnames. + * You can also specify a different port + * for each host by using this format: [hostname:port] + * (e.g. "smtp1.example.com:25;smtp2.example.com"). + * You can also specify encryption type, for example: + * (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465"). + * Hosts will be tried in order. + * + * @var string + */ + public $Host = 'localhost'; + + /** + * The default SMTP server port. + * + * @var int + */ + public $Port = 25; + + /** + * The SMTP HELO of the message. + * Default is $Hostname. If $Hostname is empty, PHPMailer attempts to find + * one with the same method described above for $Hostname. + * + * @see PHPMailer::$Hostname + * + * @var string + */ + public $Helo = ''; + + /** + * What kind of encryption to use on the SMTP connection. + * Options: '', 'ssl' or 'tls'. + * + * @var string + */ + public $SMTPSecure = ''; + + /** + * Whether to enable TLS encryption automatically if a server supports it, + * even if `SMTPSecure` is not set to 'tls'. + * Be aware that in PHP >= 5.6 this requires that the server's certificates are valid. + * + * @var bool + */ + public $SMTPAutoTLS = true; + + /** + * Whether to use SMTP authentication. + * Uses the Username and Password properties. + * + * @see PHPMailer::$Username + * @see PHPMailer::$Password + * + * @var bool + */ + public $SMTPAuth = false; + + /** + * Options array passed to stream_context_create when connecting via SMTP. + * + * @var array + */ + public $SMTPOptions = []; + + /** + * SMTP username. + * + * @var string + */ + public $Username = ''; + + /** + * SMTP password. + * + * @var string + */ + public $Password = ''; + + /** + * SMTP auth type. + * Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2, attempted in that order if not specified. + * + * @var string + */ + public $AuthType = ''; + + /** + * An instance of the PHPMailer OAuth class. + * + * @var OAuth + */ + protected $oauth; + + /** + * The SMTP server timeout in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. + * + * @var int + */ + public $Timeout = 300; + + /** + * SMTP class debug output mode. + * Debug output level. + * Options: + * * `0` No output + * * `1` Commands + * * `2` Data and commands + * * `3` As 2 plus connection status + * * `4` Low-level data output. + * + * @see SMTP::$do_debug + * + * @var int + */ + public $SMTPDebug = 0; + + /** + * How to handle debug output. + * Options: + * * `echo` Output plain-text as-is, appropriate for CLI + * * `html` Output escaped, line breaks converted to `
    `, appropriate for browser output + * * `error_log` Output to error log as configured in php.ini + * By default PHPMailer will use `echo` if run from a `cli` or `cli-server` SAPI, `html` otherwise. + * Alternatively, you can provide a callable expecting two params: a message string and the debug level: + * + * ```php + * $mail->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; + * ``` + * + * Alternatively, you can pass in an instance of a PSR-3 compatible logger, though only `debug` + * level output is used: + * + * ```php + * $mail->Debugoutput = new myPsr3Logger; + * ``` + * + * @see SMTP::$Debugoutput + * + * @var string|callable|\Psr\Log\LoggerInterface + */ + public $Debugoutput = 'echo'; + + /** + * Whether to keep SMTP connection open after each message. + * If this is set to true then to close the connection + * requires an explicit call to smtpClose(). + * + * @var bool + */ + public $SMTPKeepAlive = false; + + /** + * Whether to split multiple to addresses into multiple messages + * or send them all in one message. + * Only supported in `mail` and `sendmail` transports, not in SMTP. + * + * @var bool + */ + public $SingleTo = false; + + /** + * Storage for addresses when SingleTo is enabled. + * + * @var array + */ + protected $SingleToArray = []; + + /** + * Whether to generate VERP addresses on send. + * Only applicable when sending via SMTP. + * + * @see https://en.wikipedia.org/wiki/Variable_envelope_return_path + * @see http://www.postfix.org/VERP_README.html Postfix VERP info + * + * @var bool + */ + public $do_verp = false; + + /** + * Whether to allow sending messages with an empty body. + * + * @var bool + */ + public $AllowEmpty = false; + + /** + * DKIM selector. + * + * @var string + */ + public $DKIM_selector = ''; + + /** + * DKIM Identity. + * Usually the email address used as the source of the email. + * + * @var string + */ + public $DKIM_identity = ''; + + /** + * DKIM passphrase. + * Used if your key is encrypted. + * + * @var string + */ + public $DKIM_passphrase = ''; + + /** + * DKIM signing domain name. + * + * @example 'example.com' + * + * @var string + */ + public $DKIM_domain = ''; + + /** + * DKIM Copy header field values for diagnostic use. + * + * @var bool + */ + public $DKIM_copyHeaderFields = true; + + /** + * DKIM Extra signing headers. + * + * @example ['List-Unsubscribe', 'List-Help'] + * + * @var array + */ + public $DKIM_extraHeaders = []; + + /** + * DKIM private key file path. + * + * @var string + */ + public $DKIM_private = ''; + + /** + * DKIM private key string. + * + * If set, takes precedence over `$DKIM_private`. + * + * @var string + */ + public $DKIM_private_string = ''; + + /** + * Callback Action function name. + * + * The function that handles the result of the send email action. + * It is called out by send() for each email sent. + * + * Value can be any php callable: http://www.php.net/is_callable + * + * Parameters: + * bool $result result of the send action + * array $to email addresses of the recipients + * array $cc cc email addresses + * array $bcc bcc email addresses + * string $subject the subject + * string $body the email body + * string $from email address of sender + * string $extra extra information of possible use + * "smtp_transaction_id' => last smtp transaction id + * + * @var string + */ + public $action_function = ''; + + /** + * What to put in the X-Mailer header. + * Options: An empty string for PHPMailer default, whitespace for none, or a string to use. + * + * @var string + */ + public $XMailer = ''; + + /** + * Which validator to use by default when validating email addresses. + * May be a callable to inject your own validator, but there are several built-in validators. + * The default validator uses PHP's FILTER_VALIDATE_EMAIL filter_var option. + * + * @see PHPMailer::validateAddress() + * + * @var string|callable + */ + public static $validator = 'php'; + + /** + * An instance of the SMTP sender class. + * + * @var SMTP + */ + protected $smtp; + + /** + * The array of 'to' names and addresses. + * + * @var array + */ + protected $to = []; + + /** + * The array of 'cc' names and addresses. + * + * @var array + */ + protected $cc = []; + + /** + * The array of 'bcc' names and addresses. + * + * @var array + */ + protected $bcc = []; + + /** + * The array of reply-to names and addresses. + * + * @var array + */ + protected $ReplyTo = []; + + /** + * An array of all kinds of addresses. + * Includes all of $to, $cc, $bcc. + * + * @see PHPMailer::$to + * @see PHPMailer::$cc + * @see PHPMailer::$bcc + * + * @var array + */ + protected $all_recipients = []; + + /** + * An array of names and addresses queued for validation. + * In send(), valid and non duplicate entries are moved to $all_recipients + * and one of $to, $cc, or $bcc. + * This array is used only for addresses with IDN. + * + * @see PHPMailer::$to + * @see PHPMailer::$cc + * @see PHPMailer::$bcc + * @see PHPMailer::$all_recipients + * + * @var array + */ + protected $RecipientsQueue = []; + + /** + * An array of reply-to names and addresses queued for validation. + * In send(), valid and non duplicate entries are moved to $ReplyTo. + * This array is used only for addresses with IDN. + * + * @see PHPMailer::$ReplyTo + * + * @var array + */ + protected $ReplyToQueue = []; + + /** + * The array of attachments. + * + * @var array + */ + protected $attachment = []; + + /** + * The array of custom headers. + * + * @var array + */ + protected $CustomHeader = []; + + /** + * The most recent Message-ID (including angular brackets). + * + * @var string + */ + protected $lastMessageID = ''; + + /** + * The message's MIME type. + * + * @var string + */ + protected $message_type = ''; + + /** + * The array of MIME boundary strings. + * + * @var array + */ + protected $boundary = []; + + /** + * The array of available languages. + * + * @var array + */ + protected $language = []; + + /** + * The number of errors encountered. + * + * @var int + */ + protected $error_count = 0; + + /** + * The S/MIME certificate file path. + * + * @var string + */ + protected $sign_cert_file = ''; + + /** + * The S/MIME key file path. + * + * @var string + */ + protected $sign_key_file = ''; + + /** + * The optional S/MIME extra certificates ("CA Chain") file path. + * + * @var string + */ + protected $sign_extracerts_file = ''; + + /** + * The S/MIME password for the key. + * Used only if the key is encrypted. + * + * @var string + */ + protected $sign_key_pass = ''; + + /** + * Whether to throw exceptions for errors. + * + * @var bool + */ + protected $exceptions = false; + + /** + * Unique ID used for message ID and boundaries. + * + * @var string + */ + protected $uniqueid = ''; + + /** + * The PHPMailer Version number. + * + * @var string + */ + const VERSION = '6.0.7'; + + /** + * Error severity: message only, continue processing. + * + * @var int + */ + const STOP_MESSAGE = 0; + + /** + * Error severity: message, likely ok to continue processing. + * + * @var int + */ + const STOP_CONTINUE = 1; + + /** + * Error severity: message, plus full stop, critical error reached. + * + * @var int + */ + const STOP_CRITICAL = 2; + + /** + * SMTP RFC standard line ending. + * + * @var string + */ + protected static $LE = "\r\n"; + + /** + * The maximum line length allowed by RFC 2822 section 2.1.1. + * + * @var int + */ + const MAX_LINE_LENGTH = 998; + + /** + * The lower maximum line length allowed by RFC 2822 section 2.1.1. + * This length does NOT include the line break + * 76 means that lines will be 77 or 78 chars depending on whether + * the line break format is LF or CRLF; both are valid. + * + * @var int + */ + const STD_LINE_LENGTH = 76; + + /** + * Constructor. + * + * @param bool $exceptions Should we throw external exceptions? + */ + public function __construct($exceptions = null) + { + if (null !== $exceptions) { + $this->exceptions = (bool) $exceptions; + } + //Pick an appropriate debug output format automatically + $this->Debugoutput = (strpos(PHP_SAPI, 'cli') !== false ? 'echo' : 'html'); + } + + /** + * Destructor. + */ + public function __destruct() + { + //Close any open SMTP connection nicely + $this->smtpClose(); + } + + /** + * Call mail() in a safe_mode-aware fashion. + * Also, unless sendmail_path points to sendmail (or something that + * claims to be sendmail), don't pass params (not a perfect fix, + * but it will do). + * + * @param string $to To + * @param string $subject Subject + * @param string $body Message Body + * @param string $header Additional Header(s) + * @param string|null $params Params + * + * @return bool + */ + private function mailPassthru($to, $subject, $body, $header, $params) + { + //Check overloading of mail function to avoid double-encoding + if (ini_get('mbstring.func_overload') & 1) { + $subject = $this->secureHeader($subject); + } else { + $subject = $this->encodeHeader($this->secureHeader($subject)); + } + //Calling mail() with null params breaks + if (!$this->UseSendmailOptions or null === $params) { + $result = @mail($to, $subject, $body, $header); + } else { + $result = @mail($to, $subject, $body, $header, $params); + } + + return $result; + } + + /** + * Output debugging info via user-defined method. + * Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug). + * + * @see PHPMailer::$Debugoutput + * @see PHPMailer::$SMTPDebug + * + * @param string $str + */ + protected function edebug($str) + { + if ($this->SMTPDebug <= 0) { + return; + } + //Is this a PSR-3 logger? + if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) { + $this->Debugoutput->debug($str); + + return; + } + //Avoid clash with built-in function names + if (!in_array($this->Debugoutput, ['error_log', 'html', 'echo']) and is_callable($this->Debugoutput)) { + call_user_func($this->Debugoutput, $str, $this->SMTPDebug); + + return; + } + switch ($this->Debugoutput) { + case 'error_log': + //Don't output, just log + error_log($str); + break; + case 'html': + //Cleans up output a bit for a better looking, HTML-safe output + echo htmlentities( + preg_replace('/[\r\n]+/', '', $str), + ENT_QUOTES, + 'UTF-8' + ), "
    \n"; + break; + case 'echo': + default: + //Normalize line breaks + $str = preg_replace('/\r\n|\r/ms', "\n", $str); + echo gmdate('Y-m-d H:i:s'), + "\t", + //Trim trailing space + trim( + //Indent for readability, except for trailing break + str_replace( + "\n", + "\n \t ", + trim($str) + ) + ), + "\n"; + } + } + + /** + * Sets message type to HTML or plain. + * + * @param bool $isHtml True for HTML mode + */ + public function isHTML($isHtml = true) + { + if ($isHtml) { + $this->ContentType = static::CONTENT_TYPE_TEXT_HTML; + } else { + $this->ContentType = static::CONTENT_TYPE_PLAINTEXT; + } + } + + /** + * Send messages using SMTP. + */ + public function isSMTP() + { + $this->Mailer = 'smtp'; + } + + /** + * Send messages using PHP's mail() function. + */ + public function isMail() + { + $this->Mailer = 'mail'; + } + + /** + * Send messages using $Sendmail. + */ + public function isSendmail() + { + $ini_sendmail_path = ini_get('sendmail_path'); + + if (false === stripos($ini_sendmail_path, 'sendmail')) { + $this->Sendmail = '/usr/sbin/sendmail'; + } else { + $this->Sendmail = $ini_sendmail_path; + } + $this->Mailer = 'sendmail'; + } + + /** + * Send messages using qmail. + */ + public function isQmail() + { + $ini_sendmail_path = ini_get('sendmail_path'); + + if (false === stripos($ini_sendmail_path, 'qmail')) { + $this->Sendmail = '/var/qmail/bin/qmail-inject'; + } else { + $this->Sendmail = $ini_sendmail_path; + } + $this->Mailer = 'qmail'; + } + + /** + * Add a "To" address. + * + * @param string $address The email address to send to + * @param string $name + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addAddress($address, $name = '') + { + return $this->addOrEnqueueAnAddress('to', $address, $name); + } + + /** + * Add a "CC" address. + * + * @param string $address The email address to send to + * @param string $name + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addCC($address, $name = '') + { + return $this->addOrEnqueueAnAddress('cc', $address, $name); + } + + /** + * Add a "BCC" address. + * + * @param string $address The email address to send to + * @param string $name + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addBCC($address, $name = '') + { + return $this->addOrEnqueueAnAddress('bcc', $address, $name); + } + + /** + * Add a "Reply-To" address. + * + * @param string $address The email address to reply to + * @param string $name + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addReplyTo($address, $name = '') + { + return $this->addOrEnqueueAnAddress('Reply-To', $address, $name); + } + + /** + * Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer + * can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still + * be modified after calling this function), addition of such addresses is delayed until send(). + * Addresses that have been added already return false, but do not throw exceptions. + * + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * @param string $address The email address to send, resp. to reply to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + protected function addOrEnqueueAnAddress($kind, $address, $name) + { + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + $pos = strrpos($address, '@'); + if (false === $pos) { + // At-sign is missing. + $error_message = sprintf('%s (%s): %s', + $this->lang('invalid_address'), + $kind, + $address); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + $params = [$kind, $address, $name]; + // Enqueue addresses with IDN until we know the PHPMailer::$CharSet. + if ($this->has8bitChars(substr($address, ++$pos)) and static::idnSupported()) { + if ('Reply-To' != $kind) { + if (!array_key_exists($address, $this->RecipientsQueue)) { + $this->RecipientsQueue[$address] = $params; + + return true; + } + } else { + if (!array_key_exists($address, $this->ReplyToQueue)) { + $this->ReplyToQueue[$address] = $params; + + return true; + } + } + + return false; + } + + // Immediately add standard addresses without IDN. + return call_user_func_array([$this, 'addAnAddress'], $params); + } + + /** + * Add an address to one of the recipient arrays or to the ReplyTo array. + * Addresses that have been added already return false, but do not throw exceptions. + * + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * @param string $address The email address to send, resp. to reply to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + protected function addAnAddress($kind, $address, $name = '') + { + if (!in_array($kind, ['to', 'cc', 'bcc', 'Reply-To'])) { + $error_message = sprintf('%s: %s', + $this->lang('Invalid recipient kind'), + $kind); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + if (!static::validateAddress($address)) { + $error_message = sprintf('%s (%s): %s', + $this->lang('invalid_address'), + $kind, + $address); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + if ('Reply-To' != $kind) { + if (!array_key_exists(strtolower($address), $this->all_recipients)) { + $this->{$kind}[] = [$address, $name]; + $this->all_recipients[strtolower($address)] = true; + + return true; + } + } else { + if (!array_key_exists(strtolower($address), $this->ReplyTo)) { + $this->ReplyTo[strtolower($address)] = [$address, $name]; + + return true; + } + } + + return false; + } + + /** + * Parse and validate a string containing one or more RFC822-style comma-separated email addresses + * of the form "display name
    " into an array of name/address pairs. + * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. + * Note that quotes in the name part are removed. + * + * @see http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation + * + * @param string $addrstr The address list string + * @param bool $useimap Whether to use the IMAP extension to parse the list + * + * @return array + */ + public static function parseAddresses($addrstr, $useimap = true) + { + $addresses = []; + if ($useimap and function_exists('imap_rfc822_parse_adrlist')) { + //Use this built-in parser if it's available + $list = imap_rfc822_parse_adrlist($addrstr, ''); + foreach ($list as $address) { + if ('.SYNTAX-ERROR.' != $address->host) { + if (static::validateAddress($address->mailbox . '@' . $address->host)) { + $addresses[] = [ + 'name' => (property_exists($address, 'personal') ? $address->personal : ''), + 'address' => $address->mailbox . '@' . $address->host, + ]; + } + } + } + } else { + //Use this simpler parser + $list = explode(',', $addrstr); + foreach ($list as $address) { + $address = trim($address); + //Is there a separate name part? + if (strpos($address, '<') === false) { + //No separate name, just use the whole thing + if (static::validateAddress($address)) { + $addresses[] = [ + 'name' => '', + 'address' => $address, + ]; + } + } else { + list($name, $email) = explode('<', $address); + $email = trim(str_replace('>', '', $email)); + if (static::validateAddress($email)) { + $addresses[] = [ + 'name' => trim(str_replace(['"', "'"], '', $name)), + 'address' => $email, + ]; + } + } + } + } + + return $addresses; + } + + /** + * Set the From and FromName properties. + * + * @param string $address + * @param string $name + * @param bool $auto Whether to also set the Sender address, defaults to true + * + * @throws Exception + * + * @return bool + */ + public function setFrom($address, $name = '', $auto = true) + { + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + // Don't validate now addresses with IDN. Will be done in send(). + $pos = strrpos($address, '@'); + if (false === $pos or + (!$this->has8bitChars(substr($address, ++$pos)) or !static::idnSupported()) and + !static::validateAddress($address)) { + $error_message = sprintf('%s (From): %s', + $this->lang('invalid_address'), + $address); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + $this->From = $address; + $this->FromName = $name; + if ($auto) { + if (empty($this->Sender)) { + $this->Sender = $address; + } + } + + return true; + } + + /** + * Return the Message-ID header of the last email. + * Technically this is the value from the last time the headers were created, + * but it's also the message ID of the last sent message except in + * pathological cases. + * + * @return string + */ + public function getLastMessageID() + { + return $this->lastMessageID; + } + + /** + * Check that a string looks like an email address. + * Validation patterns supported: + * * `auto` Pick best pattern automatically; + * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0; + * * `pcre` Use old PCRE implementation; + * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; + * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. + * * `noregex` Don't use a regex: super fast, really dumb. + * Alternatively you may pass in a callable to inject your own validator, for example: + * + * ```php + * PHPMailer::validateAddress('user@example.com', function($address) { + * return (strpos($address, '@') !== false); + * }); + * ``` + * + * You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator. + * + * @param string $address The email address to check + * @param string|callable $patternselect Which pattern to use + * + * @return bool + */ + public static function validateAddress($address, $patternselect = null) + { + if (null === $patternselect) { + $patternselect = static::$validator; + } + if (is_callable($patternselect)) { + return call_user_func($patternselect, $address); + } + //Reject line breaks in addresses; it's valid RFC5322, but not RFC5321 + if (strpos($address, "\n") !== false or strpos($address, "\r") !== false) { + return false; + } + switch ($patternselect) { + case 'pcre': //Kept for BC + case 'pcre8': + /* + * A more complex and more permissive version of the RFC5322 regex on which FILTER_VALIDATE_EMAIL + * is based. + * In addition to the addresses allowed by filter_var, also permits: + * * dotless domains: `a@b` + * * comments: `1234 @ local(blah) .machine .example` + * * quoted elements: `'"test blah"@example.org'` + * * numeric TLDs: `a@b.123` + * * unbracketed IPv4 literals: `a@192.168.0.1` + * * IPv6 literals: 'first.last@[IPv6:a1::]' + * Not all of these will necessarily work for sending! + * + * @see http://squiloople.com/2009/12/20/email-address-validation/ + * @copyright 2009-2010 Michael Rushton + * Feel free to use and redistribute this code. But please keep this copyright notice. + */ + return (bool) preg_match( + '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' . + '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' . + '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' . + '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*' . + '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' . + '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' . + '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' . + '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' . + '|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', + $address + ); + case 'html5': + /* + * This is the pattern used in the HTML5 spec for validation of 'email' type form input elements. + * + * @see http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state-(type=email) + */ + return (bool) preg_match( + '/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' . + '[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD', + $address + ); + case 'php': + default: + return (bool) filter_var($address, FILTER_VALIDATE_EMAIL); + } + } + + /** + * Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the + * `intl` and `mbstring` PHP extensions. + * + * @return bool `true` if required functions for IDN support are present + */ + public static function idnSupported() + { + return function_exists('idn_to_ascii') and function_exists('mb_convert_encoding'); + } + + /** + * Converts IDN in given email address to its ASCII form, also known as punycode, if possible. + * Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet. + * This function silently returns unmodified address if: + * - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form) + * - Conversion to punycode is impossible (e.g. required PHP functions are not available) + * or fails for any reason (e.g. domain contains characters not allowed in an IDN). + * + * @see PHPMailer::$CharSet + * + * @param string $address The email address to convert + * + * @return string The encoded address in ASCII form + */ + public function punyencodeAddress($address) + { + // Verify we have required functions, CharSet, and at-sign. + $pos = strrpos($address, '@'); + if (static::idnSupported() and + !empty($this->CharSet) and + false !== $pos + ) { + $domain = substr($address, ++$pos); + // Verify CharSet string is a valid one, and domain properly encoded in this CharSet. + if ($this->has8bitChars($domain) and @mb_check_encoding($domain, $this->CharSet)) { + $domain = mb_convert_encoding($domain, 'UTF-8', $this->CharSet); + //Ignore IDE complaints about this line - method signature changed in PHP 5.4 + $errorcode = 0; + $punycode = idn_to_ascii($domain, $errorcode, INTL_IDNA_VARIANT_UTS46); + if (false !== $punycode) { + return substr($address, 0, $pos) . $punycode; + } + } + } + + return $address; + } + + /** + * Create a message and send it. + * Uses the sending method specified by $Mailer. + * + * @throws Exception + * + * @return bool false on error - See the ErrorInfo property for details of the error + */ + public function send() + { + try { + if (!$this->preSend()) { + return false; + } + + return $this->postSend(); + } catch (Exception $exc) { + $this->mailHeader = ''; + $this->setError($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + + return false; + } + } + + /** + * Prepare a message for sending. + * + * @throws Exception + * + * @return bool + */ + public function preSend() + { + if ('smtp' == $this->Mailer or + ('mail' == $this->Mailer and stripos(PHP_OS, 'WIN') === 0) + ) { + //SMTP mandates RFC-compliant line endings + //and it's also used with mail() on Windows + static::setLE("\r\n"); + } else { + //Maintain backward compatibility with legacy Linux command line mailers + static::setLE(PHP_EOL); + } + //Check for buggy PHP versions that add a header with an incorrect line break + if (ini_get('mail.add_x_header') == 1 + and 'mail' == $this->Mailer + and stripos(PHP_OS, 'WIN') === 0 + and ((version_compare(PHP_VERSION, '7.0.0', '>=') + and version_compare(PHP_VERSION, '7.0.17', '<')) + or (version_compare(PHP_VERSION, '7.1.0', '>=') + and version_compare(PHP_VERSION, '7.1.3', '<'))) + ) { + trigger_error( + 'Your version of PHP is affected by a bug that may result in corrupted messages.' . + ' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' . + ' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.', + E_USER_WARNING + ); + } + + try { + $this->error_count = 0; // Reset errors + $this->mailHeader = ''; + + // Dequeue recipient and Reply-To addresses with IDN + foreach (array_merge($this->RecipientsQueue, $this->ReplyToQueue) as $params) { + $params[1] = $this->punyencodeAddress($params[1]); + call_user_func_array([$this, 'addAnAddress'], $params); + } + if (count($this->to) + count($this->cc) + count($this->bcc) < 1) { + throw new Exception($this->lang('provide_address'), self::STOP_CRITICAL); + } + + // Validate From, Sender, and ConfirmReadingTo addresses + foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) { + $this->$address_kind = trim($this->$address_kind); + if (empty($this->$address_kind)) { + continue; + } + $this->$address_kind = $this->punyencodeAddress($this->$address_kind); + if (!static::validateAddress($this->$address_kind)) { + $error_message = sprintf('%s (%s): %s', + $this->lang('invalid_address'), + $address_kind, + $this->$address_kind); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + } + + // Set whether the message is multipart/alternative + if ($this->alternativeExists()) { + $this->ContentType = static::CONTENT_TYPE_MULTIPART_ALTERNATIVE; + } + + $this->setMessageType(); + // Refuse to send an empty message unless we are specifically allowing it + if (!$this->AllowEmpty and empty($this->Body)) { + throw new Exception($this->lang('empty_message'), self::STOP_CRITICAL); + } + + //Trim subject consistently + $this->Subject = trim($this->Subject); + // Create body before headers in case body makes changes to headers (e.g. altering transfer encoding) + $this->MIMEHeader = ''; + $this->MIMEBody = $this->createBody(); + // createBody may have added some headers, so retain them + $tempheaders = $this->MIMEHeader; + $this->MIMEHeader = $this->createHeader(); + $this->MIMEHeader .= $tempheaders; + + // To capture the complete message when using mail(), create + // an extra header list which createHeader() doesn't fold in + if ('mail' == $this->Mailer) { + if (count($this->to) > 0) { + $this->mailHeader .= $this->addrAppend('To', $this->to); + } else { + $this->mailHeader .= $this->headerLine('To', 'undisclosed-recipients:;'); + } + $this->mailHeader .= $this->headerLine( + 'Subject', + $this->encodeHeader($this->secureHeader($this->Subject)) + ); + } + + // Sign with DKIM if enabled + if (!empty($this->DKIM_domain) + and !empty($this->DKIM_selector) + and (!empty($this->DKIM_private_string) + or (!empty($this->DKIM_private) + and static::isPermittedPath($this->DKIM_private) + and file_exists($this->DKIM_private) + ) + ) + ) { + $header_dkim = $this->DKIM_Add( + $this->MIMEHeader . $this->mailHeader, + $this->encodeHeader($this->secureHeader($this->Subject)), + $this->MIMEBody + ); + $this->MIMEHeader = rtrim($this->MIMEHeader, "\r\n ") . static::$LE . + static::normalizeBreaks($header_dkim) . static::$LE; + } + + return true; + } catch (Exception $exc) { + $this->setError($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + + return false; + } + } + + /** + * Actually send a message via the selected mechanism. + * + * @throws Exception + * + * @return bool + */ + public function postSend() + { + try { + // Choose the mailer and send through it + switch ($this->Mailer) { + case 'sendmail': + case 'qmail': + return $this->sendmailSend($this->MIMEHeader, $this->MIMEBody); + case 'smtp': + return $this->smtpSend($this->MIMEHeader, $this->MIMEBody); + case 'mail': + return $this->mailSend($this->MIMEHeader, $this->MIMEBody); + default: + $sendMethod = $this->Mailer . 'Send'; + if (method_exists($this, $sendMethod)) { + return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody); + } + + return $this->mailSend($this->MIMEHeader, $this->MIMEBody); + } + } catch (Exception $exc) { + $this->setError($exc->getMessage()); + $this->edebug($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + } + + return false; + } + + /** + * Send mail using the $Sendmail program. + * + * @see PHPMailer::$Sendmail + * + * @param string $header The message headers + * @param string $body The message body + * + * @throws Exception + * + * @return bool + */ + protected function sendmailSend($header, $body) + { + // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. + if (!empty($this->Sender) and self::isShellSafe($this->Sender)) { + if ('qmail' == $this->Mailer) { + $sendmailFmt = '%s -f%s'; + } else { + $sendmailFmt = '%s -oi -f%s -t'; + } + } else { + if ('qmail' == $this->Mailer) { + $sendmailFmt = '%s'; + } else { + $sendmailFmt = '%s -oi -t'; + } + } + + $sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender); + + if ($this->SingleTo) { + foreach ($this->SingleToArray as $toAddr) { + $mail = @popen($sendmail, 'w'); + if (!$mail) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + fwrite($mail, 'To: ' . $toAddr . "\n"); + fwrite($mail, $header); + fwrite($mail, $body); + $result = pclose($mail); + $this->doCallback( + ($result == 0), + [$toAddr], + $this->cc, + $this->bcc, + $this->Subject, + $body, + $this->From, + [] + ); + if (0 !== $result) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + } + } else { + $mail = @popen($sendmail, 'w'); + if (!$mail) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + fwrite($mail, $header); + fwrite($mail, $body); + $result = pclose($mail); + $this->doCallback( + ($result == 0), + $this->to, + $this->cc, + $this->bcc, + $this->Subject, + $body, + $this->From, + [] + ); + if (0 !== $result) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + } + + return true; + } + + /** + * Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters. + * Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows. + * + * @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report + * + * @param string $string The string to be validated + * + * @return bool + */ + protected static function isShellSafe($string) + { + // Future-proof + if (escapeshellcmd($string) !== $string + or !in_array(escapeshellarg($string), ["'$string'", "\"$string\""]) + ) { + return false; + } + + $length = strlen($string); + + for ($i = 0; $i < $length; ++$i) { + $c = $string[$i]; + + // All other characters have a special meaning in at least one common shell, including = and +. + // Full stop (.) has a special meaning in cmd.exe, but its impact should be negligible here. + // Note that this does permit non-Latin alphanumeric characters based on the current locale. + if (!ctype_alnum($c) && strpos('@_-.', $c) === false) { + return false; + } + } + + return true; + } + + /** + * Check whether a file path is of a permitted type. + * Used to reject URLs and phar files from functions that access local file paths, + * such as addAttachment. + * + * @param string $path A relative or absolute path to a file + * + * @return bool + */ + protected static function isPermittedPath($path) + { + return !preg_match('#^[a-z]+://#i', $path); + } + + /** + * Send mail using the PHP mail() function. + * + * @see http://www.php.net/manual/en/book.mail.php + * + * @param string $header The message headers + * @param string $body The message body + * + * @throws Exception + * + * @return bool + */ + protected function mailSend($header, $body) + { + $toArr = []; + foreach ($this->to as $toaddr) { + $toArr[] = $this->addrFormat($toaddr); + } + $to = implode(', ', $toArr); + + $params = null; + //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver + if (!empty($this->Sender) and static::validateAddress($this->Sender)) { + //A space after `-f` is optional, but there is a long history of its presence + //causing problems, so we don't use one + //Exim docs: http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html + //Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html + //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html + //Example problem: https://www.drupal.org/node/1057954 + // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. + if (self::isShellSafe($this->Sender)) { + $params = sprintf('-f%s', $this->Sender); + } + } + if (!empty($this->Sender) and static::validateAddress($this->Sender)) { + $old_from = ini_get('sendmail_from'); + ini_set('sendmail_from', $this->Sender); + } + $result = false; + if ($this->SingleTo and count($toArr) > 1) { + foreach ($toArr as $toAddr) { + $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params); + $this->doCallback($result, [$toAddr], $this->cc, $this->bcc, $this->Subject, $body, $this->From, []); + } + } else { + $result = $this->mailPassthru($to, $this->Subject, $body, $header, $params); + $this->doCallback($result, $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From, []); + } + if (isset($old_from)) { + ini_set('sendmail_from', $old_from); + } + if (!$result) { + throw new Exception($this->lang('instantiate'), self::STOP_CRITICAL); + } + + return true; + } + + /** + * Get an instance to use for SMTP operations. + * Override this function to load your own SMTP implementation, + * or set one with setSMTPInstance. + * + * @return SMTP + */ + public function getSMTPInstance() + { + if (!is_object($this->smtp)) { + $this->smtp = new SMTP(); + } + + return $this->smtp; + } + + /** + * Provide an instance to use for SMTP operations. + * + * @param SMTP $smtp + * + * @return SMTP + */ + public function setSMTPInstance(SMTP $smtp) + { + $this->smtp = $smtp; + + return $this->smtp; + } + + /** + * Send mail via SMTP. + * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. + * + * @see PHPMailer::setSMTPInstance() to use a different class. + * + * @uses \PHPMailer\PHPMailer\SMTP + * + * @param string $header The message headers + * @param string $body The message body + * + * @throws Exception + * + * @return bool + */ + protected function smtpSend($header, $body) + { + $bad_rcpt = []; + if (!$this->smtpConnect($this->SMTPOptions)) { + throw new Exception($this->lang('smtp_connect_failed'), self::STOP_CRITICAL); + } + //Sender already validated in preSend() + if ('' == $this->Sender) { + $smtp_from = $this->From; + } else { + $smtp_from = $this->Sender; + } + if (!$this->smtp->mail($smtp_from)) { + $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError())); + throw new Exception($this->ErrorInfo, self::STOP_CRITICAL); + } + + $callbacks = []; + // Attempt to send to all recipients + foreach ([$this->to, $this->cc, $this->bcc] as $togroup) { + foreach ($togroup as $to) { + if (!$this->smtp->recipient($to[0])) { + $error = $this->smtp->getError(); + $bad_rcpt[] = ['to' => $to[0], 'error' => $error['detail']]; + $isSent = false; + } else { + $isSent = true; + } + + $callbacks[] = ['issent'=>$isSent, 'to'=>$to[0]]; + } + } + + // Only send the DATA command if we have viable recipients + if ((count($this->all_recipients) > count($bad_rcpt)) and !$this->smtp->data($header . $body)) { + throw new Exception($this->lang('data_not_accepted'), self::STOP_CRITICAL); + } + + $smtp_transaction_id = $this->smtp->getLastTransactionID(); + + if ($this->SMTPKeepAlive) { + $this->smtp->reset(); + } else { + $this->smtp->quit(); + $this->smtp->close(); + } + + foreach ($callbacks as $cb) { + $this->doCallback( + $cb['issent'], + [$cb['to']], + [], + [], + $this->Subject, + $body, + $this->From, + ['smtp_transaction_id' => $smtp_transaction_id] + ); + } + + //Create error message for any bad addresses + if (count($bad_rcpt) > 0) { + $errstr = ''; + foreach ($bad_rcpt as $bad) { + $errstr .= $bad['to'] . ': ' . $bad['error']; + } + throw new Exception( + $this->lang('recipients_failed') . $errstr, + self::STOP_CONTINUE + ); + } + + return true; + } + + /** + * Initiate a connection to an SMTP server. + * Returns false if the operation failed. + * + * @param array $options An array of options compatible with stream_context_create() + * + * @throws Exception + * + * @uses \PHPMailer\PHPMailer\SMTP + * + * @return bool + */ + public function smtpConnect($options = null) + { + if (null === $this->smtp) { + $this->smtp = $this->getSMTPInstance(); + } + + //If no options are provided, use whatever is set in the instance + if (null === $options) { + $options = $this->SMTPOptions; + } + + // Already connected? + if ($this->smtp->connected()) { + return true; + } + + $this->smtp->setTimeout($this->Timeout); + $this->smtp->setDebugLevel($this->SMTPDebug); + $this->smtp->setDebugOutput($this->Debugoutput); + $this->smtp->setVerp($this->do_verp); + $hosts = explode(';', $this->Host); + $lastexception = null; + + foreach ($hosts as $hostentry) { + $hostinfo = []; + if (!preg_match( + '/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*|\[[a-fA-F0-9:]+\]):?([0-9]*)$/', + trim($hostentry), + $hostinfo + )) { + static::edebug($this->lang('connect_host') . ' ' . $hostentry); + // Not a valid host entry + continue; + } + // $hostinfo[2]: optional ssl or tls prefix + // $hostinfo[3]: the hostname + // $hostinfo[4]: optional port number + // The host string prefix can temporarily override the current setting for SMTPSecure + // If it's not specified, the default value is used + + //Check the host name is a valid name or IP address before trying to use it + if (!static::isValidHost($hostinfo[3])) { + static::edebug($this->lang('connect_host') . ' ' . $hostentry); + continue; + } + $prefix = ''; + $secure = $this->SMTPSecure; + $tls = ('tls' == $this->SMTPSecure); + if ('ssl' == $hostinfo[2] or ('' == $hostinfo[2] and 'ssl' == $this->SMTPSecure)) { + $prefix = 'ssl://'; + $tls = false; // Can't have SSL and TLS at the same time + $secure = 'ssl'; + } elseif ('tls' == $hostinfo[2]) { + $tls = true; + // tls doesn't use a prefix + $secure = 'tls'; + } + //Do we need the OpenSSL extension? + $sslext = defined('OPENSSL_ALGO_SHA256'); + if ('tls' === $secure or 'ssl' === $secure) { + //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled + if (!$sslext) { + throw new Exception($this->lang('extension_missing') . 'openssl', self::STOP_CRITICAL); + } + } + $host = $hostinfo[3]; + $port = $this->Port; + $tport = (int) $hostinfo[4]; + if ($tport > 0 and $tport < 65536) { + $port = $tport; + } + if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) { + try { + if ($this->Helo) { + $hello = $this->Helo; + } else { + $hello = $this->serverHostname(); + } + $this->smtp->hello($hello); + //Automatically enable TLS encryption if: + // * it's not disabled + // * we have openssl extension + // * we are not already using SSL + // * the server offers STARTTLS + if ($this->SMTPAutoTLS and $sslext and 'ssl' != $secure and $this->smtp->getServerExt('STARTTLS')) { + $tls = true; + } + if ($tls) { + if (!$this->smtp->startTLS()) { + throw new Exception($this->lang('connect_host')); + } + // We must resend EHLO after TLS negotiation + $this->smtp->hello($hello); + } + if ($this->SMTPAuth) { + if (!$this->smtp->authenticate( + $this->Username, + $this->Password, + $this->AuthType, + $this->oauth + ) + ) { + throw new Exception($this->lang('authenticate')); + } + } + + return true; + } catch (Exception $exc) { + $lastexception = $exc; + $this->edebug($exc->getMessage()); + // We must have connected, but then failed TLS or Auth, so close connection nicely + $this->smtp->quit(); + } + } + } + // If we get here, all connection attempts have failed, so close connection hard + $this->smtp->close(); + // As we've caught all exceptions, just report whatever the last one was + if ($this->exceptions and null !== $lastexception) { + throw $lastexception; + } + + return false; + } + + /** + * Close the active SMTP session if one exists. + */ + public function smtpClose() + { + if (null !== $this->smtp) { + if ($this->smtp->connected()) { + $this->smtp->quit(); + $this->smtp->close(); + } + } + } + + /** + * Set the language for error messages. + * Returns false if it cannot load the language file. + * The default language is English. + * + * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr") + * @param string $lang_path Path to the language file directory, with trailing separator (slash) + * + * @return bool + */ + public function setLanguage($langcode = 'en', $lang_path = '') + { + // Backwards compatibility for renamed language codes + $renamed_langcodes = [ + 'br' => 'pt_br', + 'cz' => 'cs', + 'dk' => 'da', + 'no' => 'nb', + 'se' => 'sv', + 'rs' => 'sr', + 'tg' => 'tl', + ]; + + if (isset($renamed_langcodes[$langcode])) { + $langcode = $renamed_langcodes[$langcode]; + } + + // Define full set of translatable strings in English + $PHPMAILER_LANG = [ + 'authenticate' => 'SMTP Error: Could not authenticate.', + 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', + 'data_not_accepted' => 'SMTP Error: data not accepted.', + 'empty_message' => 'Message body empty', + 'encoding' => 'Unknown encoding: ', + 'execute' => 'Could not execute: ', + 'file_access' => 'Could not access file: ', + 'file_open' => 'File Error: Could not open file: ', + 'from_failed' => 'The following From address failed: ', + 'instantiate' => 'Could not instantiate mail function.', + 'invalid_address' => 'Invalid address: ', + 'mailer_not_supported' => ' mailer is not supported.', + 'provide_address' => 'You must provide at least one recipient email address.', + 'recipients_failed' => 'SMTP Error: The following recipients failed: ', + 'signing' => 'Signing Error: ', + 'smtp_connect_failed' => 'SMTP connect() failed.', + 'smtp_error' => 'SMTP server error: ', + 'variable_set' => 'Cannot set or reset variable: ', + 'extension_missing' => 'Extension missing: ', + ]; + if (empty($lang_path)) { + // Calculate an absolute path so it can work if CWD is not here + $lang_path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR; + } + //Validate $langcode + if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) { + $langcode = 'en'; + } + $foundlang = true; + $lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php'; + // There is no English translation file + if ('en' != $langcode) { + // Make sure language file path is readable + if (!static::isPermittedPath($lang_file) || !file_exists($lang_file)) { + $foundlang = false; + } else { + // Overwrite language-specific strings. + // This way we'll never have missing translation keys. + $foundlang = include $lang_file; + } + } + $this->language = $PHPMAILER_LANG; + + return (bool) $foundlang; // Returns false if language not found + } + + /** + * Get the array of strings for the current language. + * + * @return array + */ + public function getTranslations() + { + return $this->language; + } + + /** + * Create recipient headers. + * + * @param string $type + * @param array $addr An array of recipients, + * where each recipient is a 2-element indexed array with element 0 containing an address + * and element 1 containing a name, like: + * [['joe@example.com', 'Joe User'], ['zoe@example.com', 'Zoe User']] + * + * @return string + */ + public function addrAppend($type, $addr) + { + $addresses = []; + foreach ($addr as $address) { + $addresses[] = $this->addrFormat($address); + } + + return $type . ': ' . implode(', ', $addresses) . static::$LE; + } + + /** + * Format an address for use in a message header. + * + * @param array $addr A 2-element indexed array, element 0 containing an address, element 1 containing a name like + * ['joe@example.com', 'Joe User'] + * + * @return string + */ + public function addrFormat($addr) + { + if (empty($addr[1])) { // No name provided + return $this->secureHeader($addr[0]); + } + + return $this->encodeHeader($this->secureHeader($addr[1]), 'phrase') . ' <' . $this->secureHeader( + $addr[0] + ) . '>'; + } + + /** + * Word-wrap message. + * For use with mailers that do not automatically perform wrapping + * and for quoted-printable encoded messages. + * Original written by philippe. + * + * @param string $message The message to wrap + * @param int $length The line length to wrap to + * @param bool $qp_mode Whether to run in Quoted-Printable mode + * + * @return string + */ + public function wrapText($message, $length, $qp_mode = false) + { + if ($qp_mode) { + $soft_break = sprintf(' =%s', static::$LE); + } else { + $soft_break = static::$LE; + } + // If utf-8 encoding is used, we will need to make sure we don't + // split multibyte characters when we wrap + $is_utf8 = static::CHARSET_UTF8 === strtolower($this->CharSet); + $lelen = strlen(static::$LE); + $crlflen = strlen(static::$LE); + + $message = static::normalizeBreaks($message); + //Remove a trailing line break + if (substr($message, -$lelen) == static::$LE) { + $message = substr($message, 0, -$lelen); + } + + //Split message into lines + $lines = explode(static::$LE, $message); + //Message will be rebuilt in here + $message = ''; + foreach ($lines as $line) { + $words = explode(' ', $line); + $buf = ''; + $firstword = true; + foreach ($words as $word) { + if ($qp_mode and (strlen($word) > $length)) { + $space_left = $length - strlen($buf) - $crlflen; + if (!$firstword) { + if ($space_left > 20) { + $len = $space_left; + if ($is_utf8) { + $len = $this->utf8CharBoundary($word, $len); + } elseif ('=' == substr($word, $len - 1, 1)) { + --$len; + } elseif ('=' == substr($word, $len - 2, 1)) { + $len -= 2; + } + $part = substr($word, 0, $len); + $word = substr($word, $len); + $buf .= ' ' . $part; + $message .= $buf . sprintf('=%s', static::$LE); + } else { + $message .= $buf . $soft_break; + } + $buf = ''; + } + while (strlen($word) > 0) { + if ($length <= 0) { + break; + } + $len = $length; + if ($is_utf8) { + $len = $this->utf8CharBoundary($word, $len); + } elseif ('=' == substr($word, $len - 1, 1)) { + --$len; + } elseif ('=' == substr($word, $len - 2, 1)) { + $len -= 2; + } + $part = substr($word, 0, $len); + $word = substr($word, $len); + + if (strlen($word) > 0) { + $message .= $part . sprintf('=%s', static::$LE); + } else { + $buf = $part; + } + } + } else { + $buf_o = $buf; + if (!$firstword) { + $buf .= ' '; + } + $buf .= $word; + + if (strlen($buf) > $length and '' != $buf_o) { + $message .= $buf_o . $soft_break; + $buf = $word; + } + } + $firstword = false; + } + $message .= $buf . static::$LE; + } + + return $message; + } + + /** + * Find the last character boundary prior to $maxLength in a utf-8 + * quoted-printable encoded string. + * Original written by Colin Brown. + * + * @param string $encodedText utf-8 QP text + * @param int $maxLength Find the last character boundary prior to this length + * + * @return int + */ + public function utf8CharBoundary($encodedText, $maxLength) + { + $foundSplitPos = false; + $lookBack = 3; + while (!$foundSplitPos) { + $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack); + $encodedCharPos = strpos($lastChunk, '='); + if (false !== $encodedCharPos) { + // Found start of encoded character byte within $lookBack block. + // Check the encoded byte value (the 2 chars after the '=') + $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2); + $dec = hexdec($hex); + if ($dec < 128) { + // Single byte character. + // If the encoded char was found at pos 0, it will fit + // otherwise reduce maxLength to start of the encoded char + if ($encodedCharPos > 0) { + $maxLength -= $lookBack - $encodedCharPos; + } + $foundSplitPos = true; + } elseif ($dec >= 192) { + // First byte of a multi byte character + // Reduce maxLength to split at start of character + $maxLength -= $lookBack - $encodedCharPos; + $foundSplitPos = true; + } elseif ($dec < 192) { + // Middle byte of a multi byte character, look further back + $lookBack += 3; + } + } else { + // No encoded character found + $foundSplitPos = true; + } + } + + return $maxLength; + } + + /** + * Apply word wrapping to the message body. + * Wraps the message body to the number of chars set in the WordWrap property. + * You should only do this to plain-text bodies as wrapping HTML tags may break them. + * This is called automatically by createBody(), so you don't need to call it yourself. + */ + public function setWordWrap() + { + if ($this->WordWrap < 1) { + return; + } + + switch ($this->message_type) { + case 'alt': + case 'alt_inline': + case 'alt_attach': + case 'alt_inline_attach': + $this->AltBody = $this->wrapText($this->AltBody, $this->WordWrap); + break; + default: + $this->Body = $this->wrapText($this->Body, $this->WordWrap); + break; + } + } + + /** + * Assemble message headers. + * + * @return string The assembled headers + */ + public function createHeader() + { + $result = ''; + + $result .= $this->headerLine('Date', '' == $this->MessageDate ? self::rfcDate() : $this->MessageDate); + + // To be created automatically by mail() + if ($this->SingleTo) { + if ('mail' != $this->Mailer) { + foreach ($this->to as $toaddr) { + $this->SingleToArray[] = $this->addrFormat($toaddr); + } + } + } else { + if (count($this->to) > 0) { + if ('mail' != $this->Mailer) { + $result .= $this->addrAppend('To', $this->to); + } + } elseif (count($this->cc) == 0) { + $result .= $this->headerLine('To', 'undisclosed-recipients:;'); + } + } + + $result .= $this->addrAppend('From', [[trim($this->From), $this->FromName]]); + + // sendmail and mail() extract Cc from the header before sending + if (count($this->cc) > 0) { + $result .= $this->addrAppend('Cc', $this->cc); + } + + // sendmail and mail() extract Bcc from the header before sending + if (( + 'sendmail' == $this->Mailer or 'qmail' == $this->Mailer or 'mail' == $this->Mailer + ) + and count($this->bcc) > 0 + ) { + $result .= $this->addrAppend('Bcc', $this->bcc); + } + + if (count($this->ReplyTo) > 0) { + $result .= $this->addrAppend('Reply-To', $this->ReplyTo); + } + + // mail() sets the subject itself + if ('mail' != $this->Mailer) { + $result .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject))); + } + + // Only allow a custom message ID if it conforms to RFC 5322 section 3.6.4 + // https://tools.ietf.org/html/rfc5322#section-3.6.4 + if ('' != $this->MessageID and preg_match('/^<.*@.*>$/', $this->MessageID)) { + $this->lastMessageID = $this->MessageID; + } else { + $this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname()); + } + $result .= $this->headerLine('Message-ID', $this->lastMessageID); + if (null !== $this->Priority) { + $result .= $this->headerLine('X-Priority', $this->Priority); + } + if ('' == $this->XMailer) { + $result .= $this->headerLine( + 'X-Mailer', + 'PHPMailer ' . self::VERSION . ' (https://github.com/PHPMailer/PHPMailer)' + ); + } else { + $myXmailer = trim($this->XMailer); + if ($myXmailer) { + $result .= $this->headerLine('X-Mailer', $myXmailer); + } + } + + if ('' != $this->ConfirmReadingTo) { + $result .= $this->headerLine('Disposition-Notification-To', '<' . $this->ConfirmReadingTo . '>'); + } + + // Add custom headers + foreach ($this->CustomHeader as $header) { + $result .= $this->headerLine( + trim($header[0]), + $this->encodeHeader(trim($header[1])) + ); + } + if (!$this->sign_key_file) { + $result .= $this->headerLine('MIME-Version', '1.0'); + $result .= $this->getMailMIME(); + } + + return $result; + } + + /** + * Get the message MIME type headers. + * + * @return string + */ + public function getMailMIME() + { + $result = ''; + $ismultipart = true; + switch ($this->message_type) { + case 'inline': + $result .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';'); + $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + case 'attach': + case 'inline_attach': + case 'alt_attach': + case 'alt_inline_attach': + $result .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_MIXED . ';'); + $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + case 'alt': + case 'alt_inline': + $result .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_ALTERNATIVE . ';'); + $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + default: + // Catches case 'plain': and case '': + $result .= $this->textLine('Content-Type: ' . $this->ContentType . '; charset=' . $this->CharSet); + $ismultipart = false; + break; + } + // RFC1341 part 5 says 7bit is assumed if not specified + if (static::ENCODING_7BIT != $this->Encoding) { + // RFC 2045 section 6.4 says multipart MIME parts may only use 7bit, 8bit or binary CTE + if ($ismultipart) { + if (static::ENCODING_8BIT == $this->Encoding) { + $result .= $this->headerLine('Content-Transfer-Encoding', static::ENCODING_8BIT); + } + // The only remaining alternatives are quoted-printable and base64, which are both 7bit compatible + } else { + $result .= $this->headerLine('Content-Transfer-Encoding', $this->Encoding); + } + } + + if ('mail' != $this->Mailer) { + $result .= static::$LE; + } + + return $result; + } + + /** + * Returns the whole MIME message. + * Includes complete headers and body. + * Only valid post preSend(). + * + * @see PHPMailer::preSend() + * + * @return string + */ + public function getSentMIMEMessage() + { + return rtrim($this->MIMEHeader . $this->mailHeader, "\n\r") . static::$LE . static::$LE . $this->MIMEBody; + } + + /** + * Create a unique ID to use for boundaries. + * + * @return string + */ + protected function generateId() + { + $len = 32; //32 bytes = 256 bits + if (function_exists('random_bytes')) { + $bytes = random_bytes($len); + } elseif (function_exists('openssl_random_pseudo_bytes')) { + $bytes = openssl_random_pseudo_bytes($len); + } else { + //Use a hash to force the length to the same as the other methods + $bytes = hash('sha256', uniqid((string) mt_rand(), true), true); + } + + //We don't care about messing up base64 format here, just want a random string + return str_replace(['=', '+', '/'], '', base64_encode(hash('sha256', $bytes, true))); + } + + /** + * Assemble the message body. + * Returns an empty string on failure. + * + * @throws Exception + * + * @return string The assembled message body + */ + public function createBody() + { + $body = ''; + //Create unique IDs and preset boundaries + $this->uniqueid = $this->generateId(); + $this->boundary[1] = 'b1_' . $this->uniqueid; + $this->boundary[2] = 'b2_' . $this->uniqueid; + $this->boundary[3] = 'b3_' . $this->uniqueid; + + if ($this->sign_key_file) { + $body .= $this->getMailMIME() . static::$LE; + } + + $this->setWordWrap(); + + $bodyEncoding = $this->Encoding; + $bodyCharSet = $this->CharSet; + //Can we do a 7-bit downgrade? + if (static::ENCODING_8BIT == $bodyEncoding and !$this->has8bitChars($this->Body)) { + $bodyEncoding = static::ENCODING_7BIT; + //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit + $bodyCharSet = 'us-ascii'; + } + //If lines are too long, and we're not already using an encoding that will shorten them, + //change to quoted-printable transfer encoding for the body part only + if (static::ENCODING_BASE64 != $this->Encoding and static::hasLineLongerThanMax($this->Body)) { + $bodyEncoding = static::ENCODING_QUOTED_PRINTABLE; + } + + $altBodyEncoding = $this->Encoding; + $altBodyCharSet = $this->CharSet; + //Can we do a 7-bit downgrade? + if (static::ENCODING_8BIT == $altBodyEncoding and !$this->has8bitChars($this->AltBody)) { + $altBodyEncoding = static::ENCODING_7BIT; + //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit + $altBodyCharSet = 'us-ascii'; + } + //If lines are too long, and we're not already using an encoding that will shorten them, + //change to quoted-printable transfer encoding for the alt body part only + if (static::ENCODING_BASE64 != $altBodyEncoding and static::hasLineLongerThanMax($this->AltBody)) { + $altBodyEncoding = static::ENCODING_QUOTED_PRINTABLE; + } + //Use this as a preamble in all multipart message types + $mimepre = 'This is a multi-part message in MIME format.' . static::$LE; + switch ($this->message_type) { + case 'inline': + $body .= $mimepre; + $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + $body .= $this->attachAll('inline', $this->boundary[1]); + break; + case 'attach': + $body .= $mimepre; + $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + case 'inline_attach': + $body .= $mimepre; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= static::$LE; + $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, '', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + $body .= $this->attachAll('inline', $this->boundary[2]); + $body .= static::$LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + case 'alt': + $body .= $mimepre; + $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, static::CONTENT_TYPE_PLAINTEXT, $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= static::$LE; + $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, static::CONTENT_TYPE_TEXT_HTML, $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + if (!empty($this->Ical)) { + $body .= $this->getBoundary($this->boundary[1], '', static::CONTENT_TYPE_TEXT_CALENDAR . '; method=REQUEST', ''); + $body .= $this->encodeString($this->Ical, $this->Encoding); + $body .= static::$LE; + } + $body .= $this->endBoundary($this->boundary[1]); + break; + case 'alt_inline': + $body .= $mimepre; + $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, static::CONTENT_TYPE_PLAINTEXT, $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= static::$LE; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= static::$LE; + $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, static::CONTENT_TYPE_TEXT_HTML, $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + $body .= $this->attachAll('inline', $this->boundary[2]); + $body .= static::$LE; + $body .= $this->endBoundary($this->boundary[1]); + break; + case 'alt_attach': + $body .= $mimepre; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_ALTERNATIVE . ';'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= static::$LE; + $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, static::CONTENT_TYPE_PLAINTEXT, $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= static::$LE; + $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, static::CONTENT_TYPE_TEXT_HTML, $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + if (!empty($this->Ical)) { + $body .= $this->getBoundary($this->boundary[2], '', static::CONTENT_TYPE_TEXT_CALENDAR . '; method=REQUEST', ''); + $body .= $this->encodeString($this->Ical, $this->Encoding); + } + $body .= $this->endBoundary($this->boundary[2]); + $body .= static::$LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + case 'alt_inline_attach': + $body .= $mimepre; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_ALTERNATIVE . ';'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= static::$LE; + $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, static::CONTENT_TYPE_PLAINTEXT, $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= static::$LE; + $body .= $this->textLine('--' . $this->boundary[2]); + $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[3] . '"'); + $body .= static::$LE; + $body .= $this->getBoundary($this->boundary[3], $bodyCharSet, static::CONTENT_TYPE_TEXT_HTML, $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + $body .= $this->attachAll('inline', $this->boundary[3]); + $body .= static::$LE; + $body .= $this->endBoundary($this->boundary[2]); + $body .= static::$LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + default: + // Catch case 'plain' and case '', applies to simple `text/plain` and `text/html` body content types + //Reset the `Encoding` property in case we changed it for line length reasons + $this->Encoding = $bodyEncoding; + $body .= $this->encodeString($this->Body, $this->Encoding); + break; + } + + if ($this->isError()) { + $body = ''; + if ($this->exceptions) { + throw new Exception($this->lang('empty_message'), self::STOP_CRITICAL); + } + } elseif ($this->sign_key_file) { + try { + if (!defined('PKCS7_TEXT')) { + throw new Exception($this->lang('extension_missing') . 'openssl'); + } + // @TODO would be nice to use php://temp streams here + $file = tempnam(sys_get_temp_dir(), 'mail'); + if (false === file_put_contents($file, $body)) { + throw new Exception($this->lang('signing') . ' Could not write temp file'); + } + $signed = tempnam(sys_get_temp_dir(), 'signed'); + //Workaround for PHP bug https://bugs.php.net/bug.php?id=69197 + if (empty($this->sign_extracerts_file)) { + $sign = @openssl_pkcs7_sign( + $file, + $signed, + 'file://' . realpath($this->sign_cert_file), + ['file://' . realpath($this->sign_key_file), $this->sign_key_pass], + [] + ); + } else { + $sign = @openssl_pkcs7_sign( + $file, + $signed, + 'file://' . realpath($this->sign_cert_file), + ['file://' . realpath($this->sign_key_file), $this->sign_key_pass], + [], + PKCS7_DETACHED, + $this->sign_extracerts_file + ); + } + @unlink($file); + if ($sign) { + $body = file_get_contents($signed); + @unlink($signed); + //The message returned by openssl contains both headers and body, so need to split them up + $parts = explode("\n\n", $body, 2); + $this->MIMEHeader .= $parts[0] . static::$LE . static::$LE; + $body = $parts[1]; + } else { + @unlink($signed); + throw new Exception($this->lang('signing') . openssl_error_string()); + } + } catch (Exception $exc) { + $body = ''; + if ($this->exceptions) { + throw $exc; + } + } + } + + return $body; + } + + /** + * Return the start of a message boundary. + * + * @param string $boundary + * @param string $charSet + * @param string $contentType + * @param string $encoding + * + * @return string + */ + protected function getBoundary($boundary, $charSet, $contentType, $encoding) + { + $result = ''; + if ('' == $charSet) { + $charSet = $this->CharSet; + } + if ('' == $contentType) { + $contentType = $this->ContentType; + } + if ('' == $encoding) { + $encoding = $this->Encoding; + } + $result .= $this->textLine('--' . $boundary); + $result .= sprintf('Content-Type: %s; charset=%s', $contentType, $charSet); + $result .= static::$LE; + // RFC1341 part 5 says 7bit is assumed if not specified + if (static::ENCODING_7BIT != $encoding) { + $result .= $this->headerLine('Content-Transfer-Encoding', $encoding); + } + $result .= static::$LE; + + return $result; + } + + /** + * Return the end of a message boundary. + * + * @param string $boundary + * + * @return string + */ + protected function endBoundary($boundary) + { + return static::$LE . '--' . $boundary . '--' . static::$LE; + } + + /** + * Set the message type. + * PHPMailer only supports some preset message types, not arbitrary MIME structures. + */ + protected function setMessageType() + { + $type = []; + if ($this->alternativeExists()) { + $type[] = 'alt'; + } + if ($this->inlineImageExists()) { + $type[] = 'inline'; + } + if ($this->attachmentExists()) { + $type[] = 'attach'; + } + $this->message_type = implode('_', $type); + if ('' == $this->message_type) { + //The 'plain' message_type refers to the message having a single body element, not that it is plain-text + $this->message_type = 'plain'; + } + } + + /** + * Format a header line. + * + * @param string $name + * @param string|int $value + * + * @return string + */ + public function headerLine($name, $value) + { + return $name . ': ' . $value . static::$LE; + } + + /** + * Return a formatted mail line. + * + * @param string $value + * + * @return string + */ + public function textLine($value) + { + return $value . static::$LE; + } + + /** + * Add an attachment from a path on the filesystem. + * Never use a user-supplied path to a file! + * Returns false if the file could not be found or read. + * Explicitly *does not* support passing URLs; PHPMailer is not an HTTP client. + * If you need to do that, fetch the resource yourself and pass it in via a local file or string. + * + * @param string $path Path to the attachment + * @param string $name Overrides the attachment name + * @param string $encoding File encoding (see $Encoding) + * @param string $type File extension (MIME) type + * @param string $disposition Disposition to use + * + * @throws Exception + * + * @return bool + */ + public function addAttachment($path, $name = '', $encoding = self::ENCODING_BASE64, $type = '', $disposition = 'attachment') + { + try { + if (!static::isPermittedPath($path) || !@is_file($path)) { + throw new Exception($this->lang('file_access') . $path, self::STOP_CONTINUE); + } + + // If a MIME type is not specified, try to work it out from the file name + if ('' == $type) { + $type = static::filenameToType($path); + } + + $filename = basename($path); + if ('' == $name) { + $name = $filename; + } + + $this->attachment[] = [ + 0 => $path, + 1 => $filename, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => false, // isStringAttachment + 6 => $disposition, + 7 => $name, + ]; + } catch (Exception $exc) { + $this->setError($exc->getMessage()); + $this->edebug($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + + return false; + } + + return true; + } + + /** + * Return the array of attachments. + * + * @return array + */ + public function getAttachments() + { + return $this->attachment; + } + + /** + * Attach all file, string, and binary attachments to the message. + * Returns an empty string on failure. + * + * @param string $disposition_type + * @param string $boundary + * + * @return string + */ + protected function attachAll($disposition_type, $boundary) + { + // Return text of body + $mime = []; + $cidUniq = []; + $incl = []; + + // Add all attachments + foreach ($this->attachment as $attachment) { + // Check if it is a valid disposition_filter + if ($attachment[6] == $disposition_type) { + // Check for string attachment + $string = ''; + $path = ''; + $bString = $attachment[5]; + if ($bString) { + $string = $attachment[0]; + } else { + $path = $attachment[0]; + } + + $inclhash = hash('sha256', serialize($attachment)); + if (in_array($inclhash, $incl)) { + continue; + } + $incl[] = $inclhash; + $name = $attachment[2]; + $encoding = $attachment[3]; + $type = $attachment[4]; + $disposition = $attachment[6]; + $cid = $attachment[7]; + if ('inline' == $disposition and array_key_exists($cid, $cidUniq)) { + continue; + } + $cidUniq[$cid] = true; + + $mime[] = sprintf('--%s%s', $boundary, static::$LE); + //Only include a filename property if we have one + if (!empty($name)) { + $mime[] = sprintf( + 'Content-Type: %s; name="%s"%s', + $type, + $this->encodeHeader($this->secureHeader($name)), + static::$LE + ); + } else { + $mime[] = sprintf( + 'Content-Type: %s%s', + $type, + static::$LE + ); + } + // RFC1341 part 5 says 7bit is assumed if not specified + if (static::ENCODING_7BIT != $encoding) { + $mime[] = sprintf('Content-Transfer-Encoding: %s%s', $encoding, static::$LE); + } + + if (!empty($cid)) { + $mime[] = sprintf('Content-ID: <%s>%s', $cid, static::$LE); + } + + // If a filename contains any of these chars, it should be quoted, + // but not otherwise: RFC2183 & RFC2045 5.1 + // Fixes a warning in IETF's msglint MIME checker + // Allow for bypassing the Content-Disposition header totally + if (!(empty($disposition))) { + $encoded_name = $this->encodeHeader($this->secureHeader($name)); + if (preg_match('/[ \(\)<>@,;:\\"\/\[\]\?=]/', $encoded_name)) { + $mime[] = sprintf( + 'Content-Disposition: %s; filename="%s"%s', + $disposition, + $encoded_name, + static::$LE . static::$LE + ); + } else { + if (!empty($encoded_name)) { + $mime[] = sprintf( + 'Content-Disposition: %s; filename=%s%s', + $disposition, + $encoded_name, + static::$LE . static::$LE + ); + } else { + $mime[] = sprintf( + 'Content-Disposition: %s%s', + $disposition, + static::$LE . static::$LE + ); + } + } + } else { + $mime[] = static::$LE; + } + + // Encode as string attachment + if ($bString) { + $mime[] = $this->encodeString($string, $encoding); + } else { + $mime[] = $this->encodeFile($path, $encoding); + } + if ($this->isError()) { + return ''; + } + $mime[] = static::$LE; + } + } + + $mime[] = sprintf('--%s--%s', $boundary, static::$LE); + + return implode('', $mime); + } + + /** + * Encode a file attachment in requested format. + * Returns an empty string on failure. + * + * @param string $path The full path to the file + * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' + * + * @throws Exception + * + * @return string + */ + protected function encodeFile($path, $encoding = self::ENCODING_BASE64) + { + try { + if (!static::isPermittedPath($path) || !file_exists($path)) { + throw new Exception($this->lang('file_open') . $path, self::STOP_CONTINUE); + } + $file_buffer = file_get_contents($path); + if (false === $file_buffer) { + throw new Exception($this->lang('file_open') . $path, self::STOP_CONTINUE); + } + $file_buffer = $this->encodeString($file_buffer, $encoding); + + return $file_buffer; + } catch (Exception $exc) { + $this->setError($exc->getMessage()); + + return ''; + } + } + + /** + * Encode a string in requested format. + * Returns an empty string on failure. + * + * @param string $str The text to encode + * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' + * + * @return string + */ + public function encodeString($str, $encoding = self::ENCODING_BASE64) + { + $encoded = ''; + switch (strtolower($encoding)) { + case static::ENCODING_BASE64: + $encoded = chunk_split( + base64_encode($str), + static::STD_LINE_LENGTH, + static::$LE + ); + break; + case static::ENCODING_7BIT: + case static::ENCODING_8BIT: + $encoded = static::normalizeBreaks($str); + // Make sure it ends with a line break + if (substr($encoded, -(strlen(static::$LE))) != static::$LE) { + $encoded .= static::$LE; + } + break; + case static::ENCODING_BINARY: + $encoded = $str; + break; + case static::ENCODING_QUOTED_PRINTABLE: + $encoded = $this->encodeQP($str); + break; + default: + $this->setError($this->lang('encoding') . $encoding); + break; + } + + return $encoded; + } + + /** + * Encode a header value (not including its label) optimally. + * Picks shortest of Q, B, or none. Result includes folding if needed. + * See RFC822 definitions for phrase, comment and text positions. + * + * @param string $str The header value to encode + * @param string $position What context the string will be used in + * + * @return string + */ + public function encodeHeader($str, $position = 'text') + { + $matchcount = 0; + switch (strtolower($position)) { + case 'phrase': + if (!preg_match('/[\200-\377]/', $str)) { + // Can't use addslashes as we don't know the value of magic_quotes_sybase + $encoded = addcslashes($str, "\0..\37\177\\\""); + if (($str == $encoded) and !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) { + return $encoded; + } + + return "\"$encoded\""; + } + $matchcount = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); + break; + /* @noinspection PhpMissingBreakStatementInspection */ + case 'comment': + $matchcount = preg_match_all('/[()"]/', $str, $matches); + //fallthrough + case 'text': + default: + $matchcount += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); + break; + } + + //RFCs specify a maximum line length of 78 chars, however mail() will sometimes + //corrupt messages with headers longer than 65 chars. See #818 + $lengthsub = 'mail' == $this->Mailer ? 13 : 0; + $maxlen = static::STD_LINE_LENGTH - $lengthsub; + // Try to select the encoding which should produce the shortest output + if ($matchcount > strlen($str) / 3) { + // More than a third of the content will need encoding, so B encoding will be most efficient + $encoding = 'B'; + //This calculation is: + // max line length + // - shorten to avoid mail() corruption + // - Q/B encoding char overhead ("` =??[QB]??=`") + // - charset name length + $maxlen = static::STD_LINE_LENGTH - $lengthsub - 8 - strlen($this->CharSet); + if ($this->hasMultiBytes($str)) { + // Use a custom function which correctly encodes and wraps long + // multibyte strings without breaking lines within a character + $encoded = $this->base64EncodeWrapMB($str, "\n"); + } else { + $encoded = base64_encode($str); + $maxlen -= $maxlen % 4; + $encoded = trim(chunk_split($encoded, $maxlen, "\n")); + } + $encoded = preg_replace('/^(.*)$/m', ' =?' . $this->CharSet . "?$encoding?\\1?=", $encoded); + } elseif ($matchcount > 0) { + //1 or more chars need encoding, use Q-encode + $encoding = 'Q'; + //Recalc max line length for Q encoding - see comments on B encode + $maxlen = static::STD_LINE_LENGTH - $lengthsub - 8 - strlen($this->CharSet); + $encoded = $this->encodeQ($str, $position); + $encoded = $this->wrapText($encoded, $maxlen, true); + $encoded = str_replace('=' . static::$LE, "\n", trim($encoded)); + $encoded = preg_replace('/^(.*)$/m', ' =?' . $this->CharSet . "?$encoding?\\1?=", $encoded); + } elseif (strlen($str) > $maxlen) { + //No chars need encoding, but line is too long, so fold it + $encoded = trim($this->wrapText($str, $maxlen, false)); + if ($str == $encoded) { + //Wrapping nicely didn't work, wrap hard instead + $encoded = trim(chunk_split($str, static::STD_LINE_LENGTH, static::$LE)); + } + $encoded = str_replace(static::$LE, "\n", trim($encoded)); + $encoded = preg_replace('/^(.*)$/m', ' \\1', $encoded); + } else { + //No reformatting needed + return $str; + } + + return trim(static::normalizeBreaks($encoded)); + } + + /** + * Check if a string contains multi-byte characters. + * + * @param string $str multi-byte text to wrap encode + * + * @return bool + */ + public function hasMultiBytes($str) + { + if (function_exists('mb_strlen')) { + return strlen($str) > mb_strlen($str, $this->CharSet); + } + + // Assume no multibytes (we can't handle without mbstring functions anyway) + return false; + } + + /** + * Does a string contain any 8-bit chars (in any charset)? + * + * @param string $text + * + * @return bool + */ + public function has8bitChars($text) + { + return (bool) preg_match('/[\x80-\xFF]/', $text); + } + + /** + * Encode and wrap long multibyte strings for mail headers + * without breaking lines within a character. + * Adapted from a function by paravoid. + * + * @see http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283 + * + * @param string $str multi-byte text to wrap encode + * @param string $linebreak string to use as linefeed/end-of-line + * + * @return string + */ + public function base64EncodeWrapMB($str, $linebreak = null) + { + $start = '=?' . $this->CharSet . '?B?'; + $end = '?='; + $encoded = ''; + if (null === $linebreak) { + $linebreak = static::$LE; + } + + $mb_length = mb_strlen($str, $this->CharSet); + // Each line must have length <= 75, including $start and $end + $length = 75 - strlen($start) - strlen($end); + // Average multi-byte ratio + $ratio = $mb_length / strlen($str); + // Base64 has a 4:3 ratio + $avgLength = floor($length * $ratio * .75); + + for ($i = 0; $i < $mb_length; $i += $offset) { + $lookBack = 0; + do { + $offset = $avgLength - $lookBack; + $chunk = mb_substr($str, $i, $offset, $this->CharSet); + $chunk = base64_encode($chunk); + ++$lookBack; + } while (strlen($chunk) > $length); + $encoded .= $chunk . $linebreak; + } + + // Chomp the last linefeed + return substr($encoded, 0, -strlen($linebreak)); + } + + /** + * Encode a string in quoted-printable format. + * According to RFC2045 section 6.7. + * + * @param string $string The text to encode + * + * @return string + */ + public function encodeQP($string) + { + return static::normalizeBreaks(quoted_printable_encode($string)); + } + + /** + * Encode a string using Q encoding. + * + * @see http://tools.ietf.org/html/rfc2047#section-4.2 + * + * @param string $str the text to encode + * @param string $position Where the text is going to be used, see the RFC for what that means + * + * @return string + */ + public function encodeQ($str, $position = 'text') + { + // There should not be any EOL in the string + $pattern = ''; + $encoded = str_replace(["\r", "\n"], '', $str); + switch (strtolower($position)) { + case 'phrase': + // RFC 2047 section 5.3 + $pattern = '^A-Za-z0-9!*+\/ -'; + break; + /* + * RFC 2047 section 5.2. + * Build $pattern without including delimiters and [] + */ + /* @noinspection PhpMissingBreakStatementInspection */ + case 'comment': + $pattern = '\(\)"'; + /* Intentional fall through */ + case 'text': + default: + // RFC 2047 section 5.1 + // Replace every high ascii, control, =, ? and _ characters + /** @noinspection SuspiciousAssignmentsInspection */ + $pattern = '\000-\011\013\014\016-\037\075\077\137\177-\377' . $pattern; + break; + } + $matches = []; + if (preg_match_all("/[{$pattern}]/", $encoded, $matches)) { + // If the string contains an '=', make sure it's the first thing we replace + // so as to avoid double-encoding + $eqkey = array_search('=', $matches[0]); + if (false !== $eqkey) { + unset($matches[0][$eqkey]); + array_unshift($matches[0], '='); + } + foreach (array_unique($matches[0]) as $char) { + $encoded = str_replace($char, '=' . sprintf('%02X', ord($char)), $encoded); + } + } + // Replace spaces with _ (more readable than =20) + // RFC 2047 section 4.2(2) + return str_replace(' ', '_', $encoded); + } + + /** + * Add a string or binary attachment (non-filesystem). + * This method can be used to attach ascii or binary data, + * such as a BLOB record from a database. + * + * @param string $string String attachment data + * @param string $filename Name of the attachment + * @param string $encoding File encoding (see $Encoding) + * @param string $type File extension (MIME) type + * @param string $disposition Disposition to use + */ + public function addStringAttachment( + $string, + $filename, + $encoding = self::ENCODING_BASE64, + $type = '', + $disposition = 'attachment' + ) { + // If a MIME type is not specified, try to work it out from the file name + if ('' == $type) { + $type = static::filenameToType($filename); + } + // Append to $attachment array + $this->attachment[] = [ + 0 => $string, + 1 => $filename, + 2 => basename($filename), + 3 => $encoding, + 4 => $type, + 5 => true, // isStringAttachment + 6 => $disposition, + 7 => 0, + ]; + } + + /** + * Add an embedded (inline) attachment from a file. + * This can include images, sounds, and just about any other document type. + * These differ from 'regular' attachments in that they are intended to be + * displayed inline with the message, not just attached for download. + * This is used in HTML messages that embed the images + * the HTML refers to using the $cid value. + * Never use a user-supplied path to a file! + * + * @param string $path Path to the attachment + * @param string $cid Content ID of the attachment; Use this to reference + * the content when using an embedded image in HTML + * @param string $name Overrides the attachment name + * @param string $encoding File encoding (see $Encoding) + * @param string $type File MIME type + * @param string $disposition Disposition to use + * + * @return bool True on successfully adding an attachment + */ + public function addEmbeddedImage($path, $cid, $name = '', $encoding = self::ENCODING_BASE64, $type = '', $disposition = 'inline') + { + if (!static::isPermittedPath($path) || !@is_file($path)) { + $this->setError($this->lang('file_access') . $path); + + return false; + } + + // If a MIME type is not specified, try to work it out from the file name + if ('' == $type) { + $type = static::filenameToType($path); + } + + $filename = basename($path); + if ('' == $name) { + $name = $filename; + } + + // Append to $attachment array + $this->attachment[] = [ + 0 => $path, + 1 => $filename, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => false, // isStringAttachment + 6 => $disposition, + 7 => $cid, + ]; + + return true; + } + + /** + * Add an embedded stringified attachment. + * This can include images, sounds, and just about any other document type. + * If your filename doesn't contain an extension, be sure to set the $type to an appropriate MIME type. + * + * @param string $string The attachment binary data + * @param string $cid Content ID of the attachment; Use this to reference + * the content when using an embedded image in HTML + * @param string $name A filename for the attachment. If this contains an extension, + * PHPMailer will attempt to set a MIME type for the attachment. + * For example 'file.jpg' would get an 'image/jpeg' MIME type. + * @param string $encoding File encoding (see $Encoding), defaults to 'base64' + * @param string $type MIME type - will be used in preference to any automatically derived type + * @param string $disposition Disposition to use + * + * @return bool True on successfully adding an attachment + */ + public function addStringEmbeddedImage( + $string, + $cid, + $name = '', + $encoding = self::ENCODING_BASE64, + $type = '', + $disposition = 'inline' + ) { + // If a MIME type is not specified, try to work it out from the name + if ('' == $type and !empty($name)) { + $type = static::filenameToType($name); + } + + // Append to $attachment array + $this->attachment[] = [ + 0 => $string, + 1 => $name, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => true, // isStringAttachment + 6 => $disposition, + 7 => $cid, + ]; + + return true; + } + + /** + * Check if an embedded attachment is present with this cid. + * + * @param string $cid + * + * @return bool + */ + protected function cidExists($cid) + { + foreach ($this->attachment as $attachment) { + if ('inline' == $attachment[6] and $cid == $attachment[7]) { + return true; + } + } + + return false; + } + + /** + * Check if an inline attachment is present. + * + * @return bool + */ + public function inlineImageExists() + { + foreach ($this->attachment as $attachment) { + if ('inline' == $attachment[6]) { + return true; + } + } + + return false; + } + + /** + * Check if an attachment (non-inline) is present. + * + * @return bool + */ + public function attachmentExists() + { + foreach ($this->attachment as $attachment) { + if ('attachment' == $attachment[6]) { + return true; + } + } + + return false; + } + + /** + * Check if this message has an alternative body set. + * + * @return bool + */ + public function alternativeExists() + { + return !empty($this->AltBody); + } + + /** + * Clear queued addresses of given kind. + * + * @param string $kind 'to', 'cc', or 'bcc' + */ + public function clearQueuedAddresses($kind) + { + $this->RecipientsQueue = array_filter( + $this->RecipientsQueue, + function ($params) use ($kind) { + return $params[0] != $kind; + } + ); + } + + /** + * Clear all To recipients. + */ + public function clearAddresses() + { + foreach ($this->to as $to) { + unset($this->all_recipients[strtolower($to[0])]); + } + $this->to = []; + $this->clearQueuedAddresses('to'); + } + + /** + * Clear all CC recipients. + */ + public function clearCCs() + { + foreach ($this->cc as $cc) { + unset($this->all_recipients[strtolower($cc[0])]); + } + $this->cc = []; + $this->clearQueuedAddresses('cc'); + } + + /** + * Clear all BCC recipients. + */ + public function clearBCCs() + { + foreach ($this->bcc as $bcc) { + unset($this->all_recipients[strtolower($bcc[0])]); + } + $this->bcc = []; + $this->clearQueuedAddresses('bcc'); + } + + /** + * Clear all ReplyTo recipients. + */ + public function clearReplyTos() + { + $this->ReplyTo = []; + $this->ReplyToQueue = []; + } + + /** + * Clear all recipient types. + */ + public function clearAllRecipients() + { + $this->to = []; + $this->cc = []; + $this->bcc = []; + $this->all_recipients = []; + $this->RecipientsQueue = []; + } + + /** + * Clear all filesystem, string, and binary attachments. + */ + public function clearAttachments() + { + $this->attachment = []; + } + + /** + * Clear all custom headers. + */ + public function clearCustomHeaders() + { + $this->CustomHeader = []; + } + + /** + * Add an error message to the error container. + * + * @param string $msg + */ + protected function setError($msg) + { + ++$this->error_count; + if ('smtp' == $this->Mailer and null !== $this->smtp) { + $lasterror = $this->smtp->getError(); + if (!empty($lasterror['error'])) { + $msg .= $this->lang('smtp_error') . $lasterror['error']; + if (!empty($lasterror['detail'])) { + $msg .= ' Detail: ' . $lasterror['detail']; + } + if (!empty($lasterror['smtp_code'])) { + $msg .= ' SMTP code: ' . $lasterror['smtp_code']; + } + if (!empty($lasterror['smtp_code_ex'])) { + $msg .= ' Additional SMTP info: ' . $lasterror['smtp_code_ex']; + } + } + } + $this->ErrorInfo = $msg; + } + + /** + * Return an RFC 822 formatted date. + * + * @return string + */ + public static function rfcDate() + { + // Set the time zone to whatever the default is to avoid 500 errors + // Will default to UTC if it's not set properly in php.ini + date_default_timezone_set(@date_default_timezone_get()); + + return date('D, j M Y H:i:s O'); + } + + /** + * Get the server hostname. + * Returns 'localhost.localdomain' if unknown. + * + * @return string + */ + protected function serverHostname() + { + $result = ''; + if (!empty($this->Hostname)) { + $result = $this->Hostname; + } elseif (isset($_SERVER) and array_key_exists('SERVER_NAME', $_SERVER)) { + $result = $_SERVER['SERVER_NAME']; + } elseif (function_exists('gethostname') and gethostname() !== false) { + $result = gethostname(); + } elseif (php_uname('n') !== false) { + $result = php_uname('n'); + } + if (!static::isValidHost($result)) { + return 'localhost.localdomain'; + } + + return $result; + } + + /** + * Validate whether a string contains a valid value to use as a hostname or IP address. + * IPv6 addresses must include [], e.g. `[::1]`, not just `::1`. + * + * @param string $host The host name or IP address to check + * + * @return bool + */ + public static function isValidHost($host) + { + //Simple syntax limits + if (empty($host) + or !is_string($host) + or strlen($host) > 256 + ) { + return false; + } + //Looks like a bracketed IPv6 address + if (trim($host, '[]') != $host) { + return (bool) filter_var(trim($host, '[]'), FILTER_VALIDATE_IP, FILTER_FLAG_IPV6); + } + //If removing all the dots results in a numeric string, it must be an IPv4 address. + //Need to check this first because otherwise things like `999.0.0.0` are considered valid host names + if (is_numeric(str_replace('.', '', $host))) { + //Is it a valid IPv4 address? + return (bool) filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4); + } + if (filter_var('http://' . $host, FILTER_VALIDATE_URL)) { + //Is it a syntactically valid hostname? + return true; + } + + return false; + } + + /** + * Get an error message in the current language. + * + * @param string $key + * + * @return string + */ + protected function lang($key) + { + if (count($this->language) < 1) { + $this->setLanguage('en'); // set the default language + } + + if (array_key_exists($key, $this->language)) { + if ('smtp_connect_failed' == $key) { + //Include a link to troubleshooting docs on SMTP connection failure + //this is by far the biggest cause of support questions + //but it's usually not PHPMailer's fault. + return $this->language[$key] . ' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting'; + } + + return $this->language[$key]; + } + + //Return the key as a fallback + return $key; + } + + /** + * Check if an error occurred. + * + * @return bool True if an error did occur + */ + public function isError() + { + return $this->error_count > 0; + } + + /** + * Add a custom header. + * $name value can be overloaded to contain + * both header name and value (name:value). + * + * @param string $name Custom header name + * @param string|null $value Header value + */ + public function addCustomHeader($name, $value = null) + { + if (null === $value) { + // Value passed in as name:value + $this->CustomHeader[] = explode(':', $name, 2); + } else { + $this->CustomHeader[] = [$name, $value]; + } + } + + /** + * Returns all custom headers. + * + * @return array + */ + public function getCustomHeaders() + { + return $this->CustomHeader; + } + + /** + * Create a message body from an HTML string. + * Automatically inlines images and creates a plain-text version by converting the HTML, + * overwriting any existing values in Body and AltBody. + * Do not source $message content from user input! + * $basedir is prepended when handling relative URLs, e.g. and must not be empty + * will look for an image file in $basedir/images/a.png and convert it to inline. + * If you don't provide a $basedir, relative paths will be left untouched (and thus probably break in email) + * Converts data-uri images into embedded attachments. + * If you don't want to apply these transformations to your HTML, just set Body and AltBody directly. + * + * @param string $message HTML message string + * @param string $basedir Absolute path to a base directory to prepend to relative paths to images + * @param bool|callable $advanced Whether to use the internal HTML to text converter + * or your own custom converter @see PHPMailer::html2text() + * + * @return string $message The transformed message Body + */ + public function msgHTML($message, $basedir = '', $advanced = false) + { + preg_match_all('/(src|background)=["\'](.*)["\']/Ui', $message, $images); + if (array_key_exists(2, $images)) { + if (strlen($basedir) > 1 && '/' != substr($basedir, -1)) { + // Ensure $basedir has a trailing / + $basedir .= '/'; + } + foreach ($images[2] as $imgindex => $url) { + // Convert data URIs into embedded images + //e.g. "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" + if (preg_match('#^data:(image/(?:jpe?g|gif|png));?(base64)?,(.+)#', $url, $match)) { + if (count($match) == 4 and static::ENCODING_BASE64 == $match[2]) { + $data = base64_decode($match[3]); + } elseif ('' == $match[2]) { + $data = rawurldecode($match[3]); + } else { + //Not recognised so leave it alone + continue; + } + //Hash the decoded data, not the URL so that the same data-URI image used in multiple places + //will only be embedded once, even if it used a different encoding + $cid = hash('sha256', $data) . '@phpmailer.0'; // RFC2392 S 2 + + if (!$this->cidExists($cid)) { + $this->addStringEmbeddedImage($data, $cid, 'embed' . $imgindex, static::ENCODING_BASE64, $match[1]); + } + $message = str_replace( + $images[0][$imgindex], + $images[1][$imgindex] . '="cid:' . $cid . '"', + $message + ); + continue; + } + if (// Only process relative URLs if a basedir is provided (i.e. no absolute local paths) + !empty($basedir) + // Ignore URLs containing parent dir traversal (..) + and (strpos($url, '..') === false) + // Do not change urls that are already inline images + and 0 !== strpos($url, 'cid:') + // Do not change absolute URLs, including anonymous protocol + and !preg_match('#^[a-z][a-z0-9+.-]*:?//#i', $url) + ) { + $filename = basename($url); + $directory = dirname($url); + if ('.' == $directory) { + $directory = ''; + } + $cid = hash('sha256', $url) . '@phpmailer.0'; // RFC2392 S 2 + if (strlen($basedir) > 1 and '/' != substr($basedir, -1)) { + $basedir .= '/'; + } + if (strlen($directory) > 1 and '/' != substr($directory, -1)) { + $directory .= '/'; + } + if ($this->addEmbeddedImage( + $basedir . $directory . $filename, + $cid, + $filename, + static::ENCODING_BASE64, + static::_mime_types((string) static::mb_pathinfo($filename, PATHINFO_EXTENSION)) + ) + ) { + $message = preg_replace( + '/' . $images[1][$imgindex] . '=["\']' . preg_quote($url, '/') . '["\']/Ui', + $images[1][$imgindex] . '="cid:' . $cid . '"', + $message + ); + } + } + } + } + $this->isHTML(true); + // Convert all message body line breaks to LE, makes quoted-printable encoding work much better + $this->Body = static::normalizeBreaks($message); + $this->AltBody = static::normalizeBreaks($this->html2text($message, $advanced)); + if (!$this->alternativeExists()) { + $this->AltBody = 'This is an HTML-only message. To view it, activate HTML in your email application.' + . static::$LE; + } + + return $this->Body; + } + + /** + * Convert an HTML string into plain text. + * This is used by msgHTML(). + * Note - older versions of this function used a bundled advanced converter + * which was removed for license reasons in #232. + * Example usage: + * + * ```php + * // Use default conversion + * $plain = $mail->html2text($html); + * // Use your own custom converter + * $plain = $mail->html2text($html, function($html) { + * $converter = new MyHtml2text($html); + * return $converter->get_text(); + * }); + * ``` + * + * @param string $html The HTML text to convert + * @param bool|callable $advanced Any boolean value to use the internal converter, + * or provide your own callable for custom conversion + * + * @return string + */ + public function html2text($html, $advanced = false) + { + if (is_callable($advanced)) { + return call_user_func($advanced, $html); + } + + return html_entity_decode( + trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/si', '', $html))), + ENT_QUOTES, + $this->CharSet + ); + } + + /** + * Get the MIME type for a file extension. + * + * @param string $ext File extension + * + * @return string MIME type of file + */ + public static function _mime_types($ext = '') + { + $mimes = [ + 'xl' => 'application/excel', + 'js' => 'application/javascript', + 'hqx' => 'application/mac-binhex40', + 'cpt' => 'application/mac-compactpro', + 'bin' => 'application/macbinary', + 'doc' => 'application/msword', + 'word' => 'application/msword', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', + 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', + 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', + 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', + 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', + 'class' => 'application/octet-stream', + 'dll' => 'application/octet-stream', + 'dms' => 'application/octet-stream', + 'exe' => 'application/octet-stream', + 'lha' => 'application/octet-stream', + 'lzh' => 'application/octet-stream', + 'psd' => 'application/octet-stream', + 'sea' => 'application/octet-stream', + 'so' => 'application/octet-stream', + 'oda' => 'application/oda', + 'pdf' => 'application/pdf', + 'ai' => 'application/postscript', + 'eps' => 'application/postscript', + 'ps' => 'application/postscript', + 'smi' => 'application/smil', + 'smil' => 'application/smil', + 'mif' => 'application/vnd.mif', + 'xls' => 'application/vnd.ms-excel', + 'ppt' => 'application/vnd.ms-powerpoint', + 'wbxml' => 'application/vnd.wap.wbxml', + 'wmlc' => 'application/vnd.wap.wmlc', + 'dcr' => 'application/x-director', + 'dir' => 'application/x-director', + 'dxr' => 'application/x-director', + 'dvi' => 'application/x-dvi', + 'gtar' => 'application/x-gtar', + 'php3' => 'application/x-httpd-php', + 'php4' => 'application/x-httpd-php', + 'php' => 'application/x-httpd-php', + 'phtml' => 'application/x-httpd-php', + 'phps' => 'application/x-httpd-php-source', + 'swf' => 'application/x-shockwave-flash', + 'sit' => 'application/x-stuffit', + 'tar' => 'application/x-tar', + 'tgz' => 'application/x-tar', + 'xht' => 'application/xhtml+xml', + 'xhtml' => 'application/xhtml+xml', + 'zip' => 'application/zip', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mp2' => 'audio/mpeg', + 'mp3' => 'audio/mpeg', + 'm4a' => 'audio/mp4', + 'mpga' => 'audio/mpeg', + 'aif' => 'audio/x-aiff', + 'aifc' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'ram' => 'audio/x-pn-realaudio', + 'rm' => 'audio/x-pn-realaudio', + 'rpm' => 'audio/x-pn-realaudio-plugin', + 'ra' => 'audio/x-realaudio', + 'wav' => 'audio/x-wav', + 'mka' => 'audio/x-matroska', + 'bmp' => 'image/bmp', + 'gif' => 'image/gif', + 'jpeg' => 'image/jpeg', + 'jpe' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'png' => 'image/png', + 'tiff' => 'image/tiff', + 'tif' => 'image/tiff', + 'webp' => 'image/webp', + 'heif' => 'image/heif', + 'heifs' => 'image/heif-sequence', + 'heic' => 'image/heic', + 'heics' => 'image/heic-sequence', + 'eml' => 'message/rfc822', + 'css' => 'text/css', + 'html' => 'text/html', + 'htm' => 'text/html', + 'shtml' => 'text/html', + 'log' => 'text/plain', + 'text' => 'text/plain', + 'txt' => 'text/plain', + 'rtx' => 'text/richtext', + 'rtf' => 'text/rtf', + 'vcf' => 'text/vcard', + 'vcard' => 'text/vcard', + 'ics' => 'text/calendar', + 'xml' => 'text/xml', + 'xsl' => 'text/xml', + 'wmv' => 'video/x-ms-wmv', + 'mpeg' => 'video/mpeg', + 'mpe' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mp4' => 'video/mp4', + 'm4v' => 'video/mp4', + 'mov' => 'video/quicktime', + 'qt' => 'video/quicktime', + 'rv' => 'video/vnd.rn-realvideo', + 'avi' => 'video/x-msvideo', + 'movie' => 'video/x-sgi-movie', + 'webm' => 'video/webm', + 'mkv' => 'video/x-matroska', + ]; + $ext = strtolower($ext); + if (array_key_exists($ext, $mimes)) { + return $mimes[$ext]; + } + + return 'application/octet-stream'; + } + + /** + * Map a file name to a MIME type. + * Defaults to 'application/octet-stream', i.e.. arbitrary binary data. + * + * @param string $filename A file name or full path, does not need to exist as a file + * + * @return string + */ + public static function filenameToType($filename) + { + // In case the path is a URL, strip any query string before getting extension + $qpos = strpos($filename, '?'); + if (false !== $qpos) { + $filename = substr($filename, 0, $qpos); + } + $ext = static::mb_pathinfo($filename, PATHINFO_EXTENSION); + + return static::_mime_types($ext); + } + + /** + * Multi-byte-safe pathinfo replacement. + * Drop-in replacement for pathinfo(), but multibyte- and cross-platform-safe. + * + * @see http://www.php.net/manual/en/function.pathinfo.php#107461 + * + * @param string $path A filename or path, does not need to exist as a file + * @param int|string $options Either a PATHINFO_* constant, + * or a string name to return only the specified piece + * + * @return string|array + */ + public static function mb_pathinfo($path, $options = null) + { + $ret = ['dirname' => '', 'basename' => '', 'extension' => '', 'filename' => '']; + $pathinfo = []; + if (preg_match('#^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^\.\\\\/]+?)|))[\\\\/\.]*$#im', $path, $pathinfo)) { + if (array_key_exists(1, $pathinfo)) { + $ret['dirname'] = $pathinfo[1]; + } + if (array_key_exists(2, $pathinfo)) { + $ret['basename'] = $pathinfo[2]; + } + if (array_key_exists(5, $pathinfo)) { + $ret['extension'] = $pathinfo[5]; + } + if (array_key_exists(3, $pathinfo)) { + $ret['filename'] = $pathinfo[3]; + } + } + switch ($options) { + case PATHINFO_DIRNAME: + case 'dirname': + return $ret['dirname']; + case PATHINFO_BASENAME: + case 'basename': + return $ret['basename']; + case PATHINFO_EXTENSION: + case 'extension': + return $ret['extension']; + case PATHINFO_FILENAME: + case 'filename': + return $ret['filename']; + default: + return $ret; + } + } + + /** + * Set or reset instance properties. + * You should avoid this function - it's more verbose, less efficient, more error-prone and + * harder to debug than setting properties directly. + * Usage Example: + * `$mail->set('SMTPSecure', 'tls');` + * is the same as: + * `$mail->SMTPSecure = 'tls';`. + * + * @param string $name The property name to set + * @param mixed $value The value to set the property to + * + * @return bool + */ + public function set($name, $value = '') + { + if (property_exists($this, $name)) { + $this->$name = $value; + + return true; + } + $this->setError($this->lang('variable_set') . $name); + + return false; + } + + /** + * Strip newlines to prevent header injection. + * + * @param string $str + * + * @return string + */ + public function secureHeader($str) + { + return trim(str_replace(["\r", "\n"], '', $str)); + } + + /** + * Normalize line breaks in a string. + * Converts UNIX LF, Mac CR and Windows CRLF line breaks into a single line break format. + * Defaults to CRLF (for message bodies) and preserves consecutive breaks. + * + * @param string $text + * @param string $breaktype What kind of line break to use; defaults to static::$LE + * + * @return string + */ + public static function normalizeBreaks($text, $breaktype = null) + { + if (null === $breaktype) { + $breaktype = static::$LE; + } + // Normalise to \n + $text = str_replace(["\r\n", "\r"], "\n", $text); + // Now convert LE as needed + if ("\n" !== $breaktype) { + $text = str_replace("\n", $breaktype, $text); + } + + return $text; + } + + /** + * Return the current line break format string. + * + * @return string + */ + public static function getLE() + { + return static::$LE; + } + + /** + * Set the line break format string, e.g. "\r\n". + * + * @param string $le + */ + protected static function setLE($le) + { + static::$LE = $le; + } + + /** + * Set the public and private key files and password for S/MIME signing. + * + * @param string $cert_filename + * @param string $key_filename + * @param string $key_pass Password for private key + * @param string $extracerts_filename Optional path to chain certificate + */ + public function sign($cert_filename, $key_filename, $key_pass, $extracerts_filename = '') + { + $this->sign_cert_file = $cert_filename; + $this->sign_key_file = $key_filename; + $this->sign_key_pass = $key_pass; + $this->sign_extracerts_file = $extracerts_filename; + } + + /** + * Quoted-Printable-encode a DKIM header. + * + * @param string $txt + * + * @return string + */ + public function DKIM_QP($txt) + { + $line = ''; + $len = strlen($txt); + for ($i = 0; $i < $len; ++$i) { + $ord = ord($txt[$i]); + if (((0x21 <= $ord) and ($ord <= 0x3A)) or $ord == 0x3C or ((0x3E <= $ord) and ($ord <= 0x7E))) { + $line .= $txt[$i]; + } else { + $line .= '=' . sprintf('%02X', $ord); + } + } + + return $line; + } + + /** + * Generate a DKIM signature. + * + * @param string $signHeader + * + * @throws Exception + * + * @return string The DKIM signature value + */ + public function DKIM_Sign($signHeader) + { + if (!defined('PKCS7_TEXT')) { + if ($this->exceptions) { + throw new Exception($this->lang('extension_missing') . 'openssl'); + } + + return ''; + } + $privKeyStr = !empty($this->DKIM_private_string) ? + $this->DKIM_private_string : + file_get_contents($this->DKIM_private); + if ('' != $this->DKIM_passphrase) { + $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase); + } else { + $privKey = openssl_pkey_get_private($privKeyStr); + } + if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) { + openssl_pkey_free($privKey); + + return base64_encode($signature); + } + openssl_pkey_free($privKey); + + return ''; + } + + /** + * Generate a DKIM canonicalization header. + * Uses the 'relaxed' algorithm from RFC6376 section 3.4.2. + * Canonicalized headers should *always* use CRLF, regardless of mailer setting. + * + * @see https://tools.ietf.org/html/rfc6376#section-3.4.2 + * + * @param string $signHeader Header + * + * @return string + */ + public function DKIM_HeaderC($signHeader) + { + //Unfold all header continuation lines + //Also collapses folded whitespace. + //Note PCRE \s is too broad a definition of whitespace; RFC5322 defines it as `[ \t]` + //@see https://tools.ietf.org/html/rfc5322#section-2.2 + //That means this may break if you do something daft like put vertical tabs in your headers. + $signHeader = preg_replace('/\r\n[ \t]+/', ' ', $signHeader); + $lines = explode("\r\n", $signHeader); + foreach ($lines as $key => $line) { + //If the header is missing a :, skip it as it's invalid + //This is likely to happen because the explode() above will also split + //on the trailing LE, leaving an empty line + if (strpos($line, ':') === false) { + continue; + } + list($heading, $value) = explode(':', $line, 2); + //Lower-case header name + $heading = strtolower($heading); + //Collapse white space within the value + $value = preg_replace('/[ \t]{2,}/', ' ', $value); + //RFC6376 is slightly unclear here - it says to delete space at the *end* of each value + //But then says to delete space before and after the colon. + //Net result is the same as trimming both ends of the value. + //by elimination, the same applies to the field name + $lines[$key] = trim($heading, " \t") . ':' . trim($value, " \t"); + } + + return implode("\r\n", $lines); + } + + /** + * Generate a DKIM canonicalization body. + * Uses the 'simple' algorithm from RFC6376 section 3.4.3. + * Canonicalized bodies should *always* use CRLF, regardless of mailer setting. + * + * @see https://tools.ietf.org/html/rfc6376#section-3.4.3 + * + * @param string $body Message Body + * + * @return string + */ + public function DKIM_BodyC($body) + { + if (empty($body)) { + return "\r\n"; + } + // Normalize line endings to CRLF + $body = static::normalizeBreaks($body, "\r\n"); + + //Reduce multiple trailing line breaks to a single one + return rtrim($body, "\r\n") . "\r\n"; + } + + /** + * Create the DKIM header and body in a new message header. + * + * @param string $headers_line Header lines + * @param string $subject Subject + * @param string $body Body + * + * @return string + */ + public function DKIM_Add($headers_line, $subject, $body) + { + $DKIMsignatureType = 'rsa-sha256'; // Signature & hash algorithms + $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body + $DKIMquery = 'dns/txt'; // Query method + $DKIMtime = time(); // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone) + $subject_header = "Subject: $subject"; + $headers = explode(static::$LE, $headers_line); + $from_header = ''; + $to_header = ''; + $date_header = ''; + $current = ''; + $copiedHeaderFields = ''; + $foundExtraHeaders = []; + $extraHeaderKeys = ''; + $extraHeaderValues = ''; + $extraCopyHeaderFields = ''; + foreach ($headers as $header) { + if (strpos($header, 'From:') === 0) { + $from_header = $header; + $current = 'from_header'; + } elseif (strpos($header, 'To:') === 0) { + $to_header = $header; + $current = 'to_header'; + } elseif (strpos($header, 'Date:') === 0) { + $date_header = $header; + $current = 'date_header'; + } elseif (!empty($this->DKIM_extraHeaders)) { + foreach ($this->DKIM_extraHeaders as $extraHeader) { + if (strpos($header, $extraHeader . ':') === 0) { + $headerValue = $header; + foreach ($this->CustomHeader as $customHeader) { + if ($customHeader[0] === $extraHeader) { + $headerValue = trim($customHeader[0]) . + ': ' . + $this->encodeHeader(trim($customHeader[1])); + break; + } + } + $foundExtraHeaders[$extraHeader] = $headerValue; + $current = ''; + break; + } + } + } else { + if (!empty($$current) and strpos($header, ' =?') === 0) { + $$current .= $header; + } else { + $current = ''; + } + } + } + foreach ($foundExtraHeaders as $key => $value) { + $extraHeaderKeys .= ':' . $key; + $extraHeaderValues .= $value . "\r\n"; + if ($this->DKIM_copyHeaderFields) { + $extraCopyHeaderFields .= "\t|" . str_replace('|', '=7C', $this->DKIM_QP($value)) . ";\r\n"; + } + } + if ($this->DKIM_copyHeaderFields) { + $from = str_replace('|', '=7C', $this->DKIM_QP($from_header)); + $to = str_replace('|', '=7C', $this->DKIM_QP($to_header)); + $date = str_replace('|', '=7C', $this->DKIM_QP($date_header)); + $subject = str_replace('|', '=7C', $this->DKIM_QP($subject_header)); + $copiedHeaderFields = "\tz=$from\r\n" . + "\t|$to\r\n" . + "\t|$date\r\n" . + "\t|$subject;\r\n" . + $extraCopyHeaderFields; + } + $body = $this->DKIM_BodyC($body); + $DKIMlen = strlen($body); // Length of body + $DKIMb64 = base64_encode(pack('H*', hash('sha256', $body))); // Base64 of packed binary SHA-256 hash of body + if ('' == $this->DKIM_identity) { + $ident = ''; + } else { + $ident = ' i=' . $this->DKIM_identity . ';'; + } + $dkimhdrs = 'DKIM-Signature: v=1; a=' . + $DKIMsignatureType . '; q=' . + $DKIMquery . '; l=' . + $DKIMlen . '; s=' . + $this->DKIM_selector . + ";\r\n" . + "\tt=" . $DKIMtime . '; c=' . $DKIMcanonicalization . ";\r\n" . + "\th=From:To:Date:Subject" . $extraHeaderKeys . ";\r\n" . + "\td=" . $this->DKIM_domain . ';' . $ident . "\r\n" . + $copiedHeaderFields . + "\tbh=" . $DKIMb64 . ";\r\n" . + "\tb="; + $toSign = $this->DKIM_HeaderC( + $from_header . "\r\n" . + $to_header . "\r\n" . + $date_header . "\r\n" . + $subject_header . "\r\n" . + $extraHeaderValues . + $dkimhdrs + ); + $signed = $this->DKIM_Sign($toSign); + + return static::normalizeBreaks($dkimhdrs . $signed) . static::$LE; + } + + /** + * Detect if a string contains a line longer than the maximum line length + * allowed by RFC 2822 section 2.1.1. + * + * @param string $str + * + * @return bool + */ + public static function hasLineLongerThanMax($str) + { + return (bool) preg_match('/^(.{' . (self::MAX_LINE_LENGTH + strlen(static::$LE)) . ',})/m', $str); + } + + /** + * Allows for public read access to 'to' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getToAddresses() + { + return $this->to; + } + + /** + * Allows for public read access to 'cc' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getCcAddresses() + { + return $this->cc; + } + + /** + * Allows for public read access to 'bcc' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getBccAddresses() + { + return $this->bcc; + } + + /** + * Allows for public read access to 'ReplyTo' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getReplyToAddresses() + { + return $this->ReplyTo; + } + + /** + * Allows for public read access to 'all_recipients' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getAllRecipientAddresses() + { + return $this->all_recipients; + } + + /** + * Perform a callback. + * + * @param bool $isSent + * @param array $to + * @param array $cc + * @param array $bcc + * @param string $subject + * @param string $body + * @param string $from + * @param array $extra + */ + protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from, $extra) + { + if (!empty($this->action_function) and is_callable($this->action_function)) { + call_user_func($this->action_function, $isSent, $to, $cc, $bcc, $subject, $body, $from, $extra); + } + } + + /** + * Get the OAuth instance. + * + * @return OAuth + */ + public function getOAuth() + { + return $this->oauth; + } + + /** + * Set an OAuth instance. + * + * @param OAuth $oauth + */ + public function setOAuth(OAuth $oauth) + { + $this->oauth = $oauth; + } +} diff --git a/lib/PHPMailer/SMTP.php b/lib/PHPMailer/SMTP.php new file mode 100644 index 000000000..da85442bf --- /dev/null +++ b/lib/PHPMailer/SMTP.php @@ -0,0 +1,1326 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2017 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +/** + * PHPMailer RFC821 SMTP email transport class. + * Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server. + * + * @author Chris Ryan + * @author Marcus Bointon + */ +class SMTP +{ + /** + * The PHPMailer SMTP version number. + * + * @var string + */ + const VERSION = '6.0.7'; + + /** + * SMTP line break constant. + * + * @var string + */ + const LE = "\r\n"; + + /** + * The SMTP port to use if one is not specified. + * + * @var int + */ + const DEFAULT_PORT = 25; + + /** + * The maximum line length allowed by RFC 2822 section 2.1.1. + * + * @var int + */ + const MAX_LINE_LENGTH = 998; + + /** + * Debug level for no output. + */ + const DEBUG_OFF = 0; + + /** + * Debug level to show client -> server messages. + */ + const DEBUG_CLIENT = 1; + + /** + * Debug level to show client -> server and server -> client messages. + */ + const DEBUG_SERVER = 2; + + /** + * Debug level to show connection status, client -> server and server -> client messages. + */ + const DEBUG_CONNECTION = 3; + + /** + * Debug level to show all messages. + */ + const DEBUG_LOWLEVEL = 4; + + /** + * Debug output level. + * Options: + * * self::DEBUG_OFF (`0`) No debug output, default + * * self::DEBUG_CLIENT (`1`) Client commands + * * self::DEBUG_SERVER (`2`) Client commands and server responses + * * self::DEBUG_CONNECTION (`3`) As DEBUG_SERVER plus connection status + * * self::DEBUG_LOWLEVEL (`4`) Low-level data output, all messages. + * + * @var int + */ + public $do_debug = self::DEBUG_OFF; + + /** + * How to handle debug output. + * Options: + * * `echo` Output plain-text as-is, appropriate for CLI + * * `html` Output escaped, line breaks converted to `
    `, appropriate for browser output + * * `error_log` Output to error log as configured in php.ini + * Alternatively, you can provide a callable expecting two params: a message string and the debug level: + * + * ```php + * $smtp->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; + * ``` + * + * Alternatively, you can pass in an instance of a PSR-3 compatible logger, though only `debug` + * level output is used: + * + * ```php + * $mail->Debugoutput = new myPsr3Logger; + * ``` + * + * @var string|callable|\Psr\Log\LoggerInterface + */ + public $Debugoutput = 'echo'; + + /** + * Whether to use VERP. + * + * @see http://en.wikipedia.org/wiki/Variable_envelope_return_path + * @see http://www.postfix.org/VERP_README.html Info on VERP + * + * @var bool + */ + public $do_verp = false; + + /** + * The timeout value for connection, in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. + * This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure. + * + * @see http://tools.ietf.org/html/rfc2821#section-4.5.3.2 + * + * @var int + */ + public $Timeout = 300; + + /** + * How long to wait for commands to complete, in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. + * + * @var int + */ + public $Timelimit = 300; + + /** + * Patterns to extract an SMTP transaction id from reply to a DATA command. + * The first capture group in each regex will be used as the ID. + * MS ESMTP returns the message ID, which may not be correct for internal tracking. + * + * @var string[] + */ + protected $smtp_transaction_id_patterns = [ + 'exim' => '/[\d]{3} OK id=(.*)/', + 'sendmail' => '/[\d]{3} 2.0.0 (.*) Message/', + 'postfix' => '/[\d]{3} 2.0.0 Ok: queued as (.*)/', + 'Microsoft_ESMTP' => '/[0-9]{3} 2.[\d].0 (.*)@(?:.*) Queued mail for delivery/', + 'Amazon_SES' => '/[\d]{3} Ok (.*)/', + 'SendGrid' => '/[\d]{3} Ok: queued as (.*)/', + 'CampaignMonitor' => '/[\d]{3} 2.0.0 OK:([a-zA-Z\d]{48})/', + ]; + + /** + * The last transaction ID issued in response to a DATA command, + * if one was detected. + * + * @var string|bool|null + */ + protected $last_smtp_transaction_id; + + /** + * The socket for the server connection. + * + * @var ?resource + */ + protected $smtp_conn; + + /** + * Error information, if any, for the last SMTP command. + * + * @var array + */ + protected $error = [ + 'error' => '', + 'detail' => '', + 'smtp_code' => '', + 'smtp_code_ex' => '', + ]; + + /** + * The reply the server sent to us for HELO. + * If null, no HELO string has yet been received. + * + * @var string|null + */ + protected $helo_rply = null; + + /** + * The set of SMTP extensions sent in reply to EHLO command. + * Indexes of the array are extension names. + * Value at index 'HELO' or 'EHLO' (according to command that was sent) + * represents the server name. In case of HELO it is the only element of the array. + * Other values can be boolean TRUE or an array containing extension options. + * If null, no HELO/EHLO string has yet been received. + * + * @var array|null + */ + protected $server_caps = null; + + /** + * The most recent reply received from the server. + * + * @var string + */ + protected $last_reply = ''; + + /** + * Output debugging info via a user-selected method. + * + * @param string $str Debug string to output + * @param int $level The debug level of this message; see DEBUG_* constants + * + * @see SMTP::$Debugoutput + * @see SMTP::$do_debug + */ + protected function edebug($str, $level = 0) + { + if ($level > $this->do_debug) { + return; + } + //Is this a PSR-3 logger? + if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) { + $this->Debugoutput->debug($str); + + return; + } + //Avoid clash with built-in function names + if (!in_array($this->Debugoutput, ['error_log', 'html', 'echo']) and is_callable($this->Debugoutput)) { + call_user_func($this->Debugoutput, $str, $level); + + return; + } + switch ($this->Debugoutput) { + case 'error_log': + //Don't output, just log + error_log($str); + break; + case 'html': + //Cleans up output a bit for a better looking, HTML-safe output + echo gmdate('Y-m-d H:i:s'), ' ', htmlentities( + preg_replace('/[\r\n]+/', '', $str), + ENT_QUOTES, + 'UTF-8' + ), "
    \n"; + break; + case 'echo': + default: + //Normalize line breaks + $str = preg_replace('/\r\n|\r/ms', "\n", $str); + echo gmdate('Y-m-d H:i:s'), + "\t", + //Trim trailing space + trim( + //Indent for readability, except for trailing break + str_replace( + "\n", + "\n \t ", + trim($str) + ) + ), + "\n"; + } + } + + /** + * Connect to an SMTP server. + * + * @param string $host SMTP server IP or host name + * @param int $port The port number to connect to + * @param int $timeout How long to wait for the connection to open + * @param array $options An array of options for stream_context_create() + * + * @return bool + */ + public function connect($host, $port = null, $timeout = 30, $options = []) + { + static $streamok; + //This is enabled by default since 5.0.0 but some providers disable it + //Check this once and cache the result + if (null === $streamok) { + $streamok = function_exists('stream_socket_client'); + } + // Clear errors to avoid confusion + $this->setError(''); + // Make sure we are __not__ connected + if ($this->connected()) { + // Already connected, generate error + $this->setError('Already connected to a server'); + + return false; + } + if (empty($port)) { + $port = self::DEFAULT_PORT; + } + // Connect to the SMTP server + $this->edebug( + "Connection: opening to $host:$port, timeout=$timeout, options=" . + (count($options) > 0 ? var_export($options, true) : 'array()'), + self::DEBUG_CONNECTION + ); + $errno = 0; + $errstr = ''; + if ($streamok) { + $socket_context = stream_context_create($options); + set_error_handler([$this, 'errorHandler']); + $this->smtp_conn = stream_socket_client( + $host . ':' . $port, + $errno, + $errstr, + $timeout, + STREAM_CLIENT_CONNECT, + $socket_context + ); + restore_error_handler(); + } else { + //Fall back to fsockopen which should work in more places, but is missing some features + $this->edebug( + 'Connection: stream_socket_client not available, falling back to fsockopen', + self::DEBUG_CONNECTION + ); + set_error_handler([$this, 'errorHandler']); + $this->smtp_conn = fsockopen( + $host, + $port, + $errno, + $errstr, + $timeout + ); + restore_error_handler(); + } + // Verify we connected properly + if (!is_resource($this->smtp_conn)) { + $this->setError( + 'Failed to connect to server', + '', + (string) $errno, + (string) $errstr + ); + $this->edebug( + 'SMTP ERROR: ' . $this->error['error'] + . ": $errstr ($errno)", + self::DEBUG_CLIENT + ); + + return false; + } + $this->edebug('Connection: opened', self::DEBUG_CONNECTION); + // SMTP server can take longer to respond, give longer timeout for first read + // Windows does not have support for this timeout function + if (substr(PHP_OS, 0, 3) != 'WIN') { + $max = ini_get('max_execution_time'); + // Don't bother if unlimited + if (0 != $max and $timeout > $max) { + @set_time_limit($timeout); + } + stream_set_timeout($this->smtp_conn, $timeout, 0); + } + // Get any announcement + $announce = $this->get_lines(); + $this->edebug('SERVER -> CLIENT: ' . $announce, self::DEBUG_SERVER); + + return true; + } + + /** + * Initiate a TLS (encrypted) session. + * + * @return bool + */ + public function startTLS() + { + if (!$this->sendCommand('STARTTLS', 'STARTTLS', 220)) { + return false; + } + + //Allow the best TLS version(s) we can + $crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT; + + //PHP 5.6.7 dropped inclusion of TLS 1.1 and 1.2 in STREAM_CRYPTO_METHOD_TLS_CLIENT + //so add them back in manually if we can + if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) { + $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT; + $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT; + } + + // Begin encrypted connection + set_error_handler([$this, 'errorHandler']); + $crypto_ok = stream_socket_enable_crypto( + $this->smtp_conn, + true, + $crypto_method + ); + restore_error_handler(); + + return (bool) $crypto_ok; + } + + /** + * Perform SMTP authentication. + * Must be run after hello(). + * + * @see hello() + * + * @param string $username The user name + * @param string $password The password + * @param string $authtype The auth type (CRAM-MD5, PLAIN, LOGIN, XOAUTH2) + * @param OAuth $OAuth An optional OAuth instance for XOAUTH2 authentication + * + * @return bool True if successfully authenticated + */ + public function authenticate( + $username, + $password, + $authtype = null, + $OAuth = null + ) { + if (!$this->server_caps) { + $this->setError('Authentication is not allowed before HELO/EHLO'); + + return false; + } + + if (array_key_exists('EHLO', $this->server_caps)) { + // SMTP extensions are available; try to find a proper authentication method + if (!array_key_exists('AUTH', $this->server_caps)) { + $this->setError('Authentication is not allowed at this stage'); + // 'at this stage' means that auth may be allowed after the stage changes + // e.g. after STARTTLS + + return false; + } + + $this->edebug('Auth method requested: ' . ($authtype ? $authtype : 'UNSPECIFIED'), self::DEBUG_LOWLEVEL); + $this->edebug( + 'Auth methods available on the server: ' . implode(',', $this->server_caps['AUTH']), + self::DEBUG_LOWLEVEL + ); + + //If we have requested a specific auth type, check the server supports it before trying others + if (null !== $authtype and !in_array($authtype, $this->server_caps['AUTH'])) { + $this->edebug('Requested auth method not available: ' . $authtype, self::DEBUG_LOWLEVEL); + $authtype = null; + } + + if (empty($authtype)) { + //If no auth mechanism is specified, attempt to use these, in this order + //Try CRAM-MD5 first as it's more secure than the others + foreach (['CRAM-MD5', 'LOGIN', 'PLAIN', 'XOAUTH2'] as $method) { + if (in_array($method, $this->server_caps['AUTH'])) { + $authtype = $method; + break; + } + } + if (empty($authtype)) { + $this->setError('No supported authentication methods found'); + + return false; + } + self::edebug('Auth method selected: ' . $authtype, self::DEBUG_LOWLEVEL); + } + + if (!in_array($authtype, $this->server_caps['AUTH'])) { + $this->setError("The requested authentication method \"$authtype\" is not supported by the server"); + + return false; + } + } elseif (empty($authtype)) { + $authtype = 'LOGIN'; + } + switch ($authtype) { + case 'PLAIN': + // Start authentication + if (!$this->sendCommand('AUTH', 'AUTH PLAIN', 334)) { + return false; + } + // Send encoded username and password + if (!$this->sendCommand( + 'User & Password', + base64_encode("\0" . $username . "\0" . $password), + 235 + ) + ) { + return false; + } + break; + case 'LOGIN': + // Start authentication + if (!$this->sendCommand('AUTH', 'AUTH LOGIN', 334)) { + return false; + } + if (!$this->sendCommand('Username', base64_encode($username), 334)) { + return false; + } + if (!$this->sendCommand('Password', base64_encode($password), 235)) { + return false; + } + break; + case 'CRAM-MD5': + // Start authentication + if (!$this->sendCommand('AUTH CRAM-MD5', 'AUTH CRAM-MD5', 334)) { + return false; + } + // Get the challenge + $challenge = base64_decode(substr($this->last_reply, 4)); + + // Build the response + $response = $username . ' ' . $this->hmac($challenge, $password); + + // send encoded credentials + return $this->sendCommand('Username', base64_encode($response), 235); + case 'XOAUTH2': + //The OAuth instance must be set up prior to requesting auth. + if (null === $OAuth) { + return false; + } + $oauth = $OAuth->getOauth64(); + + // Start authentication + if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) { + return false; + } + break; + default: + $this->setError("Authentication method \"$authtype\" is not supported"); + + return false; + } + + return true; + } + + /** + * Calculate an MD5 HMAC hash. + * Works like hash_hmac('md5', $data, $key) + * in case that function is not available. + * + * @param string $data The data to hash + * @param string $key The key to hash with + * + * @return string + */ + protected function hmac($data, $key) + { + if (function_exists('hash_hmac')) { + return hash_hmac('md5', $data, $key); + } + + // The following borrowed from + // http://php.net/manual/en/function.mhash.php#27225 + + // RFC 2104 HMAC implementation for php. + // Creates an md5 HMAC. + // Eliminates the need to install mhash to compute a HMAC + // by Lance Rushing + + $bytelen = 64; // byte length for md5 + if (strlen($key) > $bytelen) { + $key = pack('H*', md5($key)); + } + $key = str_pad($key, $bytelen, chr(0x00)); + $ipad = str_pad('', $bytelen, chr(0x36)); + $opad = str_pad('', $bytelen, chr(0x5c)); + $k_ipad = $key ^ $ipad; + $k_opad = $key ^ $opad; + + return md5($k_opad . pack('H*', md5($k_ipad . $data))); + } + + /** + * Check connection state. + * + * @return bool True if connected + */ + public function connected() + { + if (is_resource($this->smtp_conn)) { + $sock_status = stream_get_meta_data($this->smtp_conn); + if ($sock_status['eof']) { + // The socket is valid but we are not connected + $this->edebug( + 'SMTP NOTICE: EOF caught while checking if connected', + self::DEBUG_CLIENT + ); + $this->close(); + + return false; + } + + return true; // everything looks good + } + + return false; + } + + /** + * Close the socket and clean up the state of the class. + * Don't use this function without first trying to use QUIT. + * + * @see quit() + */ + public function close() + { + $this->setError(''); + $this->server_caps = null; + $this->helo_rply = null; + if (is_resource($this->smtp_conn)) { + // close the connection and cleanup + fclose($this->smtp_conn); + $this->smtp_conn = null; //Makes for cleaner serialization + $this->edebug('Connection: closed', self::DEBUG_CONNECTION); + } + } + + /** + * Send an SMTP DATA command. + * Issues a data command and sends the msg_data to the server, + * finializing the mail transaction. $msg_data is the message + * that is to be send with the headers. Each header needs to be + * on a single line followed by a with the message headers + * and the message body being separated by an additional . + * Implements RFC 821: DATA . + * + * @param string $msg_data Message data to send + * + * @return bool + */ + public function data($msg_data) + { + //This will use the standard timelimit + if (!$this->sendCommand('DATA', 'DATA', 354)) { + return false; + } + + /* The server is ready to accept data! + * According to rfc821 we should not send more than 1000 characters on a single line (including the LE) + * so we will break the data up into lines by \r and/or \n then if needed we will break each of those into + * smaller lines to fit within the limit. + * We will also look for lines that start with a '.' and prepend an additional '.'. + * NOTE: this does not count towards line-length limit. + */ + + // Normalize line breaks before exploding + $lines = explode("\n", str_replace(["\r\n", "\r"], "\n", $msg_data)); + + /* To distinguish between a complete RFC822 message and a plain message body, we check if the first field + * of the first line (':' separated) does not contain a space then it _should_ be a header and we will + * process all lines before a blank line as headers. + */ + + $field = substr($lines[0], 0, strpos($lines[0], ':')); + $in_headers = false; + if (!empty($field) and strpos($field, ' ') === false) { + $in_headers = true; + } + + foreach ($lines as $line) { + $lines_out = []; + if ($in_headers and $line == '') { + $in_headers = false; + } + //Break this line up into several smaller lines if it's too long + //Micro-optimisation: isset($str[$len]) is faster than (strlen($str) > $len), + while (isset($line[self::MAX_LINE_LENGTH])) { + //Working backwards, try to find a space within the last MAX_LINE_LENGTH chars of the line to break on + //so as to avoid breaking in the middle of a word + $pos = strrpos(substr($line, 0, self::MAX_LINE_LENGTH), ' '); + //Deliberately matches both false and 0 + if (!$pos) { + //No nice break found, add a hard break + $pos = self::MAX_LINE_LENGTH - 1; + $lines_out[] = substr($line, 0, $pos); + $line = substr($line, $pos); + } else { + //Break at the found point + $lines_out[] = substr($line, 0, $pos); + //Move along by the amount we dealt with + $line = substr($line, $pos + 1); + } + //If processing headers add a LWSP-char to the front of new line RFC822 section 3.1.1 + if ($in_headers) { + $line = "\t" . $line; + } + } + $lines_out[] = $line; + + //Send the lines to the server + foreach ($lines_out as $line_out) { + //RFC2821 section 4.5.2 + if (!empty($line_out) and $line_out[0] == '.') { + $line_out = '.' . $line_out; + } + $this->client_send($line_out . static::LE, 'DATA'); + } + } + + //Message data has been sent, complete the command + //Increase timelimit for end of DATA command + $savetimelimit = $this->Timelimit; + $this->Timelimit = $this->Timelimit * 2; + $result = $this->sendCommand('DATA END', '.', 250); + $this->recordLastTransactionID(); + //Restore timelimit + $this->Timelimit = $savetimelimit; + + return $result; + } + + /** + * Send an SMTP HELO or EHLO command. + * Used to identify the sending server to the receiving server. + * This makes sure that client and server are in a known state. + * Implements RFC 821: HELO + * and RFC 2821 EHLO. + * + * @param string $host The host name or IP to connect to + * + * @return bool + */ + public function hello($host = '') + { + //Try extended hello first (RFC 2821) + return $this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host); + } + + /** + * Send an SMTP HELO or EHLO command. + * Low-level implementation used by hello(). + * + * @param string $hello The HELO string + * @param string $host The hostname to say we are + * + * @return bool + * + * @see hello() + */ + protected function sendHello($hello, $host) + { + $noerror = $this->sendCommand($hello, $hello . ' ' . $host, 250); + $this->helo_rply = $this->last_reply; + if ($noerror) { + $this->parseHelloFields($hello); + } else { + $this->server_caps = null; + } + + return $noerror; + } + + /** + * Parse a reply to HELO/EHLO command to discover server extensions. + * In case of HELO, the only parameter that can be discovered is a server name. + * + * @param string $type `HELO` or `EHLO` + */ + protected function parseHelloFields($type) + { + $this->server_caps = []; + $lines = explode("\n", $this->helo_rply); + + foreach ($lines as $n => $s) { + //First 4 chars contain response code followed by - or space + $s = trim(substr($s, 4)); + if (empty($s)) { + continue; + } + $fields = explode(' ', $s); + if (!empty($fields)) { + if (!$n) { + $name = $type; + $fields = $fields[0]; + } else { + $name = array_shift($fields); + switch ($name) { + case 'SIZE': + $fields = ($fields ? $fields[0] : 0); + break; + case 'AUTH': + if (!is_array($fields)) { + $fields = []; + } + break; + default: + $fields = true; + } + } + $this->server_caps[$name] = $fields; + } + } + } + + /** + * Send an SMTP MAIL command. + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more recipient + * commands may be called followed by a data command. + * Implements RFC 821: MAIL FROM: . + * + * @param string $from Source address of this message + * + * @return bool + */ + public function mail($from) + { + $useVerp = ($this->do_verp ? ' XVERP' : ''); + + return $this->sendCommand( + 'MAIL FROM', + 'MAIL FROM:<' . $from . '>' . $useVerp, + 250 + ); + } + + /** + * Send an SMTP QUIT command. + * Closes the socket if there is no error or the $close_on_error argument is true. + * Implements from RFC 821: QUIT . + * + * @param bool $close_on_error Should the connection close if an error occurs? + * + * @return bool + */ + public function quit($close_on_error = true) + { + $noerror = $this->sendCommand('QUIT', 'QUIT', 221); + $err = $this->error; //Save any error + if ($noerror or $close_on_error) { + $this->close(); + $this->error = $err; //Restore any error from the quit command + } + + return $noerror; + } + + /** + * Send an SMTP RCPT command. + * Sets the TO argument to $toaddr. + * Returns true if the recipient was accepted false if it was rejected. + * Implements from RFC 821: RCPT TO: . + * + * @param string $address The address the message is being sent to + * + * @return bool + */ + public function recipient($address) + { + return $this->sendCommand( + 'RCPT TO', + 'RCPT TO:<' . $address . '>', + [250, 251] + ); + } + + /** + * Send an SMTP RSET command. + * Abort any transaction that is currently in progress. + * Implements RFC 821: RSET . + * + * @return bool True on success + */ + public function reset() + { + return $this->sendCommand('RSET', 'RSET', 250); + } + + /** + * Send a command to an SMTP server and check its return code. + * + * @param string $command The command name - not sent to the server + * @param string $commandstring The actual command to send + * @param int|array $expect One or more expected integer success codes + * + * @return bool True on success + */ + protected function sendCommand($command, $commandstring, $expect) + { + if (!$this->connected()) { + $this->setError("Called $command without being connected"); + + return false; + } + //Reject line breaks in all commands + if (strpos($commandstring, "\n") !== false or strpos($commandstring, "\r") !== false) { + $this->setError("Command '$command' contained line breaks"); + + return false; + } + $this->client_send($commandstring . static::LE, $command); + + $this->last_reply = $this->get_lines(); + // Fetch SMTP code and possible error code explanation + $matches = []; + if (preg_match('/^([0-9]{3})[ -](?:([0-9]\\.[0-9]\\.[0-9]) )?/', $this->last_reply, $matches)) { + $code = $matches[1]; + $code_ex = (count($matches) > 2 ? $matches[2] : null); + // Cut off error code from each response line + $detail = preg_replace( + "/{$code}[ -]" . + ($code_ex ? str_replace('.', '\\.', $code_ex) . ' ' : '') . '/m', + '', + $this->last_reply + ); + } else { + // Fall back to simple parsing if regex fails + $code = substr($this->last_reply, 0, 3); + $code_ex = null; + $detail = substr($this->last_reply, 4); + } + + $this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER); + + if (!in_array($code, (array) $expect)) { + $this->setError( + "$command command failed", + $detail, + $code, + $code_ex + ); + $this->edebug( + 'SMTP ERROR: ' . $this->error['error'] . ': ' . $this->last_reply, + self::DEBUG_CLIENT + ); + + return false; + } + + $this->setError(''); + + return true; + } + + /** + * Send an SMTP SAML command. + * Starts a mail transaction from the email address specified in $from. + * Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more recipient + * commands may be called followed by a data command. This command + * will send the message to the users terminal if they are logged + * in and send them an email. + * Implements RFC 821: SAML FROM: . + * + * @param string $from The address the message is from + * + * @return bool + */ + public function sendAndMail($from) + { + return $this->sendCommand('SAML', "SAML FROM:$from", 250); + } + + /** + * Send an SMTP VRFY command. + * + * @param string $name The name to verify + * + * @return bool + */ + public function verify($name) + { + return $this->sendCommand('VRFY', "VRFY $name", [250, 251]); + } + + /** + * Send an SMTP NOOP command. + * Used to keep keep-alives alive, doesn't actually do anything. + * + * @return bool + */ + public function noop() + { + return $this->sendCommand('NOOP', 'NOOP', 250); + } + + /** + * Send an SMTP TURN command. + * This is an optional command for SMTP that this class does not support. + * This method is here to make the RFC821 Definition complete for this class + * and _may_ be implemented in future. + * Implements from RFC 821: TURN . + * + * @return bool + */ + public function turn() + { + $this->setError('The SMTP TURN command is not implemented'); + $this->edebug('SMTP NOTICE: ' . $this->error['error'], self::DEBUG_CLIENT); + + return false; + } + + /** + * Send raw data to the server. + * + * @param string $data The data to send + * @param string $command Optionally, the command this is part of, used only for controlling debug output + * + * @return int|bool The number of bytes sent to the server or false on error + */ + public function client_send($data, $command = '') + { + //If SMTP transcripts are left enabled, or debug output is posted online + //it can leak credentials, so hide credentials in all but lowest level + if (self::DEBUG_LOWLEVEL > $this->do_debug and + in_array($command, ['User & Password', 'Username', 'Password'], true)) { + $this->edebug('CLIENT -> SERVER: