home » zplus/dokk.org.git
Author zPlus <zplus@peers.community> 2022-08-28 05:11:22
Committer zPlus <zplus@peers.community> 2022-08-28 05:11:22
Commit aee2c84 (patch)
Tree a40db9a
Parent(s)

Change edges color. Make edges color darker in order to make them more visible.


commits diff: cf0e07f..aee2c84
1 file changed, 18 insertions, 18 deletionsdownload


Diffstat
-rw-r--r-- index.html 36

Diff options
View
Side
Whitespace
Context lines
Inter-hunk lines
+18/-18 M   index.html
index 6740e5a..116ecaf
old size: 5K - new size: 5K
@@ -4,7 +4,7 @@
4 4 <meta charset="utf-8">
5 5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 6 <title>DOKK Graph</title>
7 -
7 +
8 8 <style>
9 9 html, body, #graph {
10 10 font-family: monospace;
@@ -14,7 +14,7 @@
14 14 padding: 0;
15 15 width: 100%;
16 16 }
17 -
17 +
18 18 .sidebar {
19 19 background: #fbfbfb;
20 20 box-shadow: 0 0 .5rem 0 lightgray;
@@ -25,12 +25,12 @@
25 25 top: 0;
26 26 width: 25%;
27 27 }
28 -
28 +
29 29 input[type=search] {
30 30 padding: .5rem 1rem;
31 31 width: 100%;
32 32 }
33 -
33 +
34 34 #search_results {
35 35 list-style: none;
36 36 margin: 1rem 0 0 0;
@@ -70,8 +70,8 @@
70 70 },
71 71 edges: {
72 72 color: {
73 - color: "#f0f0f0",
74 - hover: "#e0e0e0",
73 + color: "#a0a0a0",
74 + hover: "#a0a0a0",
75 75 highlight: "red"
76 76 },
77 77 font: {
@@ -81,7 +81,7 @@
81 81 physics: true,
82 82 smooth: false,
83 83 },
84 -
84 +
85 85 layout: {
86 86 randomSeed: 0
87 87 },
@@ -101,27 +101,27 @@
101 101 };
102 102
103 103 network = new vis.Network(container, data, options);
104 -
104 +
105 105 function search(text) {
106 106 text = text.trim();
107 107 about_container = document.getElementById('about');
108 108 results_container = document.getElementById('search_results');
109 -
109 +
110 110 if(text.length == 0) {
111 111 about_container.style.display = "block";
112 112 results_container.style.display = "none";
113 113 return;
114 114 }
115 -
115 +
116 116 about_container.style.display = "none";
117 117 results_container.style.display = "block";
118 -
118 +
119 119 text = text.toLowerCase();
120 -
120 +
121 121 results = nodes.filter(obj => {
122 122 return obj.label.toLowerCase().startsWith(text);
123 123 }).slice(0, 100);
124 -
124 +
125 125 results_container.replaceChildren();
126 126 results.forEach(function (result, index, arr) {
127 127 li = document.createElement("li");
@@ -133,15 +133,15 @@
133 133 animation: false
134 134 });
135 135 });
136 -
136 +
137 137 results_container.appendChild(li);
138 138 });
139 139 }
140 140 </script>
141 -
141 +
142 142 <div class="sidebar">
143 143 <input type="search" oninput="search(this.value)" placeholder="Search node..." />
144 -
144 +
145 145 <div id="about">
146 146 <p>
147 147 <i>DOKK</i> is a community-curated graph.
@@ -153,12 +153,12 @@
153 153 <a href="https://clif.peers.community/dokk/graph.git">data</a>,
154 154 and participate in the creation of a free database of the world's knowledge.
155 155 Let's build it together!
156 -
156 +
157 157 <br /><br /><br /><br />
158 158 IRC: #<a href="https://peers.community/">peers</a> at irc.libera.chat
159 159 </p>
160 160 </div>
161 -
161 +
162 162 <ul id="search_results"></ul>
163 163 </div>
164 164 </body>