Skip to content

Commit

Permalink
iteration 1 feedback part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
kasprzyk-sz committed Jul 25, 2023
1 parent d8c6568 commit 94a7773
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 60 deletions.
11 changes: 6 additions & 5 deletions wp-content/themes/vf-wp-intranet/acf-json/training.json
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@
"id": ""
},
"default_value": "",
"tabs": "text",
"tabs": "all",
"media_upload": 0,
"toolbar": "full",
"toolbar": "basic",
"delay": 0
},
{
Expand All @@ -308,9 +308,9 @@
"id": ""
},
"default_value": "",
"tabs": "text",
"tabs": "all",
"media_upload": 0,
"toolbar": "full",
"toolbar": "basic",
"delay": 0
},
{
Expand Down Expand Up @@ -368,5 +368,6 @@
"instruction_placement": "label",
"hide_on_screen": "",
"active": true,
"description": ""
"description": "",
"modified": 1690285448
}
47 changes: 0 additions & 47 deletions wp-content/themes/vf-wp-intranet/archive-training.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,6 @@ class="vf-search__button | vf-button vf-button--tertiary vf-button--sm">
<?php include(locate_template('partials/training-filter.php', false, false)); ?>
</div>
<main>
<div class="vf-tabs">
<ul class="vf-tabs__list | vf-u-margin__top--0" data-vf-js-tabs>
<li class="vf-tabs__item">
<a class="vf-tabs__link vf-u-padding__top--0" href="#vf-tabs__section--upcoming-events">Upcoming</a>
</li>
<li class="vf-tabs__item">
<a class="vf-tabs__link vf-u-padding__top--0" href="#vf-tabs__section--past-events">Past</a>
</li>
</ul>
</div>
<div class="vf-tabs-content" data-vf-js-tabs-content>
<section class="vf-tabs__section vf-u-padding__top--800" id="vf-tabs__section--upcoming-events">
<div id="upcoming-events" data-jplist-group="data-group-1">
<?php
$forthcomingLoop = new WP_Query (array(
Expand Down Expand Up @@ -84,46 +72,11 @@ class="vf-search__button | vf-button vf-button--tertiary vf-button--sm">
<?php
include(locate_template('partials/vf-summary--training.php', false, false)); ?>
<?php endwhile;?>
</div>
</section>

<section class="vf-tabs__section vf-u-padding__top--800" id="vf-tabs__section--past-events">
<div id="past-events" data-jplist-group="data-group-1">
<?php
$pastLoop = new WP_Query (array(
'posts_per_page' => -1,
'post_type' => 'training',
'order' => 'DESC',
'orderby' => 'meta_value_num',
'meta_key' => 'vf-wp-training-start_date',
'meta_query' => array(
array(
'key' => 'vf-wp-training-start_date',
'value' => $today_date,
'compare' => '<',
'type' => 'numeric'
),
array(
'key' => 'vf-wp-training-start_date',
'value' => date('Ymd', strtotime('now')),
'type' => 'numeric',
'compare' => '<',
)
) ));
$current_month = ""; ?>
<?php while ($pastLoop->have_posts()) : $pastLoop->the_post();?>
<?php
include(locate_template('partials/vf-summary--training-past.php', false, false)); ?>
<?php endwhile;?>
</div>
<?php // include(locate_template('partials/paging-controls.php', false, false)); ?>
</section>
</div>
</main>
<div class="vf-stack vf-stack--400">
<article class="vf-card vf-card--brand vf-card--bordered">


<div class="vf-card__content | vf-stack vf-stack--400"><h3 class="vf-card__heading"><a class="vf-card__link" href="JavaScript:Void(0);">Example link <svg aria-hidden="true" class="vf-card__heading__icon | vf-icon vf-icon-arrow--inline-end" width="1em" height="1em" xmlns="http://www.w3.org/2000/svg"><path d="M0 12c0 6.627 5.373 12 12 12s12-5.373 12-12S18.627 0 12 0C5.376.008.008 5.376 0 12zm13.707-5.209l4.5 4.5a1 1 0 010 1.414l-4.5 4.5a1 1 0 01-1.414-1.414l2.366-2.367a.25.25 0 00-.177-.424H6a1 1 0 010-2h8.482a.25.25 0 00.177-.427l-2.366-2.368a1 1 0 011.414-1.414z" fill="currentColor" fill-rule="nonzero"></path></svg>
</a></h3>
<p class="vf-card__text">Sapiente harum, omnis provident</p>
Expand Down
78 changes: 75 additions & 3 deletions wp-content/themes/vf-wp-intranet/partials/training-filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
)
);


$currentYear = date("Y");

$counterCat = 1;
$counterLoc = 1;
Expand All @@ -34,14 +34,77 @@
data-path=".organiser" data-group="data-group-1" data-name="organiser" data-or="organiser"
value="<?php echo esc_attr($term->name); ?>"
data-id="organiser<?php echo $counterCat; ?>-<?php echo esc_attr($term->slug); ?>" class="vf-form__checkbox">
<label for="organiser-<?php echo $counterCat; ?>" class="vf-form__label"><?php echo esc_html($term->name); ?></label>
<label for="organiser-<?php echo $counterCat; ?>" class="vf-form__label"><?php echo esc_html($term->name); ?>
&nbsp;<span
data-jplist-control="counter"
data-group="data-group-1"
data-format="({count})"
data-path=".organiser-<?php echo esc_attr($term->name); ?>"
data-mode="static"
data-name="counter-organiser-<?php echo esc_attr($term->name); ?>"
data-filter-type="path"></span>
</label>
</div>
<?php
$counterCat++;
}
?>
</fieldset>

<fieldset class="vf-form__fieldset vf-stack vf-stack--400" id="checkbox-filter-location">
<legend class="vf-form__legend">Year</legend>
<div class="vf-form__item vf-form__item--checkbox">
<input id="year-<?php echo $currentYear; ?>" type="checkbox" data-jplist-control="checkbox-text-filter"
data-path=".year" data-group="data-group-1" data-name="year" data-or="year"
value="<?php echo $currentYear; ?>"
data-id="year<?php echo $currentYear; ?>" class="vf-form__checkbox">
<label for="year-<?php echo $currentYear; ?>" class="vf-form__label"><?php echo $currentYear; ?>
&nbsp;<span
data-jplist-control="counter"
data-group="data-group-1"
data-format="({count})"
data-path=".year-2023"
data-mode="static"
data-name="counter-current-year"
data-filter-type="path"></span>
</label>
</div>
<div class="vf-form__item vf-form__item--checkbox">
<input id="year-<?php echo $currentYear + 1; ?>" type="checkbox" data-jplist-control="checkbox-text-filter"
data-path=".year" data-group="data-group-1" data-name="year" data-or="year"
value="<?php echo $currentYear + 1; ?>"
data-id="year<?php echo $currentYear + 1; ?>" class="vf-form__checkbox">
<label for="year-<?php echo $currentYear + 1; ?>" class="vf-form__label"><?php echo $currentYear + 1; ?>
&nbsp;<span
data-jplist-control="counter"
data-group="data-group-1"
data-format="({count})"
data-path=".year-2024"
data-mode="static"
data-name="counter-next-year"
data-filter-type="path"></span>
</label>
</div>
</fieldset>

<fieldset class="vf-form__fieldset vf-stack vf-stack--400" id="checkbox-filter-location">
<legend class="vf-form__legend">Status</legend>
<div class="vf-form__item vf-form__item--checkbox">
<input id="status-open" type="checkbox" data-jplist-control="checkbox-text-filter"
data-path=".status" data-group="data-group-1" data-name="status" data-or="status"
value="open"
data-id="status-open" class="vf-form__checkbox">
<label for="status-open" class="vf-form__label">Open</label>
</div>
<div class="vf-form__item vf-form__item--checkbox">
<input id="status-closed" type="checkbox" data-jplist-control="checkbox-text-filter"
data-path=".status" data-group="data-group-1" data-name="status" data-or="status"
value="closed"
data-id="status-closed" class="vf-form__checkbox">
<label for="status-closed" class="vf-form__label">Closed</label>
</div>
</fieldset>

<fieldset class="vf-form__fieldset vf-stack vf-stack--400" id="checkbox-filter-location">
<legend class="vf-form__legend">Location</legend>
<?php
Expand All @@ -52,7 +115,16 @@
data-path=".location" data-group="data-group-1" data-name="location" data-or="location"
value="<?php echo esc_attr($term->name); ?>"
data-id="location<?php echo $counterLoc; ?>-<?php echo esc_attr($term->slug); ?>" class="vf-form__checkbox">
<label for="location-<?php echo $counterLoc; ?>" class="vf-form__label"><?php echo esc_html($term->name); ?></label>
<label for="location-<?php echo $counterLoc; ?>" class="vf-form__label"><?php echo esc_html($term->name); ?>
&nbsp;<span
data-jplist-control="counter"
data-group="data-group-1"
data-format="({count})"
data-path=".<?php echo esc_attr($term->name); ?>"
data-mode="static"
data-name="counter-location-<?php echo esc_attr($term->name); ?>"
data-filter-type="path"></span>
</label>
</div>
<?php
$counterLoc++;
Expand Down
17 changes: 13 additions & 4 deletions wp-content/themes/vf-wp-intranet/partials/vf-summary--training.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,23 @@
<div class="vf-content | wysiwyg-training-info | search-data">
<?php echo $additionalInfo; ?>
</div>
<p class="vf-summary__meta | vf-u-margin__bottom--600">
<p class="vf-summary__meta | vf-u-margin__bottom--600" id="trainingMeta">
<?php if (($organiser)) { ?>
<span>Organiser:</span>&nbsp;
<span class="vf-u-text-color--grey | vf-u-margin__right--600 | organiser">
<span class="vf-badge vf-badge--primary | vf-u-margin__right--600 | organiser | organiser-<?php $org_list = [];
foreach( $organiser as $org ) {
$org_list[] = $org->name; }
echo implode(', ', $org_list); ?>">
<?php $org_list = [];
foreach( $organiser as $org ) {
$org_list[] = $org->name; }
echo implode(', ', $org_list); ?></span>
<?php } ?>
<?php if (($location)) { ?>
<span>Location:</span>&nbsp;
<span class="vf-u-text-color--grey | vf-u-margin__right--600 | location">
<span class="vf-u-text-color--grey | vf-u-margin__right--600 | location | <?php $loc_list = [];
foreach( $location as $loc ) {
$loc_list[] = $loc->name; }
echo implode(' ', $loc_list); ?>">
<?php // if (!empty($venue)) {
// echo esc_html($venue) . ', '; } ?>
<?php $loc_list = [];
Expand Down Expand Up @@ -125,6 +130,10 @@
?>
</p>
</div>
<!-- for filtering -->
<div class="vf-u-display-none">
<span class="year year-<?php echo $start->format('Y');?>"><?php echo $start->format('Y'); ?></span>
</div>
<?php if ($forthcomingLoop->current_post +1 < $forthcomingLoop->post_count) {
echo '<hr class="vf-divider">';
} ?>
Expand Down
5 changes: 4 additions & 1 deletion wp-content/themes/vf-wp-intranet/single-training.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@
<?php the_content(); ?>
</div>
<div>

<figure class="vf-figure">
<?php the_post_thumbnail('full', array('class' => 'vf-figure__image')); ?>
</figure>

<p class="vf-text-body vf-text-body--3 | vf-u-margin__bottom--100"><span style="font-weight: 600;">Date:</span>
<span class="vf-u-text-color--grey">
<?php
Expand Down
10 changes: 10 additions & 0 deletions wp-content/themes/vf-wp-intranet/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,14 @@ Text Domain: vfwp

.wysiwyg-training-info p{
font-size: 16px !important;
}

#trainingMeta .vf-badge--primary {
background-color: #f3f3f3;
border-color: #f3f3f3;
color: #373A36;
}
#trainingMeta .vf-badge {
font-size: 14px;
font-weight: 500;
}

0 comments on commit 94a7773

Please sign in to comment.