update
This commit is contained in:
@ -6,6 +6,7 @@ import '../../assets/css1/style5.css'
|
||||
import { newsDetail } from "../../../utils/rpc";
|
||||
const { slug } = Astro.params;
|
||||
const config = getConfig(Astro)
|
||||
const requestUrl = Astro.request.url;
|
||||
if (!slug) {
|
||||
return Astro.redirect('/404');
|
||||
}
|
||||
@ -39,9 +40,10 @@ if (!data || code !== 0) {
|
||||
<Fragment set:html={data.content} />
|
||||
</article>
|
||||
<div>
|
||||
<p>原文地址: xxx</p>
|
||||
原文地址:<a href={`/news/${data.id}`}>{requestUrl}</a>
|
||||
</div>
|
||||
|
||||
<div class="top-icon"></div>
|
||||
<div class="news-navigation">
|
||||
{
|
||||
data.prevNews && (
|
||||
@ -112,7 +114,8 @@ if (!data || code !== 0) {
|
||||
|
||||
|
||||
.top-icon {
|
||||
padding-bottom: 30px;
|
||||
margin-bottom: 1rem;
|
||||
margin-top: 1rem;
|
||||
border-bottom: 1px solid #e0e0e0
|
||||
}
|
||||
|
||||
@ -243,11 +246,11 @@ if (!data || code !== 0) {
|
||||
|
||||
.news-navigation {
|
||||
margin-top: 1rem;
|
||||
padding-top: 2rem;
|
||||
border-top: 1px solid var(--divider-color);
|
||||
}
|
||||
|
||||
.news-sidebar {
|
||||
padding: 0 1.5rem 3rem;
|
||||
/* position: sticky; */
|
||||
top: 2rem;
|
||||
height: fit-content;
|
||||
@ -277,7 +280,7 @@ if (!data || code !== 0) {
|
||||
flex-direction: column;
|
||||
text-decoration: none;
|
||||
transition: all 0.3s ease;
|
||||
padding: 0.3rem;
|
||||
padding: 0.2rem;
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,7 @@ export async function newsIndex(websiteId:number = 0):Promise<result<InewsIndex[
|
||||
|
||||
// 新闻详情
|
||||
export interface InewsDetail {
|
||||
id: number
|
||||
title: string
|
||||
keywords: string
|
||||
description: string
|
||||
|
Reference in New Issue
Block a user