|
|
@ -8,46 +8,56 @@
|
|
|
|
<script setup>
|
|
|
|
<script setup>
|
|
|
|
import { ref, reactive } from "vue";
|
|
|
|
import { ref, reactive } from "vue";
|
|
|
|
import FilterComponent from "@/Apps/ScientificPublications/FilterComponent.vue";
|
|
|
|
import FilterComponent from "@/Apps/ScientificPublications/FilterComponent.vue";
|
|
|
|
import ArticleComponent from "@/Apps/ScientificPublications/ArticleComponent.vue";
|
|
|
|
import ArticleComponent from "@/Apps/ScientificPublications/ResearchComponent.vue";
|
|
|
|
const input = ref("");
|
|
|
|
const input = ref("");
|
|
|
|
const statsOf = ref("");
|
|
|
|
const statsOf = ref("");
|
|
|
|
const statsBy = ref("");
|
|
|
|
const statsBy = ref("");
|
|
|
|
const isFilterOpened = ref(false);
|
|
|
|
const isFilterOpened = ref(false);
|
|
|
|
const isArticleOpened = ref(false);
|
|
|
|
const isResearchOpened = ref(false);
|
|
|
|
let chart;
|
|
|
|
let chart;
|
|
|
|
|
|
|
|
|
|
|
|
const openModal = () => {
|
|
|
|
const openFilter = () => {
|
|
|
|
isFilterOpened.value = true;
|
|
|
|
isFilterOpened.value = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const closeModal = () => {
|
|
|
|
const closeFilter = () => {
|
|
|
|
isFilterOpened.value = false;
|
|
|
|
isFilterOpened.value = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const submitFilters = ()=>{
|
|
|
|
const submitFilters = ()=>{
|
|
|
|
// call only with those filters the get
|
|
|
|
// call only with those filters the get
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const openArticle = (article) => {
|
|
|
|
const openResearch = (article) => {
|
|
|
|
isArticleOpened.value = true;
|
|
|
|
isResearchOpened.value = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const closeArticle = () => {
|
|
|
|
const closeResearch = () => {
|
|
|
|
isArticleOpened.value =false;
|
|
|
|
isResearchOpened.value =false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const downloadBibTex = (article) => {
|
|
|
|
const downloadBibTex = (research) => {
|
|
|
|
//todo
|
|
|
|
//todo
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const downloadArticle = (article) => {
|
|
|
|
const downloadArticle = (research) => {
|
|
|
|
//todo
|
|
|
|
//todo
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const articleList = [
|
|
|
|
const researchList = [
|
|
|
|
["The Great Potato War Lorem Ipsum aeaDq Terelumni ","Author",["Co-author1", "co-Authors2"],
|
|
|
|
["The Great Potato War Lorem Ipsum aeaDq Terelumni ","Author",["Co-author1", "co-Authors2"],
|
|
|
|
" Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas condimentum ex tempor leo pulvinar, vitae imperdiet leo pellentesque. Aenean aliquam, ante at tempus sagittis, lorem leo feugiat felis, eget vestibulum tortor est nec libero. Cras sit amet venenatis velit, at rhoncus est. Cras id sem placerat, cursus sem et, aliquam felis. Nullam mi nunc, laoreet eget rutrum ac, blandit nec lorem. Duis fermentum aliquet tortor ac tristique. Aenean ac sagittis nulla, at auctor dolor. Vivamus et neque sodales, vestibulum dolor et, posuere urna. Pellentesque ut elit metus. Cras velit lectus, luctus auctor interdum eu, aliquam nec est. Donec elementum nisl sit amet nibh aliquam ultricies. Nullam felis orci, suscipit eu tincidunt pretium, euismod vel sem. Duis eget vehicula neque, nec gravida leo. Cras pellentesque arcu quis justo lobortis, ut semper massa rhoncus. Quisque sagittis dignissim congue. Nullam tortor ligula, mattis vel cursus id, pretium non lacus.",
|
|
|
|
" Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas condimentum ex tempor leo pulvinar, vitae imperdiet leo pellentesque. Aenean aliquam, ante at tempus sagittis, lorem leo feugiat felis, eget vestibulum tortor est nec libero. Cras sit amet venenatis velit, at rhoncus est. Cras id sem placerat, cursus sem et, aliquam felis. Nullam mi nunc, laoreet eget rutrum ac, blandit nec lorem. Duis fermentum aliquet tortor ac tristique. Aenean ac sagittis nulla, at auctor dolor. Vivamus et neque sodales, vestibulum dolor et, posuere urna. Pellentesque ut elit metus. Cras velit lectus, luctus auctor interdum eu, aliquam nec est. Donec elementum nisl sit amet nibh aliquam ultricies. Nullam felis orci, suscipit eu tincidunt pretium, euismod vel sem. Duis eget vehicula neque, nec gravida leo. Cras pellentesque arcu quis justo lobortis, ut semper massa rhoncus. Quisque sagittis dignissim congue. Nullam tortor ligula, mattis vel cursus id, pretium non lacus.",
|
|
|
|
"language",
|
|
|
|
"language",
|
|
|
|
"access",
|
|
|
|
"access",
|
|
|
|
]
|
|
|
|
],
|
|
|
|
|
|
|
|
["The First Ever Paper","Author",["Co-author1", "co-Authors2"],
|
|
|
|
|
|
|
|
" Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas condimentum ex tempor leo pulvinar, vitae imperdiet leo pellentesque. Aenean aliquam, ante at tempus sagittis, lorem leo feugiat felis, eget vestibulum tortor est nec libero. Cras sit amet venenatis velit, at rhoncus est. Cras id sem placerat, cursus sem et, aliquam felis. Nullam mi nunc, laoreet eget rutrum ac, blandit nec lorem. Duis fermentum aliquet tortor ac tristique. Aenean ac sagittis nulla, at auctor dolor. Vivamus et neque sodales, vestibulum dolor et, posuere urna. Pellentesque ut elit metus. Cras velit lectus, luctus auctor interdum eu, aliquam nec est. Donec elementum nisl sit amet nibh aliquam ultricies. Nullam felis orci, suscipit eu tincidunt pretium, euismod vel sem. Duis eget vehicula neque, nec gravida leo. Cras pellentesque arcu quis justo lobortis, ut semper massa rhoncus. Quisque sagittis dignissim congue. Nullam tortor ligula, mattis vel cursus id, pretium non lacus.",
|
|
|
|
|
|
|
|
"language",
|
|
|
|
|
|
|
|
"access",
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
["the atomic disintegration of particular radioactive cells","Author",["Co-author1", "co-Authors2"],
|
|
|
|
|
|
|
|
" Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas condimentum ex tempor leo pulvinar, vitae imperdiet leo pellentesque. Aenean aliquam, ante at tempus sagittis, lorem leo feugiat felis, eget vestibulum tortor est nec libero. Cras sit amet venenatis velit, at rhoncus est. Cras id sem placerat, cursus sem et, aliquam felis. Nullam mi nunc, laoreet eget rutrum ac, blandit nec lorem. Duis fermentum aliquet tortor ac tristique. Aenean ac sagittis nulla, at auctor dolor. Vivamus et neque sodales, vestibulum dolor et, posuere urna. Pellentesque ut elit metus. Cras velit lectus, luctus auctor interdum eu, aliquam nec est. Donec elementum nisl sit amet nibh aliquam ultricies. Nullam felis orci, suscipit eu tincidunt pretium, euismod vel sem. Duis eget vehicula neque, nec gravida leo. Cras pellentesque arcu quis justo lobortis, ut semper massa rhoncus. Quisque sagittis dignissim congue. Nullam tortor ligula, mattis vel cursus id, pretium non lacus.",
|
|
|
|
|
|
|
|
"language",
|
|
|
|
|
|
|
|
"access",
|
|
|
|
|
|
|
|
],
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -59,16 +69,16 @@ const jsonMockViewsByYears= [
|
|
|
|
{label: "2011", y:1666},
|
|
|
|
{label: "2011", y:1666},
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
function searchInList(list, searchInput){
|
|
|
|
function searchInList(list, searchInput) {
|
|
|
|
let retList= []
|
|
|
|
let retList = []
|
|
|
|
if (searchInput === "")
|
|
|
|
if (searchInput === ""){
|
|
|
|
return [list[0].slice(0,2)]
|
|
|
|
list.forEach(r => retList.push(r.slice(0, 2)))
|
|
|
|
|
|
|
|
return retList
|
|
|
|
|
|
|
|
}
|
|
|
|
for (let i = 0; i < list.length; i++) {
|
|
|
|
for (let i = 0; i < list.length; i++) {
|
|
|
|
console.log(list[i])
|
|
|
|
|
|
|
|
if (lDistance(list[i][0], searchInput) < 10 || list[i][0].toUpperCase().indexOf(searchInput.toUpperCase()) > -1){
|
|
|
|
if (lDistance(list[i][0], searchInput) < 10 || list[i][0].toUpperCase().indexOf(searchInput.toUpperCase()) > -1){
|
|
|
|
retList.push(list[i].slice(0,2))
|
|
|
|
retList.push(list[i].slice(0,2))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
console.log(list[i][0].toUpperCase().indexOf(searchInput.toUpperCase()))
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return retList
|
|
|
|
return retList
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -128,9 +138,8 @@ function update(){
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div id="main">
|
|
|
|
<div id="main">
|
|
|
|
<FilterComponent :isOpen="isFilterOpened" @modal-close="closeModal" @submit="submitFilters">
|
|
|
|
<FilterComponent :isOpen="isFilterOpened" @modal-close="closeFilter" @submit="submitFilters"></FilterComponent>
|
|
|
|
</FilterComponent>
|
|
|
|
<ArticleComponent :isOpen="isResearchOpened" @modal-close="closeResearch"></ArticleComponent>
|
|
|
|
<ArticleComponent :isOpen="isArticleOpened" @modal-close="closeArticle"></ArticleComponent>
|
|
|
|
|
|
|
|
<div id="profilePicture">
|
|
|
|
<div id="profilePicture">
|
|
|
|
<img src="/Clyde.png" />
|
|
|
|
<img src="/Clyde.png" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -152,7 +161,7 @@ function update(){
|
|
|
|
<select @change="update()" id="stats-select" v-model="statsOf">
|
|
|
|
<select @change="update()" id="stats-select" v-model="statsOf">
|
|
|
|
<option value="views">Views</option>
|
|
|
|
<option value="views">Views</option>
|
|
|
|
<option value="co-authors">Co-authors</option>
|
|
|
|
<option value="co-authors">Co-authors</option>
|
|
|
|
<option value="articles">Articles</option>
|
|
|
|
<option value="researches">Researches</option>
|
|
|
|
<option value="language">Languages</option>
|
|
|
|
<option value="language">Languages</option>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -168,16 +177,16 @@ function update(){
|
|
|
|
<CanvasJSChart :options="options" id=chart @chart-ref="c => chart = c "/>
|
|
|
|
<CanvasJSChart :options="options" id=chart @chart-ref="c => chart = c "/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="articles">
|
|
|
|
<div id="researches">
|
|
|
|
<div id="search">
|
|
|
|
<div id="search">
|
|
|
|
<input type="text" id="search-input" placeholder="search articles" v-model="input"/>
|
|
|
|
<input type="text" id="search-input" placeholder="search for researches" v-model="input"/>
|
|
|
|
<button id="filterButton" @click="openModal"> Filters </button>
|
|
|
|
<button id="filterButton" @click="openFilter"> Filters </button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<ul id="articlesUL">
|
|
|
|
<ul id="researchUL">
|
|
|
|
<li id="articleLi" v-for="n in searchInList(articleList,input)">
|
|
|
|
<li id="researchLi" v-for="n in searchInList(researchList,input)">
|
|
|
|
<div class="vl"> {{n[0]}}</div>
|
|
|
|
<div class="vl"> {{n[0]}}</div>
|
|
|
|
<div class="vl"> {{n[1]}}</div>
|
|
|
|
<div class="vl"> {{n[1]}}</div>
|
|
|
|
<a @click="openArticle"> MoreInfo </a></li>
|
|
|
|
<a @click="openResearch"> MoreInfo </a></li>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -262,7 +271,7 @@ function update(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#articlesUL {
|
|
|
|
#researchUL {
|
|
|
|
list-style-type: none;
|
|
|
|
list-style-type: none;
|
|
|
|
color: white;
|
|
|
|
color: white;
|
|
|
|
padding: 12px;
|
|
|
|
padding: 12px;
|
|
|
@ -270,7 +279,7 @@ function update(){
|
|
|
|
height: 400px;
|
|
|
|
height: 400px;
|
|
|
|
overflow: scroll;
|
|
|
|
overflow: scroll;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#articleLi{
|
|
|
|
#researchLi{
|
|
|
|
display: grid;
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: auto auto auto;
|
|
|
|
grid-template-columns: auto auto auto;
|
|
|
|
border: 2px solid black;
|
|
|
|
border: 2px solid black;
|
|
|
|