-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
461 lines (420 loc) · 17.4 KB
/
index.html
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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sihirli Kare Oluşturucu</title>
<style>
/* Genel stil kuralları */
@font-face {
font-family: 'DejaVu Sans Mono';
src: url('fonts/DejaVuSansMonoBold.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'UniqueRegular';
src: url('fonts/UniqueRegular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
body {
width: calc(100% - 40px);
font-family: 'UniqueRegular';
font-weight: normal;
font-style: normal;
margin: 20px;
line-height: 1.6;
color: #333;
background-color: #f9f9f9;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
/* Başlık stili */
h1 {
color: #444;
margin-bottom: 20px;
}
/* Form Grupları */
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
.form-group input,
.form-group select {
width: 100%;
padding: 10px;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 4px;
}
/* Buton Grupları */
.button-group {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 15px;
}
.button-group button {
flex: 1 1 auto;
min-width: 120px;
padding: 10px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
}
.button-group button:hover {
background-color: #0056b3;
}
/* Checkbox Slider */
.checkbox-slider {
margin: 0;
flex-shrink: 0;
}
.checkbox-slider label {
display: block;
width: 60px;
height: 30px;
background-color: #ccc;
border-radius: 15px;
position: relative;
cursor: pointer;
}
.checkbox-slider label::before {
content: '';
display: block;
width: 26px;
height: 26px;
background-color: #fff;
border-radius: 50%;
position: absolute;
top: 2px;
left: 2px;
transition: transform 0.2s;
}
.checkbox-slider input[type="checkbox"] {
display: none;
}
.checkbox-slider input[type="checkbox"]:checked + label {
background-color: #28a745;
}
.checkbox-slider input[type="checkbox"]:checked + label::before {
transform: translateX(30px);
}
/* Buton stilleri */
.button-group {
display: flex;
gap: 10px;
margin-bottom: 20px;
}
.button-group button {
min-width: 115px;
width: 240px;
padding: 5px 10px;
font-size: 16px;
color: #fff;
background-color: #007bff;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.button-group button:hover {
background-color: #0056b3;
}
.button-group button:disabled {
background-color: darkgrey;
color: grey;
}
/* Textarea stili */
textarea {
width: calc(100% - 20px);
height: 40vh;
line-height: 16px;
padding: 10px;
font-size: 16px;
font-family: 'DejaVu Sans Mono', monospace;
font-variant-numeric: tabular-nums lining-nums;
font-kerning:none;
unicode-bidi: plaintext;
tab-size: 4;
border: 1px solid #ccc;
border-radius: 4px;
background-color: #fff;
white-space: pre-wrap;
-webkit-user-select: initial;
-ms-user-select: initial;
user-select: initial;
}
#editorContainer {
position: relative;
max-width: 100%;
width: calc(100% - 20px);
height: 40vh;
line-height: 16px;
padding: 10px;
font-size: 16px;
font-family: 'DejaVu Sans Mono', monospace;
font-variant-numeric: tabular-nums lining-nums;
font-kerning:none;
unicode-bidi: plaintext;
tab-size: 4;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
#HtmlcSquareOutput, #highlightedOutput {
position: absolute;
top: 0;
left: 0;
min-width: 100%;
min-height: 100%;
width: 100%;
height: 100%;
margin: 0;
padding: 10px;
resize: vertical;
box-sizing: border-box;
white-space: pre-wrap;
overflow: auto;
font-family: inherit;
font-size: inherit;
line-height: 1.5;
}
#HtmlcSquareOutput {
z-index: 2;
background: transparent;
color: transparent;
caret-color: black;
resize: none;
border: none;
outline: none;
}
#highlightedOutput {
z-index: 1;
background-color: #fff;
color: #333;
pointer-events: none;
}
.tag {
color: #800000;
}
.string {
color: #008000;
}
.keyword {
color: #0000ff;
}
.number {
color: #ff4500;
}
.comment {
color: #808080;
font-style: italic;
}
#pdfpngSquareOutput {
width: min-content;
background-color: #fff;
border: 1px solid #ccc;
border-radius: 4px;
padding: 1cm;
}
/* Form Container */
.form-container {
width: 100%;
overflow: hidden; /* Clearfix */
}
/* Formshaper Div'leri */
.formshaper {
box-sizing: border-box;
margin-bottom: 20px;
padding: 10px;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 5px;
}
input[type=radio] {
width: inherit;
}
/* Geniş Ekranlar için Yan Yana Düzen */
@media (min-width: 768px) {
.formshaper.shaperleft {
width: 49.5%;
float: left;
margin-right: .5%;
}
.formshaper.shaperright {
width: 49.5%;
float: right;
margin-right: .5%;
}
}
/* Küçük Ekranlar için alt alta Düzen */
@media (max-width: 768px) {
.formshaper.shaperleft, .formshaper.shaperright {
width: 100%;
float: inherit;
margin-right: 0%;
}
}
/* Paragraph stili */
span.checkresults {
display: none;
font-weight: bold;
color: green;
}
span.resultiswrong {
color: red;
}
/* Responsive tasarım */
@media (min-width: 768px) {
.button-group {
justify-content: flex-start;
}
}
</style>
<script src="js/jquery-3.7.1.min.js"></script>
<script src="js/html2canvas.min.js"></script>
<script src="js/jspdf.umd.min.js"></script>
<script src="js/magicsquare.js"></script>
</head>
<body id="magicsquare">
<p style="text-align:right;"><a href="https://metatronslove.github.io/occultabjadcalculator/" turkishcontent="Okült ebced hesaplama aracını aç" englishcontent="Open occult abjad calculator" target="_blank"></a> <a href="https://metatronslove.github.io/Letter-Count-Tool/" turkishcontent="Harf sayma aracını aç" englishcontent="Open letter counter" target="_blank"></a> <a href="/magic-square-generator/vanilla" turkishcontent="Vanilla sihirli kare oluşturma aç" englishcontent="Open vanilla magic square generator" target="_blank"></a></p>
<h1 turkishcontent="Sihirli Kare Oluşturucu" englishcontent="Magic Square Creator">Sihirli Kare Oluşturucu</h1>
<!-- Form alanı -->
<div class="form-container">
<div class="formshaper shaperleft">
<section>
<div class="form-group">
<label for="rows" turkishcontent="Kare Boyutu:" englishcontent="Square Size:">Kare Boyutu:</label>
<input type="number" id="rows" min="3" value="3" style="width: 100%;">
</div>
<div id="algorithms" class="form-group">
</div>
<div class="form-group">
<label for="expectedRowSum" turkishcontent="Satır Toplamı:" englishcontent="Row Sum:">Satır Toplamı:</label>
<input type="number" id="expectedRowSum" min="15" value="15" style="width: 100%;">
</div>
<!-- Butonlar -->
<div class="button-group">
<button onclick="generateMagicSquare()" style="width: calc(100% - 100px);" turkishcontent="Sihirli Kare Oluştur" englishcontent="Create Magic Square">Sihirli Kare Oluştur</button>
<section id="lockpressed" title="Basılı tut">
<div class="checkbox-slider">
<input type="checkbox" id="lockcreator" name="lockcreator">
<label for="lockcreator"></label>
</div>
</section>
</div>
<div class="button-group">
<section id="numberswitcher" title="Arab to Indian Numbers">
<div class="checkbox-slider">
<input type="checkbox" id="numberswitch" name="numberswitch" disabled="disabled">
<label for="numberswitch"></label>
</div>
</section>
<button onclick="rotateTheSquare()" style="width: calc(calc(100% - 110px) / 2);" turkishcontent="Döndür" englishcontent="Rotate">Döndür</button>
<button onclick="mirrorTheSquare()" style="width: calc(calc(100% - 110px) / 2);" turkishcontent="Aynala" englishcontent="Mirror">Aynala</button>
</div>
<div class="form-group">
<select id="language" name="language" title="" style="width: 100%;">
<option value="english" turkishcontent="English" englishcontent="English">English</option>
<option value="turkish" selected="selected" turkishcontent="Türkçe" englishcontent="Türkçe">Türkçe</option>
</select>
</div>
</section>
</div>
<div class="formshaper shaperright">
<div id="squaremagic" class="form-group">
<label for="squareoutas"><span turkishcontent="Çıktı biçemi: " englishcontent="Output format: ">Çıktı biçemi: </span></label>
<select id="squareoutas" name="squareoutas" title="" style="width: 100%;">
<option value="tabs" turkishcontent="Tab'la ayrılmış metin" englishcontent="Tab seperated text" selected="selected">Tab'la ayrılmış metin</option>
<option value="boxed" turkishcontent="Tablolanmış metin" englishcontent="Boxed text">Tablolanmış metin</option>
<option value="html" turkishcontent="Html biçeminde kod" englishcontent="Html formatted code">Html biçeminde kod</option>
<option value="pdf" turkishcontent="PDF biçeminde belge" englishcontent="PDF document">PDF biçeminde belge</option>
<option value="png" turkishcontent="PNG biçeminde resim" englishcontent="PNG image">PNG biçeminde resim</option>
</select>
<div id="magicabilitiesfortabs" class="form-group">
<p align="justify" style="width: 100%;"
turkishcontent="Tab boşluk ayraçlarıyla satırlarda sıralanmış sihirli kare hücreleri, metin düzenleme programlarında yeterince okunabilirliği yüksek bir görünüm kazanır. Microsoft Excel, LibreOffice Hesap Tablosu, Google E-tablolar gibi elektronik tablolama yazılımlarında kopyala ve yapıştır tekniği ile kolayca veri girişi olarak tablolara eklemede alışılageldik bir seçenek oluşu yadsınamaz."
englishcontent="Cells of a magic square arranged in rows separated by tab spaces gain a sufficiently readable appearance in text editing programs. It is undeniable that using the copy and paste technique in spreadsheet software such as Microsoft Excel, LibreOffice Calc, and Google Sheets has become a conventional option for easily adding data to tables as input."></p>
</div>
<div id="magicabilitiesforboxed" class="form-group" style="display: none; width: 100%;">
<div id="borderslabel" class="form-group" style="width: 100%;">
<label for="borders" turkishcontent="Kutu kenarları: " englishcontent="Box borders: ">Kutu kenarları: </label>
<select id="borders" name="borders" class="" title="" style="width: 100%;">
<option value=0 selected="selected">┌──────────┘</option>
<option value=1>┌┄┄┄┄┄┄┄┄┄┄┘</option>
<option value=2>┏┅┅┅┅┅┅┅┅┅┅┛</option>
<option value=3>╭──────────╯</option>
<option value=4>┏━━━━━━━━━━┛</option>
<option value=5>╔══════════╝</option>
</select>
</div>
<div id="cellheightlabel" class="form-group" style="width: 100%;">
<label for="cellheight" turkishcontent="Hücre yüksekliği: " englishcontent="Cell height: ">Hücre yüksekliği: </label>
<input title="" id="cellheight" name="cellheight" value=0 type="number" min=0 max=20 step=1 style="width: 100%;">
</div>
<div id="cellwidthlabel" class="form-group" style="width: 100%;">
<label for="cellwidth" turkishcontent="Hücre genişliği: " englishcontent="Cell width: ">Hücre genişliği: </label>
<input title="" id="cellwidth" name="cellwidth" value=0 type="number" min=0 max=20 step=1 style="width: 100%;">
</div>
</div>
<div id="magicabilitiesforhtmlc" style="display: none;" class="form-group">
<label style="text-align: left;"><span turkishcontent="Mürekkep rengi: " englishcontent="Ink color: ">Mürekkep rengi: </span><input type="color" id="borderColor" value="#000000" style="width: calc(100%);"></label>
<div class="form-group" style="width: 100%;">
<fieldset style="width: calc(100% - 30px);">
<legend turkishcontent="Yatırma başlama yönü" englishcontent="Rotation start direction">Yatırma başlama yönü</legend>
<label style=""><input style="min-width: 0px;" type="radio" name="rotationStart" value="left" checked><span turkishcontent="İlk hücre sola (-45°)" englishcontent="Left (-45°) for first cell">İlk hücre sola (-45°)</span></label>
<label style=""><input style="min-width: 0px;" type="radio" name="rotationStart" value="right"><span turkishcontent="İlk hücre sağa (+45°)" englishcontent="Right (+45°) for first cell">İlk hücre sağa (+45°)</span></label>
<label style=""><input style="min-width: 0px;" type="radio" name="rotationStart" value="none"><span turkishcontent="Yatırma yok" englishcontent="No rotation">Yatırma yok</span></label>
</fieldset>
</div>
<div class="form-group" style="width: 100%;">
<label for="paper-sizes" turkishcontent="Belge boyutu seçin:" englishcontent="Select a document size:">Belge boyutu seçin:</label>
<select id="paper-sizes" name="paper-sizes" style="width: 100%;">
<option value="KUC" turkishcontent="İçeriğin sığacağı hayali ölçüler" englishcontent="Dream sized, contains content">İçeriğin sığacağı hayali ölçüler</option>
<option disabled turkishcontent="─────────────────────────" englishcontent="─────────────────────────────">─────────────────────────</option>
<option value="A5P" turkishcontent="A5 - Dikey (148 x 210 mm)" englishcontent="A5 - Portrait (148 x 210 mm)">A5 - Dikey (148 x 210 mm)</option>
<option value="A4P" turkishcontent="A4 - Dikey (210 x 297 mm)" englishcontent="A4 - Portrait (210 x 297 mm)">A4 - Dikey (210 x 297 mm)</option>
<option value="A3P" turkishcontent="A3 - Dikey (297 x 420 mm)" englishcontent="A3 - Portrait (297 x 420 mm)">A3 - Dikey (297 x 420 mm)</option>
<option disabled turkishcontent="─────────────────────────" englishcontent="─────────────────────────────">─────────────────────────</option>
<option value="A5L" turkishcontent="A5 - Yatay (210 x 148 mm)" englishcontent="A5 - Landscape (210 x 148 mm)">A5 - Yatay (210 x 148 mm)</option>
<option value="A4L" turkishcontent="A4 - Yatay (297 x 210 mm)" englishcontent="A4 - Landscape (297 x 210 mm)">A4 - Yatay (297 x 210 mm)</option>
<option value="A3L" turkishcontent="A3 - Yatay (420 x 297 mm)" englishcontent="A3 - Landscape (420 x 297 mm)">A3 - Yatay (420 x 297 mm)</option>
</select>
</div>
</div>
</div>
</div>
</div>
<!-- Sihirli kare çıktısı -->
<section>
<div class="form-group">
<label for="MagicSquareOutput"><span turkishcontent="Sihirli Kare: " englishcontent="Magic Square: ">Sihirli Kare: </span><span id="checksquare"></span></label>
<textarea id="MagicSquareOutput" readonly rotated="0" flipped="false" omode="0" style="tab-size: 10;"></textarea>
<textarea id="BoxedSquareOutput" readonly style="display: none;"></textarea>
<div id="editorContainer" style="display: none;">
<textarea id="HtmlcSquareOutput" readonly style="display: none;"></textarea>
<div id="highlightedOutput" style="display: none;"></div>
</div>
<div id="pdfpngSquareOutput" style="display: none;"></div>
</div>
<div class="button-group">
<button disabled="disabled" onclick="copyToClipboard()" turkishcontent="Panoya Kopyala" englishcontent="Copy to clipboard">Panoya Kopyala</button>
<button disabled="disabled" onclick="saveToLocalDisk()" turkishcontent="Dosyayı Kaydet" englishcontent="Save File">Dosyayı Kaydet</button>
</div>
</section>
<section>
<div id="errorblock"></div>
<span id="checksquare"></span>
</section>
<center><p class="spellcounter"><img src="https://img.shields.io/badge/HTML5-E34F26?style=flat&logo=html5&logoColor=white" title="attributes are great"> <img src="https://img.shields.io/badge/CSS3-1572B6?style=flat&logo=css3&logoColor=white" title="style is more than make up"> <img src="https://img.shields.io/badge/JavaScript-F7DF1E?style=flat&logo=javascript&logoColor=black" title="live Frenkanstein!"></p></center>
</body>
</html>