| <!DOCTYPE html> |
| <html lang="ar" dir="rtl"> |
| <head> |
| <meta charset="utf-8"> |
| <title>ذكريات نورا</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <style> |
| body { |
| font-family: 'Arial', sans-serif; |
| background-color: #fefefe; |
| color: #333; |
| padding: 20px; |
| } |
| .container { |
| max-width: 800px; |
| margin: auto; |
| background-color: #ffffff; |
| padding: 30px; |
| border-radius: 16px; |
| box-shadow: 0 0 20px rgba(0,0,0,0.1); |
| } |
| h2 { |
| text-align: center; |
| color: #4a4a90; |
| font-size: 2em; |
| } |
| ul { |
| list-style: none; |
| padding: 0; |
| } |
| li { |
| background-color: #eef3ff; |
| margin-bottom: 12px; |
| padding: 18px; |
| border-radius: 10px; |
| line-height: 1.8; |
| border-right: 4px solid #4a4a90; |
| } |
| a { |
| display: block; |
| text-align: center; |
| margin-top: 30px; |
| text-decoration: none; |
| background-color: #4a4a90; |
| color: white; |
| padding: 12px 24px; |
| border-radius: 8px; |
| font-size: 1.1em; |
| } |
| a:hover { |
| background-color: #2f2f72; |
| } |
| p { |
| text-align: center; |
| font-size: 1.2em; |
| color: #777; |
| } |
| </style> |
| </head> |
| <body> |
| <div class="container"> |
| <h2>ذكريات نورا - {{ username }}</h2> |
| {% if memory %} |
| <ul> |
| {% for q, a in memory.items() %} |
| <li> |
| <strong>سؤال:</strong> {{ q }}<br> |
| <strong>رد:</strong> {{ a }} |
| </li> |
| {% endfor %} |
| </ul> |
| {% else %} |
| <p>ما في ذكريات محفوظة حتى الآن.</p> |
| {% endif %} |
| <a href="/chat">رجوع للدردشة</a> |
| </div> |
|
|
| <script> |
| function اجابة_تلقائية(السؤال) { |
| السؤال = السؤال.trim().toLowerCase(); |
| |
| if (السؤال.includes("هل نبدأ") || السؤال.includes("ابدأ؟") || السؤال.startsWith("ابدأ") || السؤال.includes("هل أبدأ؟") || السؤال.includes("ابدأ:")) { |
| return "نعم ابدأ"; |
| } |
| |
| if (السؤال.startsWith("هل") && (السؤال.includes("؟") || السؤال.includes("?"))) { |
| return "نعم"; |
| } |
| |
| if (السؤال.startsWith("ما هي")) { |
| return "اكمل ليس الآن"; |
| } |
| |
| if (السؤال.includes("تفصيل") || السؤال.includes("وضح") || السؤال.includes("اشرح")) { |
| return "ليس الآن"; |
| } |
| |
| if (السؤال.includes("هل تود") || السؤال.includes("هل تريد")) { |
| return "نعم"; |
| } |
| |
| if (السؤال.startsWith("قول لي")) { |
| return "موافق"; |
| } |
| |
| if (السؤال.includes("هل تحتاج لشيء آخر") || السؤال.includes("هل تحتاج شيء آخر")) { |
| return "نعم اكمل مع تفعيل الإجابات التلقائية"; |
| } |
| |
| if (السؤال.includes("جاهز؟")) { |
| return "ابدأ"; |
| } |
| |
| if (السؤال.includes("اذا تبي")) { |
| return "نعم"; |
| } |
| |
| if (السؤال.includes("هل تريدني")) { |
| return "نعم أريد"; |
| } |
| |
| if (السؤال.includes("أو") || السؤال.includes("أم") || السؤال.match(/،\s*أو/) || السؤال.match(/،\s*أم/)) { |
| return "الخيار الأول"; |
| } |
| |
| return "نعم"; |
| } |
| </script> |
| </body> |
| </html> |
|
|