diff --git a/assets/print-calendar.css b/assets/print-calendar.css
index 53abec6..a56321d 100644
--- a/assets/print-calendar.css
+++ b/assets/print-calendar.css
@@ -132,11 +132,12 @@ body.month-pages .day-num {
body.month-pages .event-name {
font-size: calc(13px * var(--month-font-scale));
+ line-height: 0.98;
}
body.month-pages .matchup-name {
font-size: calc(13px * var(--month-font-scale));
- line-height: 1.05;
+ line-height: 0.92;
}
body.month-pages .event-time {
@@ -468,6 +469,8 @@ body.month-pages .day .day-num {
hyphens: none;
line-height: 1.05;
font-weight: 700;
+ font-stretch: condensed;
+ font-variation-settings: "wdth" 42, "wght" 700;
opacity: 0.85;
}
@@ -487,6 +490,7 @@ body.month-pages .day .day-num {
padding: 0;
font-size: calc(8.5px * var(--month-font-scale));
line-height: 0.98;
+ font-variation-settings: "wdth" 36, "wght" 800;
opacity: 1;
}
@@ -503,6 +507,7 @@ body.month-pages .day .day-num {
text-align: center;
text-overflow: clip;
white-space: nowrap;
+ font-stretch: condensed;
}
.ha-flag {
@@ -563,6 +568,8 @@ body.month-pages .day .day-num {
max-width: 100%;
font-size: calc(12px * var(--month-font-scale));
font-weight: 800;
+ font-stretch: condensed;
+ font-variation-settings: "wdth" 56, "wght" 800;
line-height: 1;
text-transform: uppercase;
text-align: center;
@@ -584,6 +591,8 @@ body.month-pages .day .day-num {
max-width: 100%;
font-size: calc(8px * var(--month-font-scale));
font-weight: 700;
+ font-stretch: condensed;
+ font-variation-settings: "wdth" 50, "wght" 700;
line-height: 1;
text-align: center;
text-transform: uppercase;
@@ -676,6 +685,100 @@ body.month-pages .day .day-num {
background: #fff;
}
+body.black-white .header,
+body.black-white .month-title,
+body.black-white .dow span,
+body.black-white .day,
+body.black-white .event,
+body.black-white .empty,
+body.black-white .footer-meta,
+body.black-white .footer-qr-image {
+ border-color: #2f3337 !important;
+}
+
+body.black-white .month-title,
+body.black-white .ha-flag {
+ background: #1f2328 !important;
+ color: #fff !important;
+ text-shadow: none !important;
+}
+
+body.black-white .dow span,
+body.black-white .day,
+body.black-white .day.muted,
+body.black-white .day.no-events,
+body.black-white .day.has-matchups,
+body.black-white .empty,
+body.black-white .legend-item,
+body.black-white .event.a .ha-flag {
+ background: #f7f7f7 !important;
+ color: #111 !important;
+ text-shadow: none !important;
+}
+
+body.black-white .dow span {
+ background: #e4e7eb !important;
+}
+
+body.black-white .day,
+body.black-white .day.has-matchups,
+body.black-white .legend-item {
+ background: #fff !important;
+}
+
+body.black-white .event,
+body.black-white .event.h,
+body.black-white .event.a,
+body.black-white .event.matchup {
+ background: #e4e7eb !important;
+ color: #111 !important;
+ text-shadow: none !important;
+}
+
+body.black-white .day.muted,
+body.black-white .day.no-events {
+ background: #f2f3f5 !important;
+ color: #4b5563 !important;
+}
+
+body.black-white .month-title,
+body.black-white .dow span,
+body.black-white .day,
+body.black-white .event {
+ border: 1px solid #2f3337;
+}
+
+body.black-white .day-num,
+body.black-white .day.has-events .day-num,
+body.black-white .day.has-matchups .day-num,
+body.black-white.month-pages .day .day-num {
+ background: #fff !important;
+ color: #111 !important;
+ box-shadow: 0 0 0 1px #2f3337 !important;
+ text-shadow: none !important;
+}
+
+body.black-white .ha-flag,
+body.black-white .event.a .ha-flag {
+ box-shadow: 0 0 0 1px #2f3337;
+}
+
+body.black-white .event-name,
+body.black-white .event-time,
+body.black-white .event-venue,
+body.black-white .matchup-vs,
+body.black-white .footer-qr-label,
+body.black-white .footer-qr-link,
+body.black-white .meta {
+ color: #111 !important;
+ opacity: 1 !important;
+}
+
+body.black-white .meta,
+body.black-white .footer-qr-label {
+ color: #374151 !important;
+}
+
@media print {
body,
body.print-preview {
diff --git a/includes/sp-printable-calendars.php b/includes/sp-printable-calendars.php
index 720b646..73b3a82 100644
--- a/includes/sp-printable-calendars.php
+++ b/includes/sp-printable-calendars.php
@@ -153,6 +153,7 @@ if ( ! class_exists( 'Tony_Sportspress_Printable_Calendars' ) ) {
$vars[] = 'paper';
$vars[] = 'autoprint';
$vars[] = 'month_pages';
+ $vars[] = 'black_white';
return $vars;
}
@@ -539,6 +540,11 @@ if ( ! class_exists( 'Tony_Sportspress_Printable_Calendars' ) ) {
echo '';
echo esc_html__( 'Print each month on its own page', 'tonys-sportspress-enhancements' );
echo '';
+ echo '
';
+ echo '';
echo '';
echo '';
@@ -585,6 +591,7 @@ if ( ! class_exists( 'Tony_Sportspress_Printable_Calendars' ) ) {
var titleFormat = root.querySelector('#tse-printable-builder-title-format');
var autoprint = root.querySelector('#tse-printable-builder-autoprint');
var monthPages = root.querySelector('#tse-printable-builder-month-pages');
+ var blackWhite = root.querySelector('#tse-printable-builder-black-white');
var output = root.querySelector('#tse-printable-builder-output');
var copyButton = root.querySelector('#tse-printable-builder-copy');
var openLink = root.querySelector('#tse-printable-builder-open');
@@ -658,12 +665,18 @@ if ( ! class_exists( 'Tony_Sportspress_Printable_Calendars' ) ) {
url.searchParams.delete('month_pages');
}
+ if (blackWhite.checked) {
+ url.searchParams.set('black_white', '1');
+ } else {
+ url.searchParams.delete('black_white');
+ }
+
output.value = url.toString();
openLink.href = url.toString();
openLink.toggleAttribute('disabled', !teamValues.length);
}
- [team, season, league, field, paper, teamLabel, fieldLabel, titleFormat, autoprint, monthPages].forEach(function(input){
+ [team, season, league, field, paper, teamLabel, fieldLabel, titleFormat, autoprint, monthPages, blackWhite].forEach(function(input){
input.addEventListener('change', buildUrl);
});
@@ -737,6 +750,7 @@ if ( ! class_exists( 'Tony_Sportspress_Printable_Calendars' ) ) {
$paper = $this->normalize_paper_size( (string) get_query_var( 'paper' ) );
$autoprint = '1' === (string) get_query_var( 'autoprint' );
$month_pages = '1' === (string) get_query_var( 'month_pages' );
+ $black_white = '1' === (string) get_query_var( 'black_white' );
$is_multi_team = count( $team_ids ) > 1;
$primary_team_id = isset( $team_ids[0] ) ? (int) $team_ids[0] : 0;
@@ -795,7 +809,14 @@ if ( ! class_exists( 'Tony_Sportspress_Printable_Calendars' ) ) {
echo '';
}
echo '';
- echo '
' . esc_html__( 'No SportsPress teams match the selected league and season.', 'tonys-sportspress-enhancements' ) . '
'; @@ -191,6 +192,13 @@ function tse_sp_schedule_exporter_render_shortcode() { +