Skip to content

Commit

Permalink
fix a lot
Browse files Browse the repository at this point in the history
Signed-off-by: zxypro1 <1018995004@qq.com>
  • Loading branch information
zxypro1 committed Nov 13, 2024
1 parent c2c2b5a commit b7dc7a5
Show file tree
Hide file tree
Showing 26 changed files with 509 additions and 364 deletions.
8 changes: 7 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import icon from "astro-icon";
import { SIDEBAR, SITE } from "./src/utils/config.ts";
import topLevelAwait from "vite-plugin-top-level-await";
import starlightUtils from "@lorenzo_lewis/starlight-utils";
import rehypeAstroRelativeMarkdownLinks from "astro-rehype-relative-markdown-links";

// https://astro.build/config
export default defineConfig({
Expand All @@ -16,13 +17,18 @@ export default defineConfig({
image: {
domain: ["img.alicdn"],
},
// markdown: {
// rehypePlugins: [rehypeAstroRelativeMarkdownLinks],
// },
// trailingSlash: 'never',
integrations: [
autoImportComponents(),
starlight({
title: SITE.name,
favicon: "/favicon.png",
logo: {
src: "./public/assets/logo.png",
light: "./public/assets/logo-black.svg",
dark: "./public/assets/logo.png",
replacesTitle: true,
},
//自定义组件
Expand Down
24 changes: 24 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"astro-compress": "^2.2.11",
"astro-icon": "^1.1.0",
"astro-navbar": "^2.3.3",
"astro-rehype-relative-markdown-links": "^0.15.0",
"astro-seo": "^0.8.4",
"axios": "^1.7.4",
"date-fns": "^3.4.0",
Expand Down
1 change: 1 addition & 0 deletions public/assets/logo-black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion s-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

edition: 3.0.0
name: flask-app
access: default
access: agentcraft
vars:
region: cn-hangzhou
resources:
Expand Down
12 changes: 6 additions & 6 deletions src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,16 @@ const contactWays = [{

<div class="col-span-4 lg:col-span-2">
<div class="rounded-lg p-4">
<h2 class="text-sm font-medium mb-4 text-info">DOCUMENTATION</h2>
<h2 class="text-sm font-medium mb-4 text-info">相关链接</h2>
<div class="flex flex-col space-y-2 text-white text-sm mt-10">
<a>帮助文档</a>
<a>Serverless社区</a>
<a>Registry</a>
<a href="/docs/overview">帮助文档</a>
<!-- <a>Serverless社区</a> -->
<a href="https://registry.serverless-devs.com/">Registry</a>
</div>
</div>
</div>

<div class="col-span-4 lg:col-span-2">
<!-- <div class="col-span-4 lg:col-span-2">
<div class="rounded-lg p-4">
<h2 class="text-sm font-medium mb-4 text-info">RESOURCES (文案占位)</h2>
<div class="flex flex-col space-y-2 text-white text-sm mt-10">
Expand All @@ -94,7 +94,7 @@ const contactWays = [{
<a>CLoud Service EDAS (文案占位)</a>
</div>
</div>
</div>
</div> -->
</div>
</div>

Expand Down
22 changes: 18 additions & 4 deletions src/components/LineCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,33 @@ import {Picture} from "astro:assets";
import blueFireIcon from "@assets/icons/blurFire.svg";
import starIcon from "@assets/icons/star.svg";
const {url, title, description, date, hot} = Astro.props;
const {url, title, description, date, hot, logo} = Astro.props;
const iconMap = {
'start-springboot-v3': starIcon,
'video-transcode-v3': starIcon,
'start-modelscope-v3': starIcon,
'fc-ai-character': starIcon,
'fc-stable-diffusion-v3': starIcon,
'start-flask-v3': starIcon
}
---

<div class="card flex flex-col gap-8 text-white border border-[#4a4c57] rounded-xl p-5 hover:bg-[#1e1f22]" onclick=`window.open('${url}', '_blank')` >
<div class="p-3 bg-white bg-opacity-5 rounded-xl border-[0.8px] border-[#b3b6c1] w-fit">
<Picture class="rounded-full" src={starIcon} alt="starIcon"/>
<div class="p-3 bg-white bg-opacity-5 rounded-xl border-[0.8px] border-[#b3b6c1] w-[52px] h-[52px]">
<Picture
class="object-contain w-full h-full"
src={iconMap[title] || logo || starIcon}
alt="starIcon"
width={52}
height={52}
/>
</div>
<div class="flex flex-col">
<a class="text-lg font-bold title"
href={url}>{title}</a>
<p class="text-sm text-info">{description}</p>
</div>
<div class="flex flex-row justify-between items-center">
<div class="flex flex-row justify-between items-center mt-auto">
<div class="flex flex-row gap-1 items-center text-white">
<Picture class="rounded-full" src={blueFireIcon} alt="blueFireIcon"/>
<span class="text-sm font-light">{hot}</span>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ThemeProvider.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {Props} from '@astrojs/starlight/props';
const storedTheme =
typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme');
const theme =
storedTheme || 'dark';
storedTheme || 'light';
document.documentElement.dataset.theme = theme === 'light' ? 'light' : 'dark';
localStorage.setItem('starlight-theme', theme);

Expand Down
6 changes: 3 additions & 3 deletions src/components/home/BuildForms.astro
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import SmoothButton from "./SmoothButton.astro";
<span>并且可以在流水线无缝集成</span>

<div class="mt-[2vw] text-[1vw]">
<SmoothButton href="https://registry.serverless-devs.com/">查看更多</SmoothButton>
<SmoothButton href="https://registry.serverless-devs.com/application.html">查看更多</SmoothButton>
</div>
</div>

Expand All @@ -39,7 +39,7 @@ import SmoothButton from "./SmoothButton.astro";
<span>都是精心打磨的云资源管理利器</span>

<div class="mt-[2vw] text-[1vw]">
<SmoothButton href="https://registry.serverless-devs.com/">查看更多</SmoothButton>
<SmoothButton href="https://registry.serverless-devs.com/component.html">查看更多</SmoothButton>
</div>
</div>
</div>
Expand All @@ -54,7 +54,7 @@ import SmoothButton from "./SmoothButton.astro";
<span>实现服务的热启动</span>

<div class="mt-[2vw] text-[1vw]">
<SmoothButton href="https://registry.serverless-devs.com/">查看更多</SmoothButton>
<SmoothButton href="https://registry.serverless-devs.com/plugin.html">查看更多</SmoothButton>
</div>
</div>

Expand Down
18 changes: 12 additions & 6 deletions src/components/home/Hero.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,26 @@ import SmoothButton from "./SmoothButton.astro";
<div class="hero-background"></div>

<!-- 热门模板 -->
<a href="https://registry.serverless-devs.com/"
class="hidden md:flex bg-white bg-opacity-20 opacity-80 border-[#9295a5] border-[0.8px] px-3 py-2 w-fit rounded-3xl text-center flex-row items-center gap-3 z-10">
<div
class="hidden md:flex bg-white bg-opacity-20 opacity-80 border-[#9295a5] border-[0.8px] px-3 py-2 w-fit rounded-3xl text-center flex-row items-center gap-3 z-10 ">
<div class="text-center text-white rounded-3xl text-xs px-5 py-2"
style="background:linear-gradient(134.09deg, rgba(38, 44, 244, 1) 0%, rgba(113, 64, 255, 1) 100%)">
HOT !
</div>
<p class="text-white text-xs">stable-diffusion,comfyui,cosyvoice,ollama 等应用模版上架</p>
<Picture
<p class="text-white text-xs mr-2">
<a href="https://registry.serverless-devs.com/details.html?name=fc-stable-diffusion-v3&package_type=v3" target="_blank" class="hover:text-[#ee6590]">Stable-Diffusion</a>,
<a href="https://registry.serverless-devs.com/details.html?name=fc-comfyui&package_type=v3" target="_blank" class="hover:text-[#ee6590]">ComfyUI</a>,
<a href="https://registry.serverless-devs.com/details.html?name=cosyvoice&package_type=v3" target="_blank" class="hover:text-[#ee6590]">CosyVoice</a>,
<a href="https://registry.serverless-devs.com/details.html?name=ollama&package_type=v3" target="_blank" class="hover:text-[#ee6590]">Ollama</a>,
<a href="https://registry.serverless-devs.com/details.html?name=fc-gpt-sovits&package_type=v3" target="_blank" class="hover:text-[#ee6590]">GPT-SoVITS</a>
等应用模版上架</p>
<!-- <Picture
src={nextIcon}
alt="nextIcon"
loading="eager"
format="avif"
/>
</a>
/> -->
</div>

<!-- 大标题 -->
<h1
Expand Down
16 changes: 11 additions & 5 deletions src/components/home/Maintainers.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const maintainers = [{
icon: "/assets/icons/placeholderAvatar1.svg",
}, {
avatar: "https://avatars.githubusercontent.com/u/5129967?v=4",
link: "https://github.com/heimanba"
}, {
color: "#272df4"
}, {
Expand All @@ -25,12 +26,14 @@ const maintainers = [{
color: "#1e1f24"
}, {
avatar: "https://avatars.githubusercontent.com/u/16363180?v=4",
link: "https://github.com/DevDengChao"
}, {
color: "#272df4"
}, {
color: "#d8d8d8"
}, {
avatar: "https://avatars.githubusercontent.com/u/45677661?v=4",
avatar: "https://avatars.githubusercontent.com/u/43384183?v=4",
link: "https://github.com/zxypro1"
}, {
color: "#b3b6c1"
}, {
Expand All @@ -39,14 +42,17 @@ const maintainers = [{
color: "#1e1f24"
}, {
avatar: "https://avatars.githubusercontent.com/u/21079031?v=4",
link: "https://github.com/anycodes"
}, {
avatar: "https://avatars.githubusercontent.com/u/4457084?s=60&v=4",
link: "https://github.com/hanxie-crypto"
}, {
icon: "/assets/icons/placeholderAvatar4.svg",
}, {
color: "#272df4"
}, {
avatar: "https://avatars.githubusercontent.com/u/5763215?v=4",
link: "https://github.com/lowkeyrd"
}, {
color: "#b3b6c1"
}]
Expand All @@ -56,11 +62,11 @@ const maintainers = [{
<div class="flex flex-row lg:flex-col items-center gap-14 lg:gap-5 text-white mb-10 lg:mb-0">
<div class="flex flex-col lg:items-center gap-0 lg:gap-5">
<p class="text-sm text-info">MEMBERS</p>
<h2 class="text-slate-500 font-bold text-4xl">iServerless<br>开发者社区</h2>
<h2 class="text-slate-500 font-bold text-4xl">我们的开发者</h2>
</div>

<a href="#" class="text-black text-sm">
<p class="bg-white rounded-3xl lg:mt-24 py-4 px-5 text-center text-nowrap">加入【coming soon】</p>
<a href="https://github.com/Serverless-Devs/Serverless-Devs/issues" class="text-black text-[12pt] min-w-[120px]">
<p class="bg-white rounded-3xl lg:mt-24 py-4 px-5 text-center text-nowrap">加入贡献</p>
</a>
</div>
<div class="grid grid-cols-6 flex-wrap gap-3 justify-center">
Expand All @@ -69,7 +75,7 @@ const maintainers = [{
<div class="flex flex-col items-center gap-3 w-[60px] h-[60px] sm:w-[80px] sm:h-[80px] md:w-[100px] md:h-[100px] ">
{
maintainer.avatar ?? maintainer.icon ? (
<img class="rounded-xl w-full h-full"
<img class={`rounded-xl w-full h-full ${maintainer.avatar && 'hover:cursor-pointer'}`} onclick={maintainer.avatar ? `window.open('${maintainer?.link}', '_blank')` : ''}
src={maintainer.avatar ?? maintainer.icon} alt=""/>
) : (
<div class="rounded-xl w-full h-full"
Expand Down
4 changes: 2 additions & 2 deletions src/components/home/Navbar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ const menuItems = [
href={item.path}
class="flex text-white font-light lg:px-3 py-2 items-center text-gray-600 hover:text-gray-900 no-underline"
>
<span> {item.title}</span>
<span class="text-[14pt]"> {item.title}</span>
</a>
</li>
{
index + 1 != menuItems.length &&
<div class="w-[1px] h-3 bg-white leading-none"></div>
<div class="w-[1px] h-5 bg-white leading-none"></div>
}
</>
))
Expand Down
2 changes: 1 addition & 1 deletion src/components/home/Search.astro
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const pagefindTranslations = {
<SmoothButton onlyIcon={true} id="open-modal">
<Picture
src={searchIcon}
class="size-4"
class="size-3"
alt="search"
loading="eager"
format="avif"
Expand Down
2 changes: 1 addition & 1 deletion src/components/home/SmoothButton.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let {
---

<a href={href} target="_blank" id={id} style={style}
class={`cursor-pointer inline-flex flex-nowrap text-nowrap ${mode == 'line' ? 'text-white bg-white/10' : 'text-black bg-white'} items-center justify-center border-[0.8px] border-[#b3b6c1] ${onlyIcon ? 'rounded-full h-full aspect-square' : 'fullButton rounded-[32px] h-full px-8 py-2'}`}>
class={`text-[12pt] cursor-pointer inline-flex flex-nowrap text-nowrap ${mode == 'line' ? 'text-white bg-white/10' : 'text-black bg-white'} items-center justify-center border-[0.8px] border-[#b3b6c1] ${onlyIcon ? 'rounded-full h-full aspect-square' : 'fullButton rounded-[32px] h-full px-8 py-2'}`}>
<slot/>
<img class="goIcon" src="/assets/icons/go.svg" alt=""/>
</a>
Expand Down
Loading

0 comments on commit b7dc7a5

Please sign in to comment.