merci, peux tu notifier les bases de données en cases à cocher afin de pouvoir en selectionner plusieurs, tu peux aussi ameliorer l'esthetique du site afin qu'il soit plus agreable à visualiser
Browse files- index.html +99 -44
- script.js +4 -4
- style.css +25 -8
index.html
CHANGED
|
@@ -12,17 +12,16 @@
|
|
| 12 |
<script src="components/navbar.js"></script>
|
| 13 |
<script src="components/footer.js"></script>
|
| 14 |
</head>
|
| 15 |
-
<body class="min-h-screen flex flex-col">
|
| 16 |
-
|
| 17 |
|
| 18 |
<main class="flex-grow container mx-auto px-4 py-8">
|
| 19 |
<div class="max-w-4xl mx-auto text-center mb-12">
|
| 20 |
<h1 class="text-4xl md:text-5xl font-bold text-gray-900 mb-4">Explore Scientific Constellations</h1>
|
| 21 |
<p class="text-xl text-gray-600">Discover the most influential medical research through our cosmic visualization</p>
|
| 22 |
</div>
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
<div class="flex flex-col md:flex-row gap-4 mb-6">
|
| 26 |
<div class="flex-grow relative">
|
| 27 |
<input type="text" id="searchQuery" placeholder="Search for medical research..."
|
| 28 |
class="w-full pl-12 pr-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500">
|
|
@@ -32,62 +31,118 @@
|
|
| 32 |
Search
|
| 33 |
</button>
|
| 34 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
<
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
<
|
| 56 |
-
</
|
| 57 |
-
</div>
|
| 58 |
-
</div>
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
</div>
|
| 64 |
-
|
| 65 |
<div id="resultsContainer" class="hidden">
|
| 66 |
-
<div class="flex justify-between items-center mb-
|
| 67 |
-
<h2 class="text-
|
| 68 |
-
<div id="resultCount" class="text-
|
| 69 |
</div>
|
| 70 |
|
| 71 |
-
<div class="bg-
|
| 72 |
-
|
| 73 |
<div id="tooltip" class="absolute hidden bg-white p-4 rounded-lg shadow-lg border border-gray-200 max-w-xs pointer-events-none"></div>
|
| 74 |
</div>
|
| 75 |
|
| 76 |
<div id="articleList" class="mt-8 grid gap-4"></div>
|
| 77 |
</div>
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
<
|
| 81 |
-
<
|
| 82 |
-
<
|
|
|
|
|
|
|
| 83 |
</div>
|
| 84 |
-
|
| 85 |
|
| 86 |
<custom-footer></custom-footer>
|
| 87 |
-
|
| 88 |
<script src="script.js"></script>
|
| 89 |
<script>
|
| 90 |
feather.replace();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
</script>
|
| 92 |
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 93 |
</body>
|
|
|
|
| 12 |
<script src="components/navbar.js"></script>
|
| 13 |
<script src="components/footer.js"></script>
|
| 14 |
</head>
|
| 15 |
+
<body class="min-h-screen flex flex-col bg-gradient-to-b from-white to-gray-50">
|
| 16 |
+
<custom-navbar></custom-navbar>
|
| 17 |
|
| 18 |
<main class="flex-grow container mx-auto px-4 py-8">
|
| 19 |
<div class="max-w-4xl mx-auto text-center mb-12">
|
| 20 |
<h1 class="text-4xl md:text-5xl font-bold text-gray-900 mb-4">Explore Scientific Constellations</h1>
|
| 21 |
<p class="text-xl text-gray-600">Discover the most influential medical research through our cosmic visualization</p>
|
| 22 |
</div>
|
| 23 |
+
<div class="bg-white rounded-xl shadow-lg p-8 mb-12">
|
| 24 |
+
<div class="flex flex-col md:flex-row gap-4 mb-6">
|
|
|
|
| 25 |
<div class="flex-grow relative">
|
| 26 |
<input type="text" id="searchQuery" placeholder="Search for medical research..."
|
| 27 |
class="w-full pl-12 pr-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500">
|
|
|
|
| 31 |
Search
|
| 32 |
</button>
|
| 33 |
</div>
|
| 34 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
|
| 35 |
+
<div class="bg-gray-50 p-4 rounded-xl">
|
| 36 |
+
<h3 class="text-sm font-medium text-gray-700 mb-3">Databases</h3>
|
| 37 |
+
<div class="space-y-2">
|
| 38 |
+
<label class="flex items-center space-x-2 cursor-pointer">
|
| 39 |
+
<input type="checkbox" name="database" value="pubmed" checked class="rounded border-gray-300 text-purple-600 focus:ring-purple-500">
|
| 40 |
+
<span class="text-gray-700">PubMed</span>
|
| 41 |
+
</label>
|
| 42 |
+
<label class="flex items-center space-x-2 cursor-pointer">
|
| 43 |
+
<input type="checkbox" name="database" value="medline" class="rounded border-gray-300 text-purple-600 focus:ring-purple-500">
|
| 44 |
+
<span class="text-gray-700">MEDLINE</span>
|
| 45 |
+
</label>
|
| 46 |
+
<label class="flex items-center space-x-2 cursor-pointer">
|
| 47 |
+
<input type="checkbox" name="database" value="scholar" class="rounded border-gray-300 text-purple-600 focus:ring-purple-500">
|
| 48 |
+
<span class="text-gray-700">Google Scholar</span>
|
| 49 |
+
</label>
|
| 50 |
+
<label class="flex items-center space-x-2 cursor-pointer">
|
| 51 |
+
<input type="checkbox" name="database" value="scopus" class="rounded border-gray-300 text-purple-600 focus:ring-purple-500">
|
| 52 |
+
<span class="text-gray-700">Scopus</span>
|
| 53 |
+
</label>
|
| 54 |
+
<label class="flex items-center space-x-2 cursor-pointer">
|
| 55 |
+
<input type="checkbox" name="database" value="cochrane" class="rounded border-gray-300 text-purple-600 focus:ring-purple-500">
|
| 56 |
+
<span class="text-gray-700">Cochrane Library</span>
|
| 57 |
+
</label>
|
| 58 |
+
</div>
|
| 59 |
+
</div>
|
| 60 |
|
| 61 |
+
<div class="bg-gray-50 p-4 rounded-xl">
|
| 62 |
+
<h3 class="text-sm font-medium text-gray-700 mb-3">Time Range</h3>
|
| 63 |
+
<div class="space-y-2">
|
| 64 |
+
<label class="flex items-center space-x-2 cursor-pointer">
|
| 65 |
+
<input type="radio" name="timeRange" value="all" checked class="rounded-full border-gray-300 text-purple-600 focus:ring-purple-500">
|
| 66 |
+
<span class="text-gray-700">All Time</span>
|
| 67 |
+
</label>
|
| 68 |
+
<label class="flex items-center space-x-2 cursor-pointer">
|
| 69 |
+
<input type="radio" name="timeRange" value="10" class="rounded-full border-gray-300 text-purple-600 focus:ring-purple-500">
|
| 70 |
+
<span class="text-gray-700">Last 10 Years</span>
|
| 71 |
+
</label>
|
| 72 |
+
<label class="flex items-center space-x-2 cursor-pointer">
|
| 73 |
+
<input type="radio" name="timeRange" value="5" class="rounded-full border-gray-300 text-purple-600 focus:ring-purple-500">
|
| 74 |
+
<span class="text-gray-700">Last 5 Years</span>
|
| 75 |
+
</label>
|
| 76 |
+
<label class="flex items-center space-x-2 cursor-pointer">
|
| 77 |
+
<input type="radio" name="timeRange" value="2" class="rounded-full border-gray-300 text-purple-600 focus:ring-purple-500">
|
| 78 |
+
<span class="text-gray-700">Last 2 Years</span>
|
| 79 |
+
</label>
|
| 80 |
+
</div>
|
| 81 |
+
</div>
|
|
|
|
|
|
|
| 82 |
|
| 83 |
+
<div class="bg-gray-50 p-4 rounded-xl">
|
| 84 |
+
<h3 class="text-sm font-medium text-gray-700 mb-3">Sort By</h3>
|
| 85 |
+
<div class="space-y-2">
|
| 86 |
+
<label class="flex items-center space-x-2 cursor-pointer">
|
| 87 |
+
<input type="radio" name="sortBy" value="relevance" checked class="rounded-full border-gray-300 text-purple-600 focus:ring-purple-500">
|
| 88 |
+
<span class="text-gray-700">Relevance</span>
|
| 89 |
+
</label>
|
| 90 |
+
<label class="flex items-center space-x-2 cursor-pointer">
|
| 91 |
+
<input type="radio" name="sortBy" value="citations" class="rounded-full border-gray-300 text-purple-600 focus:ring-purple-500">
|
| 92 |
+
<span class="text-gray-700">Citations</span>
|
| 93 |
+
</label>
|
| 94 |
+
<label class="flex items-center space-x-2 cursor-pointer">
|
| 95 |
+
<input type="radio" name="sortBy" value="date" class="rounded-full border-gray-300 text-purple-600 focus:ring-purple-500">
|
| 96 |
+
<span class="text-gray-700">Date</span>
|
| 97 |
+
</label>
|
| 98 |
+
</div>
|
| 99 |
+
</div>
|
| 100 |
+
</div>
|
| 101 |
+
</div>
|
| 102 |
+
<div id="loadingSpinner" class="hidden text-center py-16">
|
| 103 |
+
<div class="animate-spin rounded-full h-16 w-16 border-t-4 border-b-4 border-purple-500 mx-auto mb-6"></div>
|
| 104 |
+
<p class="text-gray-600 text-lg font-medium">Discovering research constellations...</p>
|
| 105 |
</div>
|
|
|
|
| 106 |
<div id="resultsContainer" class="hidden">
|
| 107 |
+
<div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-8 gap-4">
|
| 108 |
+
<h2 class="text-3xl font-bold text-gray-900">Research Constellation</h2>
|
| 109 |
+
<div id="resultCount" class="text-lg text-purple-600 font-medium"></div>
|
| 110 |
</div>
|
| 111 |
|
| 112 |
+
<div class="bg-gradient-to-br from-purple-50 to-blue-50 rounded-xl shadow-lg p-6 h-[600px] relative overflow-hidden border border-gray-100">
|
| 113 |
+
<svg id="constellation" class="w-full h-full"></svg>
|
| 114 |
<div id="tooltip" class="absolute hidden bg-white p-4 rounded-lg shadow-lg border border-gray-200 max-w-xs pointer-events-none"></div>
|
| 115 |
</div>
|
| 116 |
|
| 117 |
<div id="articleList" class="mt-8 grid gap-4"></div>
|
| 118 |
</div>
|
| 119 |
+
<div id="noResults" class="hidden text-center py-16">
|
| 120 |
+
<i data-feather="alert-circle" class="mx-auto text-gray-400 w-16 h-16 mb-6"></i>
|
| 121 |
+
<h3 class="text-2xl font-bold text-gray-900 mb-3">No results found</h3>
|
| 122 |
+
<p class="text-gray-600 text-lg">Try different search terms or filters</p>
|
| 123 |
+
<button class="mt-6 px-6 py-3 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition-colors font-medium">
|
| 124 |
+
Try Again
|
| 125 |
+
</button>
|
| 126 |
</div>
|
| 127 |
+
</main>
|
| 128 |
|
| 129 |
<custom-footer></custom-footer>
|
|
|
|
| 130 |
<script src="script.js"></script>
|
| 131 |
<script>
|
| 132 |
feather.replace();
|
| 133 |
+
|
| 134 |
+
// Update database selection logic
|
| 135 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 136 |
+
const searchButton = document.getElementById('searchButton');
|
| 137 |
+
|
| 138 |
+
searchButton.addEventListener('click', function() {
|
| 139 |
+
const selectedDatabases = Array.from(document.querySelectorAll('input[name="database"]:checked'))
|
| 140 |
+
.map(el => el.value);
|
| 141 |
+
|
| 142 |
+
console.log('Selected databases:', selectedDatabases);
|
| 143 |
+
// Update your search logic to use selectedDatabases instead of single select
|
| 144 |
+
});
|
| 145 |
+
});
|
| 146 |
</script>
|
| 147 |
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 148 |
</body>
|
script.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
document.addEventListener('DOMContentLoaded', function() {
|
| 2 |
const searchButton = document.getElementById('searchButton');
|
| 3 |
const searchQuery = document.getElementById('searchQuery');
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
const resultsContainer = document.getElementById('resultsContainer');
|
| 9 |
const noResults = document.getElementById('noResults');
|
| 10 |
const resultCount = document.getElementById('resultCount');
|
|
|
|
| 1 |
document.addEventListener('DOMContentLoaded', function() {
|
| 2 |
const searchButton = document.getElementById('searchButton');
|
| 3 |
const searchQuery = document.getElementById('searchQuery');
|
| 4 |
+
const databaseCheckboxes = document.querySelectorAll('input[name="database"]');
|
| 5 |
+
const timeRange = document.querySelector('input[name="timeRange"]:checked').value;
|
| 6 |
+
const sortBy = document.querySelector('input[name="sortBy"]:checked').value;
|
| 7 |
+
const loadingSpinner = document.getElementById('loadingSpinner');
|
| 8 |
const resultsContainer = document.getElementById('resultsContainer');
|
| 9 |
const noResults = document.getElementById('noResults');
|
| 10 |
const resultCount = document.getElementById('resultCount');
|
style.css
CHANGED
|
@@ -5,30 +5,47 @@
|
|
| 5 |
}
|
| 6 |
|
| 7 |
.node:hover {
|
| 8 |
-
transform: scale(1.
|
|
|
|
| 9 |
}
|
| 10 |
|
| 11 |
.link {
|
| 12 |
-
stroke: #
|
| 13 |
-
stroke-opacity: 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
}
|
| 15 |
|
| 16 |
.central-node {
|
| 17 |
stroke: #7c3aed;
|
| 18 |
-
stroke-width:
|
| 19 |
-
filter: drop-shadow(0 0
|
|
|
|
| 20 |
}
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
/* Article card styles */
|
| 23 |
.article-card {
|
| 24 |
-
transition:
|
|
|
|
| 25 |
}
|
| 26 |
|
| 27 |
.article-card:hover {
|
| 28 |
-
transform: translateY(-
|
| 29 |
-
box-shadow: 0
|
|
|
|
| 30 |
}
|
| 31 |
|
|
|
|
|
|
|
|
|
|
| 32 |
/* Responsive adjustments */
|
| 33 |
@media (max-width: 640px) {
|
| 34 |
#constellation {
|
|
|
|
| 5 |
}
|
| 6 |
|
| 7 |
.node:hover {
|
| 8 |
+
transform: scale(1.15);
|
| 9 |
+
filter: drop-shadow(0 0 12px rgba(124, 58, 237, 0.3));
|
| 10 |
}
|
| 11 |
|
| 12 |
.link {
|
| 13 |
+
stroke: #d1d5db;
|
| 14 |
+
stroke-opacity: 0.8;
|
| 15 |
+
transition: stroke-opacity 0.3s ease;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
.link:hover {
|
| 19 |
+
stroke-opacity: 1;
|
| 20 |
}
|
| 21 |
|
| 22 |
.central-node {
|
| 23 |
stroke: #7c3aed;
|
| 24 |
+
stroke-width: 3px;
|
| 25 |
+
filter: drop-shadow(0 0 12px rgba(124, 58, 237, 0.6));
|
| 26 |
+
animation: pulse 2s infinite;
|
| 27 |
}
|
| 28 |
|
| 29 |
+
@keyframes pulse {
|
| 30 |
+
0% { transform: scale(1); }
|
| 31 |
+
50% { transform: scale(1.05); }
|
| 32 |
+
100% { transform: scale(1); }
|
| 33 |
+
}
|
| 34 |
/* Article card styles */
|
| 35 |
.article-card {
|
| 36 |
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
| 37 |
+
border: 1px solid rgba(224, 231, 255, 0.5);
|
| 38 |
}
|
| 39 |
|
| 40 |
.article-card:hover {
|
| 41 |
+
transform: translateY(-6px);
|
| 42 |
+
box-shadow: 0 20px 25px -5px rgba(124, 58, 237, 0.1), 0 10px 10px -5px rgba(124, 58, 237, 0.04);
|
| 43 |
+
border-color: rgba(124, 58, 237, 0.3);
|
| 44 |
}
|
| 45 |
|
| 46 |
+
.article-card:first-child {
|
| 47 |
+
background: linear-gradient(to right, rgba(124, 58, 237, 0.05), transparent);
|
| 48 |
+
}
|
| 49 |
/* Responsive adjustments */
|
| 50 |
@media (max-width: 640px) {
|
| 51 |
#constellation {
|