1
0
forked from PGL/Clyde

finished mock researcher profile

This commit is contained in:
Bartha Maxime 2024-04-02 19:52:38 +02:00
parent bd27ffd3cb
commit 91c7f42521

View File

@ -1,13 +1,18 @@
<script setup> <script setup>
import {ref } from 'vue';
const input = ref('')
function inputKeyUp() { function inputKeyUp() {
let input, filter, ul, li, a, i, txtValue; let filter,ul,li,a,txtValue
input = document.getElementById('search-input');
filter = input.value.toUpperCase(); filter = input.value.toUpperCase();
if(document.getElementById("myUL")!=null){
ul = document.getElementById("myUL"); ul = document.getElementById("myUL");
li = ul.getElementsByTagName('li'); li = ul.getElementsByTagName('li');
// Loop through all list items, and hide those who don't match the search query // Loop through all list items, and hide those who don't match the search query
for (i = 0; i < li.length; i++) { for (let i = 0; i < li.length; i++) {
a = li[i].getElementsByTagName("a")[0]; a = li[i].getElementsByTagName("a")[0];
txtValue = a.textContent || a.innerText; txtValue = a.textContent || a.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) { if (txtValue.toUpperCase().indexOf(filter) > -1) {
@ -17,10 +22,9 @@
} }
} }
} }
}
const mydata = { const mydata = {
data() {
return {
options: { options: {
theme: "light2", theme: "light2",
animationEnabled: true, animationEnabled: true,
@ -44,9 +48,7 @@
}, },
styleOptions: { styleOptions: {
width: "100%", width: "100%",
height: "360px" height: "360px",
}
}
} }
} }
@ -102,13 +104,13 @@
</select> </select>
</div> </div>
<div id="statsPie"> <div id="statsPie">
<!-- <CanvasJSChart :options="mydata" @chart-ref="chartRef"/> !--> <CanvasJSChart :options="mydata.options" @chart-ref="chartRef"/>
</div> </div>
</div> </div>
<div id="articles"> <div id="articles">
<input type="text" id="search-input" @onkeyup="inputKeyUp" placeholder="search articles"> <input type="text" id="search-input" :onkeyup="inputKeyUp()" placeholder="search articles" v-model="input">
<ul id="myUL"> <ul id="myUL">
<li><a href="#">Adele</a></li> <li><a href="#">Adele</a></li>
<li><a href="#">Agnes</a></li> <li><a href="#">Agnes</a></li>