-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
solves #3778, add featured label and integrated workflow with slack #3786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| name: Notify Slack on Master Branch Workflows | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
|
|
||
| jobs: | ||
| notify: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Send notification to Slack | ||
| uses: rtCamp/action-slack-notify@v2.1.0 | ||
| env: | ||
| SLACK_WEBHOOK: ${{ secrets.WEBSITE_SLACK_WEBHOOK }} | ||
| SLACK_USERNAME: 'GitHub Actions' | ||
| SLACK_ICON_EMOJI: ':rocket:' | ||
| SLACK_MESSAGE: 'A workflow has been triggered on the master branch.' |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -35,6 +35,9 @@ export default forwardRef(function BlogPostItem( | |||||||||||||||||||||
| ) { | ||||||||||||||||||||||
| let typeColors: [string, string] = ['bg-indigo-100', 'text-indigo-800']; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| const isFeatured = post.featured; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| switch (post.type.toLowerCase()) { | ||||||||||||||||||||||
| case BlogPostType.Video: | ||||||||||||||||||||||
| typeColors = ['bg-pink-100', 'text-pink-800']; | ||||||||||||||||||||||
|
|
@@ -52,7 +55,7 @@ export default forwardRef(function BlogPostItem( | |||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| return ( | ||||||||||||||||||||||
| <li className={`list-none rounded-lg ${className}`} ref={ref} id={id}> | ||||||||||||||||||||||
| <li className={`list-none rounded-lg ${className} relative`} ref={ref} id={id}> | ||||||||||||||||||||||
| <article className='h-full rounded-lg'> | ||||||||||||||||||||||
| <Link href={post.slug}> | ||||||||||||||||||||||
| <span | ||||||||||||||||||||||
|
|
@@ -61,6 +64,11 @@ export default forwardRef(function BlogPostItem( | |||||||||||||||||||||
| } | ||||||||||||||||||||||
| data-testid='BlogPostItem-Link' | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| {post.featured && ( | ||||||||||||||||||||||
| <span className="featured-label bg-yellow-100 text-yellow-800 font-bold px-2 py-1 rounded-md absolute top-2 left-2 z-10"> | ||||||||||||||||||||||
| Featured | ||||||||||||||||||||||
| </span> | ||||||||||||||||||||||
| )} | ||||||||||||||||||||||
|
Comment on lines
+67
to
+71
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Fix string quote style to maintain consistency. The code uses double quotes for the className which violates the project's ESLint rules. Also, consider extracting these classes to a variable or constant for better readability if this style is used elsewhere. - <span className="featured-label bg-yellow-100 text-yellow-800 font-bold px-2 py-1 rounded-md absolute top-2 left-2 z-10">
+ <span className='featured-label bg-yellow-100 text-yellow-800 font-bold px-2 py-1 rounded-md absolute top-2 left-2 z-10'>📝 Committable suggestion
Suggested change
🧰 Tools🪛 ESLint[error] 68-68: Replace (prettier/prettier) [error] 68-68: Unexpected usage of doublequote. (jsx-quotes) |
||||||||||||||||||||||
| <img | ||||||||||||||||||||||
| className='h-48 w-full object-cover' | ||||||||||||||||||||||
| src={post.cover} | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.