~sircmpwn/godocs.io

gddo: gddo-server: Disable jump modal when necessary v1 APPLIED

Adnan Maolood: 1
 gddo-server: Disable jump modal when necessary

 2 files changed, 3 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/godocs.io/patches/22538/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH gddo] gddo-server: Disable jump modal when necessary Export this patch

Disable the jump modal and other package shortcuts for directories and
commands.
---
 gddo-server/assets/templates/doc.html    | 2 ++
 gddo-server/assets/templates/layout.html | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/gddo-server/assets/templates/doc.html b/gddo-server/assets/templates/doc.html
index 6d3fafc..3f8831a 100644
--- a/gddo-server/assets/templates/doc.html
+++ b/gddo-server/assets/templates/doc.html
@@ -120,6 +120,7 @@
    <a href="?tools">Tools</a> for package owners.
  </div>

{{if and .Name (not .IsCommand)}}
  <div id="x-jump" tabindex="-1" class="modal">
    <div class="modal-dialog">
      <div class="modal-content">
@@ -136,6 +137,7 @@
    </div>
  </div>
{{end}}
{{end}}

{{define "Examples"}}
{{if .}}
diff --git a/gddo-server/assets/templates/layout.html b/gddo-server/assets/templates/layout.html
index dba3b7a..fa7e5ac 100644
--- a/gddo-server/assets/templates/layout.html
+++ b/gddo-server/assets/templates/layout.html
@@ -50,7 +50,7 @@
        <h4 class="modal-title">Keyboard shortcuts</h4>
      </div>
      <div class="modal-body">
        <table>{{$mutePkg := not (equal "pkg.html" templateName)}}
        <table>{{$mutePkg := or (ne "doc.html" templateName) (not .Name) .IsCommand}}
          <tr><td align="right"><b>?</b></td><td> : This menu</td></tr>
          <tr><td align="right"><b>/</b></td><td> : Search site</td></tr>
          <tr{{if $mutePkg}} class="text-muted"{{end}}><td align="right"><b>f</b></td><td> : Jump to identifier</td></tr>
-- 
2.31.1
Thanks!

To git@git.sr.ht:~sircmpwn/gddo
   a978cea..062c20b  master -> master