Difference between revisions of "Widget:Compass"

From LINKS Community Center
Jump to: navigation, search
Line 147: Line 147:
 
     <div id="cmp-container">
 
     <div id="cmp-container">
 
         <div class="theme">
 
         <div class="theme">
             <h2>Engaging Citizens <div class="plus icon"></div></h2>
+
             <h2>Engaging Citizens</h2>
 
             <div class="subtheme">
 
             <div class="subtheme">
                 <h3>Collecting and Analysing Information from SMCS <div class="plus icon"></div></h3>
+
                 <h3>Collecting and Analysing Information from SMCS</h3>
 
                 <div class="question" data-aspect="Social">
 
                 <div class="question" data-aspect="Social">
 
                     Whom do you want to include in your collection and analysis of information, and from whom do you
 
                     Whom do you want to include in your collection and analysis of information, and from whom do you
Line 233: Line 233:
 
     </div>
 
     </div>
 
     <script>
 
     <script>
 +
        document.querySelectorAll('.theme > h2, .subtheme > h3').forEach(el => {
 +
            const icon = document.createElement('div');
 +
            icon.classList.add('plus', 'icon');
 +
            el.appendChild(icon);
 +
        });
 +
 
         document.getElementById('cmp-container').addEventListener('click', event => {
 
         document.getElementById('cmp-container').addEventListener('click', event => {
 
             if (event.target.tagName === 'H2') {
 
             if (event.target.tagName === 'H2') {

Revision as of 11:39, 23 November 2022

Development version of the Compass.
Not ready for production!