master #173
@ -1,134 +1,140 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
|
import { ref } from "vue";
|
||||||
import {ref } from 'vue';
|
import {w} from "../../dist/assets/_plugin-vue_export-helper-Bvj9NrzX.js";
|
||||||
const input = ref('')
|
const input = ref("");
|
||||||
|
const statsOf = ref("");
|
||||||
|
const statsBy = ref("");
|
||||||
|
|
||||||
|
|
||||||
function inputKeyUp() {
|
function inputKeyUp() {
|
||||||
let filter,ul,li,a,txtValue
|
let filter, ul, li, a, txtValue;
|
||||||
filter = input.value.toUpperCase();
|
filter = input.value.toUpperCase();
|
||||||
if(document.getElementById("myUL")!=null){
|
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 (let 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) {
|
||||||
li[i].style.display = "";
|
li[i].style.display = "";
|
||||||
} else {
|
} else {
|
||||||
li[i].style.display = "none";
|
li[i].style.display = "none";
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const mydata = {
|
|
||||||
options: {
|
|
||||||
theme: "light2",
|
|
||||||
animationEnabled: true,
|
|
||||||
title:{
|
|
||||||
text: "Visitors By Channel"
|
|
||||||
},
|
|
||||||
data: [{
|
|
||||||
type: "pie",
|
|
||||||
indexLabel: "{label} (#percent%)",
|
|
||||||
yValueFormatString: "#,##0",
|
|
||||||
toolTipContent: "<span style='\"'color: {color};'\"'>{label}</span> {y}(#percent%)",
|
|
||||||
dataPoints: [
|
|
||||||
{ label: "Organic Traffic", y: 130631 },
|
|
||||||
{ label: "Direct", y: 28874 },
|
|
||||||
{ label: "Referral", y: 15467 },
|
|
||||||
{ label: "Social", y: 10543 },
|
|
||||||
{ label: "Email", y: 5613 },
|
|
||||||
{ label: "Others", y: 8492 }
|
|
||||||
]
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
styleOptions: {
|
|
||||||
width: "100%",
|
|
||||||
height: "360px",
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const mydata = {
|
||||||
|
chart:null,
|
||||||
|
options: {
|
||||||
|
backgroundColor:null,
|
||||||
|
theme: "light2",
|
||||||
|
animationEnabled: true,
|
||||||
|
title: {
|
||||||
|
fontColor: "white",
|
||||||
|
text: statsOf.value + " By "+ statsBy.value,
|
||||||
|
},
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
type: "pie",
|
||||||
|
indexLabel: "{label} (#percent%)",
|
||||||
|
yValueFormatString: "#,##0",
|
||||||
|
indexLabelFontColor: "white",
|
||||||
|
toolTipContent:
|
||||||
|
"<span style='\"'color: {color};'\"'>{label}</span> {y}(#percent%)",
|
||||||
|
dataPoints: [
|
||||||
|
{ label: "Organic Traffic", y: 130631 },
|
||||||
|
{ label: "Direct", y: 28874 },
|
||||||
|
{ label: "Referral", y: 15467 },
|
||||||
|
{ label: "Social", y: 10543 },
|
||||||
|
{ label: "Email", y: 5613 },
|
||||||
|
{ label: "Others", y: 8492 },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
styleOptions: {
|
||||||
|
width: "100%",
|
||||||
|
height: "100%",
|
||||||
|
},
|
||||||
|
methods : {
|
||||||
|
chartInstance(chart){
|
||||||
|
console.log(chart)
|
||||||
|
this.chart = chart;
|
||||||
|
},
|
||||||
|
update(){
|
||||||
|
this.chart.render();
|
||||||
|
setTimeout(this.update, 1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<div id="profilePicture">
|
<div id="profilePicture">
|
||||||
<img src="/Clyde.png">
|
<img src="/Clyde.png" />
|
||||||
</div>
|
|
||||||
<div id="researcherInfos">
|
|
||||||
<div class="surrounded" >
|
|
||||||
John Doe
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="surrounded" >
|
<div id="researcherInfos">
|
||||||
Orcid :
|
<div class="surrounded">John Doe</div>
|
||||||
12144-2144-12336-B
|
<div class="surrounded">Orcid : 12144-2144-12336-B</div>
|
||||||
|
<div class="surrounded">Email : John.Doe@umons.ac.be</div>
|
||||||
|
|
||||||
|
<div class="surrounded">
|
||||||
|
site :
|
||||||
|
<a href="http://localhost:5173" style="color: #007aff">here</a>
|
||||||
|
</div>
|
||||||
|
<div class="surrounded">Domain : physics, IT</div>
|
||||||
|
<div id="coAuthorList" class="surrounded">Co-authors list : D</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="surrounded" >
|
<div id="stats">
|
||||||
Email : John.Doe@umons.ac.be
|
<div class="surrounded">
|
||||||
|
Stat type :
|
||||||
</div>
|
<select @change="mydata.methods.update()" name="stats" id="stats-select" v-model="statsOf">
|
||||||
|
<option value="views">Views</option>
|
||||||
<div class="surrounded" >
|
<option value="co-authors">Co-authors</option>
|
||||||
site :
|
<option value="articles">Articles</option>
|
||||||
<a href="http://localhost:5173" style="color: #007aff">here</a>
|
<option value="language">Languages</option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="surrounded" >
|
<div class="surrounded">
|
||||||
Domain : physics, IT
|
Class by:
|
||||||
</div>
|
<select @change="mydata.methods.update()" name="classedBy" id="classed-select" v-model="statsBy">
|
||||||
<div id="coAuthorList" class="surrounded">
|
<option selected="selected" value="years">Years</option>
|
||||||
Co-authors list : D
|
<option value="months">Months</option>
|
||||||
</div>
|
<option value="topics">Topics</option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div id="stats">
|
<div id="statsPie">
|
||||||
<div class="surrounded">
|
<CanvasJSChart :options="mydata.options" :style="mydata.styleOptions" @chart-ref="mydata.methods.chartInstance(this)"/>
|
||||||
Stat type : <select name="stats" id="stats-select">
|
</div>
|
||||||
<option value="views">Views</option>
|
</div>
|
||||||
<option value="co-authors">Co-authors</option>
|
<div id="articles">
|
||||||
<option value="articles">Articles</option>
|
<input
|
||||||
<option value="language">Languages</option>
|
type="text"
|
||||||
</select>
|
id="search-input"
|
||||||
</div>
|
:onkeyup="inputKeyUp()"
|
||||||
<div class="surrounded">
|
placeholder="search articles"
|
||||||
Class by: <select name="classedBy" id="classed-select">
|
v-model="input"
|
||||||
<option value="years">Years</option>
|
/>
|
||||||
<option value="months">Months</option>
|
<ul id="myUL">
|
||||||
<option value="topics">Topics</option>
|
<li><a href="#">Adele</a></li>
|
||||||
</select>
|
<li><a href="#">Agnes</a></li>
|
||||||
</div>
|
|
||||||
<div id="statsPie">
|
|
||||||
<CanvasJSChart :options="mydata.options" @chart-ref="chartRef"/>
|
|
||||||
|
|
||||||
|
<li><a href="#">Billy</a></li>
|
||||||
|
<li><a href="#">Bob</a></li>
|
||||||
|
|
||||||
|
<li><a href="#">Calvin</a></li>
|
||||||
|
<li><a href="#">Christina</a></li>
|
||||||
|
<li><a href="#">Cindy</a></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="articles">
|
|
||||||
<input type="text" id="search-input" :onkeyup="inputKeyUp()" placeholder="search articles" v-model="input">
|
|
||||||
<ul id="myUL">
|
|
||||||
<li><a href="#">Adele</a></li>
|
|
||||||
<li><a href="#">Agnes</a></li>
|
|
||||||
|
|
||||||
<li><a href="#">Billy</a></li>
|
|
||||||
<li><a href="#">Bob</a></li>
|
|
||||||
|
|
||||||
<li><a href="#">Calvin</a></li>
|
|
||||||
<li><a href="#">Christina</a></li>
|
|
||||||
<li><a href="#">Cindy</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
#main {
|
#main {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 22% auto;
|
grid-template-columns: 22% auto;
|
||||||
@ -137,31 +143,33 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#profilePicture {
|
#profilePicture {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
#profilePicture img{
|
|
||||||
|
#profilePicture img {
|
||||||
align-self: center;
|
align-self: center;
|
||||||
justify-self: center;
|
justify-self: center;
|
||||||
width:60%;
|
width: 60%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#researcherInfos {
|
#researcherInfos {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: auto auto auto;
|
grid-template-columns: auto auto auto;
|
||||||
column-gap: 5px;
|
column-gap: 5px;
|
||||||
grid-template-rows: auto auto ;
|
grid-template-rows: auto auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.surrounded {
|
.surrounded {
|
||||||
border:2px solid black;
|
border: 2px solid black;
|
||||||
color:white;
|
color: white;
|
||||||
font-size: x-large;
|
font-size: x-large;
|
||||||
align-self: center;
|
align-self: center;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: rgba(255, 255, 255, 0.09);
|
background-color: rgba(255, 255, 255, 0.09);
|
||||||
border-radius:20px;margin-bottom:10px;
|
border-radius: 20px;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.surrounded select {
|
.surrounded select {
|
||||||
@ -169,46 +177,54 @@
|
|||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
color: white;
|
color: white;
|
||||||
background-color: rgb(255,255,255,0.1);
|
background-color: rgb(255, 255, 255, 0.1);
|
||||||
font-size: large;
|
font-size: large;
|
||||||
align-self: center;
|
align-self: center;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#stats {
|
#statsPie {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#articles {
|
#articles {
|
||||||
background-color: orange;
|
background-color: orange;
|
||||||
}
|
}
|
||||||
#search-input{
|
|
||||||
|
#search-input {
|
||||||
width: 60%;
|
width: 60%;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
padding: 12px 20px 12px 40px;
|
padding: 12px 20px 12px 40px;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
#myUL{
|
|
||||||
|
#myUL {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#myUL li a {
|
#myUL li a {
|
||||||
border: 1px solid #ddd; /* Add a border to all links */
|
border: 1px solid #ddd;
|
||||||
margin-top: -1px; /* Prevent double borders */
|
/* Add a border to all links */
|
||||||
background-color: #f6f6f6; /* Grey background color */
|
margin-top: -1px;
|
||||||
padding: 12px; /* Add some padding */
|
/* Prevent double borders */
|
||||||
text-decoration: none; /* Remove default text underline */
|
background-color: #f6f6f6;
|
||||||
font-size: 18px; /* Increase the font-size */
|
/* Grey background color */
|
||||||
color: black; /* Add a black text color */
|
padding: 12px;
|
||||||
display: block; /* Make it into a block element to fill the whole list */
|
/* Add some padding */
|
||||||
|
text-decoration: none;
|
||||||
|
/* Remove default text underline */
|
||||||
|
font-size: 18px;
|
||||||
|
/* Increase the font-size */
|
||||||
|
color: black;
|
||||||
|
/* Add a black text color */
|
||||||
|
display: block;
|
||||||
|
/* Make it into a block element to fill the whole list */
|
||||||
}
|
}
|
||||||
|
|
||||||
#myUL li a:hover:not(.header) {
|
#myUL li a:hover:not(.header) {
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user