Changes for page 学校ページ テンプレート
Last modified by Super Admin on 2026/04/05 18:59
From version
56.1
edited by Super Admin
on 2026/03/15 16:10
on 2026/03/15 16:10
Change comment:
There is no comment for this version
To version
60.1
edited by Super Admin
on 2026/03/17 15:14
on 2026/03/17 15:14
Change comment:
There is no comment for this version
Summary
Details
- Page properties
-
- Content
-
... ... @@ -665,6 +665,13 @@ 665 665 <div class="activity-thread-title"> 666 666 <h3 #if($actFeatured == '1')class="featured-title"#end>$!escapetool.xml($!actTitle) #if($actFeatured == '1')<svg class="ico ico-fixed-14 ico-star-offset" viewBox="0 0 24 24" fill="currentColor" stroke="none"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>#end</h3> 667 667 <span class="activity-meta">$!escapetool.xml($!actCommittee) | $!escapetool.xml($!actPeriod) #if($actFY != 'unknown')| $!escapetool.xml($actFY)年度#end</span> 668 + #set($actTagsStr = $!activity.getValue('tags')) 669 + #if($actTagsStr && $actTagsStr.trim() != '') 670 + #foreach($tagItem in $actTagsStr.split(',')) 671 + #set($tagTrimmed = $tagItem.trim()) 672 + #if($tagTrimmed != '')<span class="activity-tag-badge">$escapetool.xml($tagTrimmed)</span>#end 673 + #end 674 + #end 668 668 </div> 669 669 <div class="thread-meta-row"> 670 670 <span class="thread-post-count">${reportCount}件の報告 ・ ${commentCount}件のコメント</span> ... ... @@ -1003,6 +1003,25 @@ 1003 1003 window.history.replaceState({}, document.title, window.location.pathname); 1004 1004 } 1005 1005 } 1013 + // 長文投稿の折りたたみ初期化 1014 + document.querySelectorAll('.thread-post-body').forEach(function(body) { 1015 + // 先にtruncatedを仮適用してline-clampを有効にし、高さの差分で判定 1016 + var fullH = body.scrollHeight; 1017 + body.classList.add('truncated'); 1018 + var clampedH = body.clientHeight; 1019 + body.classList.remove('truncated'); 1020 + if (fullH > clampedH + 10) { 1021 + body.classList.add('truncated'); 1022 + var btn = document.createElement('button'); 1023 + btn.className = 'btn-read-more'; 1024 + btn.textContent = '広げて読む ▼'; 1025 + btn.addEventListener('click', function() { 1026 + var isExpanded = body.classList.toggle('expanded'); 1027 + btn.textContent = isExpanded ? '折りたたむ ▲' : '広げて読む ▼'; 1028 + }); 1029 + body.parentNode.insertBefore(btn, body.nextSibling); 1030 + } 1031 + }); 1006 1006 }); 1007 1007 1008 1008 // トースト通知表示