students:value-calculator-chinese-quiz

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
students:value-calculator-chinese-quiz [2024/01/26 00:13] steve.wangstudents:value-calculator-chinese-quiz [2024/01/27 01:44] (current) steve.wang
Line 1: Line 1:
 ====== 人價值計算機 ====== ====== 人價值計算機 ======
- 
 <html> <html>
   <meta charset="UTF-8">   <meta charset="UTF-8">
Line 9: Line 8:
 /* Changed background color from black to grey, change font color to light grey, change font from default to this.*/ /* Changed background color from black to grey, change font color to light grey, change font from default to this.*/
 html, body { html, body {
 + color: white;
   width: 94%;   width: 94%;
   height: 90%;   height: 90%;
 /*  overflow: auto;*/ /*  overflow: auto;*/
   background-color: #262626;   background-color: #262626;
-  color: #e9e9e9;+  color: white;
  margin-left: 2%;  margin-left: 2%;
   transition: opacity 0.2s;   transition: opacity 0.2s;
Line 22: Line 22:
 #nextQButton { #nextQButton {
   background-color: green;   background-color: green;
-  color: #e9e9e9;+  color: white;
 } }
  
 #tBox{ #tBox{
     width: 99.5%;     width: 99.5%;
 +    height: 30%;
     font-size: 600%;     font-size: 600%;
-  color: #e9e9e9;+  color: white;
   background-color: #262626;   background-color: #262626;
     border-style:solid;     border-style:solid;
Line 48: Line 49:
     width: 18%;     width: 18%;
     padding:2px;     padding:2px;
-    color: #e9e9e9;+    color: white;
     font-size:300%;     font-size:300%;
     border-style:solid;     border-style:solid;
Line 207: Line 208:
   <div class="grid-item">1</div>   <div class="grid-item">1</div>
   <div class="grid-item">2</div>   <div class="grid-item">2</div>
-  <div class="grid-item">3</div>  +  <div class="grid-item">3</div>
   <div class="grid-item">4</div>   <div class="grid-item">4</div>
   <div class="grid-item">5</div>   <div class="grid-item">5</div>
-  <div class="grid-item">6</div>  +  <div class="grid-item">6</div>
   <div class="grid-item">7</div>   <div class="grid-item">7</div>
   <div class="grid-item">8</div>   <div class="grid-item">8</div>
-  <div class="grid-item">9</div>   +  <div class="grid-item">9</div> 
-  <div class="grid-item">    </div>   +  <div class="grid-item">    </div> 
-  <div id='deleteText'class="grid-item"><--</div>   +  <div id='deleteText'class="grid-item"><--</div> 
-  <div class="grid-item" id='nextQButton'>Finish </div>  +  <div class="grid-item" id='nextQButton'>Finish </div>
 </div> </div>
 <!-- Number pad from w3 schools : https://www.w3schools.com/css/tryit.asp?filename=trycss_grid --> <!-- Number pad from w3 schools : https://www.w3schools.com/css/tryit.asp?filename=trycss_grid -->
 <!-- https://www.w3schools.com/css/css_grid.asp --> <!-- https://www.w3schools.com/css/css_grid.asp -->
         <script>         <script>
-        // --------------------------------------------------------------------------+            // --------------------------------------------------------------------------
 // -- value-calculator.js // -- value-calculator.js
 // -------------------------------------------------------------------------- // --------------------------------------------------------------------------
-// Code made using Github Copilot and Google Bard +// Code made using Github Copilot and Google Bard
 // Translation helped by Google Translate // Translation helped by Google Translate
  
Line 232: Line 233:
 let referrerFrom = "https://renickbell.net/ed/2024worth/doku.php?id=students:value-calculator-chinese-3" let referrerFrom = "https://renickbell.net/ed/2024worth/doku.php?id=students:value-calculator-chinese-3"
 let referrerTo = "https://renickbell.net/ed/2024worth/doku.php?id=students:value-calculator-chinese" let referrerTo = "https://renickbell.net/ed/2024worth/doku.php?id=students:value-calculator-chinese"
- 
- 
 // let resultsPageLink = 'https://renickbell.net/middleschool/doku.php?id=students:steve-value-calculator-results-page' // let resultsPageLink = 'https://renickbell.net/middleschool/doku.php?id=students:steve-value-calculator-results-page'
 let resultsPageLink = 'https://renickbell.net/ed/2024worth/doku.php?id=students:value-calculator-results' let resultsPageLink = 'https://renickbell.net/ed/2024worth/doku.php?id=students:value-calculator-results'
Line 368: Line 367:
     return currentQ.join(' ')     return currentQ.join(' ')
 } }
-    +
 function changeInstructions(type){ function changeInstructions(type){
     if (language === 'English' && type === 'list'){     if (language === 'English' && type === 'list'){
Line 748: Line 747:
 // //Each answer is based on 0 to 5 except P is 0 - 5, // //Each answer is based on 0 to 5 except P is 0 - 5,
  
-//A function that creates a ruler like thing that shows the value of the person. +//A function that creates a ruler like thing that shows the value of the person.
 function showResults () { function showResults () {
     let results = document.getElementById('results')     let results = document.getElementById('results')
Line 1004: Line 1003:
 } }
 //Idea for using & character for passing information inspired by bardAI //Idea for using & character for passing information inspired by bardAI
- 
  
 function createLinkWithData (link){ function createLinkWithData (link){
     let outputLink = link     let outputLink = link
     answers.forEach(x => {     answers.forEach(x => {
-        outputLink += '&' + x.name + '&' + x.score+        outputLink += '&' + x.name.replace(/ /g, "-"+ '&' + x.score
     })     })
 //     return link + '&'  + answers[0].name + '&' + answers[0].score + '&' + answers[1].name + '&' + answers[1].score //     return link + '&'  + answers[0].name + '&' + answers[0].score + '&' + answers[1].name + '&' + answers[1].score
     return outputLink     return outputLink
 } }
 +
  
 function configureStylingForDokuWiki (){ function configureStylingForDokuWiki (){
Line 1031: Line 1030:
     }, 50)     }, 50)
 } }
- 
 function checkReferrer (){ function checkReferrer (){
     if (document.referrer !== referrerFrom){     if (document.referrer !== referrerFrom){
Line 1044: Line 1042:
     }     }
 } }
- 
  
 window.addEventListener('load', function() { window.addEventListener('load', function() {
     if (mode === 'doku'){     if (mode === 'doku'){
-        configureStylingForDokuWiki()+        let copy = document.getElementsByClassName('dw-content')[0] 
 +        let navbar = document.getElementsByClassName("navbar-brand d-flex align-items-center" )[0] 
 +        let newBody = document.createElement('body'
 +        newBody.appendChild(copy) 
 +        newBody.appendChild(navbar) 
 +        document.body.remove() 
 +        document.documentElement.appendChild(newBody) 
 +        copy.style.top = '20%' 
 +        document.documentElement.style.boxSizing = 'none' 
 +        document.body.style.marginTop = '0px' 
 +//         configureStylingForDokuWiki()
         checkReferrer()         checkReferrer()
     }     }
Line 1054: Line 1061:
    changeLanguage()    changeLanguage()
 }) })
-    value_calculator.style.color = 'white'+ 
 +    document.getElementById('人價值計算機').style.color = 'white'
 question.style.color = 'white' question.style.color = 'white'
 instructions.style.color = 'white' instructions.style.color = 'white'
- 
         </script>         </script>
 <br> <br>
Line 1064: Line 1071:
     </body>     </body>
 </html> </html>
- 
  
  • students/value-calculator-chinese-quiz.1706256824.txt.gz
  • Last modified: 2024/01/26 00:13
  • by steve.wang