-
You will be redirected soon.
-
You should not see this page...
+
+
+
+
+
+
+
+
+ Featured Project
+
+
+
Solar Network
+
+ The next generation social network. But not only for social media.
+
+
+ Social Network, Redefined.
+
+
+
+
+ Also supports Android, Windows, and any modern web browser
+
+
+
+
+
+
+
+ Learn more about Solar Network
+
+
+
+
+
+
+
+
diff --git a/src/pages/en/posts/[...slug].astro b/src/pages/posts/[...slug].astro
similarity index 100%
rename from src/pages/en/posts/[...slug].astro
rename to src/pages/posts/[...slug].astro
diff --git a/src/pages/posts/index.astro b/src/pages/posts/index.astro
new file mode 100644
index 0000000..47363d2
--- /dev/null
+++ b/src/pages/posts/index.astro
@@ -0,0 +1,149 @@
+---
+export const prerender = false
+
+import sanitizeHtml from 'sanitize-html'
+import { Icon } from 'astro-icon/components'
+import { marked } from 'marked'
+
+import Layout from '@/layouts/Layout.astro'
+import AttachmentRenderer from '@/components/AttachmentRenderer.astro'
+import { getAttachmentUrl, fetchAttachmentMeta } from '@/scripts/attachment'
+
+const page = parseInt(Astro.url.searchParams.get('page') ?? '1') || 1
+
+async function getPosts() {
+ const baseUrl = import.meta.env.PUBLIC_SOLAR_NETWORK_URL
+ const res = await fetch(
+ `${baseUrl}/cgi/co/posts?take=10&offset=${Math.max(page - 1, 0) * 10}`
+ )
+ const data = await res.json()
+ const posts = await Promise.all(
+ data['data'].map(async (ele: any) => {
+ if (ele.body?.content) {
+ ele.body.content = await parseContent(
+ ele.body.content,
+ ele.type == 'story'
+ )
+ }
+ if (ele.body?.attachments) {
+ ele.body.attachments = await fetchAttachmentMeta(ele.body.attachments)
+ }
+ return ele
+ })
+ )
+
+ return posts
+}
+
+const posts = await getPosts()
+
+async function parseContent(data: string, useBreaks: boolean = false) {
+ const rawContent = await marked(data, {
+ breaks: useBreaks,
+ })
+ return sanitizeHtml(rawContent)
+}
+---
+
+
+
+
+
+
Open in the Solian
+
+ The most modern, user-friendly, and official Solar Network app.
+
+
+
+
+
+
+
Posts
+
Explore the posts all over the Solar Network.
+
+
+
+
diff --git a/src/pages/en/products/solar-network.astro b/src/pages/products/solar-network.astro
similarity index 100%
rename from src/pages/en/products/solar-network.astro
rename to src/pages/products/solar-network.astro
diff --git a/src/pages/en/terms/index.astro b/src/pages/terms/index.astro
similarity index 95%
rename from src/pages/en/terms/index.astro
rename to src/pages/terms/index.astro
index 77a68e6..d87c7fc 100644
--- a/src/pages/en/terms/index.astro
+++ b/src/pages/terms/index.astro
@@ -4,7 +4,7 @@ import Layout from '@/layouts/Layout.astro'
Terms & Conditions
diff --git a/src/pages/en/terms/privacy-policy.astro b/src/pages/terms/privacy-policy.astro
similarity index 96%
rename from src/pages/en/terms/privacy-policy.astro
rename to src/pages/terms/privacy-policy.astro
index 6e4eb91..609aa16 100644
--- a/src/pages/en/terms/privacy-policy.astro
+++ b/src/pages/terms/privacy-policy.astro
@@ -3,7 +3,9 @@ import Layout from '@/layouts/Layout.astro'
---
-
+
Privacy Policy
diff --git a/src/pages/en/terms/user-agreements.astro b/src/pages/terms/user-agreements.astro
similarity index 98%
rename from src/pages/en/terms/user-agreements.astro
rename to src/pages/terms/user-agreements.astro
index 6b71f0d..5841e41 100644
--- a/src/pages/en/terms/user-agreements.astro
+++ b/src/pages/terms/user-agreements.astro
@@ -3,7 +3,9 @@ import Layout from '@/layouts/Layout.astro'
---
-
+
User Agreements
diff --git a/src/pages/zh-cn/terms/privacy-policy.astro b/src/pages/zh-cn/terms/privacy-policy.astro
index 5aa5aa4..0c61aa0 100644
--- a/src/pages/zh-cn/terms/privacy-policy.astro
+++ b/src/pages/zh-cn/terms/privacy-policy.astro
@@ -3,7 +3,9 @@ import Layout from '@/layouts/Layout.astro'
---
-
+
隐私政策
diff --git a/src/pages/zh-cn/terms/user-agreements.astro b/src/pages/zh-cn/terms/user-agreements.astro
index 4f18aeb..50306e6 100644
--- a/src/pages/zh-cn/terms/user-agreements.astro
+++ b/src/pages/zh-cn/terms/user-agreements.astro
@@ -3,7 +3,9 @@ import Layout from '@/layouts/Layout.astro'
---
-
+
用户协议
@@ -84,9 +86,8 @@ import Layout from '@/layouts/Layout.astro'
若您想搭建我们制品的镜像站,请与我们取得联系以豁免此条例。
源码二次发布
- 我们不允许任何形式的源码二次发布(Fork 除外)。
-
+
我们不允许任何形式的源码二次发布(Fork 除外)。
+
包括但不限于,将 GitHub 或 Solsynth Code Repository 上的代码仓库镜像于
GitLab、Gitee 等其他 Git 提供者。
二次售卖源码更是不允许的。