feat(chat): Dodaj przycisk pomocy wideo w NordaGPT
- Przycisk ▶️ w headerze chatu obok badge'a modelu
- Modal z 40-sekundowym tutorialem wideo z polskim narratorem
- Poster (miniaturka) wideo
- Sekcja "Szybkie wskazówki" pod odtwarzaczem
- Responsywny design dla mobile
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
daf24256fc
commit
394e51b3ba
BIN
static/videos/nordagpt-demo-poster.jpg
Normal file
BIN
static/videos/nordagpt-demo-poster.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
BIN
static/videos/nordagpt-demo.mp4
Normal file
BIN
static/videos/nordagpt-demo.mp4
Normal file
Binary file not shown.
@ -720,6 +720,138 @@
|
|||||||
.model-benefits li strong {
|
.model-benefits li strong {
|
||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============================================
|
||||||
|
Video Help Button & Modal
|
||||||
|
============================================ */
|
||||||
|
.video-help-btn {
|
||||||
|
background: rgba(255,255,255,0.3) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-help-btn:hover {
|
||||||
|
background: rgba(255,255,255,0.5) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-help-modal {
|
||||||
|
display: none;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: rgba(0,0,0,0.8);
|
||||||
|
z-index: 1001;
|
||||||
|
padding: var(--spacing-lg);
|
||||||
|
overflow-y: auto;
|
||||||
|
animation: fadeIn 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-help-modal.active {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-help-content {
|
||||||
|
background: white;
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
max-width: 800px;
|
||||||
|
width: 100%;
|
||||||
|
padding: var(--spacing-xl);
|
||||||
|
margin-top: 40px;
|
||||||
|
position: relative;
|
||||||
|
box-shadow: 0 20px 60px rgba(0,0,0,0.4);
|
||||||
|
animation: slideUp 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-help-close {
|
||||||
|
position: absolute;
|
||||||
|
top: var(--spacing-md);
|
||||||
|
right: var(--spacing-md);
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
cursor: pointer;
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
transition: var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-help-close:hover {
|
||||||
|
background: #f3f4f6;
|
||||||
|
color: var(--text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-help-content h2 {
|
||||||
|
font-size: var(--font-size-xl);
|
||||||
|
color: var(--text-primary);
|
||||||
|
margin: 0 0 var(--spacing-xs);
|
||||||
|
padding-right: var(--spacing-xl);
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-help-subtitle {
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-size: var(--font-size-sm);
|
||||||
|
margin: 0 0 var(--spacing-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-container {
|
||||||
|
position: relative;
|
||||||
|
background: #000;
|
||||||
|
border-radius: var(--radius);
|
||||||
|
overflow: hidden;
|
||||||
|
margin-bottom: var(--spacing-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-container video {
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
max-height: 450px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-help-tips {
|
||||||
|
background: #f5f3ff;
|
||||||
|
border: 1px solid #c4b5fd;
|
||||||
|
border-radius: var(--radius);
|
||||||
|
padding: var(--spacing-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-help-tips h3 {
|
||||||
|
font-size: var(--font-size-md);
|
||||||
|
color: var(--text-primary);
|
||||||
|
margin: 0 0 var(--spacing-md);
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-help-tips ul {
|
||||||
|
margin: 0;
|
||||||
|
padding-left: var(--spacing-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-help-tips li {
|
||||||
|
padding: var(--spacing-xs) 0;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-size: var(--font-size-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-help-tips li strong {
|
||||||
|
color: #5b21b6;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.video-help-content {
|
||||||
|
margin-top: 20px;
|
||||||
|
padding: var(--spacing-md);
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-container video {
|
||||||
|
max-height: 280px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@ -760,6 +892,12 @@
|
|||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
<button class="model-info-btn video-help-btn" onclick="openVideoHelpModal()" title="Jak korzystać z NordaGPT? (Wideo)">
|
||||||
|
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" width="16" height="16">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"/>
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
@ -867,6 +1005,32 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal z wideo pomocowym -->
|
||||||
|
<div class="video-help-modal" id="videoHelpModal">
|
||||||
|
<div class="video-help-content">
|
||||||
|
<button class="video-help-close" onclick="closeVideoHelpModal()">×</button>
|
||||||
|
<h2>🎬 Jak korzystać z NordaGPT?</h2>
|
||||||
|
<p class="video-help-subtitle">Krótki przewodnik (40 sekund)</p>
|
||||||
|
|
||||||
|
<div class="video-container">
|
||||||
|
<video id="helpVideo" controls poster="{{ url_for('static', filename='videos/nordagpt-demo-poster.jpg') }}">
|
||||||
|
<source src="{{ url_for('static', filename='videos/nordagpt-demo.mp4') }}" type="video/mp4">
|
||||||
|
Twoja przeglądarka nie obsługuje wideo HTML5.
|
||||||
|
</video>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="video-help-tips">
|
||||||
|
<h3>💡 Szybkie wskazówki</h3>
|
||||||
|
<ul>
|
||||||
|
<li><strong>Znajdź firmę:</strong> "Kto oferuje usługi IT?"</li>
|
||||||
|
<li><strong>Sprawdź prezesa:</strong> "Kto jest prezesem PIXLAB?"</li>
|
||||||
|
<li><strong>Wydarzenia:</strong> "Kiedy następne spotkanie Norda?"</li>
|
||||||
|
<li><strong>Rekomendacje:</strong> "Poleć drukarnie z dobrymi opiniami"</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="chat-messages" id="chatMessages">
|
<div class="chat-messages" id="chatMessages">
|
||||||
<!-- Empty state - pokazywany gdy brak wiadomości -->
|
<!-- Empty state - pokazywany gdy brak wiadomości -->
|
||||||
<div class="empty-state" id="emptyState">
|
<div class="empty-state" id="emptyState">
|
||||||
@ -952,6 +1116,39 @@ document.addEventListener('click', function(e) {
|
|||||||
document.addEventListener('keydown', function(e) {
|
document.addEventListener('keydown', function(e) {
|
||||||
if (e.key === 'Escape') {
|
if (e.key === 'Escape') {
|
||||||
closeModelInfoModal();
|
closeModelInfoModal();
|
||||||
|
closeVideoHelpModal();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// ============================================
|
||||||
|
// Video Help Modal Functions
|
||||||
|
// ============================================
|
||||||
|
function openVideoHelpModal() {
|
||||||
|
document.getElementById('videoHelpModal').classList.add('active');
|
||||||
|
document.body.style.overflow = 'hidden';
|
||||||
|
// Auto-play video when modal opens
|
||||||
|
const video = document.getElementById('helpVideo');
|
||||||
|
if (video) {
|
||||||
|
video.currentTime = 0;
|
||||||
|
// Don't autoplay - let user control
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function closeVideoHelpModal() {
|
||||||
|
document.getElementById('videoHelpModal').classList.remove('active');
|
||||||
|
document.body.style.overflow = '';
|
||||||
|
// Pause video when modal closes
|
||||||
|
const video = document.getElementById('helpVideo');
|
||||||
|
if (video) {
|
||||||
|
video.pause();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Close video modal on backdrop click
|
||||||
|
document.addEventListener('click', function(e) {
|
||||||
|
const videoModal = document.getElementById('videoHelpModal');
|
||||||
|
if (e.target === videoModal) {
|
||||||
|
closeVideoHelpModal();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user