This commit is contained in:
overcuriousity
2025-07-22 22:36:08 +02:00
parent 043a2d32ac
commit f4acf39ca7
9 changed files with 496 additions and 85 deletions

View File

@@ -0,0 +1,193 @@
---
// src/pages/contribute/index.astro
import BaseLayout from '../../layouts/BaseLayout.astro';
import { getAuthContext, requireAuth } from '../../utils/serverAuth.js';
// Check authentication
const authContext = await getAuthContext(Astro);
const authRedirect = requireAuth(authContext, Astro.url.toString());
if (authRedirect) return authRedirect;
---
<BaseLayout title="Contribute" description="Contribute tools, methods, concepts, and knowledge articles to CC24-Guide">
<section style="padding: 2rem 0;">
<!-- Header -->
<div style="text-align: center; margin-bottom: 3rem; padding: 2rem; background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%); color: white; border-radius: 1rem; border: 1px solid var(--color-border);">
<h1 style="margin-bottom: 1rem; font-size: 2.5rem;">
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="margin-right: 0.75rem; vertical-align: middle;">
<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/>
<circle cx="8.5" cy="7" r="4"/>
<line x1="20" y1="8" x2="20" y2="14"/>
<line x1="23" y1="11" x2="17" y2="11"/>
</svg>
Contribute to CC24-Guide
</h1>
<p style="margin: 0; opacity: 0.9; line-height: 1.6; font-size: 1.125rem;">
Help expand our DFIR knowledge base by contributing tools, methods, concepts, and detailed articles.
All contributions are reviewed before being merged into the main database.
</p>
</div>
<!-- Contribution Options -->
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; margin-bottom: 3rem;">
<!-- Tools, Methods & Concepts -->
<div class="card" style="padding: 2rem; border-left: 4px solid var(--color-primary); cursor: pointer; transition: var(--transition-fast);" onclick="window.location.href='/contribute/tool'">
<div style="display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem;">
<div style="width: 48px; height: 48px; background-color: var(--color-primary); border-radius: 0.5rem; display: flex; align-items: center; justify-content: center;">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2">
<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/>
</svg>
</div>
<h3 style="margin: 0; color: var(--color-primary); font-size: 1.25rem;">Tools, Methods & Concepts</h3>
</div>
<p style="margin-bottom: 1.5rem; line-height: 1.6;">
Add new software tools, forensic methodologies, or fundamental concepts to our database.
Includes detailed forms for metadata, licensing, platforms, and categorization.
</p>
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem;">
<span class="badge" style="background-color: var(--color-primary); color: white;">Software Tools</span>
<span class="badge" style="background-color: var(--color-method); color: white;">Methods</span>
<span class="badge" style="background-color: var(--color-concept); color: white;">Concepts</span>
</div>
<div style="display: flex; gap: 1rem;">
<a href="/contribute/tool" class="btn btn-primary" style="flex: 1;">Add New Entry</a>
<a href="/contribute/tool?mode=browse" class="btn btn-secondary" style="flex: 1;">Edit Existing</a>
</div>
</div>
<!-- Knowledgebase Articles -->
<div class="card" style="padding: 2rem; border-left: 4px solid var(--color-accent); cursor: pointer; transition: var(--transition-fast);" onclick="window.location.href='/contribute/knowledgebase'">
<div style="display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem;">
<div style="width: 48px; height: 48px; background-color: var(--color-accent); border-radius: 0.5rem; display: flex; align-items: center; justify-content: center;">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>
<polyline points="14 2 14 8 20 8"/>
<line x1="16" y1="13" x2="8" y2="13"/>
<line x1="16" y1="17" x2="8" y2="17"/>
<polyline points="10 9 9 9 8 9"/>
</svg>
</div>
<h3 style="margin: 0; color: var(--color-accent); font-size: 1.25rem;">Knowledgebase Articles</h3>
</div>
<p style="margin-bottom: 1.5rem; line-height: 1.6;">
Write detailed guides, tutorials, configuration instructions, and best practices.
Features a markdown editor with live preview and media upload capabilities.
</p>
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem;">
<span class="badge badge-secondary">Installation Guides</span>
<span class="badge badge-secondary">Tutorials</span>
<span class="badge badge-secondary">Best Practices</span>
<span class="badge badge-secondary">Case Studies</span>
</div>
<div style="display: flex; gap: 1rem;">
<a href="/contribute/knowledgebase" class="btn btn-accent" style="flex: 1;">Write Article</a>
<a href="/knowledgebase" class="btn btn-secondary" style="flex: 1;">View Articles</a>
</div>
</div>
<!-- Issues & Improvements -->
<div class="card" style="padding: 2rem; border-left: 4px solid var(--color-warning); grid-column: 1 / -1;">
<div style="display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem;">
<div style="width: 48px; height: 48px; background-color: var(--color-warning); border-radius: 0.5rem; display: flex; align-items: center; justify-content: center;">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2">
<circle cx="12" cy="12" r="10"/>
<line x1="12" y1="8" x2="12" y2="12"/>
<line x1="12" y1="16" x2="12.01" y2="16"/>
</svg>
</div>
<h3 style="margin: 0; color: var(--color-warning); font-size: 1.25rem;">Issues & Improvements</h3>
</div>
<div style="display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; align-items: center;">
<div>
<p style="margin-bottom: 1rem; line-height: 1.6;">
Found incorrect information, broken links, or have suggestions for improvements?
Report issues directly in our Git repository or suggest enhancements to existing entries.
</p>
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem;">
<span class="badge" style="background-color: var(--color-warning); color: white;">Bug Reports</span>
<span class="badge" style="background-color: var(--color-warning); color: white;">Corrections</span>
<span class="badge" style="background-color: var(--color-warning); color: white;">Suggestions</span>
</div>
</div>
<div style="display: flex; flex-direction: column; gap: 1rem;">
<a href="https://git.cc24.dev/mstoeck3/cc24-hub/issues/new" target="_blank" rel="noopener noreferrer" class="btn" style="background-color: var(--color-warning); color: white; border-color: var(--color-warning);">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="margin-right: 0.5rem;">
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>
<polyline points="15 3 21 3 21 9"/>
<line x1="10" y1="14" x2="21" y2="3"/>
</svg>
Report Issue
</a>
</div>
</div>
</div>
</div>
<!-- Guidelines -->
<div class="card" style="margin-bottom: 2rem;">
<h3 style="margin-bottom: 1.5rem; color: var(--color-text);">Contribution Guidelines</h3>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem;">
<div>
<h4 style="margin-bottom: 0.75rem; color: var(--color-primary);">Quality Standards</h4>
<ul style="margin: 0; padding-left: 1.5rem; line-height: 1.6;">
<li>Provide accurate and up-to-date information</li>
<li>Use clear, professional language</li>
<li>Include relevant tags and categorization</li>
<li>Verify all URLs and links work correctly</li>
</ul>
</div>
<div>
<h4 style="margin-bottom: 0.75rem; color: var(--color-accent);">Review Process</h4>
<ul style="margin: 0; padding-left: 1.5rem; line-height: 1.6;">
<li>All contributions create pull requests</li>
<li>Maintainers review within 48-72 hours</li>
<li>Feedback provided for requested changes</li>
<li>Approved changes merged automatically</li>
</ul>
</div>
<div>
<h4 style="margin-bottom: 0.75rem; color: var(--color-warning);">Best Practices</h4>
<ul style="margin: 0; padding-left: 1.5rem; line-height: 1.6;">
<li>Search existing entries before adding duplicates</li>
<li>Include rationale for new additions</li>
<li>Follow existing categorization patterns</li>
<li>Test tools/methods before recommending</li>
</ul>
</div>
</div>
</div>
<!-- Statistics -->
<div style="text-align: center; padding: 1.5rem; background-color: var(--color-bg-secondary); border-radius: 0.75rem;">
<p class="text-muted" style="margin: 0; font-size: 0.9375rem;">
<strong>Community Contributions:</strong> Help us maintain the most comprehensive DFIR resource available.
<br>
Your contributions are credited and help the entire forensics community.
</p>
</div>
</section>
</BaseLayout>
<style>
.card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-lg);
}
@media (width <= 768px) {
div[style*="grid-template-columns: 2fr 1fr"] {
grid-template-columns: 1fr !important;
}
}
</style>