Skip to content

Commit

Permalink
made a few changes
Browse files Browse the repository at this point in the history
  • Loading branch information
daviduzondu committed Aug 31, 2023
1 parent fa1d2e2 commit 72be18d
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 14 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
},
"type": "module",
"dependencies": {
"jquery": "^3.7.1",
"momentjs": "^2.0.0",
"moment": "^2.29.4",
"rss-parser": "^3.13.0"
}
}
2 changes: 1 addition & 1 deletion src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
font-size: 18px;
background-color: white;
padding: 10px;
width: 100vw;
width: 98vw;
}
.my-feeds {
Expand Down
1 change: 1 addition & 0 deletions src/routes/feed/[title]/+page.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ export async function load({url}){
const rssLink = url.searchParams.get('url');
const parser = new Parser();
let feed = await parser.parseURL(rssLink);
console.log(feed);
return {...feed};
}
22 changes: 20 additions & 2 deletions src/routes/feed/[title]/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script>
import moment from 'moment';
export let data;
</script>
{#if data.image}
Expand All @@ -13,16 +14,25 @@
{#each data.items as item}
{@const number = data.items.indexOf(item)}
<div class="item">
{number + 1}. <a href={item.link}> {item.title}</a>
{number + 1}.
<a href={item.link}> {@html item.title}</a>
<div class="metadata">
<span>{item.author || item.creator || ""}</span>
<span>{moment(item.isoDate).fromNow()}</span>
</div>
<div class="snippet">{item.contentSnippet || ""}</div>
</div>
{/each}
{:else}
<p>Something went wrong...</p>
{/if}

<style>
.snippet {
font-size: 18px;
}
a {
font-size: 30px;
font-size: 25px;
text-decoration: underline;
color: black;
Expand All @@ -36,9 +46,17 @@
}
.item {
display: flex;
flex-direction: column;
padding: 10px 10px;
}
.metadata{
display: flex;
gap:10px;
margin: 10px 0px 10px 0px;
}
img{
width: 40px;
height: 40px;
Expand Down
13 changes: 4 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -810,11 +810,6 @@ isexe@^2.0.0:
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==

jquery@^3.7.1:
version "3.7.1"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de"
integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==

js-yaml@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
Expand Down Expand Up @@ -915,10 +910,10 @@ minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2:
dependencies:
brace-expansion "^1.1.7"

momentjs@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/momentjs/-/momentjs-2.0.0.tgz#73df904b4fa418f6e3c605e831cef6ed5518ebd4"
integrity sha512-GYMUxLyCwVhECkJR1/LMHEyb9gWYSPRnXi+elGN0m5bet7ngQOxU4QLWUI/eBzgN4N/T194n6yP7lQiE+Udw9A==
moment@^2.29.4:
version "2.29.4"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==

mri@^1.1.0:
version "1.2.0"
Expand Down

0 comments on commit 72be18d

Please sign in to comment.