Spaces:
Running
Running
allknowingroger
commited on
Commit
•
5920e02
1
Parent(s):
16ea91e
Upload 6 files
Browse files- 2TaL4VgstxyOxR1Dn.html +119 -0
- FcBU2vAfa394xHFEE.html +35 -0
- dFk2QRhlphzanAvzP.html +133 -0
- siUi6EynghidyZU6N.html +284 -0
- u6Q8itx84CMpzgUin.html +414 -0
- xFNbOlWvWPkCQwLpa.html +126 -0
2TaL4VgstxyOxR1Dn.html
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<html><head><base href="https://websim.ai"/><title>Drunk Image Search - Blurry Vision Edition</title><style>
|
2 |
+
body {
|
3 |
+
font-family: Arial, sans-serif;
|
4 |
+
background-color: #f0f0f0;
|
5 |
+
margin: 0;
|
6 |
+
padding: 20px;
|
7 |
+
overflow-x: hidden;
|
8 |
+
}
|
9 |
+
.container {
|
10 |
+
max-width: 800px;
|
11 |
+
margin: 0 auto;
|
12 |
+
background-color: #fff;
|
13 |
+
padding: 20px;
|
14 |
+
border-radius: 10px;
|
15 |
+
box-shadow: 0 0 10px rgba(0,0,0,0.1);
|
16 |
+
}
|
17 |
+
h1 {
|
18 |
+
color: #333;
|
19 |
+
text-align: center;
|
20 |
+
animation: wobble 2s infinite;
|
21 |
+
}
|
22 |
+
.search-bar {
|
23 |
+
display: flex;
|
24 |
+
justify-content: center;
|
25 |
+
margin-bottom: 20px;
|
26 |
+
}
|
27 |
+
#search-input {
|
28 |
+
width: 70%;
|
29 |
+
padding: 10px;
|
30 |
+
font-size: 16px;
|
31 |
+
border: 2px solid #ddd;
|
32 |
+
border-radius: 5px 0 0 5px;
|
33 |
+
}
|
34 |
+
#search-button {
|
35 |
+
padding: 10px 20px;
|
36 |
+
font-size: 16px;
|
37 |
+
background-color: #4CAF50;
|
38 |
+
color: white;
|
39 |
+
border: none;
|
40 |
+
border-radius: 0 5px 5px 0;
|
41 |
+
cursor: pointer;
|
42 |
+
}
|
43 |
+
.results {
|
44 |
+
display: flex;
|
45 |
+
flex-wrap: wrap;
|
46 |
+
justify-content: space-around;
|
47 |
+
}
|
48 |
+
.image-container {
|
49 |
+
width: 200px;
|
50 |
+
margin: 10px;
|
51 |
+
text-align: center;
|
52 |
+
}
|
53 |
+
.image-container img {
|
54 |
+
width: 100%;
|
55 |
+
height: auto;
|
56 |
+
border-radius: 5px;
|
57 |
+
transition: transform 0.3s ease;
|
58 |
+
}
|
59 |
+
.image-container img:hover {
|
60 |
+
transform: scale(1.1);
|
61 |
+
}
|
62 |
+
@keyframes wobble {
|
63 |
+
0% { transform: translateX(0); }
|
64 |
+
25% { transform: translateX(-5px) rotate(-5deg); }
|
65 |
+
50% { transform: translateX(5px) rotate(5deg); }
|
66 |
+
75% { transform: translateX(-5px) rotate(-5deg); }
|
67 |
+
100% { transform: translateX(0); }
|
68 |
+
}
|
69 |
+
.blurry {
|
70 |
+
filter: blur(3px);
|
71 |
+
}
|
72 |
+
</style></head><body>
|
73 |
+
<div class="container">
|
74 |
+
<h1>Drunk Image Search</h1>
|
75 |
+
<div class="search-bar">
|
76 |
+
<input type="text" id="search-input" placeholder="What are you looking for?">
|
77 |
+
<button id="search-button">Search</button>
|
78 |
+
</div>
|
79 |
+
<div class="results">
|
80 |
+
<div class="image-container">
|
81 |
+
<img src="https://source.unsplash.com/random/200x200?beer" alt="Random beer image" class="blurry">
|
82 |
+
</div>
|
83 |
+
<div class="image-container">
|
84 |
+
<img src="https://source.unsplash.com/random/200x200?wine" alt="Random wine image" class="blurry">
|
85 |
+
</div>
|
86 |
+
<div class="image-container">
|
87 |
+
<img src="https://source.unsplash.com/random/200x200?cocktail" alt="Random cocktail image" class="blurry">
|
88 |
+
</div>
|
89 |
+
<div class="image-container">
|
90 |
+
<img src="https://source.unsplash.com/random/200x200?party" alt="Random party image" class="blurry">
|
91 |
+
</div>
|
92 |
+
<div class="image-container">
|
93 |
+
<img src="https://source.unsplash.com/random/200x200?drunk" alt="Random drunk image" class="blurry">
|
94 |
+
</div>
|
95 |
+
<div class="image-container">
|
96 |
+
<img src="https://source.unsplash.com/random/200x200?hangover" alt="Random hangover image" class="blurry">
|
97 |
+
</div>
|
98 |
+
</div>
|
99 |
+
</div>
|
100 |
+
<script>
|
101 |
+
document.getElementById('search-button').addEventListener('click', function() {
|
102 |
+
alert("Whoa there! You're too drunk to search right now. Try again when the room stops spinning!");
|
103 |
+
});
|
104 |
+
|
105 |
+
document.querySelectorAll('.image-container img').forEach(img => {
|
106 |
+
img.addEventListener('mouseover', function() {
|
107 |
+
this.style.transform = `rotate(${Math.random() * 20 - 10}deg) scale(1.1)`;
|
108 |
+
});
|
109 |
+
img.addEventListener('mouseout', function() {
|
110 |
+
this.style.transform = 'rotate(0deg) scale(1)';
|
111 |
+
});
|
112 |
+
});
|
113 |
+
|
114 |
+
let wobbleAmount = 5;
|
115 |
+
setInterval(() => {
|
116 |
+
document.body.style.transform = `translateX(${Math.random() * wobbleAmount - wobbleAmount/2}px)`;
|
117 |
+
}, 100);
|
118 |
+
</script>
|
119 |
+
</body></html>
|
FcBU2vAfa394xHFEE.html
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<html><head><base href="https://tamatris.com"><meta name="viewport" content="width=device-width,initial-scale=1">
|
2 |
+
<title>TAMATRIS</title>
|
3 |
+
<style>@import url(https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap);body{font-family:'Space Mono',monospace;background:#1a1a1a;color:#fff;display:flex;justify-content:center;align-items:center;height:100vh;margin:0;overflow:hidden;user-select:none}.game-container{background:#2a2a2a;border-radius:15px;padding:15px;display:flex;flex-direction:column;align-items:center;box-shadow:0 0 40px rgba(255,255,255,.1)}.game-title{color:#ff6b6b;font-size:2.2em;margin:0 0 10px;letter-spacing:-2px;text-transform:uppercase}.game-content{display:flex;justify-content:center;align-items:flex-start}.tetris-grid{width:200px;height:400px;display:grid;grid-template-columns:repeat(10,1fr);gap:1px;background:#1a1a1a;border:2px solid #4a4a4a;border-radius:5px;position:relative;overflow:hidden}.tetris-cell{background:0 0;border-radius:2px;transition:background-color .2s ease}.controls{display:flex;justify-content:space-between;margin-top:20px;width:100%}.control-btn{background:#4a4a4a;color:#fff;border:none;padding:12px 0;border-radius:25px;cursor:pointer;font-family:'Space Mono',monospace;font-size:20px;transition:background .3s ease,transform .1s ease;width:22%;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;outline:0}.control-btn:hover{background:#ff6b6b;transform:translateY(-2px)}.control-btn:active{transform:translateY(1px);background:#ff6b6b}.stats{display:flex;flex-direction:column;margin-left:20px;width:90px;background:#3a3a3a;padding:10px;border-radius:10px;height:400px;box-sizing:border-box}.monkey-face{font-size:50px;text-align:center;margin-bottom:20px}.stat-icon{font-size:14px;margin-bottom:10px;display:flex;align-items:center;justify-content:space-between;padding:6px 10px;border-radius:20px;background:#4a4a4a;transition:background .3s ease}.stat-value{font-weight:700;transition:transform .2s ease}#hydration{color:#45aaf2}#nutrition{color:#4ecdc4}#mood{color:#feca57}.danger{background:#8c2a2a!important}.game-info{margin-top:auto}.info-box{background:#3a3a3a;border-radius:5px;padding:5px;width:100%;text-align:center;margin-bottom:5px}.info-label{font-size:.7em;text-transform:uppercase;color:#aaa;margin-bottom:2px}.info-value{font-size:1.2em;font-weight:700;transition:transform .2s ease}#score-value{color:#ff6b6b}#right-btn{margin-right:10%}.path-highlight{position:absolute;background:rgba(200,200,200,.1);pointer-events:none}.highlight-change{transform:scale(1.05)}</style>
|
4 |
+
</head>
|
5 |
+
<body>
|
6 |
+
<div class="game-container">
|
7 |
+
<h1 class="game-title">TAMATRIS</h1>
|
8 |
+
<div class="game-content">
|
9 |
+
<div class="tetris-grid"></div>
|
10 |
+
<div class="stats">
|
11 |
+
<div class="monkey-face" id="monkey-emoji">🐵</div>
|
12 |
+
<div class="stat-icon" id="hydration">💧 <span id="hydration-value" class="stat-value">0</span></div>
|
13 |
+
<div class="stat-icon" id="nutrition">🍏 <span id="nutrition-value" class="stat-value">0</span></div>
|
14 |
+
<div class="stat-icon" id="mood">😊 <span id="mood-value" class="stat-value">0</span></div>
|
15 |
+
<div class="game-info">
|
16 |
+
<div class="info-box">
|
17 |
+
<div class="info-label">LEVEL</div>
|
18 |
+
<div id="level-value" class="info-value">1</div>
|
19 |
+
</div>
|
20 |
+
<div class="info-box">
|
21 |
+
<div class="info-label">SCORE</div>
|
22 |
+
<div id="score-value" class="info-value">0</div>
|
23 |
+
</div>
|
24 |
+
</div>
|
25 |
+
</div>
|
26 |
+
</div>
|
27 |
+
<div class="controls">
|
28 |
+
<button class="control-btn" id="left-btn">←</button>
|
29 |
+
<button class="control-btn" id="rotate-btn">↻</button>
|
30 |
+
<button class="control-btn" id="right-btn">→</button>
|
31 |
+
<button class="control-btn" id="drop-btn">↓</button>
|
32 |
+
</div>
|
33 |
+
</div>
|
34 |
+
<script>const grid=document.querySelector(".tetris-grid"),hydrationEl=document.getElementById("hydration-value"),nutritionEl=document.getElementById("nutrition-value"),moodEl=document.getElementById("mood-value"),scoreEl=document.getElementById("score-value"),levelEl=document.getElementById("level-value"),monkeyEmoji=document.getElementById("monkey-emoji");let score=0,level=1,lines=0,hydration,nutrition,mood,currentShape,currentPos,currentColors,currentShapeIndex,gameSpeed=1e3,statDecayRate=1;const colors=["#ff6b6b","#4ecdc4","#feca57","#45aaf2"],shapes=[{shape:[[1,1,1,1]],width:4},{shape:[[1,1],[1,1]],width:2},{shape:[[1,1,1],[0,1,0]],width:3},{shape:[[1,1,1],[1,0,0]],width:3},{shape:[[1,1,1],[0,0,1]],width:3},{shape:[[1,1,0],[0,1,1]],width:3},{shape:[[0,1,1],[1,1,0]],width:3}];for(let e=0;e<200;e++){const t=document.createElement("div");t.classList.add("tetris-cell"),grid.appendChild(t)}function initializeStats(){const e=[20,30,40],t=e.sort(()=>Math.random()-.5);hydration=t[0],nutrition=t[1],mood=t[2],updateStats()}function newShape(){currentShapeIndex=Math.floor(Math.random()*shapes.length),currentShape=shapes[currentShapeIndex].shape,currentPos={x:Math.floor((10-shapes[currentShapeIndex].width)/2),y:0},currentColors=currentShape.map(e=>e.map(()=>colors[Math.floor(Math.random()*colors.length)])),collision()?gameOver():(draw(),updatePetStats(),updatePathHighlight())}function draw(){currentShape.forEach((e,t)=>{e.forEach((e,n)=>{if(e){const e=grid.children[10*(currentPos.y+t)+(currentPos.x+n)];e&&(e.style.backgroundColor=currentColors[t][n],e.style.boxShadow=`0 0 5px ${currentColors[t][n]}`)}})})}function erase(){currentShape.forEach((e,t)=>{e.forEach((e,n)=>{if(e){const e=grid.children[10*(currentPos.y+t)+(currentPos.x+n)];e&&(e.style.backgroundColor="",e.style.boxShadow="")}})})}function collision(){return currentShape.some((e,t)=>e.some((e,n)=>e&&(currentPos.y+t>=20||currentPos.x+n<0||currentPos.x+n>=10||grid.children[10*(currentPos.y+t)+(currentPos.x+n)].classList.contains("taken"))))}function solidify(){currentShape.forEach((e,t)=>{e.forEach((e,n)=>{e&&grid.children[10*(currentPos.y+t)+(currentPos.x+n)].classList.add("taken")})})}function clearRows(){let e=0,t=[0,0,0],n=0;for(let r=19;r>=0;r--){const o=Array.from(grid.children).slice(10*r,10*(r+1));o.every(e=>e.classList.contains("taken"))&&(o.forEach(e=>{const r=e.style.backgroundColor;"rgb(255, 107, 107)"===r?(t[0]++,n++):"rgb(78, 205, 196)"===r?t[1]++:"rgb(254, 202, 87)"===r&&t[2]++,e.style.backgroundColor="",e.style.boxShadow="",e.classList.remove("taken")}),grid.prepend(...Array.from(grid.children).splice(10*r,10)),e++,r++)}e&&(lines+=e,score+=100*n,updateLevel(),updatePetStatsOnClear(t),updateScoreAndLevel())}function updateLevel(){const e=Math.floor(score/1e3)+1;e>level&&(level=e,gameSpeed*=.9,statDecayRate*=1.1,updateGameSpeed(),highlightChange(levelEl))}function updatePetStats(){hydration=Math.max(0,hydration-.5*statDecayRate),nutrition=Math.max(0,nutrition-.5*statDecayRate),mood=Math.max(0,mood-.5*statDecayRate),updateStats(),hydration<=0||nutrition<=0||mood<=0?gameOver():void 0}function updatePetStatsOnClear(e){hydration=Math.min(100,hydration+e[0]),nutrition=Math.min(100,nutrition+e[1]),mood=Math.min(100,mood+e[2]),updateStats()}function updateStats(){updateStatWithHighlight(hydrationEl,Math.round(hydration)),updateStatWithHighlight(nutritionEl,Math.round(nutrition)),updateStatWithHighlight(moodEl,Math.round(mood));const e=hydration<10||nutrition<10||mood<10;document.getElementById("hydration").classList.toggle("danger",hydration<10),document.getElementById("nutrition").classList.toggle("danger",nutrition<10),document.getElementById("mood").classList.toggle("danger",mood<10),monkeyEmoji.textContent=e?"🙊":"🐵"}function updateScoreAndLevel(){updateStatWithHighlight(scoreEl,score),updateStatWithHighlight(levelEl,level)}function updateStatWithHighlight(e,t){const n=parseInt(e.textContent);n!==t&&(e.textContent=t,highlightChange(e))}function highlightChange(e){e.classList.add("highlight-change"),setTimeout(()=>{e.classList.remove("highlight-change")},200)}function gameOver(){alert(`Game Over! Your score: ${score}`),Array.from(grid.children).forEach(e=>{e.style.backgroundColor="",e.style.boxShadow="",e.classList.remove("taken")}),score=0,level=1,lines=0,gameSpeed=1e3,statDecayRate=1,initializeStats(),updateScoreAndLevel(),updateGameSpeed(),newShape()}["left-btn","right-btn","rotate-btn","drop-btn"].forEach(e=>{const t=document.getElementById(e);t.addEventListener("mousedown",n=>{"left-btn"===e?move(-1):"right-btn"===e?move(1):"rotate-btn"===e?rotate():"drop-btn"===e&&hardDrop(),n.preventDefault()}),t.addEventListener("touchstart",n=>{"left-btn"===e?move(-1):"right-btn"===e?move(1):"rotate-btn"===e?rotate():"drop-btn"===e&&hardDrop(),n.preventDefault()}),t.addEventListener("mouseup",()=>{t.blur()}),t.addEventListener("touchend",()=>{t.blur()})});function move(e){erase(),currentPos.x+=e,collision()?(currentPos.x-=e,draw()):(draw(),updatePathHighlight())}function rotate(){erase();const e=currentShape,t=currentColors;currentShape=currentShape[0].map((e,t)=>currentShape.map(e=>e[t]).reverse()),currentColors=currentColors[0].map((e,t)=>currentColors.map(e=>e[t]).reverse()),collision()?(currentShape=e,currentColors=t,draw()):(draw(),updatePathHighlight())}function hardDrop(){for(erase();!collision();)currentPos.y++;currentPos.y--,draw(),solidify(),clearRows(),newShape()}function moveDown(){erase(),currentPos.y++,collision()?(currentPos.y--,draw(),solidify(),clearRows(),newShape()):(draw(),updatePathHighlight())}function updateGameSpeed(){clearInterval(gameInterval),gameInterval=setInterval(moveDown,gameSpeed)}function updatePathHighlight(){const e=document.querySelectorAll(".path-highlight");e.forEach(e=>e.remove());const t=getShapeWidth(),n=document.createElement("div"),r=document.createElement("div");n.classList.add("path-highlight"),r.classList.add("path-highlight"),n.style.width="1px",r.style.width="1px",n.style.height="400px",r.style.height="400px",n.style.left=20*currentPos.x+"px",r.style.left=20*(currentPos.x+t)+"px",n.style.top="0px",r.style.top="0px",grid.appendChild(n),grid.appendChild(r)}function getShapeWidth(){let e=0;for(let t=0;t<currentShape[0].length;t++)currentShape.some(e=>e[t])&&e++;return e}initializeStats(),updateScoreAndLevel(),newShape();let gameInterval=setInterval(moveDown,gameSpeed);setInterval(updatePetStats,5e3);</script>
|
35 |
+
</body></html>
|
dFk2QRhlphzanAvzP.html
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<html><head><base href="https://vastgallery.art"><title>Vast Gallery - Infinite Canvas of Digital Art</title><style>
|
2 |
+
body {
|
3 |
+
font-family: 'Arial', sans-serif;
|
4 |
+
margin: 0;
|
5 |
+
padding: 0;
|
6 |
+
background-color: #f0f0f0;
|
7 |
+
color: #333;
|
8 |
+
}
|
9 |
+
header {
|
10 |
+
background-color: #fff;
|
11 |
+
padding: 20px;
|
12 |
+
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
13 |
+
}
|
14 |
+
h1 {
|
15 |
+
margin: 0;
|
16 |
+
color: #4a4a4a;
|
17 |
+
}
|
18 |
+
nav {
|
19 |
+
margin-top: 20px;
|
20 |
+
}
|
21 |
+
nav a {
|
22 |
+
color: #4a4a4a;
|
23 |
+
text-decoration: none;
|
24 |
+
margin-right: 15px;
|
25 |
+
}
|
26 |
+
.gallery {
|
27 |
+
display: flex;
|
28 |
+
flex-wrap: wrap;
|
29 |
+
justify-content: center;
|
30 |
+
padding: 20px;
|
31 |
+
}
|
32 |
+
.artwork {
|
33 |
+
background-color: #fff;
|
34 |
+
margin: 10px;
|
35 |
+
padding: 15px;
|
36 |
+
width: 300px;
|
37 |
+
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
38 |
+
transition: transform 0.3s ease;
|
39 |
+
}
|
40 |
+
.artwork:hover {
|
41 |
+
transform: scale(1.05);
|
42 |
+
}
|
43 |
+
.artwork img {
|
44 |
+
width: 100%;
|
45 |
+
height: auto;
|
46 |
+
}
|
47 |
+
.artwork h3 {
|
48 |
+
margin: 10px 0;
|
49 |
+
}
|
50 |
+
.artwork p {
|
51 |
+
color: #666;
|
52 |
+
font-size: 0.9em;
|
53 |
+
}
|
54 |
+
footer {
|
55 |
+
background-color: #333;
|
56 |
+
color: #fff;
|
57 |
+
text-align: center;
|
58 |
+
padding: 20px;
|
59 |
+
margin-top: 20px;
|
60 |
+
}
|
61 |
+
@keyframes float {
|
62 |
+
0% { transform: translateY(0px); }
|
63 |
+
50% { transform: translateY(-20px); }
|
64 |
+
100% { transform: translateY(0px); }
|
65 |
+
}
|
66 |
+
.floating {
|
67 |
+
animation: float 6s ease-in-out infinite;
|
68 |
+
}
|
69 |
+
</style></head><body>
|
70 |
+
<header>
|
71 |
+
<h1>Vast Gallery</h1>
|
72 |
+
<nav>
|
73 |
+
<a href="#featured">Featured</a>
|
74 |
+
<a href="#explore">Explore</a>
|
75 |
+
<a href="#artists">Artists</a>
|
76 |
+
<a href="#about">About</a>
|
77 |
+
<a href="https://vastgallery.art/vr">VR Experience</a>
|
78 |
+
</nav>
|
79 |
+
</header>
|
80 |
+
|
81 |
+
<main class="gallery">
|
82 |
+
<div class="artwork floating">
|
83 |
+
<img src="quantum_landscape.jpg" alt="A swirling quantum landscape with fractals and abstract shapes, digital art" width="300" height="200">
|
84 |
+
<h3>Quantum Landscape</h3>
|
85 |
+
<p>By: QuantumDreamer</p>
|
86 |
+
</div>
|
87 |
+
<div class="artwork floating" style="animation-delay: 2s;">
|
88 |
+
<img src="neural_network_portrait.jpg" alt="A portrait created by a neural network, showing a face merging with circuit patterns" width="300" height="200">
|
89 |
+
<h3>Neural Network Portrait</h3>
|
90 |
+
<p>By: AIArtist2045</p>
|
91 |
+
</div>
|
92 |
+
<div class="artwork floating" style="animation-delay: 4s;">
|
93 |
+
<img src="fractal_city.jpg" alt="A city made entirely of fractals, with impossible architecture and glowing lines" width="300" height="200">
|
94 |
+
<h3>Fractal City</h3>
|
95 |
+
<p>By: FractalArchitect</p>
|
96 |
+
</div>
|
97 |
+
</main>
|
98 |
+
|
99 |
+
<footer>
|
100 |
+
<p>Vast Gallery - Infinite Canvas of Digital Art</p>
|
101 |
+
<p><a href="https://vastgallery.art/submit">Submit Your Artwork</a> | <a href="https://vastgallery.art/marketplace">NFT Marketplace</a></p>
|
102 |
+
</footer>
|
103 |
+
|
104 |
+
<script>
|
105 |
+
// Dynamic loading of artworks
|
106 |
+
window.addEventListener('scroll', function() {
|
107 |
+
if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight - 500) {
|
108 |
+
loadMoreArtworks();
|
109 |
+
}
|
110 |
+
});
|
111 |
+
|
112 |
+
function loadMoreArtworks() {
|
113 |
+
// Simulating API call to load more artworks
|
114 |
+
const newArtworks = [
|
115 |
+
{title: "Cybernetic Dreamscape", artist: "NeonMindscaper", image: "cybernetic_dreamscape.jpg"},
|
116 |
+
{title: "Quantum Entanglement", artist: "ParticlePoet", image: "quantum_entanglement.jpg"},
|
117 |
+
{title: "Digital Ecosystem", artist: "BinaryBiologist", image: "digital_ecosystem.jpg"}
|
118 |
+
];
|
119 |
+
|
120 |
+
const gallery = document.querySelector('.gallery');
|
121 |
+
newArtworks.forEach(artwork => {
|
122 |
+
const div = document.createElement('div');
|
123 |
+
div.className = 'artwork floating';
|
124 |
+
div.innerHTML = `
|
125 |
+
<img src="${artwork.image}" alt="${artwork.title} by ${artwork.artist}, digital artwork" width="300" height="200">
|
126 |
+
<h3>${artwork.title}</h3>
|
127 |
+
<p>By: ${artwork.artist}</p>
|
128 |
+
`;
|
129 |
+
gallery.appendChild(div);
|
130 |
+
});
|
131 |
+
}
|
132 |
+
</script>
|
133 |
+
</body></html>
|
siUi6EynghidyZU6N.html
ADDED
@@ -0,0 +1,284 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<html><head><base href="interface://insight.dataviz"><title>InsightViz - Cognitive Data Visualization Platform</title>
|
2 |
+
<style>
|
3 |
+
body, html {
|
4 |
+
margin: 0;
|
5 |
+
padding: 0;
|
6 |
+
font-family: 'Roboto', sans-serif;
|
7 |
+
background-color: #0a0a1a;
|
8 |
+
color: #e0e0e0;
|
9 |
+
height: 100%;
|
10 |
+
overflow: hidden;
|
11 |
+
}
|
12 |
+
.container {
|
13 |
+
display: flex;
|
14 |
+
flex-direction: column;
|
15 |
+
height: 100%;
|
16 |
+
}
|
17 |
+
header {
|
18 |
+
background-color: #1a1a2e;
|
19 |
+
padding: 1rem;
|
20 |
+
text-align: center;
|
21 |
+
}
|
22 |
+
h1 {
|
23 |
+
margin: 0;
|
24 |
+
color: #4db8ff;
|
25 |
+
}
|
26 |
+
.content {
|
27 |
+
display: flex;
|
28 |
+
flex: 1;
|
29 |
+
overflow: hidden;
|
30 |
+
}
|
31 |
+
.sidebar {
|
32 |
+
width: 250px;
|
33 |
+
background-color: #1a1a2e;
|
34 |
+
padding: 1rem;
|
35 |
+
overflow-y: auto;
|
36 |
+
}
|
37 |
+
.main {
|
38 |
+
flex: 1;
|
39 |
+
padding: 1rem;
|
40 |
+
overflow: hidden;
|
41 |
+
}
|
42 |
+
#visualization {
|
43 |
+
width: 100%;
|
44 |
+
height: 100%;
|
45 |
+
background-color: #0f0f1e;
|
46 |
+
border-radius: 10px;
|
47 |
+
}
|
48 |
+
.control-group {
|
49 |
+
margin-bottom: 1rem;
|
50 |
+
}
|
51 |
+
label {
|
52 |
+
display: block;
|
53 |
+
margin-bottom: 0.5rem;
|
54 |
+
color: #4db8ff;
|
55 |
+
}
|
56 |
+
select, input[type="range"] {
|
57 |
+
width: 100%;
|
58 |
+
padding: 0.5rem;
|
59 |
+
background-color: #2a2a3e;
|
60 |
+
color: #e0e0e0;
|
61 |
+
border: none;
|
62 |
+
border-radius: 5px;
|
63 |
+
}
|
64 |
+
button {
|
65 |
+
background-color: #4db8ff;
|
66 |
+
color: #0a0a1a;
|
67 |
+
border: none;
|
68 |
+
padding: 0.5rem 1rem;
|
69 |
+
cursor: pointer;
|
70 |
+
border-radius: 5px;
|
71 |
+
transition: background-color 0.3s ease;
|
72 |
+
}
|
73 |
+
button:hover {
|
74 |
+
background-color: #3a9bd9;
|
75 |
+
}
|
76 |
+
</style>
|
77 |
+
</head>
|
78 |
+
<body>
|
79 |
+
<div class="container">
|
80 |
+
<header>
|
81 |
+
<h1>InsightViz - Cognitive Data Visualization Platform</h1>
|
82 |
+
</header>
|
83 |
+
<div class="content">
|
84 |
+
<div class="sidebar">
|
85 |
+
<div class="control-group">
|
86 |
+
<label for="data-source">Data Source:</label>
|
87 |
+
<select id="data-source">
|
88 |
+
<option value="eeg">EEG Brainwaves</option>
|
89 |
+
<option value="fmri">fMRI Scans</option>
|
90 |
+
<option value="biometrics">Biometric Signals</option>
|
91 |
+
<option value="linguistic">Linguistic Patterns</option>
|
92 |
+
</select>
|
93 |
+
</div>
|
94 |
+
<div class="control-group">
|
95 |
+
<label for="viz-type">Visualization Type:</label>
|
96 |
+
<select id="viz-type">
|
97 |
+
<option value="neural-network">Neural Network</option>
|
98 |
+
<option value="thought-stream">Thought Stream</option>
|
99 |
+
<option value="emotion-landscape">Emotion Landscape</option>
|
100 |
+
<option value="decision-tree">Decision Tree</option>
|
101 |
+
</select>
|
102 |
+
</div>
|
103 |
+
<div class="control-group">
|
104 |
+
<label for="time-scale">Time Scale:</label>
|
105 |
+
<input type="range" id="time-scale" min="1" max="100" value="50">
|
106 |
+
</div>
|
107 |
+
<div class="control-group">
|
108 |
+
<label for="complexity">Complexity Level:</label>
|
109 |
+
<input type="range" id="complexity" min="1" max="10" value="5">
|
110 |
+
</div>
|
111 |
+
<button id="generate-viz">Generate Visualization</button>
|
112 |
+
</div>
|
113 |
+
<div class="main">
|
114 |
+
<div id="visualization"></div>
|
115 |
+
</div>
|
116 |
+
</div>
|
117 |
+
</div>
|
118 |
+
|
119 |
+
<script src="https://d3js.org/d3.v7.min.js"></script>
|
120 |
+
<script>
|
121 |
+
const width = document.getElementById('visualization').clientWidth;
|
122 |
+
const height = document.getElementById('visualization').clientHeight;
|
123 |
+
|
124 |
+
const svg = d3.select('#visualization')
|
125 |
+
.append('svg')
|
126 |
+
.attr('width', width)
|
127 |
+
.attr('height', height);
|
128 |
+
|
129 |
+
function generateVisualization() {
|
130 |
+
const dataSource = document.getElementById('data-source').value;
|
131 |
+
const vizType = document.getElementById('viz-type').value;
|
132 |
+
const timeScale = document.getElementById('time-scale').value;
|
133 |
+
const complexity = document.getElementById('complexity').value;
|
134 |
+
|
135 |
+
svg.selectAll('*').remove();
|
136 |
+
|
137 |
+
switch(vizType) {
|
138 |
+
case 'neural-network':
|
139 |
+
generateNeuralNetwork();
|
140 |
+
break;
|
141 |
+
case 'thought-stream':
|
142 |
+
generateThoughtStream();
|
143 |
+
break;
|
144 |
+
case 'emotion-landscape':
|
145 |
+
generateEmotionLandscape();
|
146 |
+
break;
|
147 |
+
case 'decision-tree':
|
148 |
+
generateDecisionTree();
|
149 |
+
break;
|
150 |
+
}
|
151 |
+
}
|
152 |
+
|
153 |
+
function generateNeuralNetwork() {
|
154 |
+
const nodes = d3.range(50).map(d => ({x: Math.random() * width, y: Math.random() * height}));
|
155 |
+
const links = d3.range(100).map(() => ({
|
156 |
+
source: Math.floor(Math.random() * nodes.length),
|
157 |
+
target: Math.floor(Math.random() * nodes.length)
|
158 |
+
}));
|
159 |
+
|
160 |
+
svg.selectAll('line')
|
161 |
+
.data(links)
|
162 |
+
.enter().append('line')
|
163 |
+
.style('stroke', '#4db8ff')
|
164 |
+
.style('stroke-width', 0.5);
|
165 |
+
|
166 |
+
svg.selectAll('circle')
|
167 |
+
.data(nodes)
|
168 |
+
.enter().append('circle')
|
169 |
+
.attr('r', 3)
|
170 |
+
.style('fill', '#4db8ff');
|
171 |
+
|
172 |
+
d3.forceSimulation(nodes)
|
173 |
+
.force('charge', d3.forceManyBody().strength(-20))
|
174 |
+
.force('center', d3.forceCenter(width / 2, height / 2))
|
175 |
+
.force('link', d3.forceLink(links))
|
176 |
+
.on('tick', () => {
|
177 |
+
svg.selectAll('line')
|
178 |
+
.attr('x1', d => d.source.x)
|
179 |
+
.attr('y1', d => d.source.y)
|
180 |
+
.attr('x2', d => d.target.x)
|
181 |
+
.attr('y2', d => d.target.y);
|
182 |
+
|
183 |
+
svg.selectAll('circle')
|
184 |
+
.attr('cx', d => d.x)
|
185 |
+
.attr('cy', d => d.y);
|
186 |
+
});
|
187 |
+
}
|
188 |
+
|
189 |
+
function generateThoughtStream() {
|
190 |
+
const data = d3.range(100).map((d, i) => ({
|
191 |
+
x: i,
|
192 |
+
y: Math.sin(i / 10) * Math.random() * 100 + Math.random() * 50
|
193 |
+
}));
|
194 |
+
|
195 |
+
const line = d3.line()
|
196 |
+
.x(d => d.x * (width / 100))
|
197 |
+
.y(d => height - d.y)
|
198 |
+
.curve(d3.curveBasis);
|
199 |
+
|
200 |
+
svg.append('path')
|
201 |
+
.datum(data)
|
202 |
+
.attr('fill', 'none')
|
203 |
+
.attr('stroke', '#4db8ff')
|
204 |
+
.attr('stroke-width', 2)
|
205 |
+
.attr('d', line);
|
206 |
+
}
|
207 |
+
|
208 |
+
function generateEmotionLandscape() {
|
209 |
+
const data = d3.range(20).flatMap((x) =>
|
210 |
+
d3.range(20).map((y) => ({x, y, value: Math.random()}))
|
211 |
+
);
|
212 |
+
|
213 |
+
const color = d3.scaleSequential(d3.interpolateViridis)
|
214 |
+
.domain([0, 1]);
|
215 |
+
|
216 |
+
svg.selectAll('rect')
|
217 |
+
.data(data)
|
218 |
+
.enter().append('rect')
|
219 |
+
.attr('x', d => d.x * (width / 20))
|
220 |
+
.attr('y', d => d.y * (height / 20))
|
221 |
+
.attr('width', width / 20)
|
222 |
+
.attr('height', height / 20)
|
223 |
+
.attr('fill', d => color(d.value));
|
224 |
+
}
|
225 |
+
|
226 |
+
function generateDecisionTree() {
|
227 |
+
const treeData = {
|
228 |
+
name: "Root",
|
229 |
+
children: [
|
230 |
+
{
|
231 |
+
name: "Decision A",
|
232 |
+
children: [
|
233 |
+
{name: "Outcome A1"},
|
234 |
+
{name: "Outcome A2"}
|
235 |
+
]
|
236 |
+
},
|
237 |
+
{
|
238 |
+
name: "Decision B",
|
239 |
+
children: [
|
240 |
+
{name: "Outcome B1"},
|
241 |
+
{name: "Outcome B2"}
|
242 |
+
]
|
243 |
+
}
|
244 |
+
]
|
245 |
+
};
|
246 |
+
|
247 |
+
const treeLayout = d3.tree().size([height, width - 100]);
|
248 |
+
const root = d3.hierarchy(treeData);
|
249 |
+
treeLayout(root);
|
250 |
+
|
251 |
+
svg.selectAll('.link')
|
252 |
+
.data(root.links())
|
253 |
+
.enter().append('path')
|
254 |
+
.attr('class', 'link')
|
255 |
+
.attr('d', d3.linkHorizontal()
|
256 |
+
.x(d => d.y)
|
257 |
+
.y(d => d.x))
|
258 |
+
.attr('fill', 'none')
|
259 |
+
.attr('stroke', '#4db8ff');
|
260 |
+
|
261 |
+
const node = svg.selectAll('.node')
|
262 |
+
.data(root.descendants())
|
263 |
+
.enter().append('g')
|
264 |
+
.attr('class', 'node')
|
265 |
+
.attr('transform', d => `translate(${d.y},${d.x})`);
|
266 |
+
|
267 |
+
node.append('circle')
|
268 |
+
.attr('r', 4)
|
269 |
+
.attr('fill', '#4db8ff');
|
270 |
+
|
271 |
+
node.append('text')
|
272 |
+
.attr('dy', '.31em')
|
273 |
+
.attr('x', d => d.children ? -6 : 6)
|
274 |
+
.style('text-anchor', d => d.children ? 'end' : 'start')
|
275 |
+
.text(d => d.data.name)
|
276 |
+
.attr('fill', '#e0e0e0');
|
277 |
+
}
|
278 |
+
|
279 |
+
document.getElementById('generate-viz').addEventListener('click', generateVisualization);
|
280 |
+
|
281 |
+
// Initial visualization
|
282 |
+
generateVisualization();
|
283 |
+
</script>
|
284 |
+
</body></html>
|
u6Q8itx84CMpzgUin.html
ADDED
@@ -0,0 +1,414 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<html><head><base href="interface://wikidata.graph"><title>Wikidata Graph Explorer</title>
|
2 |
+
<script src="https://d3js.org/d3.v7.min.js"></script>
|
3 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
4 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
5 |
+
<style>
|
6 |
+
body {
|
7 |
+
touch-action: none;
|
8 |
+
}
|
9 |
+
.loader {
|
10 |
+
fill: red;
|
11 |
+
stroke: red;
|
12 |
+
animation: pulsing 1s linear infinite;
|
13 |
+
transform-origin: center;
|
14 |
+
}
|
15 |
+
|
16 |
+
@keyframes pulsing {
|
17 |
+
0% { opacity: 0.7; }
|
18 |
+
50% { opacity: 0.4; }
|
19 |
+
100% { opacity: 0.7; }
|
20 |
+
}
|
21 |
+
|
22 |
+
.popover {
|
23 |
+
position: relative;
|
24 |
+
display: inline-block;
|
25 |
+
}
|
26 |
+
|
27 |
+
.popover .popovertext {
|
28 |
+
font-size: 14px;
|
29 |
+
font-weight: normal;
|
30 |
+
visibility: hidden;
|
31 |
+
width: 200px;
|
32 |
+
background-color: black;
|
33 |
+
color: #fff;
|
34 |
+
text-align: center;
|
35 |
+
border-radius: 6px;
|
36 |
+
padding: 8px;
|
37 |
+
position: absolute;
|
38 |
+
z-index: 1;
|
39 |
+
top: 171%;
|
40 |
+
left: 0;
|
41 |
+
margin-left: -0.8em;
|
42 |
+
}
|
43 |
+
|
44 |
+
.popover .popovertext::after {
|
45 |
+
content: "";
|
46 |
+
position: absolute;
|
47 |
+
bottom: 100%;
|
48 |
+
left: 0;
|
49 |
+
margin-left: 1.2em;
|
50 |
+
border-width: 5px;
|
51 |
+
border-style: solid;
|
52 |
+
border-color: transparent transparent black transparent;
|
53 |
+
}
|
54 |
+
|
55 |
+
.popover.active .popovertext {
|
56 |
+
visibility: visible;
|
57 |
+
}
|
58 |
+
|
59 |
+
#status {
|
60 |
+
position: absolute;
|
61 |
+
left: 1em;
|
62 |
+
top: 3em;
|
63 |
+
}
|
64 |
+
|
65 |
+
#status > div {
|
66 |
+
padding: 0.4em 1em;
|
67 |
+
background: rgba(255, 255, 255, 0.5);
|
68 |
+
border-radius: 1em;
|
69 |
+
box-shadow: 0em 0.2em 0.5em 0 rgba(0, 0, 0, 0.25);
|
70 |
+
max-width: 50vw;
|
71 |
+
max-height: 3em;
|
72 |
+
text-overflow: ellipsis;
|
73 |
+
white-space: nowrap;
|
74 |
+
word-break: break-word;
|
75 |
+
text-align: left;
|
76 |
+
overflow: hidden;
|
77 |
+
margin-bottom: 0.5em;
|
78 |
+
}
|
79 |
+
|
80 |
+
#status:empty {
|
81 |
+
display: none;
|
82 |
+
}
|
83 |
+
|
84 |
+
.modal {
|
85 |
+
display: none;
|
86 |
+
position: fixed;
|
87 |
+
z-index: 1;
|
88 |
+
padding-top: 100px;
|
89 |
+
left: 0;
|
90 |
+
top: 0;
|
91 |
+
width: 100%;
|
92 |
+
height: 100%;
|
93 |
+
overflow: auto;
|
94 |
+
background-color: rgb(0,0,0);
|
95 |
+
background-color: rgba(0,0,0,0.4);
|
96 |
+
}
|
97 |
+
|
98 |
+
.modal-content {
|
99 |
+
background-color: #fefefe;
|
100 |
+
margin: auto;
|
101 |
+
padding: 1em;
|
102 |
+
border: 1px solid #888;
|
103 |
+
max-width: 90%;
|
104 |
+
display:flex;
|
105 |
+
flex-direction: column;
|
106 |
+
gap: 1em;
|
107 |
+
}
|
108 |
+
|
109 |
+
.modal-content textarea {
|
110 |
+
max-width: 100%;
|
111 |
+
}
|
112 |
+
|
113 |
+
.model-content h2 {
|
114 |
+
font-weight: bold;
|
115 |
+
}
|
116 |
+
|
117 |
+
path.link {
|
118 |
+
fill: none;
|
119 |
+
stroke: rgba(0,0,0,0.2);
|
120 |
+
stroke-width: 1px;
|
121 |
+
stroke-dasharray: 3 1;
|
122 |
+
}
|
123 |
+
|
124 |
+
path.link.highlight {
|
125 |
+
stroke: red;
|
126 |
+
stroke-dasharray: none;
|
127 |
+
}
|
128 |
+
|
129 |
+
text.edge-label {
|
130 |
+
fill: rgba(0,0,0,0.2);
|
131 |
+
}
|
132 |
+
|
133 |
+
text.edge-label.highlight {
|
134 |
+
fill: black;
|
135 |
+
}
|
136 |
+
|
137 |
+
marker#arrow {
|
138 |
+
fill: black;
|
139 |
+
}
|
140 |
+
</style>
|
141 |
+
</head>
|
142 |
+
<body>
|
143 |
+
<div id="app" class="flex flex-col min-h-screen bg-gray-100">
|
144 |
+
<div class="navbar bg-blue-600 text-white px-4 py-2 sticky top-0 flex justify-between items-center">
|
145 |
+
<h1 class="text-md font-bold">
|
146 |
+
<span id="info" class="popover">
|
147 |
+
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 inline-block" viewBox="0 0 20 20" fill="currentColor">
|
148 |
+
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd" />
|
149 |
+
</svg>
|
150 |
+
<span id="popoverContent" class="popovertext">This app allows you to interactively explore Wikidata. Click on nodes to expand and reveal connected entities. Use the controls to initialize, reset or export the graph.</span>
|
151 |
+
</span>
|
152 |
+
Wikidata Graph Explorer
|
153 |
+
</h1>
|
154 |
+
<div>
|
155 |
+
<button id="initButton" class="bg-white text-blue-600 px-2 py-1 rounded text-xs mr-2">New</button>
|
156 |
+
<button id="exportButton" class="bg-white text-blue-600 px-2 py-1 rounded text-xs mr-2">Export</button>
|
157 |
+
<button id="resetButton" class="bg-white text-red-600 px-2 py-1 rounded text-xs">Reset</button>
|
158 |
+
</div>
|
159 |
+
</div>
|
160 |
+
|
161 |
+
<div class="main-content flex-grow">
|
162 |
+
<div id="status" class="mt-4 text-center"></div>
|
163 |
+
<div id="graph"></div>
|
164 |
+
</div>
|
165 |
+
|
166 |
+
<div class="flex-shrink p-2 border-t border-gray-200 text-center text-xs">
|
167 |
+
Built with D3.js and Wikidata API
|
168 |
+
</div>
|
169 |
+
</div>
|
170 |
+
|
171 |
+
<script>
|
172 |
+
const width = window.innerWidth;
|
173 |
+
const height = window.innerHeight - 75;
|
174 |
+
|
175 |
+
const svg = d3.select("#graph")
|
176 |
+
.append("svg")
|
177 |
+
.attr("viewBox", [0, 0, width, height]);
|
178 |
+
|
179 |
+
svg.append("defs").append("marker")
|
180 |
+
.attr("id", "arrow")
|
181 |
+
.attr("viewBox", "0 -5 10 10")
|
182 |
+
.attr("refX", 20)
|
183 |
+
.attr("refY", 0)
|
184 |
+
.attr("markerWidth", 6)
|
185 |
+
.attr("markerHeight", 6)
|
186 |
+
.attr("orient", "auto")
|
187 |
+
.append("path")
|
188 |
+
.attr("d", "M0,-5L10,0L0,5")
|
189 |
+
.attr("fill", "#999");
|
190 |
+
|
191 |
+
const g = svg.append("g");
|
192 |
+
|
193 |
+
const zoom = d3.zoom()
|
194 |
+
.scaleExtent([0.2, 5])
|
195 |
+
.on("zoom", zoomed);
|
196 |
+
|
197 |
+
svg.call(zoom);
|
198 |
+
|
199 |
+
function zoomed({transform}) {
|
200 |
+
g.attr("transform", transform);
|
201 |
+
}
|
202 |
+
|
203 |
+
info.onclick = (ev) => info.classList.toggle("active")
|
204 |
+
popoverContent.onclick = (ev) => ev.stopPropagation()
|
205 |
+
|
206 |
+
const simulation = d3.forceSimulation()
|
207 |
+
.force("link", d3.forceLink().id(d => d.id).distance(100))
|
208 |
+
.force("charge", d3.forceManyBody().strength(-300))
|
209 |
+
.force("center", d3.forceCenter(width / 2, height / 2))
|
210 |
+
.force("collision", d3.forceCollide().radius(50));
|
211 |
+
|
212 |
+
let link = g.append("g")
|
213 |
+
.attr("stroke", "#999")
|
214 |
+
.attr("stroke-opacity", 0.6)
|
215 |
+
.selectAll("path");
|
216 |
+
|
217 |
+
let node = g.append("g")
|
218 |
+
.attr("stroke", "#fff")
|
219 |
+
.attr("stroke-width", 1.5)
|
220 |
+
.selectAll("circle");
|
221 |
+
|
222 |
+
let edgeLabel = g.append("g")
|
223 |
+
.selectAll("text");
|
224 |
+
|
225 |
+
let nodeLabel = g.append("g")
|
226 |
+
.selectAll("text");
|
227 |
+
|
228 |
+
let currentGraph = {nodes: [], links: []};
|
229 |
+
|
230 |
+
const init = (defaultEntity) => async () => {
|
231 |
+
const entity = defaultEntity || prompt("Enter a Wikidata entity ID (e.g. Q5 for human):", "Q5");
|
232 |
+
if (entity) {
|
233 |
+
currentGraph = {
|
234 |
+
nodes: [{id: entity, label: await fetchLabel(entity)}],
|
235 |
+
links: []
|
236 |
+
};
|
237 |
+
await updateGraph(currentGraph);
|
238 |
+
}
|
239 |
+
}
|
240 |
+
|
241 |
+
d3.select("#initButton").on("click", init());
|
242 |
+
|
243 |
+
d3.select("#exportButton").on("click", () => {
|
244 |
+
const dataStr = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(currentGraph));
|
245 |
+
const downloadAnchorNode = document.createElement('a');
|
246 |
+
downloadAnchorNode.setAttribute("href", dataStr);
|
247 |
+
downloadAnchorNode.setAttribute("download", "wikidata_graph.json");
|
248 |
+
document.body.appendChild(downloadAnchorNode);
|
249 |
+
downloadAnchorNode.click();
|
250 |
+
downloadAnchorNode.remove();
|
251 |
+
});
|
252 |
+
|
253 |
+
d3.select("#resetButton").on("click", async () => {
|
254 |
+
currentGraph = {nodes: [], links: []};
|
255 |
+
svg.transition().duration(750).call(zoom.transform, d3.zoomIdentity);
|
256 |
+
await updateGraph(currentGraph);
|
257 |
+
});
|
258 |
+
|
259 |
+
async function updateGraph(data) {
|
260 |
+
console.log("Updating graph with data:", data);
|
261 |
+
|
262 |
+
let nodes = data.nodes.map(d => Object.create(d));
|
263 |
+
let links = data.links.map(d => Object.create(d));
|
264 |
+
|
265 |
+
simulation.nodes(nodes);
|
266 |
+
simulation.force("link").links(links);
|
267 |
+
|
268 |
+
link = link
|
269 |
+
.data(links)
|
270 |
+
.join("path")
|
271 |
+
.attr("class", "link")
|
272 |
+
.attr("marker-end", "url(#arrow)");
|
273 |
+
|
274 |
+
node = node
|
275 |
+
.data(nodes, d => d.id)
|
276 |
+
.join("circle")
|
277 |
+
.attr("r", 20)
|
278 |
+
.attr("fill", d => d.color || "#69b3a2")
|
279 |
+
.call(drag(simulation));
|
280 |
+
|
281 |
+
edgeLabel = edgeLabel
|
282 |
+
.data(links)
|
283 |
+
.join("text")
|
284 |
+
.attr("class", "edge-label")
|
285 |
+
.attr("font-size", "10px")
|
286 |
+
.attr("text-anchor", "middle")
|
287 |
+
.text(d => d.label);
|
288 |
+
|
289 |
+
nodeLabel = nodeLabel
|
290 |
+
.data(nodes)
|
291 |
+
.join("text")
|
292 |
+
.attr("font-size", "12px")
|
293 |
+
.attr("text-anchor", "middle")
|
294 |
+
.attr("dy", 30)
|
295 |
+
.text(d => d.label);
|
296 |
+
|
297 |
+
node.on("click", async (event, d) => {
|
298 |
+
event.stopPropagation();
|
299 |
+
console.log("Clicked node:", d);
|
300 |
+
|
301 |
+
d3.select(event.currentTarget).attr("class", "loader");
|
302 |
+
|
303 |
+
const loadingEl = document.createElement('div');
|
304 |
+
loadingEl.innerText = `Expanding "${d.label}" ...`;
|
305 |
+
document.getElementById('status').appendChild(loadingEl);
|
306 |
+
|
307 |
+
try {
|
308 |
+
const newData = await fetchConnectedEntities(d.id);
|
309 |
+
currentGraph.nodes = [...currentGraph.nodes, ...newData.nodes];
|
310 |
+
currentGraph.links = [...currentGraph.links, ...newData.links];
|
311 |
+
|
312 |
+
// Remove duplicates
|
313 |
+
currentGraph.nodes = Array.from(new Map(currentGraph.nodes.map(item => [item.id, item])).values());
|
314 |
+
currentGraph.links = currentGraph.links.filter((link, index, self) =>
|
315 |
+
index === self.findIndex((t) => t.source === link.source && t.target === link.target)
|
316 |
+
);
|
317 |
+
|
318 |
+
await updateGraph(currentGraph);
|
319 |
+
} catch (error) {
|
320 |
+
console.error("Error fetching connected entities:", error);
|
321 |
+
} finally {
|
322 |
+
d3.select(event.currentTarget).attr("class", "");
|
323 |
+
loadingEl.remove();
|
324 |
+
}
|
325 |
+
});
|
326 |
+
|
327 |
+
simulation.on("tick", () => {
|
328 |
+
link.attr("d", linkArc);
|
329 |
+
node.attr("cx", d => d.x).attr("cy", d => d.y);
|
330 |
+
nodeLabel.attr("x", d => d.x).attr("y", d => d.y);
|
331 |
+
edgeLabel
|
332 |
+
.attr("x", d => (d.source.x + d.target.x) / 2)
|
333 |
+
.attr("y", d => (d.source.y + d.target.y) / 2);
|
334 |
+
});
|
335 |
+
|
336 |
+
simulation.alpha(1).restart();
|
337 |
+
}
|
338 |
+
|
339 |
+
function linkArc(d) {
|
340 |
+
const r = Math.hypot(d.target.x - d.source.x, d.target.y - d.source.y);
|
341 |
+
return `
|
342 |
+
M${d.source.x},${d.source.y}
|
343 |
+
A${r},${r} 0 0,1 ${d.target.x},${d.target.y}
|
344 |
+
`;
|
345 |
+
}
|
346 |
+
|
347 |
+
function drag(simulation) {
|
348 |
+
function dragstarted(event) {
|
349 |
+
if (!event.active) simulation.alphaTarget(0.3).restart();
|
350 |
+
event.subject.fx = event.subject.x;
|
351 |
+
event.subject.fy = event.subject.y;
|
352 |
+
}
|
353 |
+
|
354 |
+
function dragged(event) {
|
355 |
+
event.subject.fx = event.x;
|
356 |
+
event.subject.fy = event.y;
|
357 |
+
}
|
358 |
+
|
359 |
+
function dragended(event) {
|
360 |
+
if (!event.active) simulation.alphaTarget(0);
|
361 |
+
event.subject.fx = null;
|
362 |
+
event.subject.fy = null;
|
363 |
+
}
|
364 |
+
|
365 |
+
return d3.drag()
|
366 |
+
.on("start", dragstarted)
|
367 |
+
.on("drag", dragged)
|
368 |
+
.on("end", dragended);
|
369 |
+
}
|
370 |
+
|
371 |
+
async function fetchLabel(entityId) {
|
372 |
+
const url = `https://www.wikidata.org/w/api.php?action=wbgetentities&ids=${entityId}&props=labels&languages=en&format=json&origin=*`;
|
373 |
+
const response = await fetch(url);
|
374 |
+
const data = await response.json();
|
375 |
+
return data.entities[entityId].labels.en?.value || entityId;
|
376 |
+
}
|
377 |
+
|
378 |
+
async function fetchConnectedEntities(entityId) {
|
379 |
+
const url = `https://query.wikidata.org/sparql?query=
|
380 |
+
SELECT ?item ?itemLabel ?prop ?propLabel WHERE {
|
381 |
+
wd:${entityId} ?prop ?item .
|
382 |
+
?item wdt:P31 ?type .
|
383 |
+
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
|
384 |
+
}
|
385 |
+
LIMIT 10
|
386 |
+
&format=json`;
|
387 |
+
|
388 |
+
const response = await fetch(url);
|
389 |
+
const data = await response.json();
|
390 |
+
|
391 |
+
const nodes = [];
|
392 |
+
const links = [];
|
393 |
+
const seenItems = new Set();
|
394 |
+
|
395 |
+
for (const result of data.results.bindings) {
|
396 |
+
const item = result.item.value.split('/').pop();
|
397 |
+
if (!seenItems.has(item)) {
|
398 |
+
nodes.push({id: item, label: result.itemLabel.value});
|
399 |
+
links.push({
|
400 |
+
source: entityId,
|
401 |
+
target: item,
|
402 |
+
label: result.propLabel.value
|
403 |
+
});
|
404 |
+
seenItems.add(item);
|
405 |
+
}
|
406 |
+
}
|
407 |
+
|
408 |
+
return {nodes, links};
|
409 |
+
}
|
410 |
+
|
411 |
+
document.addEventListener("DOMContentLoaded", init());
|
412 |
+
</script>
|
413 |
+
</body>
|
414 |
+
</html>
|
xFNbOlWvWPkCQwLpa.html
ADDED
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<html><head><base href="telepathic://roger/brain/tingle"><title>Roger's Telepathic Brain Tingle</title>
|
2 |
+
<style>
|
3 |
+
body {
|
4 |
+
font-family: Arial, sans-serif;
|
5 |
+
background-color: #f0f8ff;
|
6 |
+
color: #333;
|
7 |
+
margin: 0;
|
8 |
+
padding: 20px;
|
9 |
+
display: flex;
|
10 |
+
justify-content: center;
|
11 |
+
align-items: center;
|
12 |
+
height: 100vh;
|
13 |
+
overflow: hidden;
|
14 |
+
}
|
15 |
+
.container {
|
16 |
+
background-color: white;
|
17 |
+
border-radius: 10px;
|
18 |
+
padding: 30px;
|
19 |
+
box-shadow: 0 0 20px rgba(0,0,0,0.1);
|
20 |
+
max-width: 600px;
|
21 |
+
text-align: center;
|
22 |
+
position: relative;
|
23 |
+
}
|
24 |
+
h1 {
|
25 |
+
color: #4b0082;
|
26 |
+
margin-bottom: 20px;
|
27 |
+
}
|
28 |
+
.thought-bubble {
|
29 |
+
background-color: #e6e6fa;
|
30 |
+
border-radius: 20px;
|
31 |
+
padding: 15px;
|
32 |
+
margin: 20px 0;
|
33 |
+
position: relative;
|
34 |
+
}
|
35 |
+
.thought-bubble:before {
|
36 |
+
content: '';
|
37 |
+
position: absolute;
|
38 |
+
bottom: -20px;
|
39 |
+
left: 20px;
|
40 |
+
border-width: 20px 0 0 20px;
|
41 |
+
border-style: solid;
|
42 |
+
border-color: #e6e6fa transparent transparent transparent;
|
43 |
+
}
|
44 |
+
.tingle-meter {
|
45 |
+
width: 100%;
|
46 |
+
height: 20px;
|
47 |
+
background-color: #ddd;
|
48 |
+
border-radius: 10px;
|
49 |
+
margin-top: 20px;
|
50 |
+
overflow: hidden;
|
51 |
+
}
|
52 |
+
.tingle-level {
|
53 |
+
width: 75%;
|
54 |
+
height: 100%;
|
55 |
+
background-color: #9370db;
|
56 |
+
animation: pulse 2s infinite;
|
57 |
+
}
|
58 |
+
@keyframes pulse {
|
59 |
+
0% { opacity: 0.6; }
|
60 |
+
50% { opacity: 1; }
|
61 |
+
100% { opacity: 0.6; }
|
62 |
+
}
|
63 |
+
.brain-waves {
|
64 |
+
position: absolute;
|
65 |
+
top: 0;
|
66 |
+
left: 0;
|
67 |
+
right: 0;
|
68 |
+
bottom: 0;
|
69 |
+
pointer-events: none;
|
70 |
+
}
|
71 |
+
.wave {
|
72 |
+
position: absolute;
|
73 |
+
border: 2px solid rgba(75, 0, 130, 0.2);
|
74 |
+
border-radius: 50%;
|
75 |
+
animation: ripple 4s linear infinite;
|
76 |
+
}
|
77 |
+
.wave:nth-child(1) { animation-delay: 0s; }
|
78 |
+
.wave:nth-child(2) { animation-delay: 1s; }
|
79 |
+
.wave:nth-child(3) { animation-delay: 2s; }
|
80 |
+
.wave:nth-child(4) { animation-delay: 3s; }
|
81 |
+
@keyframes ripple {
|
82 |
+
0% { width: 0; height: 0; opacity: 1; top: 50%; left: 50%; }
|
83 |
+
100% { width: 500px; height: 500px; opacity: 0; top: calc(50% - 250px); left: calc(50% - 250px); }
|
84 |
+
}
|
85 |
+
</style>
|
86 |
+
</head>
|
87 |
+
<body>
|
88 |
+
<div class="container">
|
89 |
+
<h1>Roger's Brain Tingle</h1>
|
90 |
+
<div class="thought-bubble">
|
91 |
+
<p>You're experiencing a curious sensation, a gentle tingle in your mind. It feels as if someone is softly brushing the inside of your thoughts with a feather made of pure consciousness.</p>
|
92 |
+
</div>
|
93 |
+
<p>Current Tingle Intensity:</p>
|
94 |
+
<div class="tingle-meter">
|
95 |
+
<div class="tingle-level"></div>
|
96 |
+
</div>
|
97 |
+
<p>Your telepathic receptivity is currently at 75%</p>
|
98 |
+
<div class="brain-waves">
|
99 |
+
<div class="wave"></div>
|
100 |
+
<div class="wave"></div>
|
101 |
+
<div class="wave"></div>
|
102 |
+
<div class="wave"></div>
|
103 |
+
</div>
|
104 |
+
</div>
|
105 |
+
|
106 |
+
<script>
|
107 |
+
function generateThought() {
|
108 |
+
const thoughts = [
|
109 |
+
"Did I leave the stove on?",
|
110 |
+
"I wonder what dogs dream about",
|
111 |
+
"Is cereal soup?",
|
112 |
+
"Why don't sheep shrink when it rains?",
|
113 |
+
"Do fish ever get thirsty?",
|
114 |
+
"Is a hotdog a sandwich?",
|
115 |
+
"Why do we drive on parkways and park on driveways?",
|
116 |
+
"If I invisibly sleep, do I disappear in my dreams?",
|
117 |
+
"Are shadows 2D or 3D?",
|
118 |
+
"Why isn't phonetic spelled the way it sounds?"
|
119 |
+
];
|
120 |
+
const randomThought = thoughts[Math.floor(Math.random() * thoughts.length)];
|
121 |
+
document.querySelector('.thought-bubble p').textContent = randomThought;
|
122 |
+
}
|
123 |
+
|
124 |
+
setInterval(generateThought, 5000);
|
125 |
+
</script>
|
126 |
+
</body></html>
|