Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions backend/internal/api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ func (s *Server) writeError(w http.ResponseWriter, status int, message string) {
// instead of index.html to prevent Soft 404 indexing.
func (s *Server) isValidFrontendRoute(cleanPath string) bool {
switch cleanPath {
case "", "about", "copyright", "search":
case "", "about", "bookmarks", "copyright", "search":
return true
}

Expand Down Expand Up @@ -527,10 +527,10 @@ func (s *Server) serveIndexHTML(w http.ResponseWriter, r *http.Request) {
ogImage := ai.GetDynamicOGURL("Search", "Search AI News & Research Archives", "", 0)
content = injectSEOTags(content, title, desc, pageURL, ogImage, "website")
} else if cleanPath == "bookmarks" {
title := "Saved Transmissions | NeuralWire"
title := "Saved Archives | NeuralWire"
desc := "Your saved articles and offline intelligence bookmarks."
pageURL := "https://neuralwire.info/bookmarks"
ogImage := ai.GetDynamicOGURL("Bookmarks", "Saved Transmissions & Offline Intelligence", "", 0)
ogImage := ai.GetDynamicOGURL("Bookmarks", "Saved Archives & Offline Intelligence", "", 0)
content = injectSEOTags(content, title, desc, pageURL, ogImage, "website")
} else if strings.HasPrefix(cleanPath, "category/") {
catSlug := strings.TrimPrefix(cleanPath, "category/")
Expand Down
39 changes: 13 additions & 26 deletions frontend/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@
.url.pathname === '/bookmarks'
? 'border-[#22D3EE]/50 text-[#22D3EE]'
: ''}"
aria-label="Saved Transmissions"
title="Saved Transmissions ({bookmarks.count})"
aria-label="Bookmarks"
title="Bookmarks ({bookmarks.count})"
>
<svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path
Expand Down Expand Up @@ -196,7 +196,7 @@
.url.pathname === '/bookmarks'
? 'text-[#22D3EE]'
: ''}"
aria-label="Saved Transmissions"
aria-label="Bookmarks"
>
<svg class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path
Expand Down Expand Up @@ -287,7 +287,7 @@
? 'bg-[#22D3EE]/5 text-[#22D3EE]'
: 'text-slate-400 hover:text-white'}"
>
<span>SAVED ARCHIVES</span>
<span>BOOKMARKS</span>
{#if bookmarks.count > 0}
<span
class="rounded bg-[#22D3EE]/20 px-1.5 py-0.5 font-mono text-xs font-bold text-[#22D3EE]"
Expand Down Expand Up @@ -359,52 +359,39 @@
</li>
<li>
<a href="/search" class="text-slate-400 transition-colors hover:text-white"
>SEARCH ARCHIVE</a
>SEARCH FEED</a
>
</li>
<li>
<a href="/bookmarks" class="text-slate-400 transition-colors hover:text-white"
>SAVED ARCHIVES</a
>BOOKMARKS</a
>
</li>
<li>
<a href="/about" class="text-slate-400 transition-colors hover:text-white"
>ABOUT EDITORIAL</a
<a href="/about" class="text-slate-400 transition-colors hover:text-white">ABOUT</a>
</li>
<li>
<a href="/copyright" class="text-slate-400 transition-colors hover:text-white"
>COPYRIGHT & DMCA</a
>
</li>
<li>
<a
href="/rss.xml"
target="_blank"
rel="noopener noreferrer"
class="flex items-center gap-1.5 text-slate-400 transition-colors hover:text-[#22D3EE]"
class="text-slate-400 transition-colors hover:text-white"
>
<svg
class="h-3.5 w-3.5 text-[#22D3EE]"
viewBox="0 0 24 24"
fill="currentColor"
aria-hidden="true"
>
<path
d="M6.18 15.64a2.18 2.18 0 0 1 2.18 2.18C8.36 19 7.38 20 6.18 20C5 20 4 19 4 17.82a2.18 2.18 0 0 1 2.18-2.18M4 4.44A15.56 15.56 0 0 1 19.56 20h-2.83A12.73 12.73 0 0 0 4 7.27V4.44m0 5.66a9.9 9.9 0 0 1 9.9 9.9h-2.83A7.07 7.07 0 0 0 4 12.93V10.1Z"
/>
</svg>
RSS FEED
</a>
</li>
<li>
<a href="/copyright" class="text-slate-400 transition-colors hover:text-white"
>COPYRIGHT & DMCA</a
>
</li>
<li>
<a
href="https://status.neuralwire.info"
target="_blank"
rel="noopener noreferrer"
class="flex items-center gap-1.5 text-slate-400 transition-colors hover:text-[#22D3EE]"
class="text-slate-400 transition-colors hover:text-white"
>
<span class="inline-block h-1.5 w-1.5 rounded-full bg-emerald-400"></span>
SYSTEM STATUS
</a>
</li>
Expand Down
56 changes: 18 additions & 38 deletions frontend/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import type { PageData, Snapshot } from './$types';
import type { News } from '$lib/mockData';
import Image from '$lib/Image.svelte';
import BookmarkButton from '$lib/BookmarkButton.svelte';
import TrendingNews from '$lib/TrendingNews.svelte';
import { getSiteUrl } from '$lib/siteUrl';
import { getNewsPage } from '$lib/api';
Expand Down Expand Up @@ -340,13 +339,7 @@
</div>
</div>

<div class="flex items-center gap-3">
<BookmarkButton
article={featuredArticle}
size="md"
showText={true}
class="rounded-lg border border-white/10 bg-[#0F172A]/80 px-3.5 py-2 hover:border-[#22D3EE]/40 hover:bg-[#22D3EE]/5"
/>
<div>
<a
href="/{featuredArticle.slug}"
class="group inline-flex items-center justify-center space-x-2 rounded-lg border border-[#22D3EE]/20 bg-[#22D3EE]/5 px-4 py-2 font-mono text-xs text-[#22D3EE] transition-all duration-300 hover:border-[#22D3EE]/50 hover:bg-[#22D3EE]/10 hover:text-white"
Expand Down Expand Up @@ -487,8 +480,8 @@
{getCategoryName(post.category)}
</span>
</div>
<div class="absolute top-2 right-2 flex items-center gap-1.5">
{#if post.cluster_count && post.cluster_count > 0}
{#if post.cluster_count && post.cluster_count > 0}
<div class="absolute top-2 right-2 flex items-center gap-1.5">
<span
class="tag-mono inline-flex items-center gap-1 rounded border border-purple-500/40 bg-[#0A0E17]/90 px-2 py-0.5 text-[10px] font-bold text-purple-300 shadow-sm backdrop-blur-sm"
title="{post.cluster_count} sumber lain meliput berita ini"
Expand All @@ -508,13 +501,8 @@
</svg>
+{post.cluster_count} sumber
</span>
{/if}
<BookmarkButton
article={post}
size="sm"
class="rounded border border-white/10 bg-[#0A0E17]/90 p-1 backdrop-blur-sm hover:border-[#22D3EE]/50 hover:bg-[#0A0E17]"
/>
</div>
</div>
{/if}
</a>

<!-- Card Body -->
Expand Down Expand Up @@ -577,7 +565,7 @@
<h2 class="mb-1 font-mono text-xs font-bold tracking-widest text-[#22D3EE] uppercase">
Chronicle Feed
</h2>
<h3 class="font-serif text-2xl font-medium text-white md:text-3xl">LATEST TRANSMISSIONS</h3>
<h3 class="font-serif text-2xl font-medium text-white md:text-3xl">LATEST</h3>
</div>

<!-- Category Tabs -->
Expand Down Expand Up @@ -697,9 +685,9 @@
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
></path>
</svg>
<span>RECEIVING TRANSMISSIONS...</span>
<span>LOADING...</span>
{:else}
<span>LOAD MORE TRANSMISSIONS</span>
<span>LOAD MORE</span>
<svg class="h-3.5 w-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path
stroke-linecap="round"
Expand All @@ -716,27 +704,19 @@
onclick={collapseFeed}
class="cursor-pointer rounded-xl border border-[#E11D48]/30 bg-[#E11D48]/5 px-8 py-3 font-mono text-xs font-bold tracking-widest text-[#E11D48] uppercase transition-all hover:border-[#E11D48] hover:bg-[#E11D48]/10 hover:text-white"
>
Hide Feed
HIDE
</button>
{/if}
</div>
{:else}
{:else if canCollapse}
<div class="mt-12 flex flex-col items-center justify-center gap-4">
<div
class="inline-flex items-center space-x-2 rounded-full border border-[rgba(255,255,255,0.08)] bg-[#0F172A]/40 px-4 py-1.5 font-mono text-[11px] text-slate-400"
<button
type="button"
onclick={collapseFeed}
class="cursor-pointer rounded-xl border border-[#E11D48]/30 bg-[#E11D48]/5 px-8 py-3 font-mono text-xs font-bold tracking-widest text-[#E11D48] uppercase transition-all hover:border-[#E11D48] hover:bg-[#E11D48]/10 hover:text-white"
>
<span class="h-1.5 w-1.5 animate-pulse rounded-full bg-[#22D3EE]"></span>
<span>ALL {currentFeed.total || visibleFeed.length} TRANSMISSIONS INDEXED</span>
</div>
{#if canCollapse}
<button
type="button"
onclick={collapseFeed}
class="cursor-pointer rounded-xl border border-[#E11D48]/30 bg-[#E11D48]/5 px-8 py-3 font-mono text-xs font-bold tracking-widest text-[#E11D48] uppercase transition-all hover:border-[#E11D48] hover:bg-[#E11D48]/10 hover:text-white"
>
Hide Feed
</button>
{/if}
HIDE
</button>
</div>
{/if}

Expand All @@ -745,7 +725,7 @@
type="button"
onclick={collapseFeed}
class="fixed right-6 bottom-6 z-40 flex h-10 cursor-pointer items-center justify-center space-x-2 rounded-full border border-[#E11D48]/40 bg-[#0A0E17]/90 px-4 py-2 font-mono text-[10px] font-bold tracking-widest text-[#E11D48] shadow-[0_0_15px_rgba(225,29,72,0.15)] backdrop-blur-sm transition-all hover:border-[#E11D48] hover:bg-[#E11D48]/10 hover:text-white active:scale-95"
title="Collapse Feed"
title="Collapse"
>
<svg class="h-3.5 w-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path
Expand All @@ -755,7 +735,7 @@
d="M5 15l7-7 7 7"
/>
</svg>
<span>COLLAPSE FEED</span>
<span>COLLAPSE</span>
</button>
{/if}
{/if}
Expand Down
Loading
Loading