Spaces:
Runtime error
Runtime error
Update index.html
Browse files- index.html +105 -238
index.html
CHANGED
|
@@ -1,12 +1,14 @@
|
|
| 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"
|
|
|
|
|
|
|
| 8 |
<style>
|
| 9 |
-
/* استایل
|
| 10 |
body {
|
| 11 |
font-family: 'Vazirmatn', sans-serif;
|
| 12 |
line-height: 1.6;
|
|
@@ -14,11 +16,9 @@
|
|
| 14 |
padding: 20px;
|
| 15 |
background-color: #f4f4f4;
|
| 16 |
color: #333;
|
| 17 |
-
direction: rtl;
|
| 18 |
-
text-align: right;
|
| 19 |
}
|
| 20 |
-
|
| 21 |
-
/* استایل کانتینر اصلی برای محدود کردن عرض و مرکز قرار دادن محتوا */
|
| 22 |
.container {
|
| 23 |
max-width: 800px;
|
| 24 |
margin: 20px auto;
|
|
@@ -27,24 +27,7 @@
|
|
| 27 |
border-radius: 10px;
|
| 28 |
box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
|
| 29 |
}
|
| 30 |
-
|
| 31 |
-
/* استایل عنوان های اصلی */
|
| 32 |
-
h1, h2 {
|
| 33 |
-
color: #333;
|
| 34 |
-
text-align: center;
|
| 35 |
-
margin-bottom: 20px;
|
| 36 |
-
}
|
| 37 |
-
|
| 38 |
-
h1 {
|
| 39 |
-
margin-bottom: 5px; /* کاهش فاصله بعد از عنوان اصلی */
|
| 40 |
-
}
|
| 41 |
-
/* استایل عنوان بخش جستجو با متن اضافی */
|
| 42 |
-
h2 {
|
| 43 |
-
text-align: centered; /* تراز راست برای عنوان بخش */
|
| 44 |
-
}
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
/* استایل بخش های مختلف (انتخاب کتاب، جستجو، آستانه، نتایج در صفحه) */
|
| 48 |
.book-selection, .search-area, .results-per-page, .similarity-threshold-control {
|
| 49 |
margin-bottom: 20px;
|
| 50 |
padding: 15px;
|
|
@@ -52,26 +35,20 @@
|
|
| 52 |
border-radius: 8px;
|
| 53 |
border: 1px solid #ddd;
|
| 54 |
}
|
| 55 |
-
|
| 56 |
-
/* استایل لیبل های چک باکس */
|
| 57 |
.book-selection label {
|
| 58 |
-
margin-left: 10px; /* فاصله بین لیبل و چک باکس */
|
| 59 |
}
|
| 60 |
-
|
| 61 |
-
/* استایل کادر ورودی جستجو */
|
| 62 |
.search-area input[type="text"] {
|
| 63 |
-
width: calc(100% - 100px); /* عرض کادر ورودی
|
| 64 |
padding: 10px;
|
| 65 |
-
margin-left: 10px; /* فاصله بین کادر و دکمه */
|
| 66 |
border: 1px solid #ccc;
|
| 67 |
border-radius: 5px;
|
| 68 |
font-size: 1em;
|
| 69 |
-
font-family: 'Vazirmatn', sans-serif;
|
| 70 |
-
|
| 71 |
-
|
| 72 |
}
|
| 73 |
-
|
| 74 |
-
/* استایل دکمه جستجو */
|
| 75 |
.search-area button {
|
| 76 |
padding: 10px 20px;
|
| 77 |
background-color: #5cb85c;
|
|
@@ -80,83 +57,46 @@
|
|
| 80 |
border-radius: 5px;
|
| 81 |
cursor: pointer;
|
| 82 |
font-size: 1em;
|
| 83 |
-
font-family: 'Vazirmatn', sans-serif;
|
| 84 |
transition: background-color 0.3s ease;
|
| 85 |
}
|
| 86 |
-
|
| 87 |
-
/* استایل دکمه جستجو هنگام Hover */
|
| 88 |
.search-area button:hover:not(:disabled) {
|
| 89 |
background-color: #4cae4c;
|
| 90 |
}
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
cursor: not-allowed; /* نمایش نشانگر عدم اجازه */
|
| 95 |
-
}
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
/* استایل بخش انتخاب تعداد نتایج در صفحه */
|
| 99 |
-
.results-per-page label {
|
| 100 |
-
margin-left: 10px;
|
| 101 |
}
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
.similarity-threshold-control {
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
font-family: 'Vazirmatn', sans-serif;
|
| 126 |
-
direction: ltr; /* برای نمایش عدد از چپ به راست */
|
| 127 |
-
}
|
| 128 |
-
.similarity-threshold-control p {
|
| 129 |
-
margin-top: 5px; /* فاصله بین کادر ورودی و توضیح */
|
| 130 |
-
font-size: 0.8em;
|
| 131 |
-
color: #555;
|
| 132 |
-
}
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
/* استایل پیام های وضعیت و خطا */
|
| 136 |
-
.status-message {
|
| 137 |
font-weight: bold;
|
| 138 |
margin-bottom: 15px;
|
| 139 |
text-align: center;
|
| 140 |
-
color
|
| 141 |
-
}
|
| 142 |
-
.error-message {
|
| 143 |
-
font-weight: bold;
|
| 144 |
-
margin-bottom: 15px;
|
| 145 |
-
text-align: center;
|
| 146 |
-
color: red; /* رنگ قرمز برای خطاها */
|
| 147 |
-
}
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
/* استایل بخش نتایج جستجو */
|
| 151 |
-
#searchResults {
|
| 152 |
-
margin-top: 20px;
|
| 153 |
}
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
}
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
/* استایل هر آیتم نتیجه */
|
| 160 |
.result-item {
|
| 161 |
background-color: #f9f9f9;
|
| 162 |
border: 1px solid #eee;
|
|
@@ -164,174 +104,101 @@
|
|
| 164 |
padding: 15px;
|
| 165 |
margin-bottom: 15px;
|
| 166 |
box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
|
| 167 |
-
position: relative; /* برای قرار دادن دکمه کپی به صورت مطلق */
|
| 168 |
-
padding-bottom: 40px; /* اضافه کردن فضا برای دکمه کپی در پایین */
|
| 169 |
}
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
/* استایل متن اصلی خاطره */
|
| 177 |
-
.result-passage {
|
| 178 |
-
font-size: 1em;
|
| 179 |
-
color: #333;
|
| 180 |
-
text-align: justify; /* متن خاطره تراز از دو طرف */
|
| 181 |
-
}
|
| 182 |
-
|
| 183 |
-
/* استایل مرجع خاطره */
|
| 184 |
-
.result-reference {
|
| 185 |
-
font-size: 0.9em;
|
| 186 |
-
color: #555;
|
| 187 |
-
margin-top: 10px; /* کمی فاصله بیشتر بعد از متن خاطره */
|
| 188 |
-
word-wrap: break-word; /* شکستن کلمات طولانی */
|
| 189 |
-
}
|
| 190 |
-
|
| 191 |
-
/* استایل نام کتاب */
|
| 192 |
-
.result-book-title {
|
| 193 |
font-size: 0.85em;
|
| 194 |
-
color: #
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
|
|
|
| 198 |
}
|
| 199 |
-
|
| 200 |
-
/* استایل امتیاز شباهت */
|
| 201 |
-
.result-similarity {
|
| 202 |
-
font-size: 0.85em;
|
| 203 |
-
color: #007bff; /* رنگ آبی برای امتیاز */
|
| 204 |
-
font-weight: bold;
|
| 205 |
-
/* این استایل float به سمت چپ برای قرار گرفتن کنار دکمه کپی*/
|
| 206 |
-
float: right;
|
| 207 |
-
margin-right: 10px; /* فاصله از سمت راست */
|
| 208 |
-
direction: ltr; /* برای نمایش عدد شباهت از چپ به راست */
|
| 209 |
-
clear: both; /* برای اینکه زیر دکمه های کپی قبلی قرار نگیرد */
|
| 210 |
-
}
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
/* استایل بخش توضیحی */
|
| 214 |
.explanation-text {
|
| 215 |
-
margin-bottom: 20px;
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
border: 1px solid #eee;
|
| 219 |
-
border-radius: 8px;
|
| 220 |
-
text-align: justify;
|
| 221 |
-
line-height: 1.6;
|
| 222 |
-
font-size: 0.95em;
|
| 223 |
-
color: #333;
|
| 224 |
}
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
.explanation-text p:last-child {
|
| 229 |
-
margin-bottom: 0;
|
| 230 |
-
}
|
| 231 |
-
.explanation-text strong {
|
| 232 |
-
color: #555;
|
| 233 |
-
}
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
/* استایل فوتر */
|
| 237 |
.app-footer {
|
| 238 |
-
margin-top: 40px;
|
| 239 |
-
|
| 240 |
-
font-size: 0.9em;
|
| 241 |
-
color: #555;
|
| 242 |
-
padding-top: 20px; /* فاصله از محتوای بالا */
|
| 243 |
-
border-top: 1px solid #eee; /* خط جداکننده بالای فوتر */
|
| 244 |
}
|
| 245 |
-
|
| 246 |
-
/* استایل دکمه کپی */
|
| 247 |
.copy-button {
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
/* موقعیت دهی در داخل آیتم نتیجه */
|
| 258 |
-
position: absolute; /* موقعیت مطلق نسبت به آیتم نتیجه */
|
| 259 |
-
bottom: 10px; /* فاصله از پایین آیتم نتیجه */
|
| 260 |
-
left: 10px; /* فاصله از سمت چپ (برای RTL) */
|
| 261 |
-
}
|
| 262 |
-
|
| 263 |
-
.copy-button:hover {
|
| 264 |
-
background-color: #0056b3; /* آبی تیره تر هنگام Hover */
|
| 265 |
-
}
|
| 266 |
-
|
| 267 |
-
.copy-button:active {
|
| 268 |
-
background-color: #004085; /* آبی تیره تر هنگام کلیک */
|
| 269 |
-
}
|
| 270 |
-
|
| 271 |
|
| 272 |
</style>
|
| 273 |
</head>
|
| 274 |
<body>
|
| 275 |
<div class="container">
|
| 276 |
-
<h1
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
<strong>خاطرهخوان پهلوی چیه و به چه کار میاد؟</strong><br>
|
| 280 |
-
یه دستیار خوب برای بچههای <strong>جهاد تبیین</strong> که کمک میکنه راحتتر بین <strong>خاطرات مستند دوران پهلوی</strong> بگردن و مطلب بهدردبخور پیدا کنن.
|
| 281 |
-
</p>
|
| 282 |
<p>
|
| 283 |
-
این
|
| 284 |
</p>
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
</p> <p>
|
| 288 |
-
اگه خیلی خاص بنویسی مثل "خودکار هویدا"، ممکنه چیزی گیرت نیاد! پس بهتره <strong>مفهومیتر</strong> بنویسی، مثلاً "وضع اقتصاد دوران پهلوی" یا "گرونی".
|
| 289 |
</p>
|
| 290 |
</div>
|
| 291 |
|
| 292 |
-
<h2>جستجو در خاطرات <span style="font-size: 0.8em; font-weight: normal;">(نسخه آزمایشی - فعلاً فقط کتاب جعبه سیاه)</span></h2>
|
| 293 |
-
|
| 294 |
|
| 295 |
<div class="book-selection">
|
| 296 |
-
<
|
| 297 |
-
<
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
|
|
|
|
|
|
|
|
|
| 301 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 302 |
|
| 303 |
<div class="similarity-threshold-control">
|
| 304 |
<label for="similarityThresholdInput">آستانه شباهت:</label>
|
| 305 |
-
<input type="number" id="similarityThresholdInput" min="0.0" max="1.0" step="0.01"
|
| 306 |
-
<p
|
| 307 |
</div>
|
| 308 |
-
<div class="search-area">
|
| 309 |
-
<input type="text" id="userQuestion" placeholder="سوال خود را بپرسید یا موضوع مورد نظر را وارد کنید...">
|
| 310 |
-
<button id="searchButton" disabled>جستجو</button> </div>
|
| 311 |
|
| 312 |
<div class="results-per-page">
|
| 313 |
-
<label for="resultsPerPage">تعداد نتایج
|
| 314 |
<select id="resultsPerPage">
|
| 315 |
-
<option value="
|
| 316 |
-
<option value="20">20</option>
|
| 317 |
<option value="50">50</option>
|
| 318 |
-
<option value="100">100</option>
|
| 319 |
</select>
|
| 320 |
</div>
|
| 321 |
|
| 322 |
|
| 323 |
-
<p id="loadingStatus" class="status-message"
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
|
| 327 |
-
<div id="searchResults">
|
| 328 |
-
<p>پس از انتخاب کتابها و وارد کردن سوال، نتایج اینجا نمایش داده میشوند.</p>
|
| 329 |
-
</div>
|
| 330 |
|
| 331 |
<footer class="app-footer">
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
|
|
|
|
| 335 |
|
| 336 |
<script src="script.js"></script>
|
| 337 |
</body>
|
|
|
|
| 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 href="./fonts/vazirmatn.css" rel="stylesheet" type="text/css"/>
|
| 8 |
+
<link rel="stylesheet" href="style.css">
|
| 9 |
+
|
| 10 |
<style>
|
| 11 |
+
/* این بلوک استایل می تواند حذف شود اگر تمام استایل ها به style.css منتقل شده اند */
|
| 12 |
body {
|
| 13 |
font-family: 'Vazirmatn', sans-serif;
|
| 14 |
line-height: 1.6;
|
|
|
|
| 16 |
padding: 20px;
|
| 17 |
background-color: #f4f4f4;
|
| 18 |
color: #333;
|
| 19 |
+
direction: rtl;
|
| 20 |
+
text-align: right;
|
| 21 |
}
|
|
|
|
|
|
|
| 22 |
.container {
|
| 23 |
max-width: 800px;
|
| 24 |
margin: 20px auto;
|
|
|
|
| 27 |
border-radius: 10px;
|
| 28 |
box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
|
| 29 |
}
|
| 30 |
+
/* استایل های بخش ها */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
.book-selection, .search-area, .results-per-page, .similarity-threshold-control {
|
| 32 |
margin-bottom: 20px;
|
| 33 |
padding: 15px;
|
|
|
|
| 35 |
border-radius: 8px;
|
| 36 |
border: 1px solid #ddd;
|
| 37 |
}
|
|
|
|
|
|
|
| 38 |
.book-selection label {
|
| 39 |
+
margin-left: 10px; /* فاصله بین لیبل و چک باکس در RTL */
|
| 40 |
}
|
|
|
|
|
|
|
| 41 |
.search-area input[type="text"] {
|
| 42 |
+
width: calc(100% - 100px); /* عرض کادر ورودی منهای دکمه و فاصله */
|
| 43 |
padding: 10px;
|
| 44 |
+
margin-left: 10px; /* فاصله بین کادر و دکمه در RTL */
|
| 45 |
border: 1px solid #ccc;
|
| 46 |
border-radius: 5px;
|
| 47 |
font-size: 1em;
|
| 48 |
+
font-family: 'Vazirmatn', sans-serif;
|
| 49 |
+
box-sizing: border-box;
|
| 50 |
+
direction: rtl; /* برای تایپ فارسی */
|
| 51 |
}
|
|
|
|
|
|
|
| 52 |
.search-area button {
|
| 53 |
padding: 10px 20px;
|
| 54 |
background-color: #5cb85c;
|
|
|
|
| 57 |
border-radius: 5px;
|
| 58 |
cursor: pointer;
|
| 59 |
font-size: 1em;
|
| 60 |
+
font-family: 'Vazirmatn', sans-serif;
|
| 61 |
transition: background-color 0.3s ease;
|
| 62 |
}
|
|
|
|
|
|
|
| 63 |
.search-area button:hover:not(:disabled) {
|
| 64 |
background-color: #4cae4c;
|
| 65 |
}
|
| 66 |
+
.search-area button:disabled {
|
| 67 |
+
background-color: #cccccc;
|
| 68 |
+
cursor: not-allowed;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
}
|
| 70 |
+
.results-per-page label { margin-left: 10px; }
|
| 71 |
+
.results-per-page select {
|
| 72 |
+
padding: 8px;
|
| 73 |
+
border-radius: 5px;
|
| 74 |
+
border: 1px solid #ccc;
|
| 75 |
+
font-family: 'Vazirmatn', sans-serif;
|
| 76 |
+
direction: rtl;
|
| 77 |
+
}
|
| 78 |
+
.similarity-threshold-control { text-align: center; }
|
| 79 |
+
.similarity-threshold-control label { margin-left: 10px; }
|
| 80 |
+
.similarity-threshold-control input[type="number"] {
|
| 81 |
+
padding: 8px;
|
| 82 |
+
border-radius: 5px;
|
| 83 |
+
border: 1px solid #ccc;
|
| 84 |
+
font-size: 1em;
|
| 85 |
+
width: 80px;
|
| 86 |
+
text-align: center;
|
| 87 |
+
font-family: 'Vazirmatn', sans-serif;
|
| 88 |
+
direction: ltr; /* برای نمایش عدد از چپ به راست */
|
| 89 |
+
}
|
| 90 |
+
.similarity-threshold-control p { margin-top: 5px; font-size: 0.8em; color: #555; }
|
| 91 |
+
/* استایل پیام های وضعیت و خطا (به style.css منتقل شود) */
|
| 92 |
+
.status-message, .error-message {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
font-weight: bold;
|
| 94 |
margin-bottom: 15px;
|
| 95 |
text-align: center;
|
| 96 |
+
/* color و background-color توسط script در style.css مدیریت می شوند */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
}
|
| 98 |
+
#searchResults { margin-top: 20px; }
|
| 99 |
+
#searchResults p:first-child { text-align: center; } /* پیام اولیه */
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
.result-item {
|
| 101 |
background-color: #f9f9f9;
|
| 102 |
border: 1px solid #eee;
|
|
|
|
| 104 |
padding: 15px;
|
| 105 |
margin-bottom: 15px;
|
| 106 |
box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
|
|
|
|
|
|
|
| 107 |
}
|
| 108 |
+
.result-item p { margin-bottom: 8px; word-wrap: break-word; }
|
| 109 |
+
.result-passage { font-size: 1em; color: #333; text-align: justify; }
|
| 110 |
+
.result-reference { font-size: 0.9em; color: #555; margin-top: 10px; word-wrap: break-word; }
|
| 111 |
+
.result-book-title { font-size: 0.85em; color: #777; font-style: italic; margin-top: 5px; word-wrap: break-word; }
|
| 112 |
+
.result-similarity {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
font-size: 0.85em;
|
| 114 |
+
color: #007bff;
|
| 115 |
+
font-weight: bold;
|
| 116 |
+
float: right;
|
| 117 |
+
margin-right: 10px;
|
| 118 |
+
direction: ltr; /* برای نمایش عدد شباهت از چپ به راست */
|
| 119 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
.explanation-text {
|
| 121 |
+
margin-bottom: 20px; padding: 15px; background-color: #f9f9f9;
|
| 122 |
+
border: 1px solid #eee; border-radius: 8px; text-align: justify;
|
| 123 |
+
line-height: 1.6; font-size: 0.95em; color: #333;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
}
|
| 125 |
+
.explanation-text p { margin-bottom: 10px; }
|
| 126 |
+
.explanation-text p:last-child { margin-bottom: 0; }
|
| 127 |
+
.explanation-text strong { font-weight: bold; color: #333; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
.app-footer {
|
| 129 |
+
margin-top: 40px; text-align: center; font-size: 0.9em; color: #555;
|
| 130 |
+
padding-top: 20px; border-top: 1px solid #eee;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
}
|
|
|
|
|
|
|
| 132 |
.copy-button {
|
| 133 |
+
padding: 5px 10px; background-color: #007bff; color: white;
|
| 134 |
+
border: none; border-radius: 4px; cursor: pointer;
|
| 135 |
+
font-size: 0.85em; font-family: 'Vazirmatn', sans-serif;
|
| 136 |
+
transition: background-color 0.2s ease;
|
| 137 |
+
display: block; margin-top: 15px; width: fit-content;
|
| 138 |
+
margin-left: auto; margin-right: 0; /* راست چین کردن */
|
| 139 |
+
}
|
| 140 |
+
.copy-button:hover { background-color: #0056b3; }
|
| 141 |
+
.copy-button:active { background-color: #004085; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
|
| 143 |
</style>
|
| 144 |
</head>
|
| 145 |
<body>
|
| 146 |
<div class="container">
|
| 147 |
+
<h1>جستجو در خاطرات</h1>
|
| 148 |
+
|
| 149 |
+
<div class="explanation-text">
|
|
|
|
|
|
|
|
|
|
| 150 |
<p>
|
| 151 |
+
این ابزار به شما امکان میدهد در متن خاطرات <strong>اسدالله علم</strong> با استفاده از جستجوی معنایی پیشرفته، مطالب مرتبط با عبارت مورد نظر خود را بیابید. این جستجو بر اساس شباهت مفهومی انجام میشود، نه صرفاً تطابق کلمات.
|
| 152 |
</p>
|
| 153 |
+
<p>
|
| 154 |
+
برای شروع، کتاب یا کتابهای مورد نظر خود را انتخاب کنید، سپس عبارت یا سوال خود را در کادر جستجو وارد کرده و دکمه "جستجو" را بزنید. میتوانید آستانه شباهت را برای فیلتر کردن نتایج تنظیم کنید و تعداد نتایج نمایش داده شده را نیز تغییر دهید.
|
|
|
|
|
|
|
| 155 |
</p>
|
| 156 |
</div>
|
| 157 |
|
|
|
|
|
|
|
| 158 |
|
| 159 |
<div class="book-selection">
|
| 160 |
+
<h2>انتخاب کتاب</h2>
|
| 161 |
+
<div>
|
| 162 |
+
<input type="checkbox" id="select_all_books" checked>
|
| 163 |
+
<label for="select_all_books">انتخاب همه</label>
|
| 164 |
+
</div>
|
| 165 |
+
<div>
|
| 166 |
+
<input type="checkbox" class="book-checkbox" id="book_jabe_siah" value="jabe_siah.json" checked>
|
| 167 |
+
<label for="book_jabe_siah">جعبه سیاه (منتخب خاطرات اسدالله علم)</label>
|
| 168 |
</div>
|
| 169 |
+
</div>
|
| 170 |
+
|
| 171 |
+
<div class="search-area">
|
| 172 |
+
<h2>جستجو در خاطرات انتخاب شده</h2>
|
| 173 |
+
<input type="text" id="userQuestion" placeholder="عبارت مورد نظر برای جستجو را وارد کنید...">
|
| 174 |
+
<button id="searchButton" disabled>جستجو</button> </div>
|
| 175 |
|
| 176 |
<div class="similarity-threshold-control">
|
| 177 |
<label for="similarityThresholdInput">آستانه شباهت:</label>
|
| 178 |
+
<input type="number" id="similarityThresholdInput" value="0.15" min="0.0" max="1.0" step="0.01">
|
| 179 |
+
<p>نتایجی که امتیاز شباهت آنها بیشتر یا مساوی این مقدار باشد نمایش داده میشوند (بین 0 تا 1).</p>
|
| 180 |
</div>
|
|
|
|
|
|
|
|
|
|
| 181 |
|
| 182 |
<div class="results-per-page">
|
| 183 |
+
<label for="resultsPerPage">تعداد نتایج نمایش داده شده:</label>
|
| 184 |
<select id="resultsPerPage">
|
| 185 |
+
<option value="5">5</option>
|
| 186 |
+
<option value="10" selected>10</option> <option value="20">20</option>
|
| 187 |
<option value="50">50</option>
|
|
|
|
| 188 |
</select>
|
| 189 |
</div>
|
| 190 |
|
| 191 |
|
| 192 |
+
<p id="loadingStatus" class="status-message">
|
| 193 |
+
<span class="loading-spinner"></span> </p>
|
| 194 |
+
<p id="selectionError" class="error-message"></p> <div id="searchResults">
|
| 195 |
+
<p>پس از انتخاب کتابها و وارد کردن سوال، نتایج اینجا نمایش داده میشوند.</p> </div>
|
|
|
|
|
|
|
|
|
|
| 196 |
|
| 197 |
<footer class="app-footer">
|
| 198 |
+
<p>ساخته شده با ❤️</p>
|
| 199 |
+
</footer>
|
| 200 |
+
|
| 201 |
+
</div>
|
| 202 |
|
| 203 |
<script src="script.js"></script>
|
| 204 |
</body>
|