rephrasing some stuff
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<div class="footer-content">
|
||||
<div>
|
||||
<p class="text-muted" style="margin: 0;">
|
||||
© 2025 CC24-Hub - Lizensiert unter BSD-3-Clause
|
||||
© 2025 CC24-Guide - Lizensiert unter BSD-3-Clause
|
||||
</p>
|
||||
</div>
|
||||
<div style="display: flex; gap: 2rem; align-items: center;">
|
||||
|
||||
@@ -8,9 +8,9 @@ const currentPath = Astro.url.pathname;
|
||||
<div class="container">
|
||||
<div class="nav-wrapper">
|
||||
<a href="/" class="nav-brand">
|
||||
<img src="/logo-dark.png" alt="CC24-Hub" class="nav-logo nav-logo-light" />
|
||||
<img src="/logo-white.png" alt="CC24-Hub" class="nav-logo nav-logo-dark" />
|
||||
<span style="font-weight: 600; font-size: 1.125rem;">CC24-Hub</span>
|
||||
<img src="/logo-dark.png" alt="CC24-Guide" class="nav-logo nav-logo-light" />
|
||||
<img src="/logo-white.png" alt="CC24-Guide" class="nav-logo nav-logo-dark" />
|
||||
<span style="font-weight: 600; font-size: 1.125rem;">CC24-Guide</span>
|
||||
</a>
|
||||
|
||||
<ul class="nav-links">
|
||||
|
||||
68
src/components/shareButton.astro
Normal file
68
src/components/shareButton.astro
Normal file
@@ -0,0 +1,68 @@
|
||||
---
|
||||
export interface Props {
|
||||
toolName: string;
|
||||
context: 'card' | 'modal-primary' | 'modal-secondary';
|
||||
size?: 'small' | 'medium';
|
||||
}
|
||||
|
||||
const { toolName, context, size = 'small' } = Astro.props;
|
||||
|
||||
// Create URL-safe slug from tool name
|
||||
const toolSlug = toolName.toLowerCase()
|
||||
.replace(/[^a-z0-9\s-]/g, '') // Remove special characters
|
||||
.replace(/\s+/g, '-') // Replace spaces with hyphens
|
||||
.replace(/-+/g, '-') // Remove duplicate hyphens
|
||||
.replace(/^-|-$/g, ''); // Remove leading/trailing hyphens
|
||||
|
||||
const iconSize = size === 'small' ? '14' : '16';
|
||||
---
|
||||
|
||||
<button
|
||||
class={`share-btn share-btn--${size}`}
|
||||
data-tool-name={toolName}
|
||||
data-tool-slug={toolSlug}
|
||||
data-context={context}
|
||||
onclick="event.stopPropagation(); window.showShareDialog(this)"
|
||||
title={`${toolName} teilen`}
|
||||
aria-label={`${toolName} teilen`}
|
||||
>
|
||||
<svg width={iconSize} height={iconSize} viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<circle cx="18" cy="5" r="3"/>
|
||||
<circle cx="6" cy="12" r="3"/>
|
||||
<circle cx="18" cy="19" r="3"/>
|
||||
<line x1="8.59" y1="13.51" x2="15.42" y2="17.49"/>
|
||||
<line x1="15.41" y1="6.51" x2="8.59" y2="10.49"/>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<style>
|
||||
.share-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--color-text-secondary);
|
||||
cursor: pointer;
|
||||
padding: 0.25rem;
|
||||
border-radius: 0.25rem;
|
||||
transition: var(--transition-fast);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.share-btn:hover {
|
||||
color: var(--color-primary);
|
||||
background-color: var(--color-bg-secondary);
|
||||
}
|
||||
|
||||
.share-btn--small {
|
||||
padding: 0.125rem;
|
||||
}
|
||||
|
||||
.share-btn--medium {
|
||||
padding: 0.375rem;
|
||||
}
|
||||
|
||||
.share-btn svg {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user