Skip to content

Commit

Permalink
added-geogebra-api--removed-sayings
Browse files Browse the repository at this point in the history
  • Loading branch information
ti ko authored and ti ko committed Apr 4, 2024
1 parent e2e1e26 commit 01504e1
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
5 changes: 5 additions & 0 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{{ partial "head.html" }}

<div id="geogebra" style="margin-top: 30px;margin-bottom: 20px;">
<h5 style="margin-bottom: 20px;">Math tool I use</h5>
<div id="ggb-element"></div>
</div>
<div id="yellowtail">Timo Körner</div>
</div>
<div id=bottomnav></div>
{{ partial "foot.html" }}

<script src="/ggb.js"></script>
<script src=/client.js></script>
2 changes: 1 addition & 1 deletion layouts/partials/foot.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<script src="/foot.js"></script>
<script src="/foot.js"></script>
2 changes: 2 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<head>
<meta name=viewport content="width=device-width,initial-scale=1">
<meta charset="utf-8" />
<link href="/favicon.png" rel="icon">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.0.0/css/bootstrap.min.css"
rel="stylesheet" />
Expand Down
11 changes: 10 additions & 1 deletion static/client.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@

document.title = tiko

geogebra()
function geogebra() {
var params = { "appName": "graphing", "width": 600, "height": 600, "showToolBar": true, "showAlgebraInput": true, "showMenuBar": true };
var applet = new GGBApplet(params, true);
window.addEventListener("load", () => {
applet.inject('ggb-element');
});
}

data()
async function data() {
let res = await (await (fetch(net_host + net_fun + 'website'))).json()
res = res.filter(val => val.cat !== 'static')
res = res.filter(val => val.cat !== 'static' && val.cat !== 'What people say')
res = groupBy(res, 'cat');

var list = document.createElement('ul')
Expand Down
5 changes: 5 additions & 0 deletions static/ggb.js

Large diffs are not rendered by default.

0 comments on commit 01504e1

Please sign in to comment.