Compare commits

...

3 Commits

Author SHA1 Message Date
crazywhalecc
7a1d4a2cde
Add missing Contributors 2025-10-28 09:49:17 +08:00
crazywhalecc
82674bf3a2
Use smaller size to save bandwidth 2025-10-28 09:26:28 +08:00
crazywhalecc
d33cf4ab58
Change logos and remove emojis 2025-10-28 09:19:20 +08:00
6 changed files with 238 additions and 32 deletions

View File

@ -0,0 +1,219 @@
<template>
<div class="contributors-container">
<div class="contributors-header">
<h2>Contributors</h2>
<p class="contributors-description">
Thanks to all the amazing people who have contributed to this project!
</p>
</div>
<div v-if="loading" class="loading-state">
<div class="spinner"></div>
<p>Loading contributors...</p>
</div>
<div v-else-if="error" class="error-state">
<p>{{ error }}</p>
</div>
<div v-else class="contributors-grid">
<a
v-for="contributor in contributors"
:key="contributor.id"
:href="contributor.html_url"
target="_blank"
rel="noopener noreferrer"
class="contributor-card"
:title="contributor.login"
>
<img
:src="contributor.avatar_url"
:alt="contributor.login"
class="contributor-avatar"
loading="lazy"
/>
<div class="contributor-name">{{ contributor.login }}</div>
</a>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
interface Contributor {
id: number;
login: string;
avatar_url: string;
html_url: string;
contributions: number;
}
const contributors = ref<Contributor[]>([]);
const loading = ref(true);
const error = ref('');
const fetchContributors = async () => {
try {
loading.value = true;
error.value = '';
const response = await fetch(
'https://api.github.com/repos/crazywhalecc/static-php-cli/contributors?per_page=24'
);
if (!response.ok) {
throw new Error('Failed to fetch contributors');
}
const data = await response.json();
contributors.value = data;
} catch (err) {
error.value = 'Failed to load contributors. Please try again later.';
console.error('Error fetching contributors:', err);
} finally {
loading.value = false;
}
};
onMounted(() => {
fetchContributors();
});
</script>
<style scoped>
.contributors-container {
margin: 48px auto;
padding: 32px 24px;
max-width: 1152px;
background: linear-gradient(135deg, var(--vp-c-bg-soft) 0%, var(--vp-c-bg) 100%);
border-radius: 16px;
border: 1px solid var(--vp-c-divider);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
.contributors-header {
text-align: center;
margin-bottom: 24px;
}
.contributors-header h2 {
font-size: 1.5rem;
font-weight: 700;
margin: 0 0 8px 0;
background: linear-gradient(120deg, var(--vp-c-brand-1), var(--vp-c-brand-2));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.contributors-description {
font-size: 0.95rem;
color: var(--vp-c-text-2);
margin: 0;
line-height: 1.5;
}
.loading-state,
.error-state {
text-align: center;
padding: 40px 20px;
color: var(--vp-c-text-2);
}
.spinner {
width: 40px;
height: 40px;
margin: 0 auto 16px;
border: 4px solid var(--vp-c-divider);
border-top-color: var(--vp-c-brand-1);
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.contributors-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
gap: 16px;
}
.contributor-card {
display: flex;
flex-direction: column;
align-items: center;
padding: 12px;
background: var(--vp-c-bg);
border-radius: 12px;
border: 1px solid var(--vp-c-divider);
transition: all 0.3s ease;
text-decoration: none;
color: var(--vp-c-text-1);
}
.contributor-card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
border-color: var(--vp-c-brand-1);
}
.contributor-avatar {
width: 60px;
height: 60px;
border-radius: 50%;
border: 2px solid var(--vp-c-divider);
transition: all 0.3s ease;
margin-bottom: 8px;
}
.contributor-card:hover .contributor-avatar {
border-color: var(--vp-c-brand-1);
transform: scale(1.05);
}
.contributor-name {
font-size: 12px;
font-weight: 500;
text-align: center;
word-break: break-word;
max-width: 100%;
}
@media (max-width: 768px) {
.contributors-container {
margin: 32px 16px;
padding: 24px 16px;
}
.contributors-header h2 {
font-size: 1.25rem;
}
.contributors-description {
font-size: 0.9rem;
}
.contributors-grid {
grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
gap: 12px;
}
.contributor-card {
padding: 8px;
}
.contributor-avatar {
width: 48px;
height: 48px;
}
.contributor-name {
font-size: 11px;
}
}
</style>

View File

@ -4,19 +4,15 @@
max-width: 1000px !important;
}
/* Custom brand color */
:root {
--vp-c-brand-1: #9d7a47;
--vp-c-brand-2: #b08f59;
--vp-c-brand-3: #c8a16e;
--vp-c-brand-soft: rgba(157, 122, 71, 0.14);
.vp-doc .contributors-header h2 {
padding-top: 0;
border-top: none;
}
.dark {
--vp-c-brand-1: #c8a16e;
--vp-c-brand-2: #b08f59;
--vp-c-brand-3: #9d7a47;
--vp-c-brand-soft: rgba(176, 143, 89, 0.16);
.vp-doc .sponsors-header h2 {
padding-top: 0;
border-top: none;
}
.dark .VPImage.logo {

View File

@ -14,14 +14,11 @@ hero:
link: ./guide/
features:
- icon: 🚀
title: Static CLI Binary
- title: Static CLI Binary
details: You can easily compile a standalone php binary for general use. Including CLI, FPM sapi.
- icon: 📦
title: Micro Self-Extracted Executable
- title: Micro Self-Extracted Executable
details: You can compile a self-extracted executable and build with your php source code.
- icon: 🔧
title: Dependency Management
- title: Dependency Management
details: static-php-cli comes with dependency management and supports installation of different types of PHP extensions.
---
@ -37,7 +34,7 @@ const sponsors = [
<div class="sponsors-section">
<div class="sponsors-header">
<h2>💝 Special Sponsors</h2>
<h2>Special Sponsors</h2>
<p class="sponsors-description">
Thank you to our amazing sponsors for supporting this project!
</p>

View File

@ -17,14 +17,11 @@ hero:
link: /zh/
features:
- icon: 🚀
title: Static CLI Binary
- title: Static CLI Binary
details: You can easily compile a standalone php binary for general use. Including CLI, FPM sapi.
- icon: 📦
title: Micro Self-Extracted Executable
- title: Micro Self-Extracted Executable
details: You can compile a self-extracted executable and build with your php source code.
- icon: 🔧
title: Dependency Management
- title: Dependency Management
details: static-php-cli comes with dependency management and supports installation of different types of PHP extensions.
---
@ -40,7 +37,7 @@ const sponsors = [
<div class="sponsors-section">
<div class="sponsors-header">
<h2>💝 Special Sponsors</h2>
<h2>Special Sponsors</h2>
<p class="sponsors-description">
Thank you to our amazing sponsors for supporting this project!
</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 630 KiB

After

Width:  |  Height:  |  Size: 965 KiB

View File

@ -14,14 +14,11 @@ hero:
link: ./guide/
features:
- icon: 🚀
title: 静态 CLI 二进制
- title: 静态 CLI 二进制
details: 您可以轻松地编译一个独立的 PHP 二进制文件以供通用使用,包括 CLI、FPM SAPI。
- icon: 📦
title: Micro 自解压可执行文件
- title: Micro 自解压可执行文件
details: 您可以编译一个自解压的可执行文件,并将 PHP 源代码与二进制文件打包在一起。
- icon: 🔧
title: 依赖管理
- title: 依赖管理
details: static-php-cli 附带依赖项管理,支持安装不同类型的 PHP 扩展。
---
@ -37,7 +34,7 @@ const sponsors = [
<div class="sponsors-section">
<div class="sponsors-header">
<h2>💝 特别赞助商</h2>
<h2>特别赞助商</h2>
<p class="sponsors-description">
感谢我们出色的赞助商对本项目的支持!
</p>