eBPF-based security platform
Documentation: drop the page actions and link the source as a view
Daniel Borkmanna10dd044e7f3
diff --git a/Documentation/Makefile b/Documentation/Makefileindex 6977bbb9..5fcfa7fe 100644--- a/Documentation/Makefile+++ b/Documentation/Makefile@@ -78,8 +78,8 @@ lastchange:: >"$(OUT)/lastchange.txt"; \fi-# The plain-text pages under _text/ are what "View as text", "Copy page"-# and llms.txt point to, for readers that are agents.+# The plain-text pages under _text/ are what llms.txt points to, for+# readers that are agents.ifeq ($(DOCS_CONTAINER),1)html: image lastchange$(Q)printf ' HTML %s\n' '$(DOCS_OUT)/html'diff --git a/Documentation/_ext/shirudo_docs.py b/Documentation/_ext/shirudo_docs.pyindex 0a005491..2426fbe0 100644--- a/Documentation/_ext/shirudo_docs.py+++ b/Documentation/_ext/shirudo_docs.py@@ -72,7 +72,7 @@ def page_context(app, pagename, templatename, context, doctree):context["source_file"] = sourcecontext["last_change"], context["last_change_date"] = \CHANGES.get(source, (None, None))- context["edit_url"] = "%s/blob/%s/%s" % (+ context["github_url"] = "%s/blob/%s/%s" % (context.get("repository"), context.get("branch"), source)diff --git a/Documentation/_themes/shirudo/layout.html b/Documentation/_themes/shirudo/layout.htmlindex 12a03b11..461ad460 100644--- a/Documentation/_themes/shirudo/layout.html+++ b/Documentation/_themes/shirudo/layout.html@@ -42,23 +42,15 @@</div></nav><main>- <div class="pagebar">- <div class="crumbs">- {%- if pagename != root_doc %}- <a href="{{ pathto(root_doc) }}">Docs</a>- {%- for parent in parents %}- <a href="{{ parent.link|e }}">{{ parent.title }}</a>- {%- endfor %}- <span>{{ title|striptags|e }}</span>- {%- endif %}- </div>- {%- if source_file %}- <div class="pageactions">- <button type="button" class="copy-page" data-src="{{ pathto('_text/' + pagename + '.txt', 1) }}">Copy page</button>- <a href="{{ pathto('_text/' + pagename + '.txt', 1) }}">View as text</a>- </div>- {%- endif %}+ {%- if pagename != root_doc %}+ <div class="crumbs">+ <a href="{{ pathto(root_doc) }}">Docs</a>+ {%- for parent in parents %}+ <a href="{{ parent.link|e }}">{{ parent.title }}</a>+ {%- endfor %}+ <span>{{ title|striptags|e }}</span></div>+ {%- endif %}<article class="body" role="main">{% block body %}{% endblock %}</article>@@ -68,7 +60,7 @@{%- if last_change %}<span>Last change: <code>{{ last_change }}</code>, {{ last_change_date }} UTC</span>{%- endif %}- <a href="{{ edit_url }}">Edit this page on GitHub</a>+ <a href="{{ github_url }}">View on GitHub</a></footer>{%- endif %}</main>diff --git a/Documentation/_themes/shirudo/static/shirudo.css b/Documentation/_themes/shirudo/static/shirudo.cssindex e65106eb..d8b70816 100644--- a/Documentation/_themes/shirudo/static/shirudo.css+++ b/Documentation/_themes/shirudo/static/shirudo.css@@ -123,11 +123,7 @@ code.literal { font-size: 0.9em; background: none; padding: 0; }/* page */main { min-width: 0; padding: 28px 0 56px; }-.pagebar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; max-width: 780px; margin-bottom: 12px; font-size: 13px; }-.crumbs { color: var(--muted); }-.pageactions { display: flex; gap: 14px; margin-left: auto; }-.pageactions a, .pageactions button { color: var(--muted); font: inherit; background: none; border: 0; padding: 0; cursor: pointer; }-.pageactions a:hover, .pageactions button:hover { color: var(--accent); text-decoration: none; }+.crumbs { max-width: 780px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }.crumbs a { color: var(--muted); }.crumbs > * + *::before { content: "/"; margin: 0 6px; color: var(--line); }div.body, article.body { max-width: 780px; min-width: 0; padding: 0; background: none; color: var(--fg); }diff --git a/Documentation/_themes/shirudo/static/shirudo.js b/Documentation/_themes/shirudo/static/shirudo.jsindex 5c549d75..8e921fa4 100644--- a/Documentation/_themes/shirudo/static/shirudo.js+++ b/Documentation/_themes/shirudo/static/shirudo.js@@ -150,33 +150,6 @@targets.forEach(function (t) { observer.observe(t.target); });}- function copyPage() {- var button = document.querySelector(".copy-page");-- if (!button || !navigator.clipboard || !window.fetch)- return;- button.addEventListener("click", function () {- var done = function (label) {- button.textContent = label;- setTimeout(function () {- button.textContent = "Copy page";- }, 1400);- };-- fetch(button.dataset.src).then(function (response) {- if (!response.ok)- throw new Error(response.status);- return response.text();- }).then(function (text) {- return navigator.clipboard.writeText(text);- }).then(function () {- done("Copied");- }, function () {- done("Not available");- });- });- }-function search() {var input = document.querySelector(".search input");@@ -198,7 +171,6 @@menu();code();spy();- copyPage();search();});})();