105 lines
2.1 KiB
HTML
105 lines
2.1 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}生成结果{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="prompt-container">
|
|
<h1>生成结果</h1>
|
|
|
|
<div class="prompt-card">
|
|
<div class="prompt-section">
|
|
<h2>原始文本</h2>
|
|
<div class="text-content">{{ prompt.input_text }}</div>
|
|
</div>
|
|
|
|
<div class="prompt-section">
|
|
<h2>生成的提示词</h2>
|
|
<div class="text-content">{{ prompt.generated_text }}</div>
|
|
<button class="btn btn-copy" onclick="copyText('{{ prompt.generated_text }}')">复制</button>
|
|
</div>
|
|
|
|
<div class="prompt-actions">
|
|
<a href="{{ url_for('main.index') }}" class="btn btn-primary">继续生成</a>
|
|
<a href="{{ url_for('main.submit_feedback', prompt_id=prompt.id) }}" class="btn btn-secondary">提供反馈</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.prompt-container {
|
|
max-width: 800px;
|
|
margin: 2rem auto;
|
|
padding: 2rem;
|
|
}
|
|
|
|
.prompt-card {
|
|
background: white;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
padding: 2rem;
|
|
}
|
|
|
|
.prompt-section {
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.prompt-section h2 {
|
|
color: #333;
|
|
font-size: 1.25rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.text-content {
|
|
background: #f8f9fa;
|
|
padding: 1rem;
|
|
border-radius: 4px;
|
|
white-space: pre-wrap;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.prompt-actions {
|
|
display: flex;
|
|
gap: 1rem;
|
|
margin-top: 2rem;
|
|
}
|
|
|
|
.btn {
|
|
padding: 0.75rem 1.5rem;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 1rem;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.btn-primary {
|
|
background-color: #2196f3;
|
|
color: white;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background-color: #6c757d;
|
|
color: white;
|
|
}
|
|
|
|
.btn-copy {
|
|
background-color: #28a745;
|
|
color: white;
|
|
}
|
|
|
|
.btn:hover {
|
|
opacity: 0.9;
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
function copyText(text) {
|
|
navigator.clipboard.writeText(text).then(function() {
|
|
alert('已复制到剪贴板');
|
|
}).catch(function(err) {
|
|
console.error('复制失败:', err);
|
|
alert('复制失败,请手动复制');
|
|
});
|
|
}
|
|
</script>
|
|
{% endblock %} |