Plugin Directory

Changeset 3354836


Ignore:
Timestamp:
09/02/2025 03:49:03 PM (7 months ago)
Author:
dramb
Message:

Remove FontAwesome and replace with a subset of FontAwesome to reduce the size of the plugin. Modify the CSS to reflect this. Correct missing css elements to do with cancelled events.

Location:
cs-integration
Files:
24 added
6 edited

Legend:

Unmodified
Added
Removed
  • cs-integration/trunk/README.md

    r3350354 r3354836  
    44* Requires at least: 6.4
    55* Tested up to: 6.8
    6 * Stable tag: 1.0.4
     6* Stable tag: 1.0.5
    77* License: GPLv2 or later
    88
     
    202202## Changelog
    203203
     204### 1.0.5
     205
     206**2025-09-02**
     207* Remove FontAwesome and replace with a subset of FontAwesome to reduce the
     208    size of the plugin.  Modify the CSS to reflect this. Correct missing css
     209    elements to do with cancelled events.
     210   
    204211### 1.0.4
    205212
  • cs-integration/trunk/README.txt

    r3350354 r3354836  
    44* Requires at least: 6.4
    55* Tested up to: 6.8
    6 * Stable tag: 1.0.4
     6* Stable tag: 1.0.5
    77* License: GPLv2 or later
    88
     
    202202== Changelog ==
    203203
     204= 1.0.5 =
     205
     206**2025-09-02**
     207* Remove FontAwesome and replace with a subset of FontAwesome to reduce the
     208    size of the plugin.  Modify the CSS to reflect this. Correct missing css
     209    elements to do with cancelled events.
     210
    204211= 1.0.4 =
    205212
  • cs-integration/trunk/cs-integration.php

    r3350246 r3354836  
    2020 * Plugin URI:        https://github.com/AlwynBarry/cs-integration
    2121 * Description:       CS Integration provides shortcodes to request and display JSON data from the public JSON ChurchSuite feeds.
    22  * Version:           1.0.4
     22 * Version:           1.0.5
    2323 * Author:            Alwyn Barry
    2424 * Author URI:        https://github.com/AlwynBarry/
  • cs-integration/trunk/public/class-cs-integration-public.php

    r3257115 r3354836  
    33namespace amb_dev\CSI;
    44
    5 
    6 /**
    7  * The public-facing functionality of the plugin.
    8  *
    9  * @link       https://https://github.com/AlwynBarry
    10  * @since      1.0.0
    11  *
    12  * @package    Cs_Integration
    13  * @subpackage Cs_Integration/public
    14  */
    155
    166/**
     
    2010 * and enqueues the public-facing stylesheet.
    2111 *
     12 * @link       https://https://github.com/AlwynBarry
     13 * @since      1.0.0
     14 *
    2215 * @package    Cs_Integration
    2316 * @subpackage Cs_Integration/public
     
    3528    private $plugin_name;
    3629
     30
    3731    /**
    3832     * The version of this plugin.
     
    4438    private $version;
    4539
    46     /**
    47      * The Class Names and file names of the classes for communication to the ChurchSuite JSON API,
    48      * - the model classes for the data returned in the JSON responses,
    49      * - the view classes for display of the data,
    50      * - the classes which give the behaviour of the shortcodes,
     40
     41    /**
     42     * The Class Names and file names of the classes for communication
     43     * to the ChurchSuite JSON API,
    5144     *
    5245     * @since    1.0.0
     
    5750            'ChurchSuite' => 'class-churchsuite.php',
    5851            'Cs_JSON_API' => 'class-cs-json-api.php',
     52        );
     53
     54       
     55    /**
     56     * The Class Names and file names of the classes for the shortcodes
     57     * - the model classes for the churchsuite event and group data,
     58     * - the view classes for display of the data,
     59     * - the classes which give the behaviour of the shortcodes,
     60     *
     61     * @since    1.0.4
     62     * @access   private
     63     * @const    array of string    $CS_CLASS_NAMES    The class names of the dependencies needed.
     64     */
     65    private const SHORTCODE_CLASS_NAMES = array(
    5966            'Cs_Item' => 'class-cs-item.php',
    6067            'Cs_Event' => 'class-cs-event.php',
     
    7178        );
    7279
     80
    7381    /*
    7482     * The shortcode names and their corresponding static functions that
     
    8694        );
    8795
     96
    8897    /**
    8998     * Initialize the class and set its properties.
     
    119128
    120129        /**
    121          * Dependencies: the classes that hold and process the JSON API, it's data response and to form the views on the data
     130         * Dependencies: the classes that hold and process the JSON API
    122131         */
    123132        foreach ( Cs_Integration_Public::CS_CLASS_NAMES as $class_name => $file_name) {
    124133            require_once plugin_dir_path( dirname(__FILE__) ) . 'public/shortcodes/' . $file_name;
    125134        }
     135       
     136        /**
     137         * Dependencies: the classes that provide the shortcodes by creating
     138         * a data model from the JSON response and to form the views on the data
     139         */
     140        foreach ( Cs_Integration_Public::SHORTCODE_CLASS_NAMES as $class_name => $file_name) {
     141            require_once plugin_dir_path( dirname(__FILE__) ) . 'public/shortcodes/' . $file_name;
     142        }
    126143
    127144    }
     
    143160    }
    144161
     162
    145163    /**
    146164     * Register the stylesheets for the public-facing side of the site.
     
    151169    public function enqueue_styles() {
    152170
     171        /*
     172         * Enqueue the fontawesome free font for the glyphs we use
     173         */
     174        wp_enqueue_style( 'cs-glyphs-css', plugin_dir_url( __FILE__ ) . '../fonts/glyphs/css/glyphs.css', array(), $this->version, 'all' );
     175
     176        /*
     177         * Enqueue the style sheet for the public display of the shortcodes
     178         */
    153179        wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/cs-integration-public.css', array(), $this->version, 'all' );
    154180
     
    169195         */
    170196        wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/cs-integration-public.js', array(), $this->version, false );
    171 
    172     }
    173    
     197       
     198    }
     199
     200
    174201    /**
    175202     * Register a filter to add a 'cs-date' parameter in queries for the shortcodes to use
     
    181208      return $vars;
    182209    }
    183 
     210   
     211   
    184212}
  • cs-integration/trunk/public/css/cs-integration-public.css

    r3350347 r3354836  
     1/**
     2 * All of the CSS for the public-facing functionality of this plugin
     3 */
     4
    15:root {
    26    --cs-background-color: #ffffff;
     
    1216    --cs-light-grey-background-color: #f3f3f3;
    1317    --cs-today-background-color: #ffffef;
     18    --csjs-category-1-color: #3a76ca;
     19    --csjs-category-2-color: #3aca76;
     20}
     21
     22.cancelled {
     23    color: var(--csjs-text-lightest-color);
     24}
     25
     26.cancelled div.cs-event-name {
     27    text-decoration: line-through;
    1428}
    1529
     
    87101
    88102span.cs-date-gliph::before {
    89     content: "\f133";
    90     font-family: "FontAwesome";
     103    content: "\e800";
     104    font-family: "glyphs";
     105    font-size: 0.9rem;
    91106    padding-right: 0.5rem;
    92107    color: var(--cs-gliph-color);
     
    96111
    97112span.cs-time-gliph::before {
    98     content: "\f017";
    99     font-family: "FontAwesome";
     113    content: "\e802";
     114    font-family: "glyphs";
     115    font-size: 0.9rem;
    100116    padding-right: 0.5rem;
    101117    color: var(--cs-gliph-color);
     
    105121
    106122span.cs-location-gliph::before {
    107     content: "\f041";
    108     font-family: "FontAwesome";
     123    content: "\e801";
     124    font-family: "glyphs";
     125    font-size: 0.9rem;
    109126    padding-right: 0.7rem;
    110127    color: var(--cs-gliph-color);
  • cs-integration/trunk/public/shortcodes/class-cs-calendar-event-view.php

    r3350221 r3354836  
    7070        // Display the caret link to reveal the hidden event details
    7171        $output .= '<button class="cs-clickable-caret" aria-label="Open Modal" onclick="cs_revealEventDetails(this)">' . "\n"
    72             . '  <svg width="16" height="16" viewBox="0 0 16 16">' . "\n"
    73             . '    <path d="m 4,6 4,5 4,-5 z"/>' . "\n"
     72            . '  <svg fill="none" viewBox="0 0 16 16" height="16" width="16" stroke="currentColor">' . "\n"
     73            . '    <path fill-rule="evenodd" clip-rule="evenodd" d="M3.4 4.5a1 1 0 0 0-.8.6 1 1 0 0 0 .2 1.2l4.5 5c.4.4 1 .4 1.4 0l4.5-5c.3-.3.4-.7.2-1a1 1 0 0 0-.8-.7z" fill="#000" style="stroke-width: 1;"/>' . "\n"
    7474            . '  </svg>' . "\n"
    7575            . '</button>' . "\n";
Note: See TracChangeset for help on using the changeset viewer.