This commit is contained in:
f 2025-01-05 22:11:29 +03:00
parent 76a9085717
commit d037bbd5a5
1 changed files with 55 additions and 1 deletions

View File

@ -76,7 +76,7 @@
display: flex;
flex-direction: column;
justify-content: center;
gap: 0.2rem;
gap: 0;
}
.header-right {
@ -86,6 +86,20 @@
gap: 12px;
}
.star-count {
display: flex;
align-items: center;
gap: 4px;
color: var(--accent-color);
font-size: 0.9rem;
opacity: 0.8;
}
.star-count svg {
width: 16px;
height: 16px;
}
.social-links {
display: flex;
align-items: center;
@ -282,6 +296,19 @@
transition: transform 0.3s ease;
}
.site-slogan {
font-size: 0.9rem;
opacity: 0.7;
margin: 0 0 0.8rem 0;
line-height: 1;
}
@media (max-width: 768px) {
.site-slogan {
display: none;
}
}
.site-title:hover {
transform: translateY(-2px);
}
@ -881,6 +908,7 @@
<header class="site-header">
<div class="header-left">
<h1 class="site-title">prompts.chat</h1>
<p class="site-slogan">Internet's Most Famous Prompts Directory</p>
<div class="site-description">
<a href="https://chat.openai.com" target="_blank" class="platform-tag">ChatGPT</a>
<a href="https://claude.ai/new" target="_blank" class="platform-tag">Claude</a>
@ -890,6 +918,12 @@
</div>
</div>
<div class="header-right">
<div class="star-count">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>
</svg>
<span id="starCount">...</span>
</div>
<button class="dark-mode-toggle" onclick="toggleDarkMode()" title="Toggle dark mode">
<svg class="mode-icon sun-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>
<svg class="mode-icon moon-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display: none;"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>
@ -964,6 +998,14 @@
</svg>
Hugging Face Dataset
</a>
<a href="https://github.com/f/awesome-chatgpt-prompts/pulls" target="_blank" class="book-link">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<line x1="12" y1="8" x2="12" y2="16"></line>
<line x1="8" y1="12" x2="16" y2="12"></line>
</svg>
View Unmerged Prompts
</a>
</div>
</div>
</div>
@ -987,6 +1029,18 @@
// Initialize everything after DOM loads
document.addEventListener('DOMContentLoaded', () => {
// Fetch GitHub stars
fetch('https://api.github.com/repos/f/awesome-chatgpt-prompts')
.then(response => response.json())
.then(data => {
const stars = data.stargazers_count;
document.getElementById('starCount').textContent = stars.toLocaleString();
})
.catch(error => {
console.error('Error fetching star count:', error);
document.getElementById('starCount').textContent = '50k+';
});
// Create prompt cards
createPromptCards();