297 lines
8.1 KiB
HTML
297 lines
8.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>YouTube Summaries</title>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
margin: 20px;
|
|
background-color: #ffe4e6;
|
|
color: #9f1239;
|
|
}
|
|
header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
header input[type="text"] {
|
|
flex: 1;
|
|
padding: 8px;
|
|
font-size: 16px;
|
|
border-radius: 4px;
|
|
border: 1px solid #ccc;
|
|
}
|
|
header input[type="checkbox"] {
|
|
accent-color: #9f1239;
|
|
}
|
|
header button {
|
|
padding: 8px 16px;
|
|
font-size: 16px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
background-color: #9f1239;
|
|
color: white;
|
|
cursor: pointer;
|
|
}
|
|
header button:hover {
|
|
background-color: #7c0e2e;
|
|
}
|
|
header label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 5px;
|
|
font-size: 14px;
|
|
color: #9f1239;
|
|
}
|
|
.loading {
|
|
margin-top: 5px;
|
|
font-style: italic;
|
|
color: #9f1239;
|
|
}
|
|
#summaries-container {
|
|
margin-top: 20px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 15px;
|
|
}
|
|
.entry {
|
|
display: flex;
|
|
gap: 10px;
|
|
padding: 10px;
|
|
border: 1px solid #fff;
|
|
border-radius: 5px;
|
|
background-color: #fff1f2;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
}
|
|
.entry .left {
|
|
width: 150px;
|
|
flex-shrink: 0;
|
|
}
|
|
.entry .thumbnail {
|
|
max-width: 100%;
|
|
border-radius: 3px;
|
|
}
|
|
.entry .middle {
|
|
flex: 1;
|
|
}
|
|
.entry .right {
|
|
width: 140px;
|
|
flex-shrink: 0;
|
|
}
|
|
.entry ul {
|
|
list-style-type: none;
|
|
padding-left: 0;
|
|
margin: 0;
|
|
}
|
|
.entry li {
|
|
margin-bottom: 5px;
|
|
}
|
|
.entry a {
|
|
color: #9f1239;
|
|
text-decoration: none;
|
|
}
|
|
.entry a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
.entry .summary {
|
|
transition: max-height 0.2s;
|
|
}
|
|
.entry .summary hr {
|
|
border: 0;
|
|
border-top: 1px solid currentColor;
|
|
color: inherit;
|
|
margin: 0.7em 0;
|
|
}
|
|
.entry.collapsed .summary {
|
|
display: -webkit-box !important;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
max-height: 2.8em;
|
|
}
|
|
.pagination {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 5px;
|
|
justify-content: center;
|
|
margin: 10px 0;
|
|
}
|
|
.pagination button {
|
|
padding: 4px 8px;
|
|
font-size: 14px;
|
|
border: 1px solid #9f1239;
|
|
background-color: #fff1f2;
|
|
color: #9f1239;
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
}
|
|
.pagination button:hover {
|
|
background-color: #9f1239;
|
|
color: white;
|
|
}
|
|
.pagination button.active {
|
|
background-color: #9f1239;
|
|
color: white;
|
|
font-weight: bold;
|
|
}
|
|
header button:disabled {
|
|
background-color: #ffe4e6;
|
|
color: #9f1239;
|
|
opacity: 0.7;
|
|
cursor: default;
|
|
border: 1px solid #fbb6ce;
|
|
}
|
|
.settings-dialog[hidden] {
|
|
display: none;
|
|
}
|
|
.settings-dialog {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 1000;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 24px;
|
|
background: rgba(69, 10, 10, 0.28);
|
|
}
|
|
.settings-panel {
|
|
width: min(720px, 100%);
|
|
max-height: min(760px, calc(100vh - 48px));
|
|
overflow: auto;
|
|
padding: 18px;
|
|
border: 1px solid #fecdd3;
|
|
border-radius: 6px;
|
|
background: #fff1f2;
|
|
box-shadow: 0 16px 40px rgba(159, 18, 57, 0.18);
|
|
}
|
|
.settings-panel-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 16px;
|
|
margin-bottom: 14px;
|
|
}
|
|
.settings-panel-header h2 {
|
|
margin: 0;
|
|
font-size: 20px;
|
|
}
|
|
.settings-close-button {
|
|
width: 30px;
|
|
height: 30px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0;
|
|
border: none;
|
|
border-radius: 4px;
|
|
background: transparent;
|
|
color: #9f1239;
|
|
font-size: 24px;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
}
|
|
.settings-close-button:hover {
|
|
background: #ffe4e6;
|
|
}
|
|
.settings-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin: 10px 0;
|
|
font-size: 15px;
|
|
}
|
|
.settings-row input[type="checkbox"] {
|
|
accent-color: #9f1239;
|
|
}
|
|
.settings-field-label {
|
|
display: block;
|
|
margin: 16px 0 6px;
|
|
font-size: 14px;
|
|
font-weight: bold;
|
|
}
|
|
.settings-prompt-textarea {
|
|
width: 100%;
|
|
min-height: 260px;
|
|
box-sizing: border-box;
|
|
padding: 10px;
|
|
border: 1px solid #fda4af;
|
|
border-radius: 4px;
|
|
background: #fff;
|
|
color: #7f1d1d;
|
|
font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
|
|
resize: vertical;
|
|
}
|
|
.settings-prompt-textarea.compact {
|
|
min-height: 150px;
|
|
}
|
|
.settings-actions {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 10px;
|
|
margin-top: 12px;
|
|
}
|
|
.settings-actions button {
|
|
padding: 8px 12px;
|
|
border: 1px solid #9f1239;
|
|
border-radius: 4px;
|
|
background: #fff1f2;
|
|
color: #9f1239;
|
|
cursor: pointer;
|
|
}
|
|
.settings-actions button:hover {
|
|
background: #9f1239;
|
|
color: #fff;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<header style="display:flex; flex-direction:column; gap:5px;">
|
|
<form id="summarize-form" style="display:flex; width:100%; gap:10px; align-items:center; flex-wrap: wrap;">
|
|
<input type="text" id="url-input" placeholder="Enter YouTube URL" />
|
|
<button type="submit">Summarize!</button>
|
|
<select id="model-select" style="padding:6px; font-size:14px;">
|
|
<option disabled selected>Loading models…</option>
|
|
</select>
|
|
</form>
|
|
<div id="loading" class="loading" style="display:none;">Loading…</div>
|
|
</header>
|
|
<div id="settings-dialog" class="settings-dialog" hidden role="dialog" aria-modal="true" aria-labelledby="settings-title">
|
|
<section class="settings-panel">
|
|
<div class="settings-panel-header">
|
|
<h2 id="settings-title">Settings</h2>
|
|
<button type="button" id="settings-close-button" class="settings-close-button" aria-label="Close settings">×</button>
|
|
</div>
|
|
<label class="settings-row">
|
|
<input type="checkbox" id="whisper-checkbox" checked />
|
|
<span>Use Whisper</span>
|
|
</label>
|
|
<label class="settings-row">
|
|
<input type="checkbox" id="autotranslate-checkbox" checked />
|
|
<span>Auto Translate</span>
|
|
</label>
|
|
<label for="master-prompt-textarea" class="settings-field-label">Master Prompt</label>
|
|
<textarea id="master-prompt-textarea" class="settings-prompt-textarea" spellcheck="false"></textarea>
|
|
<div class="settings-actions">
|
|
<button type="button" id="reset-master-prompt-button">Reset to default</button>
|
|
</div>
|
|
<label for="translation-prompt-de-textarea" class="settings-field-label">German Translation Prompt</label>
|
|
<textarea id="translation-prompt-de-textarea" class="settings-prompt-textarea compact" spellcheck="false"></textarea>
|
|
<div class="settings-actions">
|
|
<button type="button" id="reset-translation-prompt-de-button">Reset to default</button>
|
|
</div>
|
|
<label for="translation-prompt-jp-textarea" class="settings-field-label">Japanese Translation Prompt</label>
|
|
<textarea id="translation-prompt-jp-textarea" class="settings-prompt-textarea compact" spellcheck="false"></textarea>
|
|
<div class="settings-actions">
|
|
<button type="button" id="reset-translation-prompt-jp-button">Reset to default</button>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
<div id="pagination-top" class="pagination" style="display:none;"></div>
|
|
<div id="summaries-container"></div>
|
|
<div id="pagination-bottom" class="pagination" style="display:none;"></div>
|
|
<script src="renderer.js"></script>
|
|
</body>
|
|
</html>
|