WordPress.org

Make WordPress Themes

Changes from davis/1.07 at r85497 to davis/1.08 at r85497


Ignore:
Location:
davis
Files:
6 added
3 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • davis/1.08/functions.php

    r85497 r85497  
    6262 
    6363 
     64/* BODY CLASSES 
     65------------------------------------------------ */ 
     66 
     67function davis_body_classes( $classes ) { 
     68 
     69    // Check whether we want it darker 
     70    if ( get_theme_mod( 'davis_dark_mode' ) ) { 
     71        $classes[] = 'dark-mode'; 
     72    } 
     73     
     74    return $classes; 
     75} 
     76add_action( 'body_class', 'davis_body_classes' ); 
     77 
     78 
     79/* CUSTOMIZER SETTINGS 
     80------------------------------------------------ */ 
     81 
     82class Davis_Customize { 
     83 
     84    public static function Davis_register ( $wp_customize ) { 
     85 
     86 
     87        // Dark Mode 
     88        $wp_customize->add_setting( 'davis_dark_mode', array( 
     89            'capability'        => 'edit_theme_options', 
     90            'sanitize_callback' => 'davis_sanitize_checkbox', 
     91            'transport'         => 'postMessage' 
     92        ) ); 
     93 
     94        $wp_customize->add_control( 'davis_dark_mode', array( 
     95            'type'          => 'checkbox', 
     96            'section'       => 'colors', // Default WP section added by background_color 
     97            'label'         => __( 'Dark Mode', 'davis' ), 
     98            'description'   => __( 'Displays the site with white text and black background. If Background Color is set, only the text color will change.', 'davis' ), 
     99        ) ); 
     100         
     101 
     102        // Make built-in controls use live JS preview 
     103        $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; 
     104        $wp_customize->get_setting( 'background_color' )->transport = 'postMessage'; 
     105         
     106         
     107        // SANITATION 
     108 
     109        // Sanitize boolean for checkbox 
     110        function davis_sanitize_checkbox( $checked ) { 
     111            return ( ( isset( $checked ) && true == $checked ) ? true : false ); 
     112        } 
     113         
     114    } 
     115 
     116    // Initiate the live preview JS 
     117    public static function davis_live_preview() { 
     118        wp_enqueue_script( 'davis-themecustomizer', get_template_directory_uri() . '/assets/js/theme-customizer.js', array(  'jquery', 'customize-preview' ), '', true ); 
     119    } 
     120 
     121} 
     122 
     123// Setup the Theme Customizer settings and controls 
     124add_action( 'customize_register', array( 'davis_customize', 'davis_register' ) ); 
     125 
     126// Enqueue live preview javascript in Theme Customizer admin screen 
     127add_action( 'customize_preview_init', array( 'davis_customize' , 'davis_live_preview' ) ); 
     128 
    64129?> 
  • davis/1.08/index.php

    r85497 r85497  
    2828        </header> <!-- header --> 
    2929         
    30         <div class="wrapper"> 
     30        <div class="wrapper" style="filter: url(#blur);"> 
    3131 
    32             <?php if ( have_posts() ) :  
     32            <?php if ( have_posts() )  :  
    3333 
    3434                while ( have_posts() ) : the_post(); ?> 
  • davis/1.08/readme.txt

    r85497 r85497  
    1 Copyright 
    2 -------------- 
    3  
    4 Davis WordPress Theme, Copyright 2016 Anders Norén 
    5 Davis is distributed under the terms of the GNU GPL v2 
     1=== Davis === 
     2Contributors: Anlino 
     3Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=anders%40andersnoren%2ese&lc=US&item_name=Free%20WordPress%20Themes%20from%20Anders%20Noren&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted 
     4Requires at least: 4.4 
     5Tested up to: 4.8 
     6Stable tag: trunk 
     7License: GPLv2 or later 
     8License URI: https://www.gnu.org/licenses/gpl-2.0.html 
    69 
    710 
    8 Install Steps 
    9 -------------- 
     11== Installation == 
    1012 
    11131. Upload the theme 
    12142. Activate the theme 
    1315 
     16All theme specific options are handled through the WordPress Customizer. 
    1417 
    15 Licenses 
    16 -------------- 
    1718 
    18 PT Serif font license : SIL Open Font License, 1.1 http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL 
     19== Frequently Asked Questions == 
     20 
     21= How do I activate dark mode? = 
     22Dark Mode displays the site with white text and black background. You can activate it in Appearance > Customize, in the Colors tab. 
     23 
     24 
     25== Licenses == 
     26 
     27PT Serif 
     28License: SIL Open Font License, 1.1  
     29Source: https://fonts.google.com/specimen/PT+Serif 
     30 
     31 
     32== Changelog == 
     33 
     34Version 1.08 (2017-07-15) 
     35------------------------- 
     36- Updated readme.txt to match the format, and added changelog info from changelog.txt 
     37- Removed changelog.txt 
     38- Added the Dark Mode to the customizer 
     39 
     40Version 1.07 (2016-11-30) 
     41------------------------- 
     42- Set <em> to display text as italic 
     43 
     44Version 1.06 (2016-10-02) 
     45------------------------- 
     46- Escaped the home_url() outputs in the header and footer 
     47 
     48Version 1.05 (2016-10-02) 
     49------------------------- 
     50- Fixed HTML5 related errors within the <head> 
     51- Replaced .header and .footer with the <header> and <footer> HTML5 elements 
     52- Moved the header out of the wrapper to allow for menus with more links without line breaks 
     53- Fixed an issue with sub menus deeper than one level 
     54 
     55Version 1.04 (2016-07-26) 
     56------------------------- 
     57- Changed the blog title to a h2 element, and the single post titles to h1 elements (thanks, Christina!) 
     58 
     59Version 1.03 (2016-06-18) 
     60------------------------- 
     61- Updated to comply with the new theme directory tags 
     62 
     63Version 1.02 (2016-06-18) 
     64------------------------- 
     65- Improved PHP structure, cleaned up CSS 
     66 
     67Version 1.01 (2016-05-11) 
     68------------------------- 
     69- Improved PHP structure, cleaned up CSS 
     70- Updated the font-stack to not fallback to a sans-serif font 
     71- Removed readme.txt contents from changelog.txt and added an actual changelog 
     72 
     73Version 1.0 
     74------------------------- 
  • davis/1.08/style.css

    r85497 r85497  
    33    Theme Name: Davis 
    44    Text Domain: davis 
    5     Version: 1.07 
    6     Description: Davis is a teeny-tiny WordPress theme that can be used a starter theme or a *really* lightweight blog theme. It consists of just three PHP files and weighs in at 27 KB, excluding screenshot.png. It features the aside post format, featured images and a responsive design. 
     5    Version: 1.08 
     6    Description: Davis is a teeny-tiny WordPress theme that can be used a starter theme or a *really* lightweight blog theme. It consists of just three PHP files and weighs in at 60 KB, excluding screenshot.png. It features the aside post format, a Dark Mode style option, featured images and a responsive design. 
    77    Tags: blog, one-column, custom-menu, featured-images, post-formats, threaded-comments, translation-ready 
    88    Author: Anders Norén 
     
    2525    7.  Pagination 
    2626    8.  Footer 
    27     9. Media Queries 
     27    9.  Media Queries 
    2828 
    2929----------------------------------------------------------------------------------- */ 
     
    114114} 
    115115 
     116body.dark-mode { 
     117    background: #111; 
     118    color: #fff; 
     119} 
     120 
    116121body * { 
    117122        -webkit-box-sizing: border-box;  
     
    121126} 
    122127 
    123 body a { 
     128a { 
     129    text-decoration: none; 
     130} 
     131 
     132a, 
     133a:hover { 
    124134    color: #111; 
    125     text-decoration: none; 
     135} 
     136 
     137.dark-mode a, 
     138.dark-mode a:hover { 
     139    color: #fff; 
    126140} 
    127141 
    128142body a:hover {  
    129     color: #111; 
    130143    text-decoration: underline;  
    131144} 
     
    212225            top: 8px; 
    213226    } 
     227     
     228    .dark-mode .menu li ul:before { 
     229        border-bottom-color: #fff; 
     230    } 
    214231 
    215232    .menu ul a { 
     
    220237        text-align: center; 
    221238    } 
     239     
     240    .dark-mode .menu ul a { 
     241        background: #fff; 
     242        color: #111; 
     243    } 
    222244     
    223245    .menu ul li:first-child > a { border-radius: 3px 3px 0 0; } 
     
    226248 
    227249    .menu ul a:hover { color: #fff; } 
     250    .dark-mode .menu ul a:hover { color: #111; } 
    228251 
    229252    .menu > li:hover > ul { 
     
    245268        top: 18px; 
    246269    } 
     270     
     271    .dark-mode .menu ul li ul:before { 
     272        border-color: transparent; 
     273        border-right-color: #fff; 
     274    } 
    247275 
    248276    .menu ul li:hover > ul { 
     
    276304.pagination:before, 
    277305footer:before { 
    278     background: url( images/sep.png ) no-repeat center; 
     306    background: url( assets/images/sep.png ) no-repeat center; 
    279307    background-size: auto 100%; 
    280308    content: ""; 
     
    284312} 
    285313 
     314.dark-mode .post:before, 
     315.dark-mode .comments:before, 
     316.dark-mode .comment-respond:before, 
     317.dark-mode .comments .comment-respond:after, 
     318.dark-mode .pagination:before, 
     319.dark-mode footer:before { 
     320    background-image: url( assets/images/dark-sep.png ); 
     321} 
     322 
    286323.title { 
    287324    line-height: 1.4; 
     
    328365    color: #666; 
    329366    text-decoration: none;  
     367} 
     368 
     369.dark-mode .content a { border-bottom-color: #fff; } 
     370 
     371.dark-mode .content a:hover {  
     372    border-color: #999; 
     373    color: #999; 
    330374} 
    331375 
     
    382426} 
    383427 
     428dd, 
     429dt { 
     430    line-height: 1.5; 
     431} 
     432 
    384433dd + dt { margin-top: 15px; } 
    385434 
     
    391440    padding: 0 0 0 30px; 
    392441} 
     442 
     443.dark-mode blockquote { border-left-color: #444; } 
    393444 
    394445blockquote p { font-style: italic; } 
     
    437488    border: 1px solid #ddd; 
    438489    padding: 25px; 
     490} 
     491 
     492.dark-mode fieldset { 
     493    border-color: #444; 
    439494} 
    440495 
     
    466521} 
    467522 
     523.dark-mode textarea, 
     524.dark-mode input[type="email"], 
     525.dark-mode input[type="password"], 
     526.dark-mode input[type="tel"], 
     527.dark-mode input[type="text"], 
     528.dark-mode input[type="url"] { 
     529    background: #111; 
     530    border-color: #444; 
     531    color: #fff; 
     532} 
     533 
    468534textarea { 
    469535    line-height: 1.5; 
     
    484550} 
    485551 
     552.dark-mode input[type="button"], 
     553.dark-mode input.button, 
     554.dark-mode input[type="submit"] { 
     555    background: #fff; 
     556    color: #111; 
     557} 
     558 
    486559input[type="button"]:hover, 
    487560input.button:hover, 
    488561input[type="submit"]:hover { 
    489562    background: #333; 
     563    cursor: pointer; 
     564} 
     565 
     566.dark-mode input[type="button"]:hover, 
     567.dark-mode input.button:hover, 
     568.dark-mode input[type="submit"]:hover { 
     569    background: #ddd; 
    490570    cursor: pointer; 
    491571} 
     
    532612 
    533613tbody > tr:nth-child(even) { background-color: #f6f6f6; } 
     614.dark-mode tbody > tr:nth-child(even) { background-color: #222; } 
     615 
     616.dark-mode caption, 
     617.dark-mode th { 
     618    border-bottom-color: #444; 
     619} 
    534620 
    535621 
Note: See TracChangeset for help on using the changeset viewer.