Changeset 2752006
- Timestamp:
- 07/05/2022 09:35:52 AM (4 years ago)
- Location:
- heygov
- Files:
-
- 36 added
- 6 edited
-
tags/1.4.0 (added)
-
tags/1.4.0/README.md (added)
-
tags/1.4.0/assets (added)
-
tags/1.4.0/assets/badge-app-store.svg (added)
-
tags/1.4.0/assets/badge-play-store.png (added)
-
tags/1.4.0/assets/banner-mobile.jpg (added)
-
tags/1.4.0/assets/banner.jpg (added)
-
tags/1.4.0/assets/css (added)
-
tags/1.4.0/assets/css/heygov-admin.css (added)
-
tags/1.4.0/assets/css/heygov-site.css (added)
-
tags/1.4.0/assets/heygov-admin.js (added)
-
tags/1.4.0/assets/icon-ban.svg (added)
-
tags/1.4.0/assets/icon-cocktail.svg (added)
-
tags/1.4.0/assets/icon-fire.svg (added)
-
tags/1.4.0/assets/icon-hand-paper.svg (added)
-
tags/1.4.0/assets/icon-home.svg (added)
-
tags/1.4.0/assets/icon-paw.svg (added)
-
tags/1.4.0/assets/icon-sailboat.svg (added)
-
tags/1.4.0/assets/icon-tree.svg (added)
-
tags/1.4.0/heygov.php (added)
-
tags/1.4.0/includes (added)
-
tags/1.4.0/includes/class (added)
-
tags/1.4.0/includes/class/heygov-resource.php (added)
-
tags/1.4.0/includes/class/heygov-settings.php (added)
-
tags/1.4.0/includes/view (added)
-
tags/1.4.0/includes/view/apps-banner.php (added)
-
tags/1.4.0/includes/view/show-heygov-muni-forms.php (added)
-
tags/1.4.0/includes/view/show-heygov-settings.php (added)
-
tags/1.4.0/pagebuilder-module (added)
-
tags/1.4.0/pagebuilder-module/button.svg (added)
-
tags/1.4.0/pagebuilder-module/heygov-pb-module.php (added)
-
tags/1.4.0/pagebuilder-module/includes (added)
-
tags/1.4.0/pagebuilder-module/includes/frontend.js.php (added)
-
tags/1.4.0/pagebuilder-module/includes/frontend.php (added)
-
tags/1.4.0/readme.txt (added)
-
trunk/assets/css/heygov-site.css (modified) (2 diffs)
-
trunk/heygov.php (modified) (3 diffs)
-
trunk/includes/class/heygov-resource.php (modified) (3 diffs)
-
trunk/includes/class/heygov-settings.php (modified) (1 diff)
-
trunk/includes/view/show-heygov-muni-forms.php (added)
-
trunk/includes/view/show-heygov-settings.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
heygov/trunk/assets/css/heygov-site.css
r2668903 r2752006 1 *[class*='heygov-'] { 2 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"!important; 3 } 4 5 .heygov-h6 { 6 font-weight: 600; 7 font-size: 16px; 8 line-height: 100%; 9 letter-spacing: 0.3px; 10 color: black; 11 text-decoration: none; 12 margin: 0!important; 13 14 } 15 .heygov-h3 { 16 font-weight: 600; 17 font-size: 22px; 18 line-height: 36px; 19 letter-spacing: 0.3px; 20 color:rgba(0, 0, 13); 21 text-decoration: none; 22 margin: 0!important; 23 } 24 25 @media (max-width: 567px ) { 26 h3.heygov-h3 { 27 font-size: 16px!important; 28 } 29 h6.heygov-h6 { 30 font-size: 12px!important; 31 } 32 article .entry-wrap { 33 padding: 0!important; 34 } 35 36 } 1 37 2 38 .heygov-apps-banner-wrapper { … … 87 123 } 88 124 } 125 .heygov-row { 126 display:flex; 127 flex-direction:row; 128 flex-wrap:wrap; 129 width:calc(100% + 20px); 130 margin:0 -10px 5px; 131 } 132 133 .heygov-col { 134 display:flex; 135 flex-direction:column; 136 flex-basis:100%; 137 flex:1; 138 padding-left:10px; 139 padding-right:10px; 140 } 141 142 143 144 .heygov-justify-content-center { 145 justify-content:center; 146 } 147 .heygov-row-cols-2 { 148 flex: 0 0 auto; 149 width: 50%; 150 } 151 152 @media (min-width: 992px) { 153 .heygov-row-cols-lg-5 { 154 flex: 0 0 auto; 155 width: 20%!important; 156 } 157 .heygov-row-cols-lg-4 { 158 flex: 0 0 auto; 159 width: 25%!important; 160 } 161 .heygov-row-cols-lg-3 { 162 flex: 0 0 auto; 163 width: 33.333%!important; 164 } 165 .heygov-row-cols-lg-2 { 166 flex: 0 0 auto; 167 width: 50%!important; 168 } 169 } 170 @media (min-width: 768px) { 171 .heygov-row-cols-md-4 { 172 flex: 0 0 auto; 173 width: 25%; 174 } 175 .heygov-row-cols-md-3 { 176 flex: 0 0 auto; 177 width: 33.333%; 178 } 179 } 180 .heygov-mb-3 { 181 margin-bottom: 1.5rem!important; 182 } 183 .heygov-mt-3 { 184 margin-top: 1.5rem!important; 185 } 186 .heygov-p-1 { 187 padding: 0.5rem!important; 188 } 189 .heygov-p-2 { 190 padding: 1rem!important; 191 } 192 193 .heygov-p-3 { 194 padding: 1.5rem!important; 195 } 196 .heygov-pt-3 { 197 padding-top: 1.5rem!important; 198 } 199 .heygov-my-2 { 200 margin-top: 0.5rem!important; 201 margin-bottom: 0.5rem!important; 202 } 203 .heygov-m-2 { 204 margin: 0.5rem!important; 205 } 206 .heygov-mx-2 { 207 margin-left: 1rem!important; 208 margin-right: 1rem!important; 209 } 210 .heygov-mx-1 { 211 margin-left: 0.5rem!important; 212 margin-right: 0.5rem!important; 213 } 214 .heygov-px-3 { 215 padding-right: 1rem!important; 216 padding-left: 1rem!important; 217 } 218 .heygov-card { 219 box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05); 220 transition: 0px 2px 10px rgba(0, 0, 0, 0.1) 0.2s ease-in-out; 221 border-radius: 30px; 222 overflow: hidden; 223 width: 100%; 224 } 225 226 .heygov-card-header { 227 border-radius: 30px 30px 0 0; 228 padding: 1rem 1.5rem; 229 } 230 231 .heygov-card-body { 232 padding: 1rem; 233 } 234 235 .heygov-card-title { 236 margin-bottom: 0.5rem; 237 position: relative; 238 } 239 .heygov-border-1 { 240 border-width: 0.5px!important; 241 } 242 243 .heygov-text-dark { 244 color: black!important; 245 text-decoration: none; 246 } 247 .heygov-text-dark:hover { 248 color: black!important; 249 text-decoration: none; 250 } 251 .heygov-ratio { 252 position: relative; 253 width: 100%; 254 } 255 .heygov-ratio-1x1 { 256 aspect-ratio: 1/1; 257 } 258 259 .heygov-card-form { 260 overflow: hidden; 261 } 262 263 .heygov-card.has-icon { 264 background-color: rgba(224, 224, 224, 0.4); 265 } 266 .heygov-card.has-department { 267 background: linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)); 268 } 269 .heygov-card .heygov-form-price { 270 position: absolute; 271 bottom: 0.2rem; 272 } 273 274 .heygov-card-form .heygov-card-body .heygov-form-icon { 275 right: -1rem!important; 276 top: -0.5rem!important; 277 position: absolute; 278 left: auto; 279 color: #e0e0e0; 280 opacity: 0.05!important; 281 overflow: hidden; 282 width: 8rem; 283 height: 8rem; 284 285 } 286 287 @media (max-width: 575.98px) { 288 .heygov-card-form .heygov-card-body .heygov-form-icon { 289 width: 6rem; 290 } 291 } -
heygov/trunk/heygov.php
r2745131 r2752006 4 4 Plugin URI: https://heygov.com 5 5 Description: Manage the HeyGov widget on your municipality WordPress website 6 Version: 1. 3.16 Version: 1.4.0 7 7 Requires at least: 5.0 8 8 Requires PHP: 7.0 … … 42 42 } 43 43 44 45 44 46 class HeyGov { 45 47 … … 55 57 add_action('wp_footer', array($resource, 'load_widget')); 56 58 add_action('wp_footer', array($resource, 'load_apps_banner')); 59 add_shortcode('heygov-forms', array($resource, 'heygov_forms_shortcode')); 57 60 add_shortcode('heygov-widget', array($setting, 'heygov_shortcode')); 61 58 62 } 59 63 -
heygov/trunk/includes/class/heygov-resource.php
r2668903 r2752006 4 4 5 5 public function load_admin_includes() { 6 wp_enqueue_style('heygov-admin', HEYGOV_URL . 'assets/css/heygov-admin.css' );7 wp_enqueue_style('heygov-site', HEYGOV_URL . 'assets/css/heygov-site.css' );8 wp_enqueue_script('heygov-admin', HEYGOV_URL . 'assets/heygov-admin.js' );6 wp_enqueue_style('heygov-admin', HEYGOV_URL . 'assets/css/heygov-admin.css', [], '1.4'); 7 wp_enqueue_style('heygov-site', HEYGOV_URL . 'assets/css/heygov-site.css', [], '1.4'); 8 wp_enqueue_script('heygov-admin', HEYGOV_URL . 'assets/heygov-admin.js', [], '1.4', true); 9 9 10 10 wp_localize_script('heygov-admin', 'HeyGov', [ … … 15 15 16 16 public function load_site_includes() { 17 wp_enqueue_style('heygov-site', HEYGOV_URL . 'assets/css/heygov-site.css' );17 wp_enqueue_style('heygov-site', HEYGOV_URL . 'assets/css/heygov-site.css', [], '1.4'); 18 18 } 19 19 … … 51 51 } 52 52 53 public function heygov_forms_shortcode( $atts = array()) { 54 $args = shortcode_atts( array( 55 'maxcolumns' => '5', 56 'department' => '' 57 ), $atts ); 58 59 $maxcolumns = $args['maxcolumns']; 60 $calc_medium = $maxcolumns - 1; 61 $department = $args['department']; 62 63 $heygov_id = get_option('heygov_id'); 64 $forceUpdate = isset($_REQUEST['heygov-refresh-forms']); 65 66 // Get any existing copy of our transient data 67 if ( false === ( $forms = get_transient( 'forms' ) ) || $forceUpdate ) { 68 // It wasn't there, so regenerate the data and save the transient 69 $forms = wp_remote_get('https://api.heygov.com/' . $heygov_id . '/forms?status=public&expand=department'); 70 71 if (is_wp_error($forms)) { 72 $forms = []; 73 } else { 74 $forms = wp_remote_retrieve_body($forms); 75 $forms = json_decode($forms); 76 set_transient( 'forms', $forms, 12 * HOUR_IN_SECONDS ); 77 } 78 } 79 80 if(!empty($department)) { 81 $forms = array_filter($forms, function($form) use($department) { 82 return $form->department_id == $department || $form->department->slug == $department || $form->department->name == $department; 83 }); 84 } 85 86 // generate forms HTML 87 ob_start(); 88 89 require_once HEYGOV_DIR . 'includes/view/show-heygov-muni-forms.php'; 90 91 $forms = ob_get_contents(); 92 ob_end_clean(); 93 94 return $forms; 95 } 96 53 97 } -
heygov/trunk/includes/class/heygov-settings.php
r2668903 r2752006 31 31 } 32 32 33 34 35 33 36 } -
heygov/trunk/includes/view/show-heygov-settings.php
r2745131 r2752006 207 207 </div> 208 208 209 <!-- Adding forms from heygov to muni website --> 210 <div class="heygov-feature"> 211 <h3 class="heygov-h3">Display heygov forms on your website</h3> 212 <p>Copy shortcode from below ⬇️ & paste on to the page where you want the HeyGov forms to be displayed </p> 213 <code>[heygov-forms]</code> 214 215 <div class="heygov-pt-3"> 216 <h6 class="heygov-h6">Shortcode filter examples</h6> 217 <div> 218 <!-- Container size shortcode filter --> 219 <p><b>Container size</b></p> 220 <code>[heygov-forms maxcolumns="4"]</code> 221 <p>Maxcolumns number is the number of forms card that will be displayed on large screen</p> 222 </div> 223 <div> 224 <!-- Department filter --> 225 <p><b>Department id, slug or name </b></p> 226 <p><code>[heygov-forms department="4"]</code></p> 227 <p><code>[heygov-forms department="parks-and-rec"]</code></p> 228 <p><code>[heygov-forms department="Parks and Rec"]</code></p> 229 </div> 230 </div> 231 232 233 </div> 234 209 235 <script type="text/javascript"> 210 236 const $banners = document.querySelectorAll('.heygov-apps-banner') -
heygov/trunk/readme.txt
r2745131 r2752006 3 3 Tags: heygov, issue reporting, reporting, forms, permits 4 4 Requires at least: 5.0 5 Tested up to: 5.95 Tested up to: 6.0 6 6 Requires PHP: 7.0 7 Stable tag: 1. 3.17 Stable tag: 1.4.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 18 18 - report issues or requests in your city or town 19 19 - submit applications for permits and licenses 20 - reserve local venues for your events 20 21 - search for information, meeting agendas and other documents in your city or town 21 22 … … 35 36 36 37 == Changelog == 38 39 = 1.4.0 = 40 * Added - Shortcode to display jurisdictions forms 37 41 38 42 = 1.3.1 =
Note: See TracChangeset
for help on using the changeset viewer.