fix: card/link colors, title clamp, header icon color; clean distributable zips

- links inherit design colour (Astra was recolouring card titles, destination
  names, header search icon → dark/invisible); buttons keep their colour
- clamp long tour titles + titem descriptions to 2 lines; meta values no-wrap
- theme: reset icon-btn background/colour so header icons show (white)
- add build-zip.php; zips now exclude docs/, build/, *.md, .claude (no
  doc/guidance/AI-revealing files shipped)
- bump plugin 1.8.3, theme 1.0.2

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4hNL1PSHxXbu94SCenpKj
This commit is contained in:
2026-09-15 22:46:34 +03:30
parent 35368fb5f9
commit 911d2b4d2e
18 changed files with 92 additions and 5 deletions

BIN
_home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 MiB

BIN
_tours.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

View File

@@ -23,10 +23,10 @@ add_action( 'wp_enqueue_scripts', function () {
if ( wp_style_is( 'astra-theme-css', 'registered' ) ) {
$deps[] = 'astra-theme-css';
}
wp_enqueue_style( 'hoho-chrome', get_stylesheet_directory_uri() . '/assets/chrome.css', $deps, '1.0.1' );
wp_enqueue_style( 'hoho-chrome', get_stylesheet_directory_uri() . '/assets/chrome.css', $deps, '1.0.2' );
// Header interactions: burger, submenu, sticky, back-to-top, search toggle.
wp_enqueue_script( 'hoho-chrome', get_stylesheet_directory_uri() . '/assets/chrome.js', array(), '1.0.1', true );
wp_enqueue_script( 'hoho-chrome', get_stylesheet_directory_uri() . '/assets/chrome.js', array(), '1.0.2', true );
wp_add_inline_style(
'hoho-chrome',
@@ -40,8 +40,15 @@ add_action( 'wp_enqueue_scripts', function () {
'.hoho,.hoho h1,.hoho h2,.hoho h3,.hoho p,.hoho a,.hoho span,.hoho li,.hoho button,.hoho input{font-family:"Plus Jakarta Sans",system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;}',
// Normalize: stop Astra decorating header/footer links & lists.
'.hoho a,.hoho.hoho a{text-decoration:none!important;box-shadow:none!important;}',
'.hoho a:not(.btn){color:inherit;}',
'.hoho :is(ul,ol){list-style:none!important;margin:0!important;padding:0!important;}',
'.hoho li{margin:0!important;}',
// Icon buttons: Astra gives <button> a filled background + its own
// colour, which turned the header search icon into an empty dark
// circle. Reset them (real .btn buttons keep their styling).
'.hoho .icon-btn{background:transparent!important;border:0!important;color:#fff!important;padding:.4rem;}',
'.hoho .site-header .icon{color:#fff;}',
'.hoho button:not(.btn):not(.burger){background:transparent;border:0;color:inherit;}',
// Expanding header search field.
'.hoho .header__search{display:flex;align-items:center;gap:.25rem;}',
'.hoho .header__search-input{width:0;min-width:0;padding:0;border:0;outline:0;opacity:0;height:var(--control-h);border-radius:var(--r-pill);background:rgba(255,255,255,.15);color:#fff;transition:width .25s var(--ease),opacity .2s var(--ease),padding .25s var(--ease);}',

View File

@@ -4,7 +4,7 @@ Theme URI: https://git.kaamyab.dev/vargha/TourWebsite
Description: Astra child theme that replaces the Astra header and footer with the "Hop On Hop Off" design. Pairs with the Viator Collector plugin.
Author: Amir Bagheri
Template: astra
Version: 1.0.0
Version: 1.0.2
Text Domain: hoponhopoff
*/

70
build-zip.php Normal file
View File

@@ -0,0 +1,70 @@
<?php
/**
* Distribution zipper for the plugin / theme.
*
* php build-zip.php <source-dir> <output.zip>
*
* Produces a clean, distributable archive: excludes docs, build tooling,
* markdown, VCS and editor/AI metadata — nothing that documents how the code
* was produced ships to the client.
*
* Exclusion rule (keep in sync with the "no docs/AI files in zips" preference):
* - any path segment: .git, .claude, .github, docs, build, node_modules
* - any *.md file
* - dotfiles at any level except .htaccess
*/
$src = isset( $argv[1] ) ? rtrim( str_replace( '\\', '/', $argv[1] ), '/' ) : '';
$out = isset( $argv[2] ) ? $argv[2] : '';
if ( '' === $src || '' === $out || ! is_dir( $src ) ) {
fwrite( STDERR, "Usage: php build-zip.php <source-dir> <output.zip>\n" );
exit( 1 );
}
$excluded_dirs = array( '.git', '.claude', '.github', 'docs', 'build', 'node_modules' );
function is_excluded( $rel, array $excluded_dirs ) {
$parts = explode( '/', $rel );
$base = end( $parts );
foreach ( $parts as $seg ) {
if ( in_array( $seg, $excluded_dirs, true ) ) {
return true;
}
}
// Markdown / doc files.
if ( preg_match( '/\.md$/i', $base ) ) {
return true;
}
// Dotfiles (e.g. .gitignore, .DS_Store) except .htaccess.
if ( '' !== $base && '.' === $base[0] && '.htaccess' !== $base ) {
return true;
}
return false;
}
@unlink( $out );
$zip = new ZipArchive();
if ( true !== $zip->open( $out, ZipArchive::CREATE | ZipArchive::OVERWRITE ) ) {
fwrite( STDERR, "Cannot create $out\n" );
exit( 1 );
}
$root = basename( $src );
$it = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $src, FilesystemIterator::SKIP_DOTS ) );
$added = 0;
$skip = 0;
foreach ( $it as $file ) {
$path = str_replace( '\\', '/', $file->getPathname() );
// Path relative to the source's parent, so the archive contains <root>/…
$rel_from_src = ltrim( substr( $path, strlen( $src ) ), '/' );
if ( is_excluded( $rel_from_src, $excluded_dirs ) ) {
$skip++;
continue;
}
$zip->addFile( $path, $root . '/' . $rel_from_src );
$added++;
}
$zip->close();
fwrite( STDOUT, "Wrote $out — $added files (skipped $skip)\n" );

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 320 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 KiB

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 577 B

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 577 B

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

After

Width:  |  Height:  |  Size: 630 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 MiB

After

Width:  |  Height:  |  Size: 696 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 825 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 574 KiB

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

BIN
viator-collector/assets.zip Normal file

Binary file not shown.

View File

@@ -202,6 +202,16 @@ class VC_Display {
'.vc-app .tour__text ul{list-style:disc!important;margin:1em 0!important;padding-inline-start:1.5em!important;}',
'.vc-app .tour__text ol{list-style:decimal!important;margin:1em 0!important;padding-inline-start:1.5em!important;}',
'.vc-app .tour__text li{margin:.25em 0!important;}',
// Links must inherit the design colour (Astra colours links with its
// theme colour, which turned white card titles/destination names into
// coloured text). Buttons keep their own colour.
'.vc-app a:not(.btn){color:inherit;}',
'.vc-app .tour__text a{color:var(--c-teal);}',
// Real tour titles are far longer than the mockup\'s city names — clamp
// them and stop price/duration values wrapping mid-number.
'.vc-app .dcard__title{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}',
'.vc-app .titem__desc{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}',
'.vc-app .dcard__meta .meta__v{white-space:nowrap;}',
// Typography: force the design font over Astra inside our scopes.
'.vc-app,.vc-app h1,.vc-app h2,.vc-app h3,.vc-app h4,.vc-app h5,.vc-app h6,'
. '.vc-app p,.vc-app a,.vc-app span,.vc-app li,.vc-app button,.vc-app input,'

View File

@@ -4,13 +4,13 @@ defined('ABSPATH') || exit;
/**
* Plugin Name: Viator Collector
* Description: Import Viator tours using the Viator Partner API and display them with native WordPress post types, templates, and shortcodes.
* Version: 1.8.2
* Version: 1.8.3
* Author: Amir Bagheri
* License: GPL-2.0-or-later
* Text Domain: viator-collector
*/
define('VC_VERSION', '1.8.2');
define('VC_VERSION', '1.8.3');
define('VC_PLUGIN_FILE', __FILE__);
define('VC_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('VC_PLUGIN_URL', plugin_dir_url(__FILE__));