✨ Support microformat1
This commit is contained in:
parent
90f139413e
commit
8156715d9d
3 changed files with 24 additions and 22 deletions
|
@ -1,4 +1,4 @@
|
|||
<div class="h-feed">
|
||||
<div class="h-feed hfeed">
|
||||
|
||||
<?php if ($WHERE_AM_I == 'home') : ?>
|
||||
<?php echo Theme::getHomepagePresentation(); ?>
|
||||
|
@ -16,13 +16,13 @@
|
|||
|
||||
<div class="article-list"><?php foreach ($content as $page) : ?>
|
||||
<!-- Post -->
|
||||
<article class="h-entry">
|
||||
<article class="h-entry hentry">
|
||||
<!-- Load Koblog Plugins: Page Begin -->
|
||||
<?php Theme::plugins('pageBegin'); ?>
|
||||
|
||||
<!-- Title -->
|
||||
<h3 class="title p-name">
|
||||
<a class="u-url" href="<?php echo $page->permalink(); ?>"><?php echo $page->title(); ?></a>
|
||||
<h3 class="title p-name entry-title">
|
||||
<a class="u-url" rel="bookmark" href="<?php echo $page->permalink(); ?>"><?php echo $page->title(); ?></a>
|
||||
</h3>
|
||||
|
||||
<!-- Cover image -->
|
||||
|
@ -38,9 +38,9 @@
|
|||
<div class="article-metadata flex p">
|
||||
<div>
|
||||
<?php if ($themePlugin->dateFormat() == 'relative') : ?>
|
||||
<time class="dt-published" datetime="<?php echo $page->date(DATE_ATOM) ?>"><?php echo $page->relativeTime() ?></time>
|
||||
<time class="dt-published published" datetime="<?php echo $page->date(DATE_ATOM) ?>"><?php echo $page->relativeTime() ?></time>
|
||||
<?php else : ?>
|
||||
<time class="dt-published" datetime="<?php echo $page->date(DATE_ATOM) ?>"><?php echo $page->date() ?></time>
|
||||
<time class="dt-published published" datetime="<?php echo $page->date(DATE_ATOM) ?>"><?php echo $page->date() ?></time>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<div><?php echo $L->get('Reading time') . ': ' . $page->readingTime(); ?></div>
|
||||
|
@ -48,12 +48,12 @@
|
|||
|
||||
<!-- Breaked content -->
|
||||
<?php if ($page->readMore()) : ?>
|
||||
<div class="p-summary"><?php echo $page->contentBreak(); ?></div>
|
||||
<div class="p-summary entry-summary"><?php echo $page->contentBreak(); ?></div>
|
||||
<?php else : ?>
|
||||
<?php if ($page->description()) : ?>
|
||||
<div class="p-summary p"><?php echo $page->description(); ?></div>
|
||||
<div class="p-summary p entry-summary"><?php echo $page->description(); ?></div>
|
||||
<?php else : ?>
|
||||
<div class="e-content p"><?php echo $page->contentBreak(); ?></div>
|
||||
<div class="e-content p entry-content"><?php echo $page->contentBreak(); ?></div>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
<!-- "Read more" button -->
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<!-- Post -->
|
||||
<article id="article-solo" class="h-entry">
|
||||
<article id="article-solo" class="h-entry hentry">
|
||||
|
||||
<!-- Load Koblog Plugins: Page Begin -->
|
||||
<?php Theme::plugins('pageBegin'); ?>
|
||||
|
||||
<!-- Title -->
|
||||
<h2 class="title p-name">
|
||||
<a class="u-url" href="<?php echo $page->permalink(); ?>"><?php echo $page->title(); ?></a>
|
||||
<h2 class="title p-name entry-title">
|
||||
<a class="u-url" href="<?php echo $page->permalink(); ?>" rel="bookmark"><?php echo $page->title(); ?></a>
|
||||
</h2>
|
||||
|
||||
<!-- Cover image -->
|
||||
|
@ -17,18 +17,18 @@
|
|||
<!-- Creation date -->
|
||||
<?php if (!$page->isStatic() && !$url->notFound()) : ?>
|
||||
<div class="article-metadata flex p">
|
||||
<div><time class="dt-published" datetime="<?php echo $page->date(DATE_ATOM) ?>"><?php echo $page->date(); ?></time></div>
|
||||
<div><time class="dt-published published" datetime="<?php echo $page->date(DATE_ATOM) ?>"><?php echo $page->date(); ?></time></div>
|
||||
<div><?php echo $L->get('Reading time') . ': ' . $page->readingTime(); ?></div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($page->description()) : ?>
|
||||
<div class="p-summary p article-metadata"><?php echo $page->description(); ?></div>
|
||||
<div class="p-summary p article-metadata entry-summary"><?php echo $page->description(); ?></div>
|
||||
<hr />
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Full content -->
|
||||
<div class="article-body e-content">
|
||||
<div class="article-body e-content entry-content">
|
||||
<?php echo $page->content(); ?>
|
||||
</div>
|
||||
<?php if (!$page->isStatic() && !$url->notFound()) : ?>
|
||||
|
@ -45,20 +45,20 @@
|
|||
<?php endforeach ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card author-area p-author h-card">
|
||||
<div class="card author-area p-author h-card vcard author">
|
||||
<div class="author-identity">
|
||||
<img alt="" class="avatar u-photo" src="<?php echo ($page->user('profilePicture'));?>" height="64" width="64" decoding="async">
|
||||
<img alt="" class="avatar u-photo photo" src="<?php echo ($page->user('profilePicture'));?>" height="64" width="64" decoding="async">
|
||||
<div class="author-metadata">
|
||||
<div class="author-pseudo">
|
||||
Écrit par <a href="<?php echo $page->user('authorUri'); ?>" class="p-name"><?php echo $page->user('displayName'); ?></a>
|
||||
Écrit par <a href="<?php echo $page->user('authorUri'); ?>" class="p-name fn"><?php echo $page->user('displayName'); ?></a>
|
||||
<span class="pill p-pronouns"><?php echo $page->user('pronouns'); ?></span>
|
||||
</div>
|
||||
<div class="p-note"><?php echo $page->user('description'); ?></div>
|
||||
<div class="p-note note"><?php echo $page->user('description'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="author-links">
|
||||
<?php if ($page->user('homepage')):?>
|
||||
<li><a href="<?php echo ($page->user('homepage'));?>" class="u-url">Homepage</a> </li>
|
||||
<li><a href="<?php echo ($page->user('homepage'));?>" class="u-url url">Homepage</a> </li>
|
||||
<?php endif ?>
|
||||
<?php foreach ($page->user('socials') as $key => $social):?>
|
||||
<li><a href="<?php echo ($social->url);?>" rel="me"><?php echo $social->name; ?></a> </li>
|
||||
|
|
|
@ -75,7 +75,8 @@ class defaultTheme extends Plugin
|
|||
if ($this->getValue('banner') == '') {
|
||||
return '';
|
||||
}
|
||||
return new Media($this->getValue('banner'))->permalink();
|
||||
$banner = new Media($this->getValue('banner'));
|
||||
return $banner->permalink();
|
||||
}
|
||||
|
||||
public function backgroundURI()
|
||||
|
@ -83,6 +84,7 @@ class defaultTheme extends Plugin
|
|||
if ($this->getValue('background') == '') {
|
||||
return '';
|
||||
}
|
||||
return new Media($this->getValue('background'))->permalink();
|
||||
$background = new Media($this->getValue('background'));
|
||||
return $background->permalink();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue