Changes for page 生徒会Wiki
Last modified by Super Admin on 2026/04/01 16:27
From version
30.1
edited by Super Admin
on 2026/03/10 22:25
on 2026/03/10 22:25
Change comment:
There is no comment for this version
To version
6.1
edited by Super Admin
on 2026/03/06 09:08
on 2026/03/06 09:08
Change comment:
There is no comment for this version
Summary
Details
- Page properties
-
- Content
-
... ... @@ -1,64 +1,29 @@ 1 1 {{velocity}} 2 -## ユーザーごとに異なるコンテンツ(ゲストCTA等)があるためキャッシュ無効化 3 -#set($discard = $xcontext.put('rendering.cache.disabled', true)) 2 +## メンテナンスバナー 3 +{{include reference="SeitokaiCode.MaintenanceBannerInclude" /}} 4 + 4 4 {{html clean="false"}} 5 -## メンテナンスバナー(インラインで記述し、<p>タグ挿入を回避) 6 -#set($bannerDoc = $xwiki.getDocument('SeitokaiAdmin.MaintenanceBanner')) 7 -#set($bannerObj = $bannerDoc.getObject('SeitokaiCode.MaintenanceBannerClass')) 8 -#if($bannerObj && $bannerObj.getValue('enabled') == 1) 9 -#set($bannerMsg = $bannerObj.getValue('message')) 10 -#set($bannerLevel = $bannerObj.getValue('level')) 11 -#if(!$bannerLevel || $bannerLevel == '')#set($bannerLevel = 'warning')#end 12 -<div class="maintenance-banner active maintenance-${bannerLevel}" id="maintenance-banner"> 13 - <div class="maintenance-banner-inner"> 14 - <span class="maintenance-icon">#if($bannerLevel == 'urgent')<svg class="ico-banner" viewBox="0 0 24 24"><path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>#elseif($bannerLevel == 'info')<svg class="ico-banner" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>#else<svg class="ico-banner" viewBox="0 0 24 24"><path d="M14.7 6.3a1 1 0 000 1.4l1.6 1.6a1 1 0 001.4 0l3.77-3.77a6 6 0 01-7.94 7.94l-6.91 6.91a2.12 2.12 0 01-3-3l6.91-6.91a6 6 0 017.94-7.94l-3.76 3.76z"/></svg>#end</span> 15 - <span class="maintenance-text">$!escapetool.xml($bannerMsg)</span> 16 - <button class="maintenance-close" onclick="document.getElementById('maintenance-banner').style.display='none'">×</button> 17 - </div> 18 -</div> 19 -#end 20 20 <div class="home-hero"> 21 - <span class="home-hero-icon"><svg class="ico ico-hero" viewBox="0 0 24 24"><path d="M2 20h20"/><path d="M5 20V10l7-5 7 5v10"/><path d="M9 20v-5h6v5"/></svg></span>7 + <span class="home-hero-icon"><svg style="width:56px;height:56px;stroke-width:1.5;" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><path d="M2 20h20"/><path d="M5 20V10l7-5 7 5v10"/><path d="M9 20v-5h6v5"/></svg></span> 22 22 <h1>生徒会Wiki</h1> 23 23 <p>全国の学校の生徒会活動を共有するプラットフォーム</p> 24 24 </div> 25 25 26 -#if($xcontext.user == "XWiki.XWikiGuest") 27 -<div class="home-guest-cta"> 28 - <div class="home-guest-cta-inner"> 29 - <div class="home-guest-cta-content"> 30 - <h2 class="home-guest-cta-title">アカウントを作成して、全国の生徒会と情報を共有しましょう</h2> 31 - <p class="home-guest-cta-desc">ログインすると、自分の学校ページの作成・編集や活動報告の投稿ができるようになります。</p> 32 - </div> 33 - <div class="home-guest-cta-buttons"> 34 - <a href="$xwiki.getURL('XWiki.XWikiLogin', 'login', 'loginLink=1')" class="btn-guest-register"> 35 - <svg class="login-icon" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2"/><circle cx="8.5" cy="7" r="4"/><line x1="20" y1="11" x2="20" y2="17"/><line x1="17" y1="14" x2="23" y2="14"/></svg> 36 - アカウントを作成 37 - </a> 38 - <a href="$xwiki.getURL('XWiki.XWikiLogin', 'login')" class="btn-guest-login"> 39 - <svg class="login-icon" viewBox="0 0 24 24"><path d="M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"/><circle cx="12" cy="7" r="4"/></svg> 40 - ログイン 41 - </a> 42 - </div> 43 - </div> 44 -</div> 45 -#end 46 - 47 47 <div class="home-cards"> 48 48 <a href="$xwiki.getURL('Schools.WebHome', 'view')" class="home-card"> 49 - <div class="home-card-icon"><svg class="ico" viewBox="0 0 24 24"><path d="M4 19.5A2.5 2.5 0 016.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 014 19.5v-15A2.5 2.5 0 016.5 2z"/></svg></div> 14 + <div class="home-card-icon"><svg class="ico" style="width:1em;height:1em;vertical-align:-0.125em;" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19.5A2.5 2.5 0 016.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 014 19.5v-15A2.5 2.5 0 016.5 2z"/></svg></div> 50 50 <div class="home-card-title">学校ページを見る</div> 51 51 <div class="home-card-desc">登録されている学校の活動を閲覧</div> 52 52 </a> 53 53 54 54 <a href="$xwiki.getURL('SeitokaiCode.CreateSchool', 'view')" class="home-card"> 55 - <div class="home-card-icon"><svg class="ico" viewBox="0 0 24 24"><path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"/></svg></div> 20 + <div class="home-card-icon"><svg class="ico" style="width:1em;height:1em;vertical-align:-0.125em;" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"/></svg></div> 56 56 <div class="home-card-title">学校ページを作成</div> 57 57 <div class="home-card-desc">あなたの学校のページを新規作成</div> 58 58 </a> 59 59 60 60 <a href="$xwiki.getURL('SeitokaiCode.Guidelines', 'view')" class="home-card"> 61 - <div class="home-card-icon"><svg class="ico" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/></svg></div> 26 + <div class="home-card-icon"><svg class="ico" style="width:1em;height:1em;vertical-align:-0.125em;" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/></svg></div> 62 62 <div class="home-card-title">ガイドライン</div> 63 63 <div class="home-card-desc">編集ルール・利用規約を確認</div> 64 64 </a> ... ... @@ -65,7 +65,7 @@ 65 65 66 66 #if($xcontext.user != "XWiki.XWikiGuest") 67 67 <a href="$xwiki.getURL('SeitokaiCode.MyPage', 'view')" class="home-card"> 68 - <div class="home-card-icon"><svg class="ico" viewBox="0 0 24 24"><path d="M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"/><circle cx="12" cy="7" r="4"/></svg></div> 33 + <div class="home-card-icon"><svg class="ico" style="width:1em;height:1em;vertical-align:-0.125em;" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"/><circle cx="12" cy="7" r="4"/></svg></div> 69 69 <div class="home-card-title">マイページ</div> 70 70 <div class="home-card-desc">プロフィール・投稿履歴を確認</div> 71 71 </a> ... ... @@ -72,7 +72,7 @@ 72 72 #end 73 73 </div> 74 74 75 -<div class="home-recent-section">40 +<div style="margin-top:32px;"> 76 76 <h2 class="home-section-title">最近の更新</h2> 77 77 #set($recentDocs = $xwiki.searchDocuments("where (doc.fullName like 'Main.%' or doc.fullName like 'Schools.%') and doc.fullName not like '%.WebPreferences' order by doc.date desc", 10)) 78 78 #if($recentDocs.size() > 0) ... ... @@ -80,34 +80,23 @@ 80 80 #foreach($docName in $recentDocs) 81 81 #set($rdoc = $xwiki.getDocument($docName)) 82 82 <li class="recent-changes-item"> 83 - <span class="recent-changes-icon"></span> 84 - <span class="recent-changes-title"><a href="$rdoc.getURL('view')">$!escapetool.xml($rdoc.displayTitle)</a> が更新されました</span> 85 - <span class="recent-changes-meta" data-ts="$rdoc.date.time">$datetool.format('yyyy/MM/dd HH:mm', $rdoc.date)</span> 48 + <span class="recent-changes-icon"> 49 + <svg style="width:1em;height:1em;display:inline-block;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"/><polyline points="14 2 14 8 20 8"/></svg> 50 + </span> 51 + <div> 52 + <div class="recent-changes-title"><a href="$rdoc.getURL('view')">$escapetool.xml($rdoc.displayTitle)</a></div> 53 + <div class="recent-changes-meta">$xwiki.formatDate($rdoc.date, 'yyyy/MM/dd HH:mm')</div> 54 + </div> 86 86 </li> 87 87 #end 88 88 </ul> 89 89 #else 90 - <div class="home-empty-state">91 - <svg class="home-empty-icon" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>59 + <div style="text-align:center;padding:40px 20px;color:var(--text-light);"> 60 + <svg style="width:3em;height:3em;display:block;margin:0 auto 12px;opacity:0.4;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"/><polyline points="14 2 14 8 20 8"/></svg> 92 92 <p>まだ更新はありません。</p> 93 - <p class="home-empty-sub">学校ページを作成して、活動を共有しましょう!</p>62 + <p style="font-size:0.9em;">学校ページを作成して、活動を共有しましょう!</p> 94 94 </div> 95 95 #end 96 96 </div> 97 - 98 -<script> 99 -// タイムスタンプをユーザーのローカルタイムゾーンで表示 100 -document.querySelectorAll('[data-ts]').forEach(function(el) { 101 - var ts = parseInt(el.getAttribute('data-ts')); 102 - if (isNaN(ts)) return; 103 - var d = new Date(ts); 104 - var y = d.getFullYear(); 105 - var m = ('0' + (d.getMonth() + 1)).slice(-2); 106 - var day = ('0' + d.getDate()).slice(-2); 107 - var h = ('0' + d.getHours()).slice(-2); 108 - var min = ('0' + d.getMinutes()).slice(-2); 109 - el.textContent = y + '/' + m + '/' + day + ' ' + h + ':' + min; 110 -}); 111 -</script> 112 112 {{/html}} 113 113 {{/velocity}}