dylanebert HF staff commited on
Commit
93e3db3
1 Parent(s): ed00e24

added learn more button

Browse files
Files changed (3) hide show
  1. editor/index.html +1 -0
  2. editor/src/main.ts +5 -0
  3. editor/style.css +8 -0
editor/index.html CHANGED
@@ -140,6 +140,7 @@
140
  <p class="control-name">Undo</p>
141
  <p class="control-icon">Ctrl + Z</p>
142
  </div>
 
143
  </div>
144
 
145
  <canvas id="canvas"> </canvas>
 
140
  <p class="control-name">Undo</p>
141
  <p class="control-icon">Ctrl + Z</p>
142
  </div>
143
+ <div id="about">Click here to learn more</div>
144
  </div>
145
 
146
  <canvas id="canvas"> </canvas>
editor/src/main.ts CHANGED
@@ -15,6 +15,7 @@ const fileInput = document.getElementById("file-input") as HTMLInputElement;
15
  const urlInput = document.getElementById("url-input") as HTMLInputElement;
16
  const uploadSubmit = document.getElementById("upload-submit") as HTMLButtonElement;
17
  const uploadError = document.getElementById("upload-error") as HTMLDivElement;
 
18
 
19
  const engine = new Engine(canvas);
20
 
@@ -134,6 +135,10 @@ async function main() {
134
  }
135
  });
136
 
 
 
 
 
137
  window.addEventListener("click", () => {
138
  window.focus();
139
  });
 
15
  const urlInput = document.getElementById("url-input") as HTMLInputElement;
16
  const uploadSubmit = document.getElementById("upload-submit") as HTMLButtonElement;
17
  const uploadError = document.getElementById("upload-error") as HTMLDivElement;
18
+ const learnMoreButton = document.getElementById("about") as HTMLButtonElement;
19
 
20
  const engine = new Engine(canvas);
21
 
 
135
  }
136
  });
137
 
138
+ learnMoreButton.addEventListener("click", () => {
139
+ window.open("https://huggingface.co/spaces/dylanebert/gsplat-editor/discussions/1", "_blank");
140
+ });
141
+
142
  window.addEventListener("click", () => {
143
  window.focus();
144
  });
editor/style.css CHANGED
@@ -150,6 +150,7 @@ progress::-moz-progress-bar {
150
  padding: 16px;
151
  border: 1px solid #888;
152
  width: 80%;
 
153
  color: #ddd;
154
  }
155
 
@@ -226,3 +227,10 @@ input[type="file"] {
226
  display: none;
227
  color: #f00;
228
  }
 
 
 
 
 
 
 
 
150
  padding: 16px;
151
  border: 1px solid #888;
152
  width: 80%;
153
+ max-width: 960px;
154
  color: #ddd;
155
  }
156
 
 
227
  display: none;
228
  color: #f00;
229
  }
230
+
231
+ #about {
232
+ margin: 8px 0;
233
+ text-decoration: underline;
234
+ cursor: pointer;
235
+ pointer-events: auto;
236
+ }