-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure and format component, fix #306
- Loading branch information
1 parent
9be8783
commit 09d8af6
Showing
1 changed file
with
24 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,47 @@ | ||
@php | ||
/** @var \Hyde\Framework\Models\MarkdownPost $post */ | ||
@endphp | ||
|
||
<article class="mt-4 mb-8" itemscope itemtype="https://schema.org/Article"> | ||
<meta itemprop="identifier" content="{{ $post->slug }}"> | ||
@if(Hyde::uriPath()) | ||
@if(Hyde::uriPath()) | ||
<meta itemprop="url" content="{{ Hyde::uriPath('posts/' . $post->slug) }}"> | ||
@endif | ||
@endif | ||
|
||
<header> | ||
<a href="posts/{{ $post->matter['slug'] }}.html" class="block w-fit"> | ||
<a href="posts/{{ $post->slug }}.html" class="block w-fit"> | ||
<h2 class="text-2xl font-bold text-gray-700 hover:text-gray-900 dark:text-gray-200 dark:hover:text-white transition-colors duration-75"> | ||
{{ $post->matter['title'] ?? $post->title }} | ||
</h2> | ||
</a> | ||
</header> | ||
|
||
<footer> | ||
@isset($post->matter['date']) | ||
@isset($post->matter['date']) | ||
<span class="opacity-75"> | ||
<span itemprop="dateCreated datePublished"> | ||
{{ date('M jS, Y', strtotime($post->matter['date'])) }}</span>{{ isset($post->matter['author']) ? ',' : '' }} | ||
</span> | ||
@endisset | ||
@isset($post->matter['author']) | ||
@endisset | ||
@isset($post->author) | ||
<span itemprop="author" itemscope itemtype="https://schema.org/Person"> | ||
<span class="opacity-75">by</span> | ||
<span itemprop="name"> | ||
{{ $post->matter['author'] }} | ||
{{ $post->author->name ?? $post->author->username }} | ||
</span> | ||
</span> | ||
@endisset | ||
@endisset | ||
</footer> | ||
|
||
<div> | ||
@isset($post->matter['description']) | ||
<section role="doc-abstract" aria-label="Excerpt"> | ||
<p class="leading-relaxed my-1"> | ||
{{ $post->matter['description'] }} | ||
</p> | ||
</section> | ||
@endisset | ||
<a href="posts/{{ $post->matter['slug'] }}.html" class="text-indigo-500 hover:underline font-medium">Read post</a> | ||
</div> | ||
@isset($post->matter['description']) | ||
<section role="doc-abstract" aria-label="Excerpt"> | ||
<p class="leading-relaxed my-1"> | ||
{{ $post->matter['description'] }} | ||
</p> | ||
</section> | ||
@endisset | ||
|
||
<footer> | ||
<a href="posts/{{ $post->slug }}.html" class="text-indigo-500 hover:underline font-medium">Read post</a> | ||
</footer> | ||
</article> |