Dotclear

Changeset 3770:75566f4ffead for inc


Ignore:
Timestamp:
07/10/18 13:41:19 (7 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Add a dark mode (user preferences), some refinements to come

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/lib.dc.page.php

    r3769 r3770  
    165165        '  <meta name="GOOGLEBOT" content="NOSNIPPET" />' . "\n" . 
    166166        '  <meta name="viewport" content="width=device-width, initial-scale=1.0" />' . "\n" . 
    167         '  <title>' . $title . ' - ' . html::escapeHTML($core->blog->name) . ' - ' . html::escapeHTML(DC_VENDOR_NAME) . ' - ' . DC_VERSION . '</title>' . "\n" . 
    168  
    169         self::cssLoad('style/default.css'); 
     167        '  <title>' . $title . ' - ' . html::escapeHTML($core->blog->name) . ' - ' . html::escapeHTML(DC_VENDOR_NAME) . ' - ' . DC_VERSION . '</title>' . "\n"; 
     168 
     169      if ($core->auth->user_prefs->interface->darkmode) { 
     170            echo self::cssLoad('style/default-dark.css'); 
     171      } else { 
     172            echo self::cssLoad('style/default.css'); 
     173      } 
    170174        if (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl') { 
    171175            echo self::cssLoad('style/default-rtl.css'); 
     
    433437 
    434438        '  <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />' . "\n" . 
    435         '  <meta name="GOOGLEBOT" content="NOSNIPPET" />' . "\n" . 
    436  
    437         self::cssLoad('style/default.css'); 
     439        '  <meta name="GOOGLEBOT" content="NOSNIPPET" />' . "\n"; 
     440 
     441        if ($core->auth->user_prefs->interface->darkmode) { 
     442            echo self::cssLoad('style/default-dark.css'); 
     443        } else { 
     444            echo self::cssLoad('style/default.css'); 
     445        } 
    438446        if (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl') { 
    439447            echo self::cssLoad('style/default-rtl.css'); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map