-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor view more+rss+json into component
- Loading branch information
Showing
6 changed files
with
52 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
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
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,9 +1,12 @@ | ||
--- | ||
import EmojiList from '../EmojiList.astro' | ||
import ViewMore from '../ViewMore.astro' | ||
--- | ||
|
||
<EmojiList emoji="🔧"> | ||
<li><a href="/" class="inline text-ellipsis">2024 01 01</a></li> | ||
<li><a href="/" class="inline text-ellipsis">2023 12 31</a></li> | ||
<li><a href="/" class="inline text-ellipsis">2023 12 30</a></li> | ||
<li><a href="/git/1" class="inline text-ellipsis">2024 01 01</a></li> | ||
<li><a href="/git/2" class="inline text-ellipsis">2023 12 31</a></li> | ||
<li><a href="/git/3" class="inline text-ellipsis">2023 12 30</a></li> | ||
</EmojiList> | ||
|
||
<ViewMore urlbase="/git" rss json text="view 12 more" /> |
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,22 +1,27 @@ | ||
--- | ||
import EmojiList from '../EmojiList.astro' | ||
import ViewMore from '../ViewMore.astro' | ||
--- | ||
|
||
<EmojiList emoji="🗞️"> | ||
<li class="line-clamp-1"> | ||
<a href="/" class="inline text-ellipsis">Lorem ipsum, dolor sit</a> | ||
<a href="/news/1" class="inline text-ellipsis">Lorem ipsum, dolor sit</a> | ||
</li> | ||
<li class="line-clamp-1"> | ||
<a href="/" class="inline text-ellipsis">Dolore, quasi minus! Perferendis</a | ||
<a href="/news/2" class="inline text-ellipsis" | ||
>Dolore, quasi minus! Perferendis</a | ||
> | ||
</li> | ||
<li class="line-clamp-1"> | ||
<a href="/" class="inline text-ellipsis" | ||
<a href="/news/3" class="inline text-ellipsis" | ||
>Quam magni nisi error culpa quasi</a | ||
> | ||
</li> | ||
<li class="line-clamp-1"> | ||
<a href="/" class="inline text-ellipsis">Aspernatur illo similique cumque</a | ||
<a href="/news/4" class="inline text-ellipsis" | ||
>Aspernatur illo similique cumque</a | ||
> | ||
</li> | ||
</EmojiList> | ||
|
||
<ViewMore urlbase="/news" rss json text="view 4 more" /> |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
interface Props { | ||
urlbase: string | ||
text: string | ||
rss?: boolean | ||
json?: boolean | ||
} | ||
const { urlbase, text, rss = false, json = false } = Astro.props | ||
--- | ||
|
||
<div class="flex flex-row justify-between"> | ||
<a href={`${urlbase}`} class="">{text}</a> | ||
<span> | ||
{ | ||
rss && ( | ||
<a href={`${urlbase}/rss`} class="text-green-500"> | ||
rss | ||
</a> | ||
) | ||
} | ||
{ | ||
json && ( | ||
<> | ||
{' • '} | ||
<a href={`${urlbase}/json`} class="text-yellow-500"> | ||
json | ||
</a> | ||
</> | ||
) | ||
} | ||
</span> | ||
</div> |
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