-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproduction-dashboard.html
More file actions
247 lines (225 loc) · 7.96 KB
/
Copy pathproduction-dashboard.html
File metadata and controls
247 lines (225 loc) · 7.96 KB
1
2
3
4
5
6
7
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<!doctype html>
<html dir="rtl" lang="ar">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>لوحة إنتاج عربية</title>
<style>
body {
margin: 0;
font-family: system-ui;
color: #172033;
background: #f6f7fb;
}
main {
width: clamp(22rem, 94vw, 76rem);
margin-inline: auto;
padding: 2rem;
}
section.بطولة {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
gap: 1rem;
align-items: center;
padding: 1.25rem;
border: 1px solid #d7dde8;
border-radius: 8px;
background-color: #ffffff;
box-shadow: 0 1rem 2rem #0001;
}
section.بطولة h1 {
margin: 0;
font-size: 2rem;
line-height: 1.2;
}
section.بطولة p,
section.بطاقة p {
color: #516070;
line-height: 1.8;
}
section.شارة {
padding: 0.85rem;
border: 1px solid #9ac7b4;
border-radius: 8px;
background-color: #e9f7f0;
}
section.مؤشرات,
section.مساحة_عمل,
section.إثبات {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
gap: 1rem;
margin-top: 1rem;
}
article.بطاقة,
section.بطاقة {
padding: 1rem;
border: 1px solid #d7dde8;
border-radius: 8px;
background-color: #ffffff;
box-shadow: 0 0.75rem 1.5rem #0001;
}
article.بطاقة strong {
font-size: 1.75rem;
color: #0f766e;
}
label {
display: block;
margin-top: 0.75rem;
font-weight: 700;
}
input,
select,
textarea,
button {
width: 100%;
box-sizing: border-box;
padding: 0.8rem;
margin-top: 0.35rem;
border: 1px solid #c8d1df;
border-radius: 8px;
font-family: system-ui;
}
button {
background-color: #0f766e;
color: #ffffff;
font-weight: 700;
cursor: pointer;
}
ul {
padding-right: 1.2rem;
}
span.حالة {
display: inline-block;
padding: 0.25rem 0.6rem;
border-radius: 8px;
background-color: #fff3db;
color: #7a4b00;
font-weight: 700;
}
code {
display: block;
padding: 0.75rem;
border-radius: 8px;
background-color: #172033;
color: #f8fafc;
line-height: 1.8;
}
</style>
</head>
<body>
<main>
<section class="بطولة">
<section>
<span class="حالة">PRODUCT-READY-0.2.0</span>
<h1>لوحة إنتاج عربية حقيقية</h1>
<p>واجهة عربية مكتوبة بمصدر عربي وتعمل في المتصفح كـ HTML وCSS وJavaScript قياسية، مع خادم عربي فوق CPython.</p>
</section>
<section class="شارة">
<h2>حالة الخادم</h2>
<p id="حالة-الخادم">بانتظار فحص الخادم...</p>
</section>
</section>
<section class="مؤشرات">
<article class="بطاقة">
<h2>المترجم</h2>
<strong>HTML5</strong>
<p>خرج قياسي مع اتجاه عربي.</p>
</article>
<article class="بطاقة">
<h2>القاموس</h2>
<strong>v1.22</strong>
<p>مصدر الواجهة يستخدم قاموس إنتاجي ثابت.</p>
</article>
<article class="بطاقة">
<h2>الخادم</h2>
<strong>Flask</strong>
<p>API عربي يحفظ الطلبات في SQLite.</p>
</article>
<article class="بطاقة">
<h2>العقد</h2>
<strong>RTL</strong>
<p>العربية هي لغة الواجهة والمنطق والبيانات.</p>
</article>
</section>
<section class="مساحة_عمل">
<section class="بطاقة">
<h2>طلب جاهزية تطبيق</h2>
<label for="الاسم">الاسم</label>
<input id="الاسم" value="مطور عربي">
<label for="المجال">المجال</label>
<select id="المجال">
<option value="ويب">ويب</option>
<option value="بيانات">بيانات</option>
<option value="ذكاء">ذكاء اصطناعي</option>
</select>
<label for="التفاصيل">التفاصيل</label>
<textarea id="التفاصيل">أريد تطبيقاً عربياً يستخدم واجهة ويب وخادم Python وقاعدة بيانات.</textarea>
<button id="ارسل" type="button">احسب الجاهزية</button>
</section>
<section class="بطاقة">
<h2>نتيجة التشغيل</h2>
<p id="الحالة">لم يرسل طلب بعد.</p>
<ul id="الطلبات"></ul>
</section>
</section>
<section class="إثبات">
<section class="بطاقة">
<h2>المصدر العربي</h2>
<code>examples/production-dashboard.arhtml</code>
<p>العناصر والسمات وCSS وJavaScript مكتوبة بمفردات عربية.</p>
</section>
<section class="بطاقة">
<h2>الخرج القياسي</h2>
<code><!doctype html> + dir="rtl" + lang="ar"</code>
<p>المتصفح لا يحتاج إضافة أو وقت تشغيل خاص.</p>
</section>
<section class="بطاقة">
<h2>مسار الإنتاج</h2>
<ul>
<li>اكتب الواجهة بالعربية.</li>
<li>شغل arhtml.</li>
<li>افتح HTML قياسي في المتصفح.</li>
<li>اتصل بخادم عربي حقيقي.</li>
</ul>
</section>
</section>
<script>
const الاسم = document.getElementById("الاسم");
const المجال = document.getElementById("المجال");
const التفاصيل = document.getElementById("التفاصيل");
const زر = document.getElementById("ارسل");
const الحالة = document.getElementById("الحالة");
const الطلبات = document.getElementById("الطلبات");
const حالة_الخادم = document.getElementById("حالة-الخادم");
async function افحص_الخادم() {
const رد = await fetch("http://127.0.0.1:5055/");
const dataset = await رد.json();
حالة_الخادم.textContent = dataset["رسالة"] + " " + dataset["العقدة"];
}
async function ارسل_طلب() {
الحالة.textContent = "جاري الإرسال إلى الخادم العربي...";
const رد = await fetch("http://127.0.0.1:5055/طلبات", {
method: "POST",
headers: new Headers({ "Content-Type": "application/json" }),
body: JSON.stringify({
الاسم: الاسم.value,
المجال: المجال.value,
التفاصيل: التفاصيل.value
})
});
const نتيجة = await رد.json();
الحالة.textContent = نتيجة["الملخص"];
الطلبات.replaceChildren();
const بند = document.createElement("li");
بند.textContent = نتيجة["رسالة"] + " — " + نتيجة["الطلب"]["الاسم"] + " — درجة " + نتيجة["الطلب"]["الدرجة"];
الطلبات.append(بند);
}
document.addEventListener("DOMContentLoaded", function () {
افحص_الخادم();
زر.addEventListener("click", ارسل_طلب);
});
</script>
</main>
</body>
</html>