-
Notifications
You must be signed in to change notification settings - Fork 0
News temp trending #60
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a22f0c6
Resource Edits, and Errors Flash (#59)
AllanKoder ba4214e
Merge branch 'news-temp-trending' of https://github.com/AllanKoder/Co…
AllanKoder 2b5c986
Apply automatic changes
AllanKoder ed470d9
Update resources/js/Components/NewsItem.vue
AllanKoder c4d6c90
Update resources/js/Components/NewsItem.vue
AllanKoder 7e5f457
Initial plan (#62)
Copilot 4406260
Initial plan (#63)
Copilot b86065b
Rename NewsItem component to TrendingResourceItem (#61)
Copilot db23298
Quick npm update
AllanKoder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,27 +1,41 @@ | ||
| <script setup> | ||
| import { Link } from '@inertiajs/vue3'; | ||
|
|
||
| defineProps({ | ||
| news: { | ||
| resource: { | ||
| type: Object, | ||
| required: true, | ||
| }, | ||
| }); | ||
| </script> | ||
|
|
||
| <template> | ||
| <div class="my-4"> | ||
| <h3 class="font-bold mb-2 text-lg"> | ||
| {{ news.title }} | ||
| </h3> | ||
| <Link :href="route('resources.show', { slug: resource.slug }) || '#'" target="_blank" rel="noopener noreferrer"> | ||
|
AllanKoder marked this conversation as resolved.
Outdated
|
||
| <div class="my-4 border hover:bg-gray-50 dark:hover:bg-gray-700 p-2 rounded-sm transition-colors cursor-pointer"> | ||
| <div class="flex items-center gap-2 text-xs text-gray-500 dark:text-gray-400 mb-1"> | ||
| <span v-if="resource.upvotes_count || resource.vote_score" class="flex items-center gap-1"> | ||
| <svg class="w-4 h-4 text-orange-500" fill="currentColor" viewBox="0 0 20 20"> | ||
| <path d="M2 10.5a1.5 1.5 0 113 0v6a1.5 1.5 0 01-3 0v-6zM6 10.333v5.43a2 2 0 001.106 1.79l.05.025A4 4 0 008.943 18h5.416a2 2 0 001.962-1.608l1.2-6A2 2 0 0015.56 8H12V4a2 2 0 00-2-2 1 1 0 00-1 1v.667a4 4 0 01-.8 2.4L6.8 7.933a4 4 0 00-.8 2.4z" /> | ||
| </svg> | ||
| {{ resource.upvotes_count || resource.vote_score }} | ||
| </span> | ||
| </div> | ||
|
|
||
| <h3 class="font-bold mb-2 text-md dark:text-white line-clamp-2"> | ||
| {{ resource.name }} | ||
| </h3> | ||
|
|
||
| <img | ||
| v-if="resource.image_url " | ||
|
AllanKoder marked this conversation as resolved.
Outdated
|
||
| :src="resource.image_url" | ||
| :alt="resource.name" | ||
| class="w-full h-32 object-cover rounded mb-2" | ||
| /> | ||
|
|
||
| <img | ||
| v-if="news.thumbnail_url" | ||
| :src="news.thumbnail_url" | ||
| :alt="news.title" | ||
| class="w-full h-48 object-cover rounded mb-2" | ||
| /> | ||
| <p class="text-sm text-gray-600 dark:text-gray-300 line-clamp-3 mb-2"> | ||
| {{ resource.excerpt || resource.description }} | ||
| </p> | ||
|
|
||
| <p class="text-sm text-gray-600"> | ||
| {{ news.excerpt }} | ||
| </p> | ||
| </div> | ||
| </div> | ||
| </Link> | ||
| </template> | ||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.