Changeset 3466076
- Timestamp:
- 02/20/2026 08:20:36 PM (6 weeks ago)
- Location:
- cancer-awareness-ribbon-shortcode/trunk
- Files:
-
- 1 added
- 5 edited
-
assets/css/admin.css (modified) (1 diff)
-
assets/css/cancer-awareness-ribbon.css (modified) (3 diffs)
-
assets/js/cancer-awareness-ribbon.js (added)
-
cancer-awareness-ribbon.php (modified) (6 diffs)
-
includes/admin/admin.php (modified) (1 diff)
-
readme.txt (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cancer-awareness-ribbon-shortcode/trunk/assets/css/admin.css
r3458994 r3466076 11 11 padding:16px; 12 12 } 13 .car-admin-column{ 14 display:flex; 15 flex-direction:column; 16 gap:24px; 17 } 13 18 .car-preview-box{ 14 19 border:1px dashed #c3c4c7; 15 20 border-radius:10px; 16 21 padding:18px; 17 min-height: 120px;22 min-height:72px; 18 23 display:flex; 19 24 align-items:flex-start; 20 25 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); 21 40 } 22 41 .car-shortcode-row{ -
cancer-awareness-ribbon-shortcode/trunk/assets/css/cancer-awareness-ribbon.css
r3458719 r3466076 3 3 align-items: center; 4 4 gap: 10px; 5 line-height: 1 5 padding: 6px; 6 line-height: 1; 7 vertical-align: top; 6 8 } 7 9 … … 10 12 height: var(--car-size, 64px); 11 13 display: block; 12 border: 1px solid #3a3a3a; 13 border-radius: 15px; 14 box-shadow: 0 0 15px #080808; 14 flex: 0 0 auto; 15 15 } 16 16 … … 18 18 font-size: 14px; 19 19 font-weight: 600; 20 opacity: .9 20 opacity: .9; 21 line-height: 1.25; 21 22 } 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 5 5 * Plugin URI: https://www.parallelmedia.co.za/cancer-awareness-ribbon-demo/ 6 6 * 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. 27 * Version: 1.5.3 8 8 * Author: Parallel Media 9 9 * Author URI: http://parallelmedia.co.za … … 21 21 plugins_url('assets/css/cancer-awareness-ribbon.css', __FILE__), 22 22 [], 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 24 32 ); 25 33 }, 20); … … 297 305 return ' 298 306 <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" 300 308 xmlns="http://www.w3.org/2000/svg" role="img" 301 309 aria-label="' . esc_attr($label) . ' Awareness Ribbon"> … … 331 339 332 340 wp_enqueue_style('car-ribbon-style'); 341 wp_enqueue_script('car-ribbon-script'); 333 342 334 343 $types = car_get_awareness_types(); … … 379 388 $svg = car_render_ribbon_svg((array)$it['colors'], $size, (string)$it['label']); 380 389 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;">'; 382 391 $html .= $svg; 383 392 … … 437 446 $svg = car_render_ribbon_svg((array)$selected['colors'], $size, (string)$selected['label']); 438 447 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;">'; 440 449 $html .= $svg; 441 450 -
cancer-awareness-ribbon-shortcode/trunk/includes/admin/admin.php
r3458994 r3466076 217 217 </div> 218 218 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> 226 244 </div> 227 245 </div> -
cancer-awareness-ribbon-shortcode/trunk/readme.txt
r3459621 r3466076 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1.5. 28 Version: 1.5. 27 Stable tag: 1.5.3 8 Version: 1.5.3 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 26 26 - Works seamlessly with Elementor, Divi, WPBakery, Beaver Builder, Gutenberg, headers, footers, and widgets 27 27 - Includes a built-in admin shortcode builder with live preview 28 - Includes a friendly admin review prompt card 28 29 - Scales crisply at any size 30 - Improves visibility on light/dark backgrounds automatically 29 31 - Does not rely on external libraries or image files 30 32 - Includes accessibility-friendly ARIA labels … … 53 55 * Fully responsive SVG (no images required) 54 56 * Admin shortcode builder with live preview 57 * Friendly admin review card with direct link to WordPress.org reviews 55 58 * Save default ribbon display settings 56 59 * Compatible with major page builders 57 60 * Lightweight and fast (no external libraries) 58 61 * Accessible SVG with ARIA labels 62 * Automatic contrast assist for low-visibility color/background combinations 59 63 * Customizable size, label, type, month, category filtering, and month listing via shortcode attributes 60 64 * Developer hook to extend awareness ribbon library … … 98 102 - Add custom CSS class 99 103 - View live preview instantly 104 - Access a direct "Leave a Review" button 100 105 - Copy generated shortcode 101 106 - Save global defaults … … 180 185 181 186 = Is the ribbon background transparent? = 182 Yes. The SVG has no background or shadow by default.187 Yes. The SVG remains transparent. A subtle contrast outline is applied only when needed for visibility against certain backgrounds. 183 188 184 189 == Screenshots == … … 194 199 == Changelog == 195 200 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 196 207 = 1.5.2 = 197 208 * Added screenshots … … 238 249 == Upgrade Notice == 239 250 251 = 1.5.3 = 252 Improves ribbon sizing consistency and background contrast handling, plus adds an admin review prompt card. 253 240 254 = 1.5.0 = 241 255 Adds 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.