arcadedb icon indicating copy to clipboard operation
arcadedb copied to clipboard

betther manual navigation.

Open mdre opened this issue 2 years ago • 3 comments

Could be changed the title with the section first so it more easy to find it in the multiple tabs open.

Screenshot_20220829_113702

mdre avatar Aug 29 '22 14:08 mdre

What's the URL of that page?

lvca avatar Aug 30 '22 19:08 lvca

it is the same URL, just different section. For example: https://docs.arcadedb.com/#SQL-Create-Vertex --> title: AcadeDB Manual ---> suggestion: Create Vertex - ArcadeDB Manual https://docs.arcadedb.com/#SQL-Update --> title: AcadeDB Manual ---> suggestion: SQL Update - ArcadeDB Manual https://docs.arcadedb.com/#SQL-Alter-Type --> title: AcadeDB Manual ---> suggestion: SQL Alter - ArcadeDB Manual

I usually open and keep a section open for fast reference. The title fine but if it include the section that is showing could be better. It just a suggestion. When I'am studding something I open a lot of pages and keep ir open and sorted. The Tree Style Tab is my best friend to do this!

mdre avatar Aug 30 '22 19:08 mdre

I got it now. We use AsciiDoc, not sure if changing the title is possible. But I agree it would be nice.

lvca avatar Aug 31 '22 14:08 lvca

Dear @mdre , I second @lvca on this, the bookmark's title is likely suggested from the <title> tag in the HTML head(er) block of a page, so each bookmark of any anchor produces the same bookmark title. So, this could be more of a missing browser feature?

gramian avatar Nov 16 '22 21:11 gramian

Hi guys!

I had never used AsciiDoc but a fast reading take me to passthrough. What I found is that if you include this block in the head it make what I want:

++++
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script>
    $(document).ready(function () {
       $('a').click(function(e) {
          $('title').text(e.target.text + " - ArcadeDB Manual");
          history.pushState({}, '', $(this).attr('href'));
          
      });
    });
</script>
++++

I do not have the doc to test but here is the result of adding that script to the html head section: adb.zip

mdre avatar Nov 17 '22 12:11 mdre

@mdre just deployed your fix and works. Thanks!

lvca avatar Nov 17 '22 16:11 lvca

Hi! It's seem that this enhanced has been lost in current manual. Could be it activated again? Thanks

mdre avatar Apr 08 '23 20:04 mdre

I see your code is still there: https://raw.githubusercontent.com/ArcadeData/arcadedb-docs/main/src/main/asciidoc/index.adoc

lvca avatar Apr 10 '23 14:04 lvca

It still works for me, maybe a hard refresh is needed because of doc updates?

gramian avatar Apr 10 '23 14:04 gramian

Hi!. I found what was bothering me. If you keep the browser with the tabs open it loose every title in next reload. The same happend if you ctrl+click to open the link in a new tab. To fix it the script must be changed to:

 $(document).ready(function () {
       $('a').click(function(e) {
          $('title').text(e.target.text + " - ArcadeDB Manual");
          history.pushState({}, '', $(this).attr('href'));
      });
      
      var hash = window.location.hash;

      if (hash) {
              hash = hash.substr(1); // Quita el carácter "#" del hash
              $("a[href$='" + hash + "']").each(function() {
                      var title = this.text;
                      
                      let isSection = /^\d/.test(title);
                      if (isSection) {
                        $('title').text(title + " - ArcadeDB Manual");
                      }
              });
      } 
      
    });

mdre avatar Apr 10 '23 20:04 mdre

Trying this out, just pushed, in 10 mins should be online.

lvca avatar Apr 10 '23 21:04 lvca