Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
taufik-nurrohman committed Dec 6, 2024
1 parent 129d97a commit 0a312b9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions enter.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8">
<meta content="width=device-width,initial-scale=1,shrink-to-fit=no" name="viewport">
<?php if ($w = w($page->description ?? $site->description)): ?>
<meta content="<?= $w; ?>" name="description">
<?php if ($v = w($page->description ?? $site->description)): ?>
<meta content="<?= $v; ?>" name="description">
<?php endif; ?>
<?php if ('archive' === $page->x): ?>
<!-- Prevent search engines from indexing pages with `archive` state -->
Expand All @@ -14,7 +14,7 @@
<title>
<?= w($t->reverse->join(' - ')); ?>
</title>
<link href="<?= eat($url); ?>/favicon.ico" rel="icon">
<link href="<?= eat($url . '/favicon.ico'); ?>" rel="icon">
<link href="<?= eat($url->current(false, false)); ?>" rel="canonical">
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion header.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<header<?= !empty($site->y->contrast->{'title-show'}) && !empty($site->y->contrast->{'icons-show'}) ? ' class="full"' : ""; ?>>
<?php if (!empty($site->y->contrast->{'title-show'})): ?>
<?php if (!empty($site->y->contrast->{'title-show'})): ?>
<h2 title="<?= w($site->description ?? ""); ?>">
<?php if ($site->is('home')): ?>
<span>
Expand Down
10 changes: 5 additions & 5 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

$defaults = [
$states = [
'x.comment.page.type' => 'Markdown',
'x.page.page.type' => 'Markdown'
];

foreach ($defaults as $k => $v) {
foreach ($states as $k => $v) {
!State::get($k) && State::set($k, $v);
}

Expand All @@ -14,8 +14,8 @@
Asset::set(__DIR__ . D . 'index' . D . ($state->y->contrast->skin ?: 'minimal') . $z . 'css', 20.1);

// Create site link data to be used in navigation
$GLOBALS['links'] = new Anemone((static function ($links, $state, $url) {
$index = LOT . D . 'page' . D . trim(strtr($state->route, '/', D), D) . '.page';
lot('links', $links = new Anemone((static function ($links, $state, $url) {
$index = LOT . D . 'page' . D . trim(strtr($state->route ?? 'index', '/', D), D) . '.page';
$path = $url->path . '/';
foreach (g(LOT . D . 'page', 'page') as $k => $v) {
// Exclude home page
Expand All @@ -29,4 +29,4 @@
}
ksort($links);
return $links;
})([], $state, $url));
})([], $state, $url)));
2 changes: 1 addition & 1 deletion page.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</h1>
<?php if ($site->has('parent')): ?>
<time datetime="<?= eat($page->time->format('c')); ?>">
<?= $page->time($site->y->contrast->{'date-format'}); ?>
<?= $page->time($site->y->contrast->{'date-format'}); ?>
</time>
<?php endif; ?>
</header>
Expand Down
4 changes: 2 additions & 2 deletions pager.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php if ($prev = $pager->prev): ?>
<a class="gray" href="<?= eat($prev->link); ?>" rel="prev">
&#x00AB; <?= $prev->title ?? i('Previous'); ?>
&#x00ab; <?= $prev->title ?? i('Previous'); ?>
</a>
<?php else: ?>
<span></span>
<?php endif; ?>
<?php if ($next = $pager->next): ?>
<a class="gray" href="<?= eat($next->link); ?>" rel="next">
<?= $next->title ?? i('Next'); ?> &#x00BB;
<?= $next->title ?? i('Next'); ?> &#x00bb;
</a>
<?php else: ?>
<span></span>
Expand Down

0 comments on commit 0a312b9

Please sign in to comment.