Spaces:
Runtime error
Runtime error
add some copy
Browse files
client/src/components/NewsBlock.svelte
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
{#if feedEntry.media_content}
|
8 |
<a target="_blank" href={feedEntry.link}>
|
9 |
<img
|
10 |
-
class="w-full max-w-
|
11 |
src={feedEntry.media_content[0].url}
|
12 |
alt={feedEntry.title}
|
13 |
/>
|
|
|
7 |
{#if feedEntry.media_content}
|
8 |
<a target="_blank" href={feedEntry.link}>
|
9 |
<img
|
10 |
+
class="w-full max-w-[15rem] md:max-w-md object-cover object-top aspect-[4/3]"
|
11 |
src={feedEntry.media_content[0].url}
|
12 |
alt={feedEntry.title}
|
13 |
/>
|
client/src/routes/index.svelte
CHANGED
@@ -27,10 +27,23 @@
|
|
27 |
<div class="px-6 py-3 max-w-4xl mx-auto">
|
28 |
<h1 class="text-4xl font-bold font-serif pt-5 leading-tight">The New York Times Homepage</h1>
|
29 |
<h3 class="text-sm leading-tight pb-5 {lastUpdate ? 'visibile' : 'invisible'}">
|
30 |
-
<b>Last
|
31 |
{lastUpdate ? lastUpdate.toLocaleString() : ''}
|
32 |
</h3>
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
<button
|
35 |
class="{positiveOrder
|
36 |
? 'bg-emerald-600'
|
@@ -44,7 +57,7 @@
|
|
44 |
<svg class="animate-spin inline-block" width="25" height="25" viewBox="0 0 100 100">
|
45 |
<path d="M0,50 a1,1 0 0,0 100,0" fill="lightgrey" />
|
46 |
</svg>
|
47 |
-
Loading the NYTimes homepage feed and running sentiment analysis on
|
48 |
</div>
|
49 |
{:then data}
|
50 |
<ul>
|
|
|
27 |
<div class="px-6 py-3 max-w-4xl mx-auto">
|
28 |
<h1 class="text-4xl font-bold font-serif pt-5 leading-tight">The New York Times Homepage</h1>
|
29 |
<h3 class="text-sm leading-tight pb-5 {lastUpdate ? 'visibile' : 'invisible'}">
|
30 |
+
<b>Last Updated:</b>
|
31 |
{lastUpdate ? lastUpdate.toLocaleString() : ''}
|
32 |
</h3>
|
33 |
|
34 |
+
<p class="py-3 max-w-prose leading-normal">
|
35 |
+
This project is an experiment running sentiment analysis on the current
|
36 |
+
<a
|
37 |
+
class="text-blue-500 underline"
|
38 |
+
target="_blank"
|
39 |
+
href="https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml">New York Times</a
|
40 |
+
>
|
41 |
+
homepage RSS headlines feed. It also provides you with a sorting button to choose to see {positiveOrder
|
42 |
+
? 'good or bad news first'
|
43 |
+
: 'bad or good news first'}. It's built with a custom SvelveKit front-end, served by a Flask
|
44 |
+
application and using transformers for the sentiment analysis.
|
45 |
+
</p>
|
46 |
+
<div class="py-5"> </div>
|
47 |
<button
|
48 |
class="{positiveOrder
|
49 |
? 'bg-emerald-600'
|
|
|
57 |
<svg class="animate-spin inline-block" width="25" height="25" viewBox="0 0 100 100">
|
58 |
<path d="M0,50 a1,1 0 0,0 100,0" fill="lightgrey" />
|
59 |
</svg>
|
60 |
+
Loading the NYTimes homepage feed and running sentiment analysis on headlines...
|
61 |
</div>
|
62 |
{:then data}
|
63 |
<ul>
|