Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:WikiCard: Difference between revisions

Template page
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 1: Line 1:
  <html><div class="grid-item wiki-card">
<html>
    <a href="/w/</html>{{{1}}}<html>">
<div class="grid-item wiki-card">
      </html>{{#if:{{{2|}}}|<html><img src="</html>{{#tag:nowiki|{{{2}}}}}<html>" alt="</html>{{{1}}}<html>"></html>|}}<html>
  <a href="/w/</html>{{{1}}}<html>">
      <div class="wiki-card-content"></html>{{{3|{{{1}}}}}}<html></div>
    </html>{{#if:{{{2|}}}|<html><img src="</html>{{#tag:nowiki|{{{2}}}}}<html>" alt="</html>{{{1}}}<html>"></html>|}}<html>
    </a>
    <div class="wiki-card-content"></html>{{{3|{{{1}}}}}}<html></div>
  </div>
  </a>
</div>


<style>
<style>
Line 13: Line 14:


<script>
<script>
document.querySelectorAll('.wiki-card-content').forEach(el => {
(function() {
   // Only process plain text nodes (avoid breaking existing HTML)
  const script = document.currentScript;
  const card = script.closest('.wiki-card');
  if (!card) return;
 
  const el = card.querySelector('.wiki-card-content');
  if (!el) return;
 
   // Only process plain text
   if (el.children.length === 0) {
   if (el.children.length === 0) {
     const text = el.textContent.trim();
     const text = el.textContent.trim();
Line 25: Line 33:
     }
     }
   }
   }
});
})();
</script></html>
</script>
</html>

Revision as of 07:43, 17 April 2026