Skip to content

Commit

Permalink
v4.0..0
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristineTham committed Mar 31, 2024
1 parent c7dce64 commit e05706c
Show file tree
Hide file tree
Showing 53 changed files with 269 additions and 240 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,11 @@ All commands are run from the root of the project, from a terminal:
- Make BlogHero accept post as props rather than frontmatter
- Moved Markdown pages to content collection
- Eliminated Frontmatter type
- 3.4.1: Maintenance:
- 4.0.0: Major changes:
- Updated packages
- Removed @types/photoswipe and photoswipe tsconfig
- Removed @types/photoswipe and photoswipe tsconfig
- Moved to RSS schema
- getPosts() function
- schema tags
- automatically generated sidebar links
- improved RSS and search metadata
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hello-astro",
"description": "Hello Astro is a full featured Astro corporate/marketing/blog starter theme written in Typescript and TailwindCSS. It supports Markdown and MDX based pages and blog posts.",
"version": "3.4.1",
"version": "4.0.0",
"scripts": {
"dev": "astro dev",
"clean": "rm -rf node_modules .astro dist",
Expand Down Expand Up @@ -50,7 +50,7 @@
"tailwindcss": "^3.4.3",
"typescript": "~5.4.3",
"unist-util-visit": "^5.0.0",
"vite": "^5.2.6"
"vite": "^5.2.7"
},
"dependencies": {
"@astrojs/check": "^0.5.10",
Expand Down
58 changes: 29 additions & 29 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 25 additions & 17 deletions src/components/blogcard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -38,43 +38,51 @@ if (post.data.author) {
alt={post.data.title + ' featured image'}
class='relative h-64 w-full overflow-hidden rounded-lg bg-purple-100 object-cover object-center group-hover:opacity-75 dark:bg-purple-800'
/>
<p class='sr-only'>{post.data.title}</p>
<p itemprop='name' class='sr-only'>{post.data.title}</p>
</a>
<div class='p-6'>
{post.data.categories && <Categories categories={post.data.categories} />}
<a href={import.meta.env.BASE_URL + 'blog/' + post.slug}>
<a itemprop='url' href={import.meta.env.BASE_URL + 'blog/' + post.slug}>
<h1
itemprop='name'
class='title-font mt-2 text-xl font-bold text-purple-600 hover:text-pink-600 dark:text-purple-300 dark:hover:text-pink-300'
>
{post.data.title}
</h1>
</a>
<div class='flex flex-wrap items-center'>
<span
class='mr-3 inline-flex items-center border-r-2 border-purple-200 py-1 pr-3 text-xs leading-none text-gray-500 dark:border-purple-600 dark:text-gray-400'
>
<Icon class='mr-1 h-4 w-4' name='heroicons:calendar-days' />
{post.data.publishDate.toDateString()}
</span>
{
post.data.minutesRead && (
<span class='mr-3 inline-flex items-center border-r-2 border-purple-200 py-1 pr-3 text-xs leading-none text-gray-500 dark:border-purple-600 dark:text-gray-400'>
<Icon class='mr-1 h-4 w-4' name='heroicons:clock' />
{post.data.minutesRead}
post.data.pubDate && (
<span
itemprop='datePublished'
class='mr-3 inline-flex items-center border-r-2 border-purple-200 py-1 pr-3 text-xs leading-none text-gray-500 dark:border-purple-600 dark:text-gray-400'
>
<Icon class='mr-1 h-4 w-4' name='heroicons:calendar-days' />
{post.data.pubDate.toDateString()}
</span>
)
}
{
post.data.author && (
<span class='text-rosely1 dark:text-rosely7 inline-flex items-center text-xs leading-none'>
<Icon class='mr-1 h-4 w-4' name='heroicons:user-circle' />
{author.data.title}
post.data.minutesRead && (
<span class='mr-3 inline-flex items-center border-r-2 border-purple-200 py-1 pr-3 text-xs leading-none text-gray-500 dark:border-purple-600 dark:text-gray-400'>
<Icon class='mr-1 h-4 w-4' name='heroicons:clock' />
{post.data.minutesRead}
</span>
)
}
<span
itemprop='author'
class='inline-flex items-center text-xs leading-none text-gray-500 dark:text-gray-400'
>
<Icon class='mr-1 h-4 w-4' name='heroicons:user-circle' />
{author.data.title}
</span>
</div>

<p class='mt-3 text-sm italic text-gray-600 dark:text-gray-300'>
<p
itemprop='abstract description'
class='mt-3 text-sm italic text-gray-600 dark:text-gray-300'
>
{post.data.description}
</p>
<Tags tags={post.data.tags} />
Expand Down
25 changes: 12 additions & 13 deletions src/components/bloghero.astro
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ if (post.data.author) {
>
</div>
<Image
itemprop='image'
src={image}
alt='featured image'
class='absolute left-0 top-0 z-0 h-full w-full object-cover'
Expand All @@ -47,24 +48,22 @@ if (post.data.author) {
{post.data.description}
</h2>
<span class='mt-3 flex'>
<span class='mr-6 flex items-center'>
<Image
src={author.data.image}
alt={author.data.title}
class='mr-2 h-10 w-10 rounded-full object-cover'
/>
<span class='font-semibold text-purple-200'>{author.data.title}</span>
</span>
{
post.data.author && (
post.data.pubDate && (
<span class='mr-6 flex items-center'>
<Image
src={author.data.image}
alt={author.data.title}
class='mr-2 h-10 w-10 rounded-full object-cover'
/>
<span class='font-semibold text-purple-200'>{author.data.title}</span>
<Icon class='mr-1 h-6 w-6 text-purple-200' name='heroicons:calendar-days' />
<span class='ml-1 font-semibold text-purple-200'>{post.data.pubDate.toString()}</span>
</span>
)
}
<span class='mr-6 flex items-center'>
<Icon class='mr-1 h-6 w-6 text-purple-200' name='heroicons:calendar-days' />
<span class='ml-1 font-semibold text-purple-200'>
{new Date(post.data.publishDate).toString()}
</span>
</span>
{
post.data.minutesRead && (
<span class='flex items-center'>
Expand Down
7 changes: 6 additions & 1 deletion src/components/blogroll.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ export interface Props {
const { posts } = Astro.props
---

<div class='flex flex-wrap space-y-12 dark:bg-gray-900 lg:space-y-0'>
<div
itemprop='mainEntity'
itemscope
itemtype='https://schema.org/Article'
class='flex flex-wrap space-y-12 dark:bg-gray-900 lg:space-y-0'
>
{posts.map((post) => <BlogCard post={post} />)}
</div>
3 changes: 0 additions & 3 deletions src/components/carousel.astro
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ const images = folderFiles.map((image) => imageFiles[image])
// @ts-ignore
import Swiper from 'swiper/bundle'

// import Swiper styles
import 'swiper/css/bundle'

new Swiper('.mySwiper', {
cssMode: true,
// lazy: true,
Expand Down
Loading

0 comments on commit e05706c

Please sign in to comment.