213 lines
9.7 KiB
PHP
213 lines
9.7 KiB
PHP
<?php
|
||
/**
|
||
* صفحه ۴۰۴ — تجربهٔ تعاملی با تم حسابداری
|
||
*
|
||
* @package Hesabix2
|
||
*/
|
||
|
||
get_header();
|
||
|
||
$wrap = 'max-w-6xl mx-auto px-4 sm:px-6 lg:px-8';
|
||
|
||
$blog_url = function_exists( 'hesabix2_blog_url' )
|
||
? hesabix2_blog_url()
|
||
: ( get_option( 'page_for_posts' ) ? get_permalink( (int) get_option( 'page_for_posts' ) ) : home_url( '/blog/' ) );
|
||
|
||
$dev_url = function_exists( 'hesabix2_development_page_url' )
|
||
? hesabix2_development_page_url()
|
||
: home_url( '/development/' );
|
||
|
||
$compare_url = function_exists( 'hesabix2_versions_compare_url' )
|
||
? hesabix2_versions_compare_url()
|
||
: home_url( '/arc-shadoman/' );
|
||
|
||
$requested_path = '';
|
||
if ( ! empty( $_SERVER['REQUEST_URI'] ) ) {
|
||
$requested_path = wp_parse_url( wp_unslash( $_SERVER['REQUEST_URI'] ), PHP_URL_PATH );
|
||
if ( ! is_string( $requested_path ) ) {
|
||
$requested_path = '';
|
||
}
|
||
$requested_path = sanitize_text_field( $requested_path );
|
||
}
|
||
|
||
$witty_lines = array(
|
||
__( 'این آدرس در دفتر کل ثبت نشده است.', 'hesabix2' ),
|
||
__( 'فاکتور این صفحه باطل شده — شاید جابهجا شده.', 'hesabix2' ),
|
||
__( 'ترازنامهٔ سایت متعادل است؛ فقط این URL نیست.', 'hesabix2' ),
|
||
__( 'ماندهٔ این صفحه: صفر. موجودی محتوا: ناموجود.', 'hesabix2' ),
|
||
__( 'ربات هوشمند ما هم این مسیر را در انبار پیدا نکرد.', 'hesabix2' ),
|
||
);
|
||
?>
|
||
|
||
<main id="main-content" class="hx-404" aria-labelledby="hx-404-title">
|
||
<div class="hx-404__bg" aria-hidden="true">
|
||
<div class="hx-404__grid"></div>
|
||
<div class="hx-404__orb hx-404__orb--1"></div>
|
||
<div class="hx-404__orb hx-404__orb--2"></div>
|
||
<div class="hx-404__orb hx-404__orb--3"></div>
|
||
<canvas id="hx-404-particles" class="hx-404__particles"></canvas>
|
||
</div>
|
||
|
||
<div class="<?php echo esc_attr( $wrap ); ?> hx-404__shell relative z-10">
|
||
<div class="hx-404__layout">
|
||
<!-- صحنهٔ بصری -->
|
||
<div class="hx-404__stage" id="hx-404-stage">
|
||
<div class="hx-404__digits" aria-hidden="true">
|
||
<span class="hx-404__digit hx-404__digit--4a" data-digit="4">۴</span>
|
||
<span class="hx-404__digit hx-404__digit--0" data-digit="0">۰</span>
|
||
<span class="hx-404__digit hx-404__digit--4b" data-digit="4">۴</span>
|
||
</div>
|
||
|
||
<div class="hx-404__scene">
|
||
<!-- ترازو -->
|
||
<div class="hx-404__scale" id="hx-404-scale" role="img" aria-label="<?php esc_attr_e( 'ترازوی نامتعادل', 'hesabix2' ); ?>">
|
||
<div class="hx-404__scale-stand"></div>
|
||
<div class="hx-404__scale-beam">
|
||
<div class="hx-404__scale-pan hx-404__scale-pan--left">
|
||
<span class="hx-404__scale-label"><?php esc_html_e( 'صفحه', 'hesabix2' ); ?></span>
|
||
<span class="hx-404__scale-weight">۰</span>
|
||
</div>
|
||
<div class="hx-404__scale-pan hx-404__scale-pan--right">
|
||
<span class="hx-404__scale-label"><?php esc_html_e( 'محتوا', 'hesabix2' ); ?></span>
|
||
<span class="hx-404__scale-weight">؟</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- فاکتور معلق -->
|
||
<figure class="hx-404__invoice" id="hx-404-invoice">
|
||
<div class="hx-404__invoice-header">
|
||
<span class="hx-404__invoice-brand"><?php esc_html_e( 'حسابیکس', 'hesabix2' ); ?></span>
|
||
<span class="hx-404__invoice-stamp"><?php esc_html_e( 'باطل', 'hesabix2' ); ?></span>
|
||
</div>
|
||
<div class="hx-404__invoice-body">
|
||
<div class="hx-404__invoice-row">
|
||
<span><?php esc_html_e( 'شرح', 'hesabix2' ); ?></span>
|
||
<span><?php esc_html_e( 'صفحهٔ یافتنشده', 'hesabix2' ); ?></span>
|
||
</div>
|
||
<div class="hx-404__invoice-row">
|
||
<span><?php esc_html_e( 'کد خطا', 'hesabix2' ); ?></span>
|
||
<strong>۴۰۴</strong>
|
||
</div>
|
||
<div class="hx-404__invoice-row hx-404__invoice-row--total">
|
||
<span><?php esc_html_e( 'جمع', 'hesabix2' ); ?></span>
|
||
<strong class="hx-404__invoice-total">۰</strong>
|
||
</div>
|
||
</div>
|
||
<div class="hx-404__invoice-barcode" aria-hidden="true">
|
||
<?php
|
||
for ( $i = 0; $i < 28; $i++ ) :
|
||
$bar_h = 6 + ( $i % 7 ) * 2 + (int) ( ( $i * 3 ) % 5 );
|
||
?>
|
||
<span style="height:<?php echo (int) $bar_h; ?>px"></span>
|
||
<?php endfor; ?>
|
||
</div>
|
||
</figure>
|
||
|
||
<!-- ماشینحساب -->
|
||
<div class="hx-404__calc" aria-hidden="true">
|
||
<div class="hx-404__calc-screen">ERR ۴۰۴</div>
|
||
<div class="hx-404__calc-keys">
|
||
<?php
|
||
$keys = array( '۷', '۸', '۹', '÷', '۴', '۵', '۶', '×', '۱', '۲', '۳', '−', '۰', '.', '=', '+' );
|
||
foreach ( $keys as $key ) :
|
||
?>
|
||
<span class="hx-404__calc-key<?php echo ( '۰' === $key ) ? ' hx-404__calc-key--wide' : ''; ?>"><?php echo esc_html( $key ); ?></span>
|
||
<?php endforeach; ?>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<button type="button" class="hx-404__balance-btn" id="hx-404-balance-btn" aria-describedby="hx-404-balance-hint" data-done-label="<?php esc_attr_e( 'تراز شد ✓', 'hesabix2' ); ?>">
|
||
<span class="hx-404__balance-btn-icon" aria-hidden="true">⚖️</span>
|
||
<span class="hx-404__balance-btn-label"><?php esc_html_e( 'تراز کردن دفتر', 'hesabix2' ); ?></span>
|
||
</button>
|
||
<p id="hx-404-balance-hint" class="hx-404__balance-hint"><?php esc_html_e( 'یک کلیک — شاید معجزه کند!', 'hesabix2' ); ?></p>
|
||
<p class="hx-404__balance-success is-hidden" id="hx-404-balance-success" role="status">
|
||
<?php esc_html_e( 'تراز شد! حالا برویم خانه.', 'hesabix2' ); ?>
|
||
</p>
|
||
</div>
|
||
|
||
<!-- محتوا -->
|
||
<div class="hx-404__panel">
|
||
<p class="hx-404__badge">
|
||
<span class="hx-404__badge-dot" aria-hidden="true"></span>
|
||
<?php esc_html_e( 'خطای حسابداری — کد ۴۰۴', 'hesabix2' ); ?>
|
||
</p>
|
||
|
||
<h1 id="hx-404-title" class="hx-404__title">
|
||
<?php esc_html_e( 'صفحه پیدا نشد', 'hesabix2' ); ?>
|
||
</h1>
|
||
|
||
<p class="hx-404__subtitle" id="hx-404-witty" data-lines="<?php echo esc_attr( wp_json_encode( array_values( $witty_lines ) ) ); ?>">
|
||
<?php echo esc_html( $witty_lines[0] ); ?>
|
||
</p>
|
||
|
||
<p class="hx-404__desc">
|
||
<?php esc_html_e( 'آدرسی که وارد کردید وجود ندارد، حذف شده یا به جای دیگری منتقل شده. نگران نباشید — در حسابداری هم گاهی یک سطر جابهجا میشود.', 'hesabix2' ); ?>
|
||
</p>
|
||
|
||
<?php if ( $requested_path && $requested_path !== '/' ) : ?>
|
||
<div class="hx-404__path" dir="ltr">
|
||
<span class="hx-404__path-label"><?php esc_html_e( 'آدرس درخواستی', 'hesabix2' ); ?></span>
|
||
<code class="hx-404__path-value"><?php echo esc_html( $requested_path ); ?></code>
|
||
</div>
|
||
<?php endif; ?>
|
||
|
||
<div class="hx-404__actions">
|
||
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="hx-404__btn hx-404__btn--primary">
|
||
<svg width="20" height="20" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"/></svg>
|
||
<?php esc_html_e( 'بازگشت به صفحهٔ اصلی', 'hesabix2' ); ?>
|
||
</a>
|
||
<a href="<?php echo esc_url( home_url( '/contact/' ) ); ?>" class="hx-404__btn hx-404__btn--ghost">
|
||
<svg width="20" height="20" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"/></svg>
|
||
<?php esc_html_e( 'تماس با پشتیبانی', 'hesabix2' ); ?>
|
||
</a>
|
||
</div>
|
||
|
||
<nav class="hx-404__quick" aria-label="<?php esc_attr_e( 'مسیرهای پیشنهادی', 'hesabix2' ); ?>">
|
||
<a href="<?php echo esc_url( $blog_url ); ?>" class="hx-404__quick-link">
|
||
<span class="hx-404__quick-icon" aria-hidden="true">📰</span>
|
||
<span class="hx-404__quick-text"><?php esc_html_e( 'وبلاگ', 'hesabix2' ); ?></span>
|
||
</a>
|
||
<a href="<?php echo esc_url( $compare_url ); ?>" class="hx-404__quick-link">
|
||
<span class="hx-404__quick-icon" aria-hidden="true">⚡</span>
|
||
<span class="hx-404__quick-text"><?php esc_html_e( 'آرک و شادمان', 'hesabix2' ); ?></span>
|
||
</a>
|
||
<a href="<?php echo esc_url( $dev_url ); ?>" class="hx-404__quick-link">
|
||
<span class="hx-404__quick-icon" aria-hidden="true">🛠</span>
|
||
<span class="hx-404__quick-text"><?php esc_html_e( 'وضعیت توسعه', 'hesabix2' ); ?></span>
|
||
</a>
|
||
<?php if ( function_exists( 'hesabix2_bbpress_root_url' ) ) : ?>
|
||
<a href="<?php echo esc_url( hesabix2_bbpress_root_url() ); ?>" class="hx-404__quick-link">
|
||
<span class="hx-404__quick-icon" aria-hidden="true">💬</span>
|
||
<span class="hx-404__quick-text"><?php esc_html_e( 'انجمن', 'hesabix2' ); ?></span>
|
||
</a>
|
||
<?php endif; ?>
|
||
</nav>
|
||
|
||
<div class="hx-404__search">
|
||
<p class="hx-404__search-label"><?php esc_html_e( 'یا جستجو کنید', 'hesabix2' ); ?></p>
|
||
<?php get_search_form(); ?>
|
||
<div class="hx-404__search-chips" role="list">
|
||
<?php
|
||
$chips = array(
|
||
__( 'حسابداری', 'hesabix2' ),
|
||
__( 'آرک', 'hesabix2' ),
|
||
__( 'API', 'hesabix2' ),
|
||
__( 'قیمت', 'hesabix2' ),
|
||
);
|
||
foreach ( $chips as $chip ) :
|
||
?>
|
||
<button type="button" class="hx-404__chip" data-search="<?php echo esc_attr( $chip ); ?>" role="listitem">
|
||
<?php echo esc_html( $chip ); ?>
|
||
</button>
|
||
<?php endforeach; ?>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</main>
|
||
|
||
<?php get_footer(); ?>
|