MaximEremeev commited on
Commit
245dac3
·
verified ·
1 Parent(s): 6330fc7

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +12 -17
templates/index.html CHANGED
@@ -5,7 +5,7 @@
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>BeRestoral | Birchbark Manuscript Analysis</title>
7
  <script src="https://cdn.tailwindcss.com"></script>
8
- <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
9
  <style>
10
  :root {
11
  --birch: #F5EDD8; --birch-dark: #E8D9B5;
@@ -19,7 +19,7 @@
19
  .mode-btn.active { background: var(--cinnabar); color: white; }
20
  .mode-btn:not(.active):hover { color: white; }
21
  .mode-desc { font-size: 0.8rem; color: var(--chainmail); margin-top: 6px; min-height: 1.4em; }
22
- .legend-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--birch); border: 1px solid var(--birch-dark); border-radius: 20px; padding: 3px 11px; font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; }
23
  .legend-pill .symbol { font-size: 0.95rem; color: var(--cinnabar); font-weight: 500; }
24
  textarea { font-family: 'Inter', sans-serif; font-size: 0.95rem; line-height: 1.7; background: var(--birch); border: 1.5px solid var(--birch-dark); border-radius: 8px; padding: 18px 20px; width: 100%; resize: none; outline: none; transition: border-color 0.2s; }
25
  textarea:focus { border-color: var(--gold); }
@@ -34,22 +34,22 @@
34
  .highlight-restored { color: var(--cinnabar); font-weight: 600; background: #FEF2F2; padding: 0 3px; border-radius: 3px; }
35
  .bar-fill { height: 3px; border-radius: 2px; transition: width 0.4s ease; }
36
  header { border-bottom: 1px solid var(--birch-dark); background: var(--cream); }
37
- .section-label { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--chainmail); margin-bottom: 6px; }
38
  select.lang-sw { background: transparent; border: 1px solid var(--birch-dark); border-radius: 6px; padding: 4px 8px; font-family: 'Inter', sans-serif; font-size: 0.85rem; color: var(--charcoal); cursor: pointer; outline: none; }
39
  .results-panel { background: #FAFAF7; border: 1px solid var(--birch-dark); border-radius: 12px; padding: 24px; min-height: 400px; }
40
- .res-title { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--charcoal); margin-bottom: 16px; }
41
  .steps-block { margin-bottom: 20px; }
42
  .step-row { display: flex; align-items: baseline; gap: 12px; padding: 6px 0; border-bottom: 1px solid #EDE9E0; font-size: 0.92rem; line-height: 1.5; }
43
  .step-row:last-child { border-bottom: none; }
44
  .step-sentence { flex: 1; color: var(--charcoal); }
45
- .step-conf { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--chainmail); white-space: nowrap; }
46
  .steps-divider { border: none; border-top: 1px solid var(--birch-dark); margin: 18px 0; }
47
 
48
  /* Classification card */
49
  .classify-card { background: white; border: 1px solid #E8DDD0; border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
50
  .classify-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
51
  .classify-item { background: var(--birch); border-radius: 8px; padding: 10px 12px; }
52
- .classify-item-label { font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--chainmail); margin-bottom: 4px; }
53
  .classify-item-value { font-size: 1rem; font-weight: 600; color: var(--charcoal); }
54
  .classify-item-sub { font-size: 0.75rem; color: var(--chainmail); margin-top: 2px; }
55
 
@@ -58,9 +58,9 @@
58
  .hist-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
59
  .hist-bar { width: 100%; background: var(--birch-dark); border-radius: 2px 2px 0 0; transition: height 0.4s; min-height: 2px; }
60
  .hist-bar.active { background: var(--cinnabar); }
61
- .hist-label { font-family: 'JetBrains Mono', monospace; font-size: 0.45rem; color: var(--chainmail); text-align: center; writing-mode: vertical-rl; transform: rotate(180deg); height: 28px; overflow: hidden; }
62
 
63
- .gap-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--charcoal); color: white; border-radius: 20px; padding: 3px 10px; font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; margin-bottom: 14px; }
64
  </style>
65
  </head>
66
  <body>
@@ -73,7 +73,7 @@
73
  <div style="font-size:1.35rem;font-weight:600;letter-spacing:0.12em">
74
  <span style="color:var(--cinnabar)">Be</span>Restoral
75
  </div>
76
- <div style="font-family:'JetBrains Mono',monospace;font-size:0.6rem;letter-spacing:0.1em;color:var(--chainmail)" data-i18n="subtitle">BIRCHBARK MANUSCRIPT ANALYSIS</div>
77
  </div>
78
  </div>
79
  <select class="lang-sw" onchange="changeLanguage(this.value)">
@@ -122,7 +122,7 @@
122
  <div>
123
  <div class="section-label flex justify-between">
124
  <span data-i18n="slider_topk">Search width (Top-K)</span>
125
- <span id="topkValue" style="color:var(--cinnabar);font-family:'JetBrains Mono',monospace;font-size:0.7rem">5</span>
126
  </div>
127
  <input type="range" id="topkSlider" min="1" max="20" value="5"
128
  oninput="document.getElementById('topkValue').innerText = this.value">
@@ -130,7 +130,7 @@
130
  <div>
131
  <div class="section-label flex justify-between">
132
  <span data-i18n="slider_temp">Temperature</span>
133
- <span id="tempValue" style="color:var(--cinnabar);font-family:'JetBrains Mono',monospace;font-size:0.7rem">1.0</span>
134
  </div>
135
  <input type="range" id="tempSlider" min="0.1" max="2.0" step="0.1" value="1.0"
136
  oninput="document.getElementById('tempValue').innerText = parseFloat(this.value).toFixed(1)">
@@ -319,11 +319,6 @@ function renderResults(data) {
319
  card.appendChild(grid);
320
 
321
  // Histogram
322
- const histLabel = document.createElement('div');
323
- histLabel.className = 'section-label';
324
- histLabel.textContent = d.date_hist_label;
325
- card.appendChild(histLabel);
326
-
327
  const maxProb = Math.max(...cl.date_probs);
328
  const histWrap = document.createElement('div');
329
  histWrap.className = 'hist-bar-wrap';
@@ -395,7 +390,7 @@ function renderResults(data) {
395
  row.innerHTML = `
396
  <div style="display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px">
397
  <span style="font-size:1.1rem;font-weight:${isTop?'600':'400'};color:${isTop?'var(--cinnabar)':'var(--charcoal)'}">${v.word}</span>
398
- <span style="font-family:'JetBrains Mono',monospace;font-size:0.7rem;color:var(--chainmail)">${v.score}%</span>
399
  </div>
400
  <div style="background:#EDE9E0;border-radius:2px;height:3px;margin-bottom:8px">
401
  <div class="bar-fill" style="width:${Math.min(v.score,100)}%;background:${color}"></div>
 
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>BeRestoral | Birchbark Manuscript Analysis</title>
7
  <script src="https://cdn.tailwindcss.com"></script>
8
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
9
  <style>
10
  :root {
11
  --birch: #F5EDD8; --birch-dark: #E8D9B5;
 
19
  .mode-btn.active { background: var(--cinnabar); color: white; }
20
  .mode-btn:not(.active):hover { color: white; }
21
  .mode-desc { font-size: 0.8rem; color: var(--chainmail); margin-top: 6px; min-height: 1.4em; }
22
+ .legend-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--birch); border: 1px solid var(--birch-dark); border-radius: 20px; padding: 3px 11px; font-family: 'Inter', sans-serif; font-size: 0.75rem; }
23
  .legend-pill .symbol { font-size: 0.95rem; color: var(--cinnabar); font-weight: 500; }
24
  textarea { font-family: 'Inter', sans-serif; font-size: 0.95rem; line-height: 1.7; background: var(--birch); border: 1.5px solid var(--birch-dark); border-radius: 8px; padding: 18px 20px; width: 100%; resize: none; outline: none; transition: border-color 0.2s; }
25
  textarea:focus { border-color: var(--gold); }
 
34
  .highlight-restored { color: var(--cinnabar); font-weight: 600; background: #FEF2F2; padding: 0 3px; border-radius: 3px; }
35
  .bar-fill { height: 3px; border-radius: 2px; transition: width 0.4s ease; }
36
  header { border-bottom: 1px solid var(--birch-dark); background: var(--cream); }
37
+ .section-label { font-family: 'Inter', sans-serif; font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--chainmail); margin-bottom: 6px; }
38
  select.lang-sw { background: transparent; border: 1px solid var(--birch-dark); border-radius: 6px; padding: 4px 8px; font-family: 'Inter', sans-serif; font-size: 0.85rem; color: var(--charcoal); cursor: pointer; outline: none; }
39
  .results-panel { background: #FAFAF7; border: 1px solid var(--birch-dark); border-radius: 12px; padding: 24px; min-height: 400px; }
40
+ .res-title { font-family: 'Inter', sans-serif; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--charcoal); margin-bottom: 16px; }
41
  .steps-block { margin-bottom: 20px; }
42
  .step-row { display: flex; align-items: baseline; gap: 12px; padding: 6px 0; border-bottom: 1px solid #EDE9E0; font-size: 0.92rem; line-height: 1.5; }
43
  .step-row:last-child { border-bottom: none; }
44
  .step-sentence { flex: 1; color: var(--charcoal); }
45
+ .step-conf { font-family: 'Inter', sans-serif; font-size: 0.7rem; color: var(--chainmail); white-space: nowrap; }
46
  .steps-divider { border: none; border-top: 1px solid var(--birch-dark); margin: 18px 0; }
47
 
48
  /* Classification card */
49
  .classify-card { background: white; border: 1px solid #E8DDD0; border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
50
  .classify-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
51
  .classify-item { background: var(--birch); border-radius: 8px; padding: 10px 12px; }
52
+ .classify-item-label { font-family: 'Inter', sans-serif; font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--chainmail); margin-bottom: 4px; }
53
  .classify-item-value { font-size: 1rem; font-weight: 600; color: var(--charcoal); }
54
  .classify-item-sub { font-size: 0.75rem; color: var(--chainmail); margin-top: 2px; }
55
 
 
58
  .hist-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
59
  .hist-bar { width: 100%; background: var(--birch-dark); border-radius: 2px 2px 0 0; transition: height 0.4s; min-height: 2px; }
60
  .hist-bar.active { background: var(--cinnabar); }
61
+ .hist-label { font-family: 'Inter', sans-serif; font-size: 0.45rem; color: var(--chainmail); text-align: center; writing-mode: vertical-rl; transform: rotate(180deg); height: 28px; overflow: hidden; }
62
 
63
+ .gap-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--charcoal); color: white; border-radius: 20px; padding: 3px 10px; font-family: 'Inter', sans-serif; font-size: 0.7rem; margin-bottom: 14px; }
64
  </style>
65
  </head>
66
  <body>
 
73
  <div style="font-size:1.35rem;font-weight:600;letter-spacing:0.12em">
74
  <span style="color:var(--cinnabar)">Be</span>Restoral
75
  </div>
76
+ <div style="font-family:'Inter',sans-serif;font-size:0.7rem;letter-spacing:0.04em;color:var(--chainmail)" data-i18n="subtitle">BIRCHBARK MANUSCRIPT ANALYSIS</div>
77
  </div>
78
  </div>
79
  <select class="lang-sw" onchange="changeLanguage(this.value)">
 
122
  <div>
123
  <div class="section-label flex justify-between">
124
  <span data-i18n="slider_topk">Search width (Top-K)</span>
125
+ <span id="topkValue" style="color:var(--cinnabar);font-family:'Inter',sans-serif;font-size:0.7rem">5</span>
126
  </div>
127
  <input type="range" id="topkSlider" min="1" max="20" value="5"
128
  oninput="document.getElementById('topkValue').innerText = this.value">
 
130
  <div>
131
  <div class="section-label flex justify-between">
132
  <span data-i18n="slider_temp">Temperature</span>
133
+ <span id="tempValue" style="color:var(--cinnabar);font-family:'Inter',sans-serif;font-size:0.7rem">1.0</span>
134
  </div>
135
  <input type="range" id="tempSlider" min="0.1" max="2.0" step="0.1" value="1.0"
136
  oninput="document.getElementById('tempValue').innerText = parseFloat(this.value).toFixed(1)">
 
319
  card.appendChild(grid);
320
 
321
  // Histogram
 
 
 
 
 
322
  const maxProb = Math.max(...cl.date_probs);
323
  const histWrap = document.createElement('div');
324
  histWrap.className = 'hist-bar-wrap';
 
390
  row.innerHTML = `
391
  <div style="display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px">
392
  <span style="font-size:1.1rem;font-weight:${isTop?'600':'400'};color:${isTop?'var(--cinnabar)':'var(--charcoal)'}">${v.word}</span>
393
+ <span style="font-family:'Inter',sans-serif;font-size:0.7rem;color:var(--chainmail)">${v.score}%</span>
394
  </div>
395
  <div style="background:#EDE9E0;border-radius:2px;height:3px;margin-bottom:8px">
396
  <div class="bar-fill" style="width:${Math.min(v.score,100)}%;background:${color}"></div>