From 74bc939843ae5c35fbd367c1ef0144b6074cfefe Mon Sep 17 00:00:00 2001 From: Daniel Hader Date: Fri, 15 May 2026 09:12:24 -0500 Subject: problem loading via javascript and some problems initialized in sql --- static/index.html | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) (limited to 'static/index.html') diff --git a/static/index.html b/static/index.html index 37a831f..8162ac9 100644 --- a/static/index.html +++ b/static/index.html @@ -14,25 +14,47 @@ const result = await response.json(); console.log(result); + + const problems_div = document.getElementById("problems"); + while (problems_div.firstChild) { + problems_div.removeChild(problems_div.lastChild); + } + + for (const problem of result) { + const problem_div = document.createElement("div"); + problem_div.className = "problem"; + problems_div.appendChild(problem_div); + + const title = document.createElement("h2"); + title.innerHTML = problem.title; + problem_div.appendChild(title); + + const description = document.createElement("p"); + description.innerHTML = problem.description; + problem_div.appendChild(description); + } } - +
-
+
-

C&! Code Golf Leaderboard

In golf, the goal is to get a ball into a hole in as few swings as possible. The goal of code golf is similarly to solve a problem in as few bytes (of source code) as possible. The following is a list of programming challenges. Your task is to try and solve them in Python with as little code as possible measured in bytes.

- -
-

Title

-

Description

+ +
+
+

Title

+

Description

+
+ +
© 2026 Daniel Hader
-- cgit v1.2.3