Plugin Directory

Changeset 3466076


Ignore:
Timestamp:
02/20/2026 08:20:36 PM (6 weeks ago)
Author:
FreelanceDirectZA
Message:

Release 1.5.3: admin review card, contrast visibility improvements, SVG sizing/spacing fixes, readme updates.

Location:
cancer-awareness-ribbon-shortcode/trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • cancer-awareness-ribbon-shortcode/trunk/assets/css/admin.css

    r3458994 r3466076  
    1111  padding:16px;
    1212}
     13.car-admin-column{
     14  display:flex;
     15  flex-direction:column;
     16  gap:24px;
     17}
    1318.car-preview-box{
    1419  border:1px dashed #c3c4c7;
    1520  border-radius:10px;
    1621  padding:18px;
    17   min-height:120px;
     22  min-height:72px;
    1823  display:flex;
    1924  align-items:flex-start;
    2025  justify-content:flex-start;
     26}
     27.car-review-card{
     28  text-align:left;
     29}
     30.car-review-card p{
     31  margin:10px 0;
     32}
     33.car-review-stars{
     34  margin:4px 0 12px;
     35  color:#ffcc00;
     36  font-size:30px;
     37  letter-spacing:3px;
     38  line-height:1;
     39  text-shadow:0 1px 0 rgba(0, 0, 0, 0.08);
    2140}
    2241.car-shortcode-row{
  • cancer-awareness-ribbon-shortcode/trunk/assets/css/cancer-awareness-ribbon.css

    r3458719 r3466076  
    33    align-items: center;
    44    gap: 10px;
    5     line-height: 1
     5    padding: 6px;
     6    line-height: 1;
     7    vertical-align: top;
    68}
    79
     
    1012    height: var(--car-size, 64px);
    1113    display: block;
    12     border: 1px solid #3a3a3a;
    13     border-radius: 15px;
    14     box-shadow: 0 0 15px #080808;
     14    flex: 0 0 auto;
    1515}
    1616
     
    1818    font-size: 14px;
    1919    font-weight: 600;
    20     opacity: .9
     20    opacity: .9;
     21    line-height: 1.25;
    2122}
     23
     24.car-ribbon-wrap.car-contrast-light .car-ribbon {
     25    filter:
     26        drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.95))
     27        drop-shadow(0 0 3px rgba(255, 255, 255, 0.75));
     28}
     29
     30.car-ribbon-wrap.car-contrast-dark .car-ribbon {
     31    filter:
     32        drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.95))
     33        drop-shadow(0 0 3px rgba(0, 0, 0, 0.75));
     34}
  • cancer-awareness-ribbon-shortcode/trunk/cancer-awareness-ribbon.php

    r3459621 r3466076  
    55 * Plugin URI: https://www.parallelmedia.co.za/cancer-awareness-ribbon-demo/
    66 * Description: Adds a shortcode to display an awareness ribbon whose colors change based on the current month (or by type override).
    7  * Version: 1.5.2
     7 * Version: 1.5.3
    88 * Author: Parallel Media
    99 * Author URI: http://parallelmedia.co.za
     
    2121        plugins_url('assets/css/cancer-awareness-ribbon.css', __FILE__),
    2222        [],
    23         '1.5.0'
     23        '1.5.3'
     24    );
     25
     26    wp_register_script(
     27        'car-ribbon-script',
     28        plugins_url('assets/js/cancer-awareness-ribbon.js', __FILE__),
     29        [],
     30        '1.5.3',
     31        true
    2432    );
    2533}, 20);
     
    297305    return '
    298306<svg class="car-ribbon" width="' . esc_attr($size) . '" height="' . esc_attr($size) . '"
    299      viewBox="0 0 2200 2200" preserveAspectRatio="xMidYMid meet"
     307     viewBox="634 241 932 1553" preserveAspectRatio="xMidYMid meet"
    300308     xmlns="http://www.w3.org/2000/svg" role="img"
    301309     aria-label="' . esc_attr($label) . ' Awareness Ribbon">
     
    331339
    332340    wp_enqueue_style('car-ribbon-style');
     341    wp_enqueue_script('car-ribbon-script');
    333342
    334343    $types = car_get_awareness_types();
     
    379388                $svg = car_render_ribbon_svg((array)$it['colors'], $size, (string)$it['label']);
    380389
    381                 $html .= '<div class="car-ribbon-wrap" style="--car-size:' . esc_attr($size) . 'px;">';
     390                $html .= '<div class="car-ribbon-wrap" data-car-colors="' . esc_attr(implode(',', (array)$it['colors'])) . '" style="--car-size:' . esc_attr($size) . 'px;">';
    382391                $html .= $svg;
    383392
     
    437446    $svg = car_render_ribbon_svg((array)$selected['colors'], $size, (string)$selected['label']);
    438447
    439     $html  = '<div class="' . esc_attr($wrap_class) . '" style="--car-size:' . esc_attr($size) . 'px;">';
     448    $html  = '<div class="' . esc_attr($wrap_class) . '" data-car-colors="' . esc_attr(implode(',', (array)$selected['colors'])) . '" style="--car-size:' . esc_attr($size) . 'px;">';
    440449    $html .= $svg;
    441450
  • cancer-awareness-ribbon-shortcode/trunk/includes/admin/admin.php

    r3458994 r3466076  
    217217            </div>
    218218
    219             <div class="car-admin-card">
    220                 <h2><?php echo esc_html__('Live Preview', 'cancer-awareness-ribbon'); ?></h2>
    221                 <div id="car_preview" class="car-preview-box">
    222                     <?php
    223                     // Initial server-side preview using saved defaults
    224                     echo car_render_awareness_ribbon($settings);
    225                     ?>
     219            <div class="car-admin-column">
     220                <div class="car-admin-card">
     221                    <h2><?php echo esc_html__('Live Preview', 'cancer-awareness-ribbon'); ?></h2>
     222                    <div id="car_preview" class="car-preview-box">
     223                        <?php
     224                        // Initial server-side preview using saved defaults
     225                        echo car_render_awareness_ribbon($settings);
     226                        ?>
     227                    </div>
     228                </div>
     229
     230                <div class="car-admin-card car-review-card">
     231                    <h2><?php echo esc_html__('Enjoying the plugin?', 'cancer-awareness-ribbon'); ?></h2>
     232                    <p><?php echo esc_html__('If the Awareness Ribbon plugin helps your site, a quick 5-star review would mean a lot.', 'cancer-awareness-ribbon'); ?></p>
     233                    <p class="car-review-stars" aria-hidden="true">★★★★★</p>
     234                    <p>
     235                        <a
     236                            class="button button-primary"
     237                            href="<?php echo esc_url('https://wordpress.org/plugins/cancer-awareness-ribbon-shortcode/#reviews'); ?>"
     238                            target="_blank"
     239                            rel="noopener noreferrer"
     240                        >
     241                            <?php echo esc_html__('Leave a Review', 'cancer-awareness-ribbon'); ?>
     242                        </a>
     243                    </p>
    226244                </div>
    227245            </div>
  • cancer-awareness-ribbon-shortcode/trunk/readme.txt

    r3459621 r3466076  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.5.2
    8 Version: 1.5.2
     7Stable tag: 1.5.3
     8Version: 1.5.3
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    2626- Works seamlessly with Elementor, Divi, WPBakery, Beaver Builder, Gutenberg, headers, footers, and widgets
    2727- Includes a built-in admin shortcode builder with live preview
     28- Includes a friendly admin review prompt card
    2829- Scales crisply at any size
     30- Improves visibility on light/dark backgrounds automatically
    2931- Does not rely on external libraries or image files
    3032- Includes accessibility-friendly ARIA labels
     
    5355* Fully responsive SVG (no images required)
    5456* Admin shortcode builder with live preview
     57* Friendly admin review card with direct link to WordPress.org reviews
    5558* Save default ribbon display settings
    5659* Compatible with major page builders
    5760* Lightweight and fast (no external libraries)
    5861* Accessible SVG with ARIA labels
     62* Automatic contrast assist for low-visibility color/background combinations
    5963* Customizable size, label, type, month, category filtering, and month listing via shortcode attributes
    6064* Developer hook to extend awareness ribbon library
     
    98102- Add custom CSS class
    99103- View live preview instantly
     104- Access a direct "Leave a Review" button
    100105- Copy generated shortcode
    101106- Save global defaults
     
    180185
    181186= Is the ribbon background transparent? =
    182 Yes. The SVG has no background or shadow by default.
     187Yes. The SVG remains transparent. A subtle contrast outline is applied only when needed for visibility against certain backgrounds.
    183188
    184189== Screenshots ==
     
    194199== Changelog ==
    195200
     201= 1.5.3 =
     202* Improved SVG sizing/cropping so displayed dimensions better match configured size
     203* Added automatic foreground/background contrast assist for better visibility on light and dark sections
     204* Added small edge spacing around rendered ribbons for cleaner presentation
     205* Added admin review card below the live preview with a direct review link
     206
    196207= 1.5.2 =
    197208* Added screenshots
     
    238249== Upgrade Notice ==
    239250
     251= 1.5.3 =
     252Improves ribbon sizing consistency and background contrast handling, plus adds an admin review prompt card.
     253
    240254= 1.5.0 =
    241255Adds admin shortcode builder, default settings support, internal awareness refactor, developer extensibility hook, and builder integrations.
Note: See TracChangeset for help on using the changeset viewer.