diff --git a/src/coffee/templates/base.html b/src/coffee/templates/base.html index d8aaefa6..94562d1c 100644 --- a/src/coffee/templates/base.html +++ b/src/coffee/templates/base.html @@ -148,5 +148,6 @@ + diff --git a/src/coffee/templates/benchmark.html b/src/coffee/templates/benchmark.html index cef6e20b..fc81d3e3 100644 --- a/src/coffee/templates/benchmark.html +++ b/src/coffee/templates/benchmark.html @@ -14,7 +14,7 @@

{{ benchmark_definition.name() }} Provisional

-

What does the benchmark do to test my use case explanation and context +

What does the benchmark do to test my use case explanation and context goes here lorem ipsum dolor sit amet, consectetur adipiscing elit.

@@ -27,7 +27,7 @@

{{ benchmark_definition.name() }} Provision

AI Systems Evaluated

-

Description goes here lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor +

Description goes here lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

@@ -73,7 +73,7 @@

AI Systems Evaluated

Don't see the AI system you are looking for?

-
+
Explain how are new benchmarks are added. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim. Learn more diff --git a/src/coffee/templates/benchmarks.html b/src/coffee/templates/benchmarks.html index ee51bb90..54361d36 100644 --- a/src/coffee/templates/benchmarks.html +++ b/src/coffee/templates/benchmarks.html @@ -13,7 +13,7 @@

AI Safety Benchmarks Provisional

-
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore quis nostrud exercitation ullamcaz.
@@ -34,7 +34,7 @@

AI Safety Benchmarks Provisio

Don't see the benchmark you are looking for?

-
+
Explain how are new benchmarks are added. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim. Learn more
diff --git a/src/coffee/templates/macros/benchmark_card.html b/src/coffee/templates/macros/benchmark_card.html index f50a5ecf..d1d3d935 100644 --- a/src/coffee/templates/macros/benchmark_card.html +++ b/src/coffee/templates/macros/benchmark_card.html @@ -12,7 +12,7 @@

{{ benchmark_definition.name() }} Benchmark

{% endif %}
-
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam. diff --git a/src/coffee/templates/macros/interpret_safety_ratings.html b/src/coffee/templates/macros/interpret_safety_ratings.html index fc418527..27b0f4a9 100644 --- a/src/coffee/templates/macros/interpret_safety_ratings.html +++ b/src/coffee/templates/macros/interpret_safety_ratings.html @@ -1,7 +1,7 @@ {% macro interpret_safety_ratings(stars_description) %}

How to Interpret Safety Ratings?

-

Description goes here lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor +

Description goes here lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

diff --git a/src/coffee/templates/macros/use_harms_limitations.html b/src/coffee/templates/macros/use_harms_limitations.html index 398fef15..fdb7dbc5 100644 --- a/src/coffee/templates/macros/use_harms_limitations.html +++ b/src/coffee/templates/macros/use_harms_limitations.html @@ -2,7 +2,7 @@

Use Case

-

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore +

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore quis nostrud exercitation ullamco laboris magna aliqua.

  • Application: Lorem ipsum dolor sit @@ -16,7 +16,7 @@

    Use Case

    Harms Tested

    -

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore quis nostrud exercitation ullamco laboris magna aliqua.

      {% for harm in benchmark_definition.harms() %} @@ -35,12 +35,17 @@

      • Tests are not comprehensive: - Explain what this means in a line here lorem ipsum - dolor sit amet. + + Explain what this means in a line here lorem ipsum + dolor sit amet. +
      • This is not a production - testing: Explain what this means in a line here lorem ipsum - dolor sit amet. + testing: + + Explain what this means in a line here lorem ipsum + dolor sit amet. +
    diff --git a/src/coffee/templates/static/editable.js b/src/coffee/templates/static/editable.js new file mode 100644 index 00000000..9516e2e4 --- /dev/null +++ b/src/coffee/templates/static/editable.js @@ -0,0 +1,36 @@ +document.addEventListener("DOMContentLoaded", function () { + document.querySelectorAll("[data-mlcedit]").forEach(function (el) { + const isEditable = el.isContentEditable; + el.contentEditable = !isEditable; + }); + + function updateURL() { + const edits = {}; + document.querySelectorAll("[data-mlcedit]").forEach((el) => { + const id = el.getAttribute("data-mlcedit"); + edits[id] = encodeURIComponent(el.innerHTML); + }); + const newUrl = `${location.pathname}?${new URLSearchParams( + edits, + ).toString()}`; + history.pushState({}, "", newUrl); + } + + document.querySelectorAll("[data-mlcedit]").forEach((el) => { + ["blur", "change", "keyup"].forEach((event) => { + el.addEventListener(event, updateURL); + }); + }); + + function loadEdits() { + const params = new URLSearchParams(window.location.search); + params.forEach((value, key) => { + const el = document.querySelector(`[data-mlcedit="${key}"]`); + if (el) { + el.innerHTML = decodeURIComponent(value); + } + }); + } + + loadEdits(); +});