focomy 0.1.120__py3-none-any.whl → 0.1.121__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: focomy
3
- Version: 0.1.120
3
+ Version: 0.1.121
4
4
  Summary: The Most Beautiful CMS - A metadata-driven, zero-duplicate-code content management system
5
5
  Project-URL: Homepage, https://github.com/focomy/focomy
6
6
  Project-URL: Documentation, https://focomy.dev/docs
@@ -189,7 +189,7 @@ themes/default/theme.yaml,sha256=tgcUP1YFptyXVNL2a8DBiPrP7zTjWNH62Cy9D_w6Chk,187
189
189
  themes/default/templates/404.html,sha256=6pYUz7zg5hx3nikgxiZWSkwYnv2nENCSV3KjdIF0_lE,1105
190
190
  themes/default/templates/500.html,sha256=CtU3gEsHsxAh-vbcnx5McH8V8ruKtdP8usj8hPuu8zY,1174
191
191
  themes/default/templates/archive.html,sha256=ZHBxPYewvc2TbrsB745LYO2uM5SJbTFQQR6savWUzYg,2385
192
- themes/default/templates/base.html,sha256=Vl0HbbOcCd6SRGoi5j7_xJopsaqZ7Kr9dI7ygS0vx14,26867
192
+ themes/default/templates/base.html,sha256=mbT1wxaD9gygkod7sFPAda-uQsvfV-AT_Jzvn23eR1s,34012
193
193
  themes/default/templates/category.html,sha256=k-yN0vFoOpgxgg6DlGin5X4IzVDBG9xRZ0FOD7OJtU8,3061
194
194
  themes/default/templates/channel.html,sha256=1i1zkAWmvpcqyoEfaeQNDc2zrMao2xSXCkjRuwzxOUU,3213
195
195
  themes/default/templates/form.html,sha256=KFrFS6qxHELPrpRB0B_BNU-uqM3k11oMYwd6oY3qoPQ,8685
@@ -204,8 +204,8 @@ themes/minimal/templates/base.html,sha256=LFkx-XLDMGH7oFHHa0e6KPB0DJITOBvr6GtPkD
204
204
  themes/minimal/templates/home.html,sha256=ygYQgYj1OGCiKwmfsxwkPselVKT8vDH3jLLbfphpqKI,1577
205
205
  themes/minimal/templates/page.html,sha256=7Xcoq-ryaxlp913H2S1ishrAro2wsqqGmvsm1osXxd4,389
206
206
  themes/minimal/templates/post.html,sha256=FkTRHci8HNIIi3DU6Mb3oL0aDisGyDcsT_IUDwHmrvo,1387
207
- focomy-0.1.120.dist-info/METADATA,sha256=7UzC55msNplib9gEMyoHDcrY9cR_WFPPfOqbCKpd6G8,7042
208
- focomy-0.1.120.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
209
- focomy-0.1.120.dist-info/entry_points.txt,sha256=_rF-wxGI1axY7gox3DBsTLHq-JrFKkMCjA65a6b_oqE,41
210
- focomy-0.1.120.dist-info/licenses/LICENSE,sha256=z9Z7gN7NNV7zYCaY-Knh3bv8RBCu89VueYtAlN_-lro,1063
211
- focomy-0.1.120.dist-info/RECORD,,
207
+ focomy-0.1.121.dist-info/METADATA,sha256=ZH2pjblW1icUgF-ajYHNgHqDvhd6cJXCI43S-I-ZFDk,7042
208
+ focomy-0.1.121.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
209
+ focomy-0.1.121.dist-info/entry_points.txt,sha256=_rF-wxGI1axY7gox3DBsTLHq-JrFKkMCjA65a6b_oqE,41
210
+ focomy-0.1.121.dist-info/licenses/LICENSE,sha256=z9Z7gN7NNV7zYCaY-Knh3bv8RBCu89VueYtAlN_-lro,1063
211
+ focomy-0.1.121.dist-info/RECORD,,
@@ -334,6 +334,57 @@
334
334
  flex: 1;
335
335
  font-family: monospace;
336
336
  }
337
+ .image-field {
338
+ display: flex;
339
+ flex-direction: column;
340
+ gap: 0.5rem;
341
+ }
342
+ .image-field input[type="url"] {
343
+ width: 100%;
344
+ padding: 0.5rem;
345
+ background: #0f172a;
346
+ border: 1px solid #374151;
347
+ border-radius: 4px;
348
+ color: white;
349
+ font-size: 0.75rem;
350
+ }
351
+ .image-preview {
352
+ width: 100%;
353
+ height: 60px;
354
+ border: 1px dashed #374151;
355
+ border-radius: 4px;
356
+ display: flex;
357
+ align-items: center;
358
+ justify-content: center;
359
+ background: #0f172a;
360
+ overflow: hidden;
361
+ }
362
+ .image-preview img {
363
+ max-width: 100%;
364
+ max-height: 100%;
365
+ object-fit: contain;
366
+ }
367
+ .image-preview .no-image {
368
+ color: #64748b;
369
+ font-size: 0.75rem;
370
+ }
371
+ .image-field-actions {
372
+ display: flex;
373
+ gap: 0.5rem;
374
+ }
375
+ .image-field-actions button {
376
+ padding: 0.25rem 0.5rem;
377
+ font-size: 0.6875rem;
378
+ background: transparent;
379
+ border: 1px solid #374151;
380
+ color: #94a3b8;
381
+ border-radius: 4px;
382
+ cursor: pointer;
383
+ }
384
+ .image-field-actions button:hover {
385
+ background: #374151;
386
+ color: white;
387
+ }
337
388
  #customize-panel-footer {
338
389
  padding: 1rem;
339
390
  display: flex;
@@ -390,6 +441,60 @@
390
441
  <button type="button" id="customize-panel-close">&times;</button>
391
442
  </div>
392
443
  <div id="customize-panel-content">
444
+ <div class="customize-section">
445
+ <h3>サイトID</h3>
446
+ <div class="customize-field">
447
+ <label>サイトロゴ</label>
448
+ <div class="image-field">
449
+ <input type="url" id="site_logo" placeholder="https://example.com/logo.png">
450
+ <div class="image-preview" id="site_logo_preview">
451
+ <span class="no-image">画像未設定</span>
452
+ </div>
453
+ <div class="image-field-actions">
454
+ <button type="button" onclick="clearImageField('site_logo')">クリア</button>
455
+ </div>
456
+ </div>
457
+ </div>
458
+ <div class="customize-field">
459
+ <label>サイトアイコン</label>
460
+ <div class="image-field">
461
+ <input type="url" id="site_icon" placeholder="https://example.com/icon.png">
462
+ <div class="image-preview" id="site_icon_preview">
463
+ <span class="no-image">画像未設定</span>
464
+ </div>
465
+ <div class="image-field-actions">
466
+ <button type="button" onclick="clearImageField('site_icon')">クリア</button>
467
+ </div>
468
+ </div>
469
+ </div>
470
+ </div>
471
+ <div class="customize-section">
472
+ <h3>ヘッダー・背景</h3>
473
+ <div class="customize-field">
474
+ <label>ヘッダー画像</label>
475
+ <div class="image-field">
476
+ <input type="url" id="header_image" placeholder="https://example.com/header.jpg">
477
+ <div class="image-preview" id="header_image_preview">
478
+ <span class="no-image">画像未設定</span>
479
+ </div>
480
+ <div class="image-field-actions">
481
+ <button type="button" onclick="clearImageField('header_image')">クリア</button>
482
+ </div>
483
+ </div>
484
+ </div>
485
+ <div class="customize-field">
486
+ <label>背景画像</label>
487
+ <div class="image-field">
488
+ <input type="url" id="background_image" placeholder="https://example.com/bg.jpg">
489
+ <div class="image-preview" id="background_image_preview">
490
+ <span class="no-image">画像未設定</span>
491
+ </div>
492
+ <div class="image-field-actions">
493
+ <button type="button" onclick="clearImageField('background_image')">クリア</button>
494
+ </div>
495
+ </div>
496
+ </div>
497
+ </div>
393
498
  <div class="customize-section">
394
499
  <h3>カラー</h3>
395
500
  <div class="customize-field">
@@ -492,6 +597,12 @@
492
597
  }
493
598
  } else if (setting.id === 'custom_css') {
494
599
  document.getElementById('custom_css').value = setting.value || '';
600
+ } else if (['site_logo', 'site_icon', 'header_image', 'background_image'].includes(setting.id)) {
601
+ const input = document.getElementById(setting.id);
602
+ if (input) {
603
+ input.value = setting.value || '';
604
+ updateImagePreview(setting.id, setting.value || '');
605
+ }
495
606
  }
496
607
  });
497
608
 
@@ -506,6 +617,10 @@
506
617
  // Get current form values
507
618
  function getFormValues() {
508
619
  return {
620
+ site_logo: document.getElementById('site_logo').value,
621
+ site_icon: document.getElementById('site_icon').value,
622
+ header_image: document.getElementById('header_image').value,
623
+ background_image: document.getElementById('background_image').value,
509
624
  color_primary: document.getElementById('color_primary').value,
510
625
  color_background: document.getElementById('color_background').value,
511
626
  color_text: document.getElementById('color_text').value,
@@ -587,6 +702,17 @@
587
702
  resetBtn.addEventListener('click', function() {
588
703
  if (!confirm('変更をリセットしますか?')) return;
589
704
 
705
+ // Image fields
706
+ document.getElementById('site_logo').value = originalValues.site_logo || '';
707
+ updateImagePreview('site_logo', originalValues.site_logo || '');
708
+ document.getElementById('site_icon').value = originalValues.site_icon || '';
709
+ updateImagePreview('site_icon', originalValues.site_icon || '');
710
+ document.getElementById('header_image').value = originalValues.header_image || '';
711
+ updateImagePreview('header_image', originalValues.header_image || '');
712
+ document.getElementById('background_image').value = originalValues.background_image || '';
713
+ updateImagePreview('background_image', originalValues.background_image || '');
714
+
715
+ // Color fields
590
716
  document.getElementById('color_primary').value = originalValues.color_primary || '#2563eb';
591
717
  document.getElementById('color_primary_text').value = originalValues.color_primary || '#2563eb';
592
718
  document.getElementById('color_background').value = originalValues.color_background || '#ffffff';
@@ -619,6 +745,39 @@
619
745
  timer = setTimeout(() => fn.apply(this, args), delay);
620
746
  };
621
747
  }
748
+
749
+ // Update image preview
750
+ function updateImagePreview(fieldId, url) {
751
+ const previewEl = document.getElementById(fieldId + '_preview');
752
+ if (!previewEl) return;
753
+
754
+ if (url && url.trim()) {
755
+ previewEl.innerHTML = '<img src="' + url + '" alt="プレビュー" onerror="this.parentElement.innerHTML=\'<span class=no-image>読み込み失敗</span>\'">';
756
+ } else {
757
+ previewEl.innerHTML = '<span class="no-image">画像未設定</span>';
758
+ }
759
+ }
760
+
761
+ // Clear image field (global for onclick)
762
+ window.clearImageField = function(fieldId) {
763
+ const input = document.getElementById(fieldId);
764
+ if (input) {
765
+ input.value = '';
766
+ updateImagePreview(fieldId, '');
767
+ updatePreview();
768
+ }
769
+ };
770
+
771
+ // Image URL input listeners
772
+ ['site_logo', 'site_icon', 'header_image', 'background_image'].forEach(function(fieldId) {
773
+ const input = document.getElementById(fieldId);
774
+ if (input) {
775
+ input.addEventListener('input', debounce(function() {
776
+ updateImagePreview(fieldId, input.value);
777
+ updatePreview();
778
+ }, 300));
779
+ }
780
+ });
622
781
  })();
623
782
  </script>
624
783
  {% endif %}