Spaces:
Sleeping
Sleeping
Update index.html
Browse files- index.html +43 -213
index.html
CHANGED
@@ -1,214 +1,44 @@
|
|
1 |
-
<!DOCTYPE html>
|
2 |
-
<html lang="fa">
|
3 |
-
<head>
|
4 |
-
<meta charset="UTF-8">
|
5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title
|
7 |
-
<link rel="stylesheet" href="
|
8 |
-
<
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
}
|
45 |
-
.book-list label {
|
46 |
-
display: block;
|
47 |
-
margin-bottom: 8px;
|
48 |
-
cursor: pointer;
|
49 |
-
font-family: 'Vazirmatn', sans-serif;
|
50 |
-
}
|
51 |
-
.book-list input[type="checkbox"] {
|
52 |
-
margin-left: 5px;
|
53 |
-
}
|
54 |
-
#select_all_books_label {
|
55 |
-
font-weight: bold;
|
56 |
-
}
|
57 |
-
#loadingStatus, #selectionError {
|
58 |
-
margin-top: 10px;
|
59 |
-
font-style: italic;
|
60 |
-
font-weight: bold;
|
61 |
-
color: #666;
|
62 |
-
font-family: 'Vazirmatn', sans-serif;
|
63 |
-
}
|
64 |
-
#selectionError {
|
65 |
-
color: red;
|
66 |
-
}
|
67 |
-
label {
|
68 |
-
display: block;
|
69 |
-
margin-bottom: 8px;
|
70 |
-
font-weight: bold;
|
71 |
-
font-family: 'Vazirmatn', sans-serif;
|
72 |
-
}
|
73 |
-
input[type="text"], button, select {
|
74 |
-
padding: 10px;
|
75 |
-
border: 1px solid #ccc;
|
76 |
-
border-radius: 4px;
|
77 |
-
font-size: 1rem;
|
78 |
-
box-sizing: border-box;
|
79 |
-
font-family: 'Vazirmatn', sans-serif !important;
|
80 |
-
vertical-align: middle;
|
81 |
-
}
|
82 |
-
input[type="text"] {
|
83 |
-
min-height: 40px;
|
84 |
-
}
|
85 |
-
button {
|
86 |
-
background-color: #5cb85c;
|
87 |
-
color: white;
|
88 |
-
border: none;
|
89 |
-
cursor: pointer;
|
90 |
-
}
|
91 |
-
button:hover {
|
92 |
-
background-color: #4cae4c;
|
93 |
-
}
|
94 |
-
button:disabled {
|
95 |
-
background-color: #d3d3d3;
|
96 |
-
cursor: not-allowed;
|
97 |
-
}
|
98 |
-
select {
|
99 |
-
padding: 8px;
|
100 |
-
font-size: 0.9rem;
|
101 |
-
}
|
102 |
-
.search-input-container {
|
103 |
-
display: flex;
|
104 |
-
align-items: center;
|
105 |
-
gap: 10px;
|
106 |
-
width: 100%;
|
107 |
-
box-sizing: border-box;
|
108 |
-
max-width: 700px;
|
109 |
-
}
|
110 |
-
.search-input-container input[type="text"] {
|
111 |
-
flex: 1 1 auto;
|
112 |
-
min-width: 200px;
|
113 |
-
max-width: 600px;
|
114 |
-
margin: 0;
|
115 |
-
box-sizing: border-box;
|
116 |
-
}
|
117 |
-
.search-input-container button {
|
118 |
-
flex: 0 0 auto;
|
119 |
-
width: 90px;
|
120 |
-
margin: 0;
|
121 |
-
box-sizing: border-box;
|
122 |
-
height: 40px;
|
123 |
-
}
|
124 |
-
.results-control-section label {
|
125 |
-
display: inline-block;
|
126 |
-
margin-left: 10px;
|
127 |
-
font-weight: normal;
|
128 |
-
font-family: 'Vazirmatn', sans-serif;
|
129 |
-
}
|
130 |
-
.result-item {
|
131 |
-
border-bottom: 1px solid #eee;
|
132 |
-
padding: 10px 0;
|
133 |
-
margin-bottom: 10px;
|
134 |
-
}
|
135 |
-
.result-item:last-child {
|
136 |
-
border-bottom: none;
|
137 |
-
margin-bottom: 0;
|
138 |
-
}
|
139 |
-
.result-reference {
|
140 |
-
font-size: 0.9em;
|
141 |
-
color: #555;
|
142 |
-
margin-bottom: 5px;
|
143 |
-
font-family: 'Vazirmatn', sans-serif;
|
144 |
-
}
|
145 |
-
.result-book-title {
|
146 |
-
font-size: 0.8em;
|
147 |
-
color: #777;
|
148 |
-
margin-bottom: 5px;
|
149 |
-
font-style: italic;
|
150 |
-
font-family: 'Vazirmatn', sans-serif;
|
151 |
-
}
|
152 |
-
.result-passage {
|
153 |
-
margin-bottom: 5px;
|
154 |
-
font-family: 'Vazirmatn', sans-serif;
|
155 |
-
}
|
156 |
-
.result-similarity {
|
157 |
-
font-size: 0.8em;
|
158 |
-
color: #007bff;
|
159 |
-
text-align: left;
|
160 |
-
font-family: 'Vazirmatn', sans-serif;
|
161 |
-
}
|
162 |
-
</style>
|
163 |
-
</head>
|
164 |
-
<body>
|
165 |
-
<div class="container">
|
166 |
-
<h1>جستجوی معنایی خاطرات دوران پهلوی</h1>
|
167 |
-
|
168 |
-
<div class="book-selection-section">
|
169 |
-
<h3>انتخاب کتابها برای جستجو:</h3>
|
170 |
-
<div class="book-list">
|
171 |
-
<label id="select_all_books_label">
|
172 |
-
<input type="checkbox" id="select_all_books">
|
173 |
-
انتخاب همه موارد
|
174 |
-
</label>
|
175 |
-
<label>
|
176 |
-
<input type="checkbox" class="book-checkbox" id="jabe_siah_checkbox" value="jabe_siah.json" checked>
|
177 |
-
جعبه سیاه (منتخب خاطرات اسدالله علم)
|
178 |
-
</label>
|
179 |
-
</div>
|
180 |
-
<p id="loadingStatus"></p>
|
181 |
-
<p id="selectionError"></p>
|
182 |
-
</div>
|
183 |
-
|
184 |
-
<div class="search-section">
|
185 |
-
<label for="userQuestion">سوال شما:</label>
|
186 |
-
<div class="search-input-container">
|
187 |
-
<input type="text" id="userQuestion" placeholder="عبارت مورد نظر برای جستجو را وارد کنید...">
|
188 |
-
<button id="searchButton" disabled>جستجو</button>
|
189 |
-
</div>
|
190 |
-
</div>
|
191 |
-
|
192 |
-
<div class="results-control-section">
|
193 |
-
<h3>کنترل نمایش نتایج:</h3>
|
194 |
-
<label for="resultsPerPage">تعداد نتایج برتر برای نمایش:</label>
|
195 |
-
<select id="resultsPerPage">
|
196 |
-
<option value="10">10</option>
|
197 |
-
<option value="20">20</option>
|
198 |
-
<option value="30">30</option>
|
199 |
-
<option value="50">50</option>
|
200 |
-
<option value="100">100</option>
|
201 |
-
</select>
|
202 |
-
</div>
|
203 |
-
|
204 |
-
<div class="results-section">
|
205 |
-
<h2>نتایج جستجو:</h2>
|
206 |
-
<div id="searchResults">
|
207 |
-
<p>پس از انتخاب کتابها و وارد کردن سوال، نتایج اینجا نمایش داده میشوند.</p>
|
208 |
-
</div>
|
209 |
-
</div>
|
210 |
-
</div>
|
211 |
-
|
212 |
-
<script src="script.js"></script>
|
213 |
-
</body>
|
214 |
</html>
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="fa" dir="rtl">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>جستجو در خاطرات</title>
|
7 |
+
<link rel="stylesheet" href="style.css">
|
8 |
+
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600" rel="stylesheet">
|
9 |
+
</head>
|
10 |
+
<body>
|
11 |
+
<div class="container">
|
12 |
+
<h1>جستجو در خاطرات</h1>
|
13 |
+
|
14 |
+
<div class="search-box">
|
15 |
+
<input type="text" id="search-input" placeholder="عبارت جستجو را وارد کنید...">
|
16 |
+
<button id="searchButton" disabled>جستجو</button>
|
17 |
+
</div>
|
18 |
+
|
19 |
+
<div class="books-selection">
|
20 |
+
<label>انتخاب کتابها:</label>
|
21 |
+
<div id="books-checkboxes-container">
|
22 |
+
</div>
|
23 |
+
</div>
|
24 |
+
|
25 |
+
<div class="similarity-threshold-control">
|
26 |
+
<label for="similarity-threshold">آستانه شباهت:</label>
|
27 |
+
<input type="range" id="similarity-threshold" min="0" max="1" step="0.01" value="0.15">
|
28 |
+
<span id="similarity-threshold-value">0.15</span>
|
29 |
+
</div>
|
30 |
+
|
31 |
+
|
32 |
+
<div id="loading-spinner" class="spinner"></div>
|
33 |
+
|
34 |
+
<div id="status-message"></div>
|
35 |
+
|
36 |
+
|
37 |
+
<div id="results-container">
|
38 |
+
</div>
|
39 |
+
|
40 |
+
</div>
|
41 |
+
|
42 |
+
<script src="script.js"></script>
|
43 |
+
</body>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
</html>
|