-
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.
- Loading branch information
Mordechai Dror
committed
Dec 6, 2023
1 parent
2e73ca2
commit 96eb638
Showing
14 changed files
with
90 additions
and
98 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,7 @@ | ||
# build output | ||
dist/ | ||
|
||
# generated types | ||
.astro/ | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
# logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
# environment variables | ||
.env | ||
.env.production | ||
|
||
# macOS-specific files | ||
.DS_Store | ||
**/dist | ||
**/node_modules | ||
**/.astro | ||
|
||
src/content/.obsidian | ||
src/content/templates |
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 |
---|---|---|
|
@@ -24,7 +24,7 @@ export async function GET(context: APIContext) { | |
pubDate: entry.data.publishedAt, | ||
link: post.fullPath, | ||
categories: entry.data.tags, | ||
author: '[email protected]', | ||
author: DATA.email, | ||
}; | ||
}), | ||
}); | ||
|
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
19 changes: 19 additions & 0 deletions
19
packages/blog/src/shared/components/molecules/PostListItem.astro
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,19 @@ | ||
--- | ||
import { Post } from '../../post'; | ||
import type { HTMLAttributes } from 'astro/types'; | ||
interface Props extends Pick<HTMLAttributes<'a'>, 'class'> { | ||
post: Post; | ||
} | ||
const { post, class: moreClasses } = Astro.props; | ||
--- | ||
|
||
<a | ||
href={post.fullPath} | ||
class:list={['text-black hover:text-blue-500 hover:underline', moreClasses]}> | ||
<span class="flex gap-3"> | ||
<span class="flex-1 truncate">{post.title}</span> | ||
<span>{post.publishedAt}</span> | ||
</span> | ||
</a> |
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
25 changes: 25 additions & 0 deletions
25
packages/blog/src/shared/components/organisms/PinnedPosts.astro
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,25 @@ | ||
--- | ||
import StandOut from '../molecules/StandOut.astro'; | ||
import { Post } from '../../post'; | ||
import PostListItem from '../molecules/PostListItem.astro'; | ||
interface Props { | ||
posts: Post[]; | ||
} | ||
const { posts } = Astro.props; | ||
--- | ||
|
||
{ | ||
posts.map((post) => ( | ||
<StandOut class="flex-col"> | ||
<span class="flex gap-3 items-center"> | ||
<i class="fa-solid fa-thumbtack" /> | ||
<PostListItem | ||
post={post} | ||
class="flex-1" | ||
/> | ||
</span> | ||
</StandOut> | ||
)) | ||
} |
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 |
---|---|---|
|
@@ -2,10 +2,27 @@ export class Data { | |
constructor( | ||
public readonly title: string, | ||
public readonly description: string, | ||
public readonly email: string, | ||
public readonly copyright: string, | ||
public readonly navLinks: NavLink[], | ||
) {} | ||
} | ||
|
||
export class NavLink { | ||
constructor( | ||
public readonly label: string, | ||
public readonly url: string, | ||
) {} | ||
} | ||
|
||
export const DATA = new Data( | ||
`vorant94's Digital Garden`, | ||
`Welcome to my digital garden, here I write about all sorts of things (mostly about technologies, a little bit on gaming, traveling and self-reflecting)`, | ||
'[email protected]', | ||
'Mordechai Dror © 2021-present', | ||
[ | ||
new NavLink('Home', '/'), | ||
new NavLink('About', '/about'), | ||
new NavLink('Posts', '/posts'), | ||
], | ||
); |
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,3 @@ | ||
export function removeTrailingSlash(pathname: string) { | ||
return /\w+\/$/.test(pathname) ? pathname.slice(0, -1) : pathname; | ||
} |