update
This commit is contained in:
@ -4,6 +4,25 @@ import { APP_NAME } from '../config/app';
|
||||
import '../styles/global.css'
|
||||
import '../styles/theme.css'
|
||||
const {description, title, keywords} = Astro.props;
|
||||
import { getHost } from '../../utils/host';
|
||||
import { websiteConfig } from '../../utils/rpc';
|
||||
|
||||
// const host = await getHost(Astro.request);
|
||||
// console.log(host)
|
||||
// return Astro.redirect("/login");
|
||||
// if (!host) {
|
||||
// return Astro.redirect('/404');
|
||||
// }
|
||||
|
||||
// const {code, data} = await websiteConfig(host);
|
||||
|
||||
// console.log(data)
|
||||
// if (!data || code !== 0) {
|
||||
// return Astro.redirect('/news');
|
||||
// }
|
||||
|
||||
// console.log(data)
|
||||
|
||||
---
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
|
576
src/layouts/Layout_1.astro
Normal file
576
src/layouts/Layout_1.astro
Normal file
@ -0,0 +1,576 @@
|
||||
---
|
||||
import Footer from '../components/Footer.astro'
|
||||
import { APP_NAME } from '../config/app';
|
||||
import '../styles/global.css'
|
||||
import '../styles/theme.css'
|
||||
const {description, title, keywords} = Astro.props;
|
||||
const {template_config} = Astro.locals;
|
||||
---
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link rel="icon" type="image/svg+xml" href="/logo.png" />
|
||||
<title>{title}</title>
|
||||
<meta name="description" content={description} />
|
||||
<meta name="keywords" content={keywords} />
|
||||
<meta name="baidu-site-verification" content="codeva-kLMUXYuoiO" />
|
||||
<!-- <link href="https://fonts.googleapis.com/css2?family=Graphik:wght@400;500;600;700&display=swap" rel="stylesheet"> -->
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="logo-container">
|
||||
<div class="logo-text"><a href="/">{template_config.app_name}</a></div>
|
||||
</div>
|
||||
<button class="mobile-menu-btn" aria-label="打开菜单">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</button>
|
||||
<nav class="desktop-nav">
|
||||
<ul>
|
||||
<li><a title="首页" href="/">首页</a></li>
|
||||
<li><a title="新闻专栏" href="/news">新闻专栏</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="mobile-nav">
|
||||
<ul>
|
||||
<li><a title="首页" href="/">首页</a></li>
|
||||
<li><a title="新闻专栏" href="/news">新闻专栏</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
<slot />
|
||||
</main>
|
||||
<footer class="site-footer">
|
||||
<div class="footer-content">
|
||||
<div class="footer-logo">
|
||||
<a href="/" title={template_config.app_name}>{ template_config.app_name }</a>
|
||||
</div>
|
||||
<div class="footer-links">
|
||||
<div class="footer-column">
|
||||
<h4>浏览</h4>
|
||||
<ul>
|
||||
<li><a href="/news" title="新闻专栏">新闻专栏</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-bottom">
|
||||
<div class="copyright">
|
||||
© {new Date().getFullYear()} { template_config.app_company }. 保留所有权利。
|
||||
</div>
|
||||
<div class="icpoo">
|
||||
<a target="_blank" rel="noopener" href="https://beian.miit.gov.cn/" title="ICP备案信息">新ICP备2023000253号</a>
|
||||
<span class="margin-oc">新B2-20230068号</span>
|
||||
<a target="_blank" rel="noopener" class="beiancil" href="https://www.beian.gov.cn/portal/registerSystemInfo?recordcode=65400402000209" title="公安备案信息">
|
||||
<span>新公网安备 65400402000209号</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<div class="background-animation"></div>
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--primary-color: #4F46E5;
|
||||
--primary-light: #818CF8;
|
||||
--primary-dark: #3730A3;
|
||||
--accent-color: #10B981;
|
||||
--accent-light: #34D399;
|
||||
--accent-dark: #059669;
|
||||
--background-light: #FFFFFF;
|
||||
--background-off-white: #F8FAFC;
|
||||
--background-gray: #F1F5F9;
|
||||
--text-primary: #000000;
|
||||
--text-secondary: #64748B;
|
||||
--gradient-start: #FFFFFF;
|
||||
--gradient-end: #F8FAFC;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-family: 'Graphik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
||||
background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
|
||||
background-attachment: fixed;
|
||||
background-size: cover;
|
||||
color: var(--text-primary);
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.background-animation {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: -2;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.background-animation::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -50%;
|
||||
left: -50%;
|
||||
width: 200%;
|
||||
height: 200%;
|
||||
background:
|
||||
radial-gradient(circle at 20% 30%, rgba(79, 70, 229, 0.03), transparent 50%),
|
||||
radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.03), transparent 50%),
|
||||
radial-gradient(circle at 50% 50%, rgba(129, 140, 248, 0.03), transparent 50%);
|
||||
animation: rotate 60s linear infinite;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1rem 2rem;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
backdrop-filter: blur(10px);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.logo-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
z-index: 101;
|
||||
}
|
||||
|
||||
.logo-image {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
object-fit: contain;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.logo-container:hover .logo-image {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.logo-text {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
background: black;
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
.mobile-menu-btn {
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
width: 30px;
|
||||
height: 21px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
z-index: 101;
|
||||
}
|
||||
|
||||
.mobile-menu-btn span {
|
||||
width: 100%;
|
||||
height: 3px;
|
||||
background-color: var(--text-primary);
|
||||
border-radius: 3px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.desktop-nav {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.mobile-nav {
|
||||
display: none;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
gap: 2.5rem;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
nav a {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
transition: all 0.3s ease;
|
||||
position: relative;
|
||||
padding: 0.5rem 0;
|
||||
}
|
||||
|
||||
nav a::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 0;
|
||||
height: 2px;
|
||||
/* background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); */
|
||||
background: black;
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
|
||||
nav a:hover {
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
nav a:hover::after {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 0.75rem 1.5rem;
|
||||
border-radius: 8px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
|
||||
main {
|
||||
flex: 1;
|
||||
padding: 2rem;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
/* background: var(--background-light); */
|
||||
}
|
||||
|
||||
@keyframes rotate {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
header {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.mobile-menu-btn {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.desktop-nav {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mobile-nav {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
padding: 6rem 2rem 2rem;
|
||||
box-sizing: border-box;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.mobile-nav.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mobile-nav ul {
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.mobile-nav a {
|
||||
font-size: 1.2rem;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.mobile-menu-btn.active span:nth-child(1) {
|
||||
transform: translateY(9px) rotate(45deg);
|
||||
}
|
||||
|
||||
.mobile-menu-btn.active span:nth-child(2) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.mobile-menu-btn.active span:nth-child(3) {
|
||||
transform: translateY(-9px) rotate(-45deg);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.logo-text {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.logo-image {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.mobile-nav {
|
||||
padding: 5rem 1.5rem 1.5rem;
|
||||
}
|
||||
|
||||
.mobile-nav a {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
// 移动端菜单交互
|
||||
const menuBtn = document.querySelector('.mobile-menu-btn');
|
||||
const mobileNav = document.querySelector('.mobile-nav');
|
||||
const body = document.body;
|
||||
|
||||
menuBtn?.addEventListener('click', () => {
|
||||
menuBtn.classList.toggle('active');
|
||||
mobileNav?.classList.toggle('active');
|
||||
body.style.overflow = body.style.overflow === 'hidden' ? '' : 'hidden';
|
||||
});
|
||||
|
||||
// 点击导航链接时关闭菜单
|
||||
const mobileNavLinks = document.querySelectorAll('.mobile-nav a');
|
||||
mobileNavLinks.forEach(link => {
|
||||
link.addEventListener('click', () => {
|
||||
menuBtn?.classList.remove('active');
|
||||
mobileNav?.classList.remove('active');
|
||||
body.style.overflow = '';
|
||||
});
|
||||
});
|
||||
|
||||
// 点击页面其他区域关闭菜单
|
||||
document.addEventListener('click', (e) => {
|
||||
if (mobileNav?.classList.contains('active') &&
|
||||
!e.target.closest('.mobile-nav') &&
|
||||
!e.target.closest('.mobile-menu-btn')) {
|
||||
menuBtn?.classList.remove('active');
|
||||
mobileNav?.classList.remove('active');
|
||||
body.style.overflow = '';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.site-footer {
|
||||
background-color: var(--hulu-black);
|
||||
padding: 3rem 2rem 2rem;
|
||||
margin-top: 4rem;
|
||||
color: var(--hulu-light-gray);
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding-bottom: 2rem;
|
||||
gap: 4rem;
|
||||
}
|
||||
|
||||
.footer-logo {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.footer-logo a {
|
||||
color: var(--hulu-green);
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
.footer-logo a:hover {
|
||||
color: var(--hulu-green-light);
|
||||
}
|
||||
|
||||
.footer-links {
|
||||
display: flex;
|
||||
gap: 4rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.footer-column {
|
||||
min-width: 160px;
|
||||
}
|
||||
|
||||
.footer-column h4 {
|
||||
margin: 0 0 1.25rem;
|
||||
color: black;
|
||||
font-size: 1.1rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.footer-column ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.footer-column li {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.footer-column a {
|
||||
color: var(--hulu-light-gray);
|
||||
text-decoration: none;
|
||||
transition: color 0.2s ease;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.footer-column a:hover {
|
||||
color: var(--hulu-green);
|
||||
}
|
||||
|
||||
.footer-bottom {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding-top: 2rem;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.copyright {
|
||||
color: var(--hulu-light-gray);
|
||||
font-size: 0.875rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.icpoo {
|
||||
color: var(--hulu-light-gray);
|
||||
font-size: 0.875rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 1.5rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.icpoo a {
|
||||
color: var(--hulu-light-gray);
|
||||
text-decoration: none;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.icpoo a:hover {
|
||||
color: var(--hulu-green);
|
||||
}
|
||||
|
||||
.margin-oc {
|
||||
margin: 0 0.5rem;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.footer-content {
|
||||
gap: 3rem;
|
||||
}
|
||||
|
||||
.footer-links {
|
||||
gap: 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.site-footer {
|
||||
padding: 2rem 1.5rem 1.5rem;
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
flex-direction: column;
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
.footer-links {
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
.footer-column {
|
||||
min-width: 140px;
|
||||
}
|
||||
|
||||
.icpoo {
|
||||
gap: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.site-footer {
|
||||
padding: 1.5rem 1rem 1rem;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.footer-content {
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.footer-logo {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer-links {
|
||||
display: none; /* 在移动端隐藏导航链接 */
|
||||
}
|
||||
|
||||
.footer-bottom {
|
||||
padding-top: 1rem;
|
||||
}
|
||||
|
||||
.copyright {
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.icpoo {
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.margin-oc {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 移动端显示简化的底部导航 */
|
||||
.mobile-nav {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 1rem;
|
||||
margin-top: 1rem;
|
||||
padding-top: 1rem;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.mobile-nav a {
|
||||
color: var(--hulu-light-gray);
|
||||
text-decoration: none;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.mobile-nav a:hover {
|
||||
color: var(--hulu-green);
|
||||
}
|
||||
}
|
||||
</style>
|
39
src/middleware/index.ts
Normal file
39
src/middleware/index.ts
Normal file
@ -0,0 +1,39 @@
|
||||
import { getHost } from "../../utils/host";
|
||||
import { websiteConfig } from "../../utils/rpc";
|
||||
|
||||
export async function onRequest (context: any, next: any) {
|
||||
|
||||
// 拦截一个请求里的数据
|
||||
// 可选地修改 `locals` 中的属性
|
||||
const host = await getHost(context.request);
|
||||
|
||||
if (host == 'www.zhishihuisheng.com' || host == 'zhishihuisheng.com') {
|
||||
return next();
|
||||
}
|
||||
|
||||
|
||||
// 防止无线跳转
|
||||
if (context.locals.is_write) {
|
||||
return next();
|
||||
}
|
||||
|
||||
if (!host) {
|
||||
context.locals.is_write = 1;
|
||||
return context.rewrite('/404');
|
||||
}
|
||||
|
||||
const {code, data} = await websiteConfig(host);
|
||||
if (!data || code !== 0) {
|
||||
context.locals.is_write = 1;
|
||||
return context.rewrite('/404');
|
||||
}
|
||||
|
||||
if (!context.locals.is_write) {
|
||||
context.locals.is_write = 1;
|
||||
context.locals.template_number = 1;
|
||||
context.locals.template_config = data;
|
||||
return context.rewrite('/template/' + context.locals.template_number + context.url.pathname);
|
||||
}
|
||||
|
||||
return next();
|
||||
};
|
744
src/pages/template/1/index.astro
Normal file
744
src/pages/template/1/index.astro
Normal file
@ -0,0 +1,744 @@
|
||||
---
|
||||
import bg from '../../../../public/bg.png';
|
||||
|
||||
import Layout from '../../../layouts/Layout_1.astro';
|
||||
import { Image } from 'astro:assets';
|
||||
import { APP_NAME, BASE_URL } from '../../../config/app';
|
||||
import { formatDateTime } from '../../../../utils/date';
|
||||
|
||||
const title = `${APP_NAME} - 开启有声阅读新方式`;
|
||||
const description = '知识回声是一款超实用学习应用,涵盖海量读物,热门有声书籍,让知识触手可及';
|
||||
const keywords = '知识回声,知识回声官网,知识回声下载,知识回声官方,知识回声软件,知识回声下载,知识回声app';
|
||||
|
||||
const {template_config} = Astro.locals;
|
||||
console.log(template_config)
|
||||
const LDJSON = {
|
||||
context: "https://ziyuan.baidu.com/contexts/cambrian.jsonld",
|
||||
id: BASE_URL,
|
||||
appid: "",
|
||||
title: title,
|
||||
image: BASE_URL + "/app-showcase.png",
|
||||
pubDate: "2025-06-09T11:20:04",
|
||||
updateDate: formatDateTime(),
|
||||
description: description,
|
||||
};
|
||||
---
|
||||
<Layout title={template_config.app_name} description={template_config.app_description} keywords={keywords}>
|
||||
<section class="hero">
|
||||
<div class="partner-bg">
|
||||
<Image src={bg} alt="背景" class="bg-image" loading="eager" />
|
||||
</div>
|
||||
<div class="hero-content">
|
||||
<h1>视听阅读,尽在这端</h1>
|
||||
<p>一款超实用学习应用,涵盖海量读物,热门有声书籍,让知识触手可及。</p>
|
||||
<!-- <div class="cta-buttons">
|
||||
<button class="cta-primary">
|
||||
<a rel="nofollow" title="立即下载" href="https://appgallery.huawei.com/app/C113905377" target="_blank">立即下载</a>
|
||||
</button>
|
||||
</div> -->
|
||||
</div>
|
||||
</section>
|
||||
</Layout>
|
||||
<!-- 百度结构化数据 -->
|
||||
<script type="application/ld+json" set:html={JSON.stringify({
|
||||
"@context": LDJSON.context,
|
||||
"@id": LDJSON.id,
|
||||
"appid": LDJSON.appid,
|
||||
"title": LDJSON.title,
|
||||
"images": [LDJSON.image],
|
||||
"pubDate": LDJSON.pubDate,
|
||||
"Update": LDJSON.updateDate,
|
||||
"description": LDJSON.description,
|
||||
})}/>
|
||||
|
||||
<style>
|
||||
.experience-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
||||
gap: 2rem;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.experience-card {
|
||||
background: white;
|
||||
padding: 2rem;
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.user-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.user-info img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.user-details h3 {
|
||||
font-size: 1.2rem;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.rating {
|
||||
color: #fbbf24;
|
||||
}
|
||||
|
||||
.experience-card p {
|
||||
color: var(--text-secondary);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.cta-buttons {
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
.hero {
|
||||
/* position: relative; */
|
||||
height: 60vh;
|
||||
min-height: 600px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
/* background: linear-gradient(135deg, var(--background-light), var(--background-off-white)); */
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.8;
|
||||
}
|
||||
100% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
.hero-content {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 0 2rem;
|
||||
text-align: center;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 3.5rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 1rem;
|
||||
/* background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); */
|
||||
background: black;
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
.hero-content p {
|
||||
font-size: 1.2rem;
|
||||
margin-bottom: 2rem;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.cta-buttons {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.cta-primary {
|
||||
background: black;
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 0.75rem 1.5rem;
|
||||
border-radius: 8px;
|
||||
font-weight: 600;
|
||||
font-size: 1rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
box-shadow: 0 4px 6px rgba(79, 70, 229, 0.1);
|
||||
}
|
||||
|
||||
.cta-primary:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 6px 12px rgba(79, 70, 229, 0.2);
|
||||
}
|
||||
|
||||
section {
|
||||
/* padding: 2rem 2rem; */
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 2.5rem;
|
||||
text-align: center;
|
||||
margin-bottom: 3rem;
|
||||
color: var(--text-primary);
|
||||
/* background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); */
|
||||
background: black;
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
.features {
|
||||
padding: 4rem 0;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.features-bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 0;
|
||||
opacity: 0.05;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.bg-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
/* transform: scale(1.2); */
|
||||
}
|
||||
|
||||
.features h2 {
|
||||
text-align: center;
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 3rem;
|
||||
/* background: linear-gradient(135deg, var(--primary-color), var(--accent-color)); */
|
||||
background: black;
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.feature-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 2rem;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 0 1rem;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.feature-card {
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
backdrop-filter: blur(10px);
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.feature-card:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.feature-content {
|
||||
display: flex;
|
||||
gap: 2rem;
|
||||
padding: 2.5rem;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.feature-icon {
|
||||
font-size: 3rem;
|
||||
flex-shrink: 0;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
|
||||
border-radius: 50%;
|
||||
color: white;
|
||||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.feature-text {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.feature-text h3 {
|
||||
font-size: 1.5rem;
|
||||
margin: 0 0 1rem;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.feature-text p {
|
||||
font-size: 1.1rem;
|
||||
line-height: 1.6;
|
||||
color: var(--text-secondary);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.feature-grid {
|
||||
grid-template-columns: 1fr;
|
||||
max-width: 800px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.features {
|
||||
padding: 3rem 0;
|
||||
}
|
||||
|
||||
.features h2 {
|
||||
font-size: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.feature-content {
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.feature-icon {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.feature-text h3 {
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
.feature-text p {
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.features {
|
||||
padding: 2rem 0;
|
||||
}
|
||||
|
||||
.features h2 {
|
||||
font-size: 1.8rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.feature-content {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.feature-icon {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.feature-text h3 {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.partner-section {
|
||||
padding: 2rem 0;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05), rgba(var(--accent-rgb), 0.05));
|
||||
}
|
||||
|
||||
.partner-bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 0;
|
||||
opacity: 0.03;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.partner-section h2 {
|
||||
text-align: center;
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 2rem;
|
||||
background: black;
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.partner-intro, .app-intro {
|
||||
max-width: 800px;
|
||||
margin: 0 auto 3rem;
|
||||
text-align: center;
|
||||
padding: 0 1rem;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.partner-intro p, .app-intro p {
|
||||
font-size: 0.8rem;
|
||||
line-height: 1.8;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.partner-logos {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 2rem;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 0 1rem;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.partner-logo {
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
backdrop-filter: blur(10px);
|
||||
border-radius: 16px;
|
||||
padding: 2rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1.5rem;
|
||||
transition: all 0.3s ease;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
|
||||
border: 1px solid rgba(var(--primary-rgb), 0.1);
|
||||
}
|
||||
|
||||
.partner-icon {
|
||||
flex-shrink: 0;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.1);
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.partner-logo:hover .partner-icon {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.partner-icon img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.partner-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.partner-info h3 {
|
||||
font-size: 1.3rem;
|
||||
margin: 0 0 0.5rem;
|
||||
color: var(--text-primary);
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
.partner-logo:hover .partner-info h3 {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.partner-info p {
|
||||
font-size: 0.9rem;
|
||||
color: var(--text-secondary);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.partner-section {
|
||||
padding: 3rem 0;
|
||||
}
|
||||
|
||||
.partner-section h2 {
|
||||
font-size: 2rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.partner-intro {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.partner-intro p {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.partner-logos {
|
||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.partner-logo {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.partner-icon {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.partner-icon img {
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
}
|
||||
|
||||
.partner-info h3 {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.partner-section {
|
||||
padding: 2rem 0;
|
||||
}
|
||||
|
||||
.partner-section h2 {
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
|
||||
.partner-logos {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.partner-logo {
|
||||
padding: 1.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
.app-showcase {
|
||||
border-radius: 16px;
|
||||
padding: 2rem 2rem;
|
||||
margin: 2rem auto;
|
||||
}
|
||||
|
||||
.app-showcase-desc {
|
||||
font-size: 0.8rem;
|
||||
line-height: 1.8;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.app-showcase-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: 2rem;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.app-showcase-item {
|
||||
position: relative;
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
transition: all 0.3s ease;
|
||||
aspect-ratio: 9/16;
|
||||
}
|
||||
|
||||
.app-showcase-item:hover {
|
||||
transform: translateY(-10px);
|
||||
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.app-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.app-image img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.app-showcase-item:hover .app-image img {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.app-overlay {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 1.5rem;
|
||||
background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
|
||||
color: white;
|
||||
transform: translateY(100%);
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.app-showcase-item:hover .app-overlay {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.app-overlay h3 {
|
||||
font-size: 1.25rem;
|
||||
margin-bottom: 0.5rem;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.app-overlay p {
|
||||
font-size: 0.9rem;
|
||||
opacity: 0.9;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.app-showcase-grid {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.app-overlay {
|
||||
transform: translateY(0);
|
||||
background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.6));
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.app-overlay h3 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.app-overlay p {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.app-showcase-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.enterprise-section {
|
||||
background: linear-gradient(135deg, var(--background-light), var(--background-off-white));
|
||||
border-radius: 24px;
|
||||
padding: 4rem 2rem;
|
||||
margin: 2rem auto;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.enterprise-section::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 4px;
|
||||
background: black;
|
||||
}
|
||||
|
||||
.enterprise-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||
gap: 2rem;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.enterprise-card {
|
||||
background: white;
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
transition: all 0.3s ease;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
||||
border: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.enterprise-card:hover {
|
||||
transform: translateY(-10px);
|
||||
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.enterprise-image {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.enterprise-image img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.enterprise-card:hover .enterprise-image img {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.enterprise-content {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.enterprise-content h3 {
|
||||
color: var(--text-primary);
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.enterprise-content p {
|
||||
color: var(--text-secondary);
|
||||
line-height: 1.6;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.enterprise-grid {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.enterprise-image {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.enterprise-content {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.enterprise-content h3 {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.enterprise-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.enterprise-image {
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
.enterprise-card {
|
||||
max-width: 400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
</style>
|
1
src/pages/template/1/news.astro
Normal file
1
src/pages/template/1/news.astro
Normal file
@ -0,0 +1 @@
|
||||
template_news
|
5
utils/host.ts
Normal file
5
utils/host.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export async function getHost(request: Request) {
|
||||
// 获取请求头中的 Host
|
||||
const host = request.headers.get('host');
|
||||
return host;
|
||||
}
|
20
utils/rpc.ts
20
utils/rpc.ts
@ -68,3 +68,23 @@ export async function newsDetail(id:string):Promise<result<InewsDetail>>{
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
// 网站配置
|
||||
export interface IWebsiteConfig {
|
||||
app_name: string
|
||||
app_description: string
|
||||
app_company: string
|
||||
app_logo: string
|
||||
app_favicon: string
|
||||
app_copyright: string
|
||||
app_icp: string
|
||||
}
|
||||
export async function websiteConfig(host:string):Promise<result<IWebsiteConfig>>{
|
||||
const client = getRpcClient()
|
||||
const result = await client.call('website/config', {
|
||||
host:host
|
||||
})
|
||||
|
||||
return result
|
||||
}
|
Reference in New Issue
Block a user