Make WordPress Themes

Changeset 340617


Ignore:
Timestamp:
07/24/2026 08:20:50 PM (3 months ago)
Author:
themedropbox
Message:

New version of Silver Liquid Dev - 1.2.2

Location:
silver-liquid-dev/1.2.2
Files:
29 added
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • silver-liquid-dev/1.2.2/front-page.php

    r334461 r340617  
    77
    88get_header();
     9
     10// Optional custom header banner, shown on the front page only when one is set.
     11if ( has_header_image() ) {
     12        echo '<div class="header-media wrap">';
     13        the_header_image_tag( array( 'class' => 'header-image' ) );
     14        echo '</div>';
     15}
     16
     17if ( ! is_home() ) :
     18        // A static page is set as the front page — render its content (mirrors page.php).
     19        ?>
     20        <div class="wrap wrap--narrow">
     21                <?php
     22                while ( have_posts() ) :
     23                        the_post();
     24                        ?>
     25                        <article <?php post_class( 'article' ); ?>>
     26                                <header class="article-header">
     27                                        <h1><?php the_title(); ?></h1>
     28                                </header>
     29
     30                                <?php if ( has_post_thumbnail() ) : ?>
     31                                        <figure class="featured-media"><?php the_post_thumbnail( 'large' ); ?></figure>
     32                                <?php endif; ?>
     33
     34                                <div class="prose">
     35                                        <?php
     36                                        the_content();
     37                                        wp_link_pages(
     38                                                array(
     39                                                        'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'silver-liquid-dev' ),
     40                                                        'after'  => '</div>',
     41                                                )
     42                                        );
     43                                        ?>
     44                                </div>
     45                        </article>
     46
     47                        <?php
     48                        if ( comments_open() || get_comments_number() ) {
     49                                comments_template();
     50                        }
     51                endwhile;
     52                ?>
     53        </div>
     54        <?php
     55        get_footer();
     56        return;
     57endif;
    958?>
    1059
  • silver-liquid-dev/1.2.2/functions.php

    r338495 r340617  
    1111
    1212if ( ! defined( 'SILVER_LIQUID_DEV_VERSION' ) ) {
    13         define( 'SILVER_LIQUID_DEV_VERSION', '1.2.0' );
     13        define( 'SILVER_LIQUID_DEV_VERSION', '1.2.2' );
    1414}
    1515
    … …  
    4747        add_theme_support( 'align-wide' );
    4848        add_theme_support( 'editor-styles' );
     49                add_editor_style( 'assets/css/editor-style.css' );
    4950        add_theme_support( 'wp-block-styles' );
    5051        add_theme_support( 'custom-background' );
     52
     53        add_theme_support(
     54                'custom-header',
     55                array(
     56                        'default-image' => '',
     57                        'width'         => 1600,
     58                        'height'        => 400,
     59                        'flex-width'    => true,
     60                        'flex-height'   => true,
     61                        'header-text'   => false,
     62                        'video'         => false,
     63                )
     64        );
    5165
    5266        // WooCommerce: declare compatibility so shops render inside the theme
    … …  
    8094 */
    8195function silver_liquid_dev_assets() {
    82         // Google Fonts: Space Grotesk (display), IBM Plex Sans (body), JetBrains Mono (code).
     96        // Self-hosted webfonts: Space Grotesk (display), IBM Plex Sans (body), JetBrains Mono (code).
    8397        wp_enqueue_style(
    8498                'silver-liquid-dev-fonts',
    85                 'https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&family=JetBrains+Mono:wght@400;500;700&family=Space+Grotesk:wght@400;500;600;700&display=swap',
     99                get_template_directory_uri() . '/assets/fonts/fonts.css',
    86100                array(),
    87                 null // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion -- Google Fonts is externally versioned.
     101                SILVER_LIQUID_DEV_VERSION
    88102        );
    89103
    … …  
    162176/**
    163177 * Social profiles used in the hero and footer.
    164  * Edit the URLs here to point at your own accounts.
     178 *
     179 * Set the GitHub and NuGet URLs under Appearance > Customize > Theme Options;
     180 * an icon is rendered only when its URL is filled in. RSS points at the site's
     181 * own feed and is always available.
    165182 *
    166183 * @return array
    167184 */
    168185function silver_liquid_dev_social_links() {
    169         return apply_filters(
    170                 'silver_liquid_dev_social_links',
    171                 array(
    172                         'github' => array(
    173                                 'label' => 'GitHub',
    174                                 'url'   => 'https://github.com/pierrejochem',
    175                         ),
    176                         'nuget'  => array(
    177                                 'label' => 'NuGet',
    178                                 'url'   => 'https://www.nuget.org/profiles/pierrejochem',
    179                         ),
    180                         'rss'    => array(
    181                                 'label' => 'RSS',
    182                                 'url'   => get_feed_link(),
    183                         ),
    184                 )
    185         );
     186        $links = array();
     187
     188        $github = get_theme_mod( 'silver_liquid_dev_github_url', '' );
     189        if ( $github ) {
     190                $links['github'] = array(
     191                        'label' => 'GitHub',
     192                        'url'   => $github,
     193                );
     194        }
     195
     196        $nuget = get_theme_mod( 'silver_liquid_dev_nuget_url', '' );
     197        if ( $nuget ) {
     198                $links['nuget'] = array(
     199                        'label' => 'NuGet',
     200                        'url'   => $nuget,
     201                );
     202        }
     203
     204        // The site's own feed — not a third-party profile, so always shown.
     205        $links['rss'] = array(
     206                'label' => 'RSS',
     207                'url'   => get_feed_link(),
     208        );
     209
     210        return apply_filters( 'silver_liquid_dev_social_links', $links );
    186211}
    187212
    … …  
    258283 */
    259284require get_template_directory() . '/inc/customizer.php';
     285require get_template_directory() . '/inc/block-styles.php';
     286require get_template_directory() . '/inc/block-patterns.php';
  • silver-liquid-dev/1.2.2/header.php

    r338495 r340617  
    1313        <meta name="viewport" content="width=device-width, initial-scale=1">
    1414        <link rel="profile" href="https://gmpg.org/xfn/11">
    15         <link rel="preconnect" href="https://fonts.googleapis.com">
    16         <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    1715        <?php wp_head(); ?>
    1816</head>
  • silver-liquid-dev/1.2.2/inc/customizer.php

    r338495 r340617  
    4747                                'settings'    => 'silver_liquid_dev_accent_color',
    4848                        )
     49                )
     50        );
     51
     52        // Social profile links (empty by default — the theme ships no author links).
     53        $wp_customize->add_setting(
     54                'silver_liquid_dev_github_url',
     55                array(
     56                        'default'           => '',
     57                        'sanitize_callback' => 'esc_url_raw',
     58                        'transport'         => 'refresh',
     59                )
     60        );
     61        $wp_customize->add_control(
     62                'silver_liquid_dev_github_url',
     63                array(
     64                        'type'        => 'url',
     65                        'label'       => __( 'GitHub URL', 'silver-liquid-dev' ),
     66                        'description' => __( 'Your GitHub profile. Leave empty to hide the icon.', 'silver-liquid-dev' ),
     67                        'section'     => 'silver_liquid_dev_options',
     68                        'settings'    => 'silver_liquid_dev_github_url',
     69                )
     70        );
     71
     72        $wp_customize->add_setting(
     73                'silver_liquid_dev_nuget_url',
     74                array(
     75                        'default'           => '',
     76                        'sanitize_callback' => 'esc_url_raw',
     77                        'transport'         => 'refresh',
     78                )
     79        );
     80        $wp_customize->add_control(
     81                'silver_liquid_dev_nuget_url',
     82                array(
     83                        'type'        => 'url',
     84                        'label'       => __( 'NuGet URL', 'silver-liquid-dev' ),
     85                        'description' => __( 'Your NuGet profile. Leave empty to hide the icon.', 'silver-liquid-dev' ),
     86                        'section'     => 'silver_liquid_dev_options',
     87                        'settings'    => 'silver_liquid_dev_nuget_url',
    4988                )
    5089        );
  • silver-liquid-dev/1.2.2/readme.txt

    r338495 r340617  
    33Contributors: pierrejochem
    44Requires at least: 6.5
    5 Tested up to: 6.7
     5Tested up to: 6.9
    66Requires PHP: 8.0
    7 Stable tag: 1.2.0
     7Stable tag: 1.2.2
    88License: GNU General Public License v2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    10 Tags: blog, portfolio, two-columns, custom-menu, custom-logo, featured-images, translation-ready, full-width-template, block-styles, dark-mode
     10Tags: blog, portfolio, two-columns, custom-menu, custom-logo, custom-header, custom-background, featured-images, translation-ready, full-width-template, block-styles, editor-style
    1111
    1212A modern developer blog and portfolio theme with a brushed-silver, liquid-glass aesthetic.
    … …  
    4444= How do I change the social links in the hero and footer? =
    4545
    46 Edit the silver_liquid_dev_social_links() function near the top of functions.php, or use the
    47 silver_liquid_dev_social_links filter to add or change links.
     46Go to Appearance > Customize > Theme Options and fill in the GitHub and/or NuGet URLs. Each icon
     47is shown only when its URL is set; the RSS link points at your site's own feed automatically.
     48Developers can also use the silver_liquid_dev_social_links filter to add or change links.
    4849
    4950= How do I change the accent color or fonts? =
    … …  
    5859
    5960== Changelog ==
     61
     62= 1.2.2 =
     63* Added a Theme URI header.
     64* Added editor styles (add_editor_style) so the block editor matches the front end.
     65* Added custom block styles: Group "Glass panel", Quote "Terminal", Button "Ghost".
     66* Added starter block patterns (Call to action, Terminal note) in a "Silver Liquid Dev" category.
     67* Added custom header image support, shown as a front-page banner when set.
     68* Added the standard WordPress alignment, caption, gallery, sticky, and by-post-author CSS classes.
     69* Added the custom-header, custom-background, and editor-style feature tags.
     70
     71= 1.2.1 =
     72* Removed the non-standard "dark-mode" tag from the theme headers.
     73* Offset the focused "Skip to content" link below the WordPress admin bar.
     74* Moved social profile links (GitHub, NuGet) to the Customizer; no author links ship by default.
     75* Fixed the header keyboard focus order so the dark-mode toggle is reachable in mobile view.
     76* Front page now respects the Settings > Reading option (static page vs. latest posts).
     77* Bundled the Space Grotesk, IBM Plex Sans, and JetBrains Mono fonts locally instead of loading them from Google Fonts.
     78* Updated "Tested up to" to WordPress 6.9.
    6079
    6180= 1.2.0 =
    … …  
    8099== Upgrade Notice ==
    81100
     101= 1.2.2 =
     102Editor styles, block styles/patterns, and custom header support. No breaking changes.
     103
     104= 1.2.1 =
     105Accessibility and theme-review fixes; fonts are now bundled locally. No breaking changes.
     106
    82107= 1.2.0 =
    83108Now requires WordPress 6.5+ and PHP 8.0+. Adds theme.json, Customizer options, submenus, and WooCommerce support.
    … …  
    88113== Resources ==
    89114
    90 Fonts are served from Google Fonts (https://fonts.google.com/) and are not bundled in the theme.
     115Fonts are bundled locally in assets/fonts/ (woff2, latin and latin-ext subsets) and self-hosted;
     116the theme makes no external font requests. Each is licensed under the SIL Open Font License 1.1,
     117a copy of which is included at assets/fonts/LICENSE.txt.
    91118
    92119* Space Grotesk — Copyright Florian Karsten, SIL Open Font License 1.1, https://fonts.google.com/specimen/Space+Grotesk
  • silver-liquid-dev/1.2.2/style.css

    r338495 r340617  
    33Author: Pierre Jochem
    44Author URI: https://pierrejochem.wordpress.com/
     5Theme URI: https://github.com/pierrejochem/SilverLiquidDev
    56Description: A modern developer blog and portfolio theme with a brushed-silver, liquid-glass aesthetic — frosted translucent surfaces, iridescent accents, editor-style code blocks with copy buttons, light/dark mode, and typography tuned for technical writing.
    6 Version: 1.2.0
     7Version: 1.2.2
    78Requires at least: 6.5
    8 Tested up to: 6.7
     9Tested up to: 6.9
    910Requires PHP: 8.0
    1011License: GNU General Public License v2 or later
    1112License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1213Text Domain: silver-liquid-dev
    13 Tags: blog, portfolio, two-columns, custom-menu, custom-logo, featured-images, translation-ready, full-width-template, block-styles, dark-mode
     14Tags: blog, portfolio, two-columns, custom-menu, custom-logo, custom-header, custom-background, featured-images, translation-ready, full-width-template, block-styles, editor-style
    1415*/
    1516
    … …  
    196197}
    197198.skip-link:focus { left: 0; color: var(--bg); }
     199
     200/* Offset the focused skip link below the WordPress admin bar. */
     201.admin-bar .skip-link:focus { top: 32px; }
     202@media screen and (max-width: 782px) {
     203  .admin-bar .skip-link:focus { top: 46px; }
     204}
    198205
    199206/* ===========================================================
    … …  
    341348    transform: translateY(-12px);
    342349    opacity: 0;
     350    visibility: hidden;
    343351    pointer-events: none;
    344     transition: opacity 0.18s ease, transform 0.18s ease;
     352    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    345353    box-shadow: var(--shadow);
    346354  }
    347   .primary-nav.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
     355  .primary-nav.open { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
    348356  .primary-nav ul { flex-direction: column; gap: 0.1rem; }
    349357  .nav a, .nav .menu-item a { padding: 0.7rem 0.8rem; font-size: 1rem; }
    … …  
    354362    position: static;
    355363    opacity: 1;
    356     visibility: visible;
     364    /* Follow the parent nav: hidden (and out of tab order) while the menu is
     365       closed, visible once it opens. A literal "visible" here would override
     366       the collapsed nav and leak submenu links back into keyboard focus. */
     367    visibility: inherit;
    357368    transform: none;
    358369    min-width: 0;
    … …  
    646657.post-nav .next { text-align: right; }
    647658@media (max-width: 560px) { .post-nav { grid-template-columns: 1fr; } .post-nav .next { text-align: left; } }
     659
     660/* ===========================================================
     661   WordPress core: alignment, captions, galleries, post markers
     662   =========================================================== */
     663.alignleft { float: left; margin: 0.3rem 1.5rem 1rem 0; }
     664.alignright { float: right; margin: 0.3rem 0 1rem 1.5rem; }
     665.aligncenter { display: block; margin-left: auto; margin-right: auto; }
     666.prose .alignwide { width: min(100%, var(--maxw)); max-width: none; margin-inline: auto; }
     667.prose .alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
     668
     669/* Captions (classic [caption] shortcode + core image block) */
     670.wp-caption { max-width: 100%; margin-bottom: 1.4rem; }
     671.wp-caption img { display: block; border-radius: var(--radius-sm); border: 1px solid var(--border); }
     672.wp-caption-text,
     673.gallery-caption,
     674figure.wp-block-image figcaption { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); text-align: center; margin-top: 0.5rem; }
     675
     676/* Galleries (classic [gallery] shortcode) */
     677.gallery { display: grid; grid-template-columns: repeat(var(--gallery-cols, 3), 1fr); gap: 0.8rem; margin: 1.4rem 0; }
     678.gallery-columns-1 { --gallery-cols: 1; }
     679.gallery-columns-2 { --gallery-cols: 2; }
     680.gallery-columns-4 { --gallery-cols: 4; }
     681.gallery-columns-5 { --gallery-cols: 5; }
     682.gallery-columns-6 { --gallery-cols: 6; }
     683.gallery-item { margin: 0; }
     684.gallery-item img { border-radius: var(--radius-sm); border: 1px solid var(--border); }
     685
     686/* Sticky posts and comments by the post author */
     687.sticky { position: relative; }
     688.card.sticky { border-color: var(--accent); box-shadow: var(--shadow), 0 0 0 1px var(--accent-soft); }
     689.card.sticky .card-title::before { content: "\2605 "; color: var(--accent); }
     690.bypostauthor { border-left: 3px solid var(--accent); padding-left: 0.9rem; }
     691
     692/* Custom header image (front page banner) */
     693.header-media { margin-top: 1.6rem; }
     694.header-image { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); }
     695
     696/* ===========================================================
     697   Block styles (register_block_style)
     698   =========================================================== */
     699.wp-block-group.is-style-glass {
     700  background: var(--surface);
     701  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
     702  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
     703  border: 1px solid var(--border);
     704  border-radius: var(--radius);
     705  box-shadow: var(--shadow), var(--rim);
     706  padding: clamp(1.4rem, 4vw, 2.4rem);
     707}
     708.wp-block-quote.is-style-terminal {
     709  border-left: 3px solid var(--accent);
     710  background: var(--code-bg);
     711  color: var(--code-ink);
     712  font-family: var(--font-mono);
     713  font-size: 0.92rem;
     714  border-radius: var(--radius-sm);
     715  padding: 1rem 1.2rem;
     716}
     717.wp-block-quote.is-style-terminal cite { color: var(--muted); font-style: normal; }
     718.wp-block-button.is-style-ghost .wp-block-button__link {
     719  background: transparent;
     720  color: var(--accent);
     721  border: 1px solid var(--accent);
     722}
     723.wp-block-button.is-style-ghost .wp-block-button__link:hover { background: var(--accent-soft); }
    648724
    649725/* ===========================================================
Note: See TracChangeset for help on using the changeset viewer.