initfest/front-page.php

77 lines
1.9 KiB
PHP
Raw Normal View History

2014-09-30 12:13:06 +03:00
<?php get_header(); ?>
2024-10-24 23:38:56 +03:00
<section class="content subtitle_content">
<?php
e_('about_event');
2024-10-25 00:09:41 +03:00
// countdown begin
$eventStartTimes = [
'2024' => '2024-11-02 10:00:00',
];
2024-10-24 23:38:56 +03:00
$blog_slug = get_blog_slug();
2024-10-25 00:09:41 +03:00
if (array_key_exists($blog_slug, $eventStartTimes)) {
$now = new DateTimeImmutable('now');
$eventStart = new DateTimeImmutable($eventStartTimes[$blog_slug] . ' Europe/Sofia');
$interval = $now->diff($eventStart);
}
if ($interval instanceof DateInterval && $interval->invert === 0) {
2024-10-24 23:38:56 +03:00
?>
<style>
.countdown {
text-align: center;
}
2024-10-24 23:38:56 +03:00
.countdown > table {
margin: 0 auto;
}
.countdown .digits > td {
font-size: 30px;
2024-10-24 23:50:09 +03:00
padding: 0 10px;
2024-10-24 23:38:56 +03:00
}
2024-10-24 23:44:57 +03:00
.countdown .units > td {
2024-10-24 23:38:56 +03:00
font-size: 12px;
}
</style>
<br><br>
<div class="countdown">
<?php e_('countdown_text_before'); ?>
2024-10-24 23:38:56 +03:00
<table>
<tbody>
<tr class="digits">
2024-10-25 00:09:41 +03:00
<td><?php echo $interval->format('%a'); ?></td>
<td><?php echo $interval->format('%H'); ?></td>
<td><?php echo $interval->format('%I'); ?></td>
2024-10-24 23:38:56 +03:00
</tr>
<tr class="units">
<td><?php e_('countdown_days'); ?></td>
<td><?php e_('countdown_hours'); ?></td>
<td><?php e_('countdown_minutes'); ?></td>
</tr>
</tbody>
</table>
<?php e_('countdown_text_after'); ?>
2024-10-24 23:38:56 +03:00
</div>
<?php
2024-10-24 23:38:56 +03:00
}
2024-10-25 00:09:41 +03:00
// countdown end
?>
</section>
2014-10-17 10:56:05 +03:00
<section class="content">
<?php echo do_shortcode( '[sh-latest-posts cat="news" label="'.pll__('Новини').'"]' ); ?>
2014-10-17 09:39:11 +03:00
<div class="separator"></div>
<div class="col-right sponsors sponsors-frontpage">
2014-10-17 09:39:11 +03:00
<?php echo do_shortcode( '[sponsors]' ); ?>
<?php echo do_shortcode( '[partners]' ); ?>
</div>
<div class="separator"></div>
2014-09-30 12:13:06 +03:00
</section>
2014-10-04 23:54:46 +03:00
2014-10-06 05:41:54 +03:00
<?php echo do_shortcode( '[transport]' ); ?>
2014-10-06 04:38:44 +03:00
2014-09-30 12:13:06 +03:00
<?php get_footer(); ?>