{"id":19065592,"url":"https://github.com/caiorss/org-nav-theme","last_synced_at":"2025-06-24T14:40:00.962Z","repository":{"id":41287899,"uuid":"108227184","full_name":"caiorss/org-nav-theme","owner":"caiorss","description":"org-mode theme with navigation bar for big documents","archived":false,"fork":false,"pushed_at":"2018-10-18T18:41:51.000Z","size":272,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-28T11:51:27.944Z","etag":null,"topics":["document","export","html","navigation","org-mode","theme","toc"],"latest_commit_sha":null,"homepage":"https://caiorss.github.io/org-nav-theme","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caiorss.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-25T06:09:06.000Z","updated_at":"2025-02-12T23:07:44.000Z","dependencies_parsed_at":"2022-07-07T11:04:06.426Z","dependency_job_id":null,"html_url":"https://github.com/caiorss/org-nav-theme","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/caiorss/org-nav-theme","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caiorss%2Forg-nav-theme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caiorss%2Forg-nav-theme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caiorss%2Forg-nav-theme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caiorss%2Forg-nav-theme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caiorss","download_url":"https://codeload.github.com/caiorss/org-nav-theme/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caiorss%2Forg-nav-theme/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261695398,"owners_count":23195740,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["document","export","html","navigation","org-mode","theme","toc"],"created_at":"2024-11-09T00:51:17.871Z","updated_at":"2025-06-24T14:40:00.924Z","avatar_url":"https://github.com/caiorss.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+TITLE: Org-nav\n#+STARTUP: content\n#+DESCRIPTION: org-mode theme with navigation bar for big documents.\n\n#+INCLUDE: theme/theme.org\n\n* Org-nav theme \n** What is it? \n\nIt is a theme for org-mode html export that makes easier to browser\ndocuments with very long table of contents. This theme displays a\nnavigation bar at the left side.\n\n - [[https://github.com/caiorss/org-nav-theme][Github Repository]] \n\n - [[https://caiorss.github.io/org-nav-theme][Demonstration]] \n\nFeatures: \n \n - It makes easy to browse large org-mode files exported to html as it\n   provides a scrollable sidebar showing the table of contents.\n\n - Dark Theme - Dark scify background makes staring the screen for long\n   hours less tiring for the eyes.\n\n - Mobile friend. It now works on Phones and Table Screens and\n   provides a mobile-friendly table of contents menu. \n\n\n# Screenshots:\n\n# #+CAPTION: Screenshot 1 \n# [[file:images/image1.png][file:images/image1.png]] \n\n# #+CAPTION: Screenshot 2 \n# [[file:images/image2.png][file:images/image2.png]] \n\n** Objectives \n\nMake a customizable and convenient theme for reading long documents in\norg-mode.\n\nIdeas: \n\n - Strive for readability.\n\n - Make the convenient for documents with long table of contents.\n\n - Load fast, using the minimum of javascript as possible.\n\n - Make this theme convenient for mobile devices.\n\n** Install it  \n\nStep 1. Put the directory ./theme where are the org-files and add to each org-file. \n\n#+BEGIN_SRC sh\n$ tree .\n.\n├── README.org\n└── theme\n    ├── org-nav-theme.css\n    ├── org-nav-theme.js\n    └── theme.org\n#+END_SRC\n\nStep 2. Add thoses headers at the top of the file: \n\n#+BEGIN_SRC \n#+INCLUDE: theme/theme.org\n#+END_SRC\n\nStep 3. To export an org-file such as README.org to README.html run: \n\n - =M-x org-html-export-to-html=\n\n** Settings for syntax highlight \n*** Overview \n\nIn order to export code blocks with syntax highligh, it is necessary to\ninstall the package _htmlize_ add this settings to Emacs init.el \n\n*** Syntax highlight for latex fragments\n\n#+BEGIN_SRC emacs-lisp\n(setq org-highlight-latex-and-related '(latex script entities))\n#+END_SRC\n*** Syntax highlight for code blocks  #+BEGIN_SRC .. #+END_SRC \n\n#+BEGIN_SRC emacs-lisp\n(setq org-src-fontify-natively t)\n#+END_SRC\n\n*** Htmlize output set by css \n\n\n#+BEGIN_SRC emacs-lisp \n;; (setq org-html-htmlize-output-type 'inline-css) ;; default\n(setq org-html-htmlize-output-type 'css)\n#+END_SRC\n\n*** Org-html htmlize font prefix \n\n #+BEGIN_SRC emacs-lisp \n;; (setq org-html-htmlize-font-prefix \"\") ;; default\n(setq org-html-htmlize-font-prefix \"org-\")\n #+END_SRC\n\n* Example of how this theme would look like\n** Examples 1 \n*** Dijkstra quote about APL  \n\n\n#+BEGIN_QUOTE\n“The competent programmer is fully aware of the strictly limited size of \nhis own skull; therefore he approaches the programming task in full \nhumility, and among other things he avoids clever tricks like the \nplague. In the case of a well-known conversational programming \nlanguage I have been told from various sides that as soon as a \nprogramming community is equipped with a terminal for it, a specific \nphenomenon occurs that even has a well-established name: it is called \n\"the one-liners\". It takes one of two different forms: one programmer \nplaces a one-line program on the desk of another and either he proudly \ntells what it does and adds the question \"Can you code this in less \nsymbols?\" —as if this were of any conceptual relevance!— or he just \nasks \"Guess what it does!\". From this observation we must conclude \nthat this language as a tool is an open invitation for clever tricks; and \nwhile exactly this may be the explanation for some of its appeal, viz. to \nthose who like to show how clever they are, I am sorry, but I must \nregard this as one of the most damning things that can be said about a \nprogramming language.” \n\n-- Dijkstra on APL \n#+END_QUOTE\n\n*** Quote from Cloud Flare \n\n#+BEGIN_QUOTE\nEvery technology, when sufficiently complicated, becomes\nprogrammable. \n\n-- [[https://blog.cloudflare.com/introducing-cloudflare-workers/][Kenton Vardas]] / Cloud Flare. \n#+END_QUOTE\n\n** Examples 2 \n*** Lorem-ipsum text \n\nLorem ipsum dolor sit amet, cu mei vero quodsi bonorum. Option oblique\nceteros nec ut, et alii eros choro sit, at has alterum commune\nincorrupte. Cu mea munere aperiri, sea nominavi apeirian mnesarchum\nex. Te duo euripidis persecuti, corrumpit quaerendum efficiantur vel\nat, ea omnium partiendo est. Nonumes apeirian tincidunt ne his, audire\nconstituto te mea, ei imperdiet contentiones cum.\n\nVis ex vitae deserunt convenire. Clita expetendis honestatis vis ea,\nea altera consetetur mel, solet bonorum maiorum ut eum. Eum ad stet\naccommodare, atqui referrentur ut nam, nam eu autem aliquam\nconsequat. Postea posidonium sed ex, sumo dolorem perpetua sit\nea. Mandamus tractatos definiebas eu eam.\n\nTe vocent fierent mea, te pro sale ubique, ea vocibus voluptatibus\nsea. Eu impetus molestiae pri, libris antiopam est te, ad tota\nmandamus pertinacia mea. Id eam erat adolescens. Eos mutat malis dicit\nea. Ex pri detracto sapientem, mea ad saperet recusabo. Has ad veritus\nadversarium, sed ea nusquam placerat, nulla pericula an pro.\n\nCum integre detraxit ex, clita causae copiosae pro et, id sea cetero\npartiendo. Elit pericula theophrastus ea quo, ad nec aeterno\nreferrentur, eos ea aperiam voluptatibus. Sed elitr prodesset\nquaerendum an. Et his possit iudicabit intellegebat, in graeci possit\nqui.\n\nMaiorum delicata forensibus ei pri, commodo officiis platonem mel et,\niusto dolore ullamcorper nec in. Usu honestatis accommodare id,\noblique atomorum interesset no qui. Ex oporteat conclusionemque\nest. Dolor quaerendum mea an. Mei et quaeque epicurei assentior,\niudico tempor eu vel. Animal antiopam dissentias sed eu, id vel augue\nullamcorper.\n\n*** Quick and dirty Javascript code  \n\n\n#+BEGIN_SRC js\n  var button = document.createElement(\"button\")\n  button.textContent    = \"Toggle\";\n  button.style.top      = \"20px\";\n  button.style.left     = \"30px\";\n  button.style.position = \"fixed\";\n  button.style.zIndex   = 10000;\n\n\n  function hideNavBar(){\n      var toc = document.querySelector(\"#table-of-contents\");\n      toc.style.display = \"none\";\n      document.documentElement.style.setProperty('--main-width', '90%');\n      // button.style.left = \"10px\";\n  }\n\n  function showNavBar(){\n      var toc = document.querySelector(\"#table-of-contents\");\n      toc.style.display = \"block\";\n      document.documentElement.style.setProperty('--main-width', '70%');\n      // button.style.left = \"25%\";\n  }\n\n  var buttonFlag = false; \n\n  button.addEventListener(\"click\", function(){\n      if(buttonFlag == true) {\n          hideNavBar();\n          buttonFlag = false;\n      } else {\n          showNavBar();\n          buttonFlag = true;\n      }\n  });\n\n\n  var init = function(){\n      hideNavBar();\n      document.body.appendChild(button);\n  }\n  document.addEventListener(\"DOMContentLoaded\", init, false);\n#+END_SRC\n\n*** Bullet lists \n\n - topic 1\n   - topic 1.1\n   - topic 1.2\n   - topic 1.3\n\n - topic 2\n   - topic 2.1\n   - topic 2.2\n   - topic 2.3\n\n - topic 3\n   - topic 3.1\n   - topic 3.2\n   - topic 3.3\n   - topic 3.4\n\n*** Topic 2.3\n** Tables everywhere! Gotta love tables!\n\n\n|               | Signature                                      | Description                                                           |\n|---------------+------------------------------------------------+-----------------------------------------------------------------------|\n|               |                                                |                                                                       |\n| ReaderT r m a |                                                | Encapsulates a function or computation (a -\u003e m b) where m is a monad. |\n| ReaderT       | (r -\u003e m a) -\u003e ReaderT r m a                    |                                                                       |\n|               |                                                |                                                                       |\n| runReaderT    | ReaderT r m a -\u003e r -\u003e m a                      | Run computation and get its value.                                    |\n|               |                                                |                                                                       |\n|               |                                                |                                                                       |\n| return        | a -\u003e (ReaderT r m) a                           | Monad return function.                                                |\n| (\u003e\u003e=)         | a -\u003e (ReaderT r m) b -\u003e (ReaderT r m) b        | Monad bind function.                                                  |\n|               |                                                |                                                                       |\n|               |                                                |                                                                       |\n| fmap          | (a -\u003e b) -\u003e (ReaderT r m) a -\u003e (ReaderT r m) b | Apply a function (a -\u003e b) to the result of computation Reader r a.    |\n|               |                                                |                                                                       |\n|               |                                                |                                                                       |\n| ask           | m r                                            | Read environment or configuration.                                    |\n|               |                                                |                                                                       |\n|               |                                                |                                                                       |\n| local         | (r -\u003e r) -\u003e m a -\u003e m a                         | Modify environment by applying a function to it.                      |\n|               |                                                |                                                                       |\n|               |                                                |                                                                       |\n| liftIO        | MonadIO m =\u003e IO a -\u003e m a                       |                                                                       |\n| liftIO        | IO a -\u003e (Reader r m) a                         |                                                                       |\n|               |                                                |                                                                       |\n|               |                                                |                                                                       |\n** C/C++ and the big picture - System Programming \n\n\n*Platform and Processors* \n\n_Processors:_\n\n - Intel - x86 (32 bits)    architecture\n\n - Intel/AMD x64 (64 bits)  architecture\n\n - PowerPC - Embedded systems, printers ...\n\n - ARM - Processor architecture used in smartphones, tablets, security\n   cameras ...\n\n - AVR - Microcontroller - SOC (System On Chip) - 8 bits, 16 bits and\n   32 bits. \n\n_Operating Systems_\n\n - GNU/Linux\n\n - Android/Linux (Android is a modified Linux with custom basic libc\n   C-library based on BSD c-lib).\n\n - Windows\n\n - Mac OSX\n\n - FreeBSD, NetBSD, OpenBSD\n\n - VxWorks - Real Time OS for Embedded Systems.\n\n - QNX\n\n_Main APIs_ \n\n - Unix API - Common libaries and header files in Unix-like operating\n   systems like Linux, BSD variants and OSX and IOS.\n\n - Windows / Windows Operating System - windows.h\n\n*Compilers*\n\n - gcc (g++) - GNU C Compiler \n\n - mingw - gcc/g++ ported for Windows \n\n - clang (llvm)\n\n - Microsoft C++ compiler \n\n*CPP / C++ Dialects* \n \n - Legacy C/C++\n\n - C++11\n\n - C++14 \n\n*File Formats*\n\n#+CAPTION: Reader monad transformer type signatures\n| File Format            | Description                                              |   |\n|------------------------+----------------------------------------------------------+---|\n|                        | *Source Code*                                            |   |\n|                        |                                                          |   |\n| .asm                   | Assembly Source code - Used for very low level handling. |   |\n|                        |                                                          |   |\n| .c                     | c-language source code                                   |   |\n| .h                     | c-langauge header file                                   |   |\n|                        |                                                          |   |\n| .cpp                   | C++ source code                                          |   |\n| .hpp                   | C++ header file                                          |   |\n|                        |                                                          |   |\n|                        | *Object Code / Compiled*                                 |   |\n|------------------------+----------------------------------------------------------+---|\n| .o                     | Object file created before linking.                      |   |\n|                        |                                                          |   |\n|                        | *Shared Libraries*                                       |   |\n| .dll                   | Windows shared library                                   |   |\n| .so                    | Linux shared Library                                     |   |\n| .dylib                 | Mac OSX shared library                                   |   |\n|                        |                                                          |   |\n|                        | *Exectuables*                                            |   |\n| .bin or any extensions | Linux/ Unix / OSX executables  - ELF Format              |   |\n| .exe                   | Windows Executable - PE32 - Portable Executable          |   |\n|                        |                                                          |   |\n|                        |                                                          |   |\n\n** Simple C++ program \n\n#+BEGIN_SRC cpp \n/**   File:      dataTypeSizes.cpp \n      Objective: Show C/C++ primitive data types sizes.      \n */\n\n#include \u003ciostream\u003e\n#include \u003climits\u003e\n\nusing namespace std;\n\n\nint main(){\n  // 8 bits / 1 byte numeric types\n  //---------------------------------------------------\n  int charMin = numeric_limits\u003cchar\u003e::min() ;\n  int charMax = numeric_limits\u003cchar\u003e::max() ;\n  \n  int scharMin = numeric_limits\u003csigned char\u003e::min() ;\n  int scharMax = numeric_limits\u003csigned char\u003e::max() ;\n\n  int ucharMin = numeric_limits\u003cunsigned char\u003e::min() ;\n  int ucharMax = numeric_limits\u003cunsigned char\u003e::max() ;\n\n  int int8Min  = numeric_limits\u003cint8_t\u003e::min() ;\n  int int8Max  = numeric_limits\u003cint8_t\u003e::max() ;  \n\n  int uint8Min  = numeric_limits\u003cuint8_t\u003e::min() ;\n  int uint8Max  = numeric_limits\u003cuint8_t\u003e::max() ;\n\n  // 16 bits / 2 bytes Numeric types\n  //---------------------------------------------------\n  \n  int shortMin  = numeric_limits\u003cshort\u003e::min() ;\n  int shortMax  = numeric_limits\u003cshort\u003e::max() ;\n\n  int ushortMin  = numeric_limits\u003cunsigned short\u003e::min() ;\n  int ushortMax  = numeric_limits\u003cunsigned short\u003e::max() ;\n  \n  int int16Min  = numeric_limits\u003cint16_t\u003e::min() ;\n  int int16Max  = numeric_limits\u003cint16_t\u003e::max() ;  \n\n  int uint16Min  = numeric_limits\u003cuint16_t\u003e::min() ;\n  int uint16Max  = numeric_limits\u003cuint16_t\u003e::max() ;  \n\n  // 32 bits / 4 bytes Numeric types\n  //---------------------------------------------------\n    \n  int intMin  = numeric_limits\u003cint\u003e::min() ;\n  int intMax  = numeric_limits\u003cint\u003e::max() ;  \n  \n  cout \u003c\u003c \"C/C++ Data type sizes in number of bytes (1 byte = 8 bits)\" \u003c\u003c endl;\n\n  cout \u003c\u003c \"\\n1 byte / 8 bits Data types\"                       \u003c\u003c endl;\n  cout \u003c\u003c  \"------------------------------------\"              \u003c\u003c endl; \n  cout \u003c\u003c \"sizeof(char)          = \" \u003c\u003c sizeof(char)           \u003c\u003c \" min = \" \u003c\u003c charMin  \u003c\u003c \" max = \" \u003c\u003c charMax \u003c\u003c endl; \n  cout \u003c\u003c \"sizeof(signed char)   = \" \u003c\u003c sizeof(signed char)    \u003c\u003c \" min = \" \u003c\u003c scharMin \u003c\u003c \" max = \" \u003c\u003c scharMax \u003c\u003c endl; \n  cout \u003c\u003c \"sizeof(unsigned char) = \" \u003c\u003c sizeof(unsigned char)  \u003c\u003c \" min = \" \u003c\u003c ucharMin \u003c\u003c \" max = \" \u003c\u003c ucharMax \u003c\u003c endl; \n  cout \u003c\u003c \"sizeof(int8_t)        = \" \u003c\u003c sizeof(int8_t)         \u003c\u003c \" min = \" \u003c\u003c int8Min  \u003c\u003c \" max = \" \u003c\u003c int8Max \u003c\u003c endl; \n  cout \u003c\u003c \"sizeof(uint8_t)       = \" \u003c\u003c sizeof(uint8_t)        \u003c\u003c \" min = \" \u003c\u003c uint8Min \u003c\u003c \" max = \" \u003c\u003c uint8Max \u003c\u003c endl; \n  \n  cout \u003c\u003c \"\\n2 bytes / 16 bits Data types\"                     \u003c\u003c endl;  \n  cout \u003c\u003c  \"------------------------------------\"              \u003c\u003c endl;   \n  cout \u003c\u003c \"sizeof(short)         = \" \u003c\u003c sizeof(short)          \u003c\u003c \" min = \" \u003c\u003c shortMin  \u003c\u003c \" max = \" \u003c\u003c shortMax  \u003c\u003c endl; \n  cout \u003c\u003c \"sizeof(usigned short) = \" \u003c\u003c sizeof(unsigned short) \u003c\u003c \" min = \" \u003c\u003c ushortMin \u003c\u003c \" max = \" \u003c\u003c ushortMax \u003c\u003c endl; \n  cout \u003c\u003c \"sizeof(int16_t)       = \" \u003c\u003c sizeof(int16_t)        \u003c\u003c \" min = \" \u003c\u003c int16Min  \u003c\u003c \" max = \" \u003c\u003c int16Max  \u003c\u003c endl;  \n  cout \u003c\u003c \"sizeof(uint16_t)      = \" \u003c\u003c sizeof(uint16_t)       \u003c\u003c \" min = \" \u003c\u003c uint16Min \u003c\u003c \" max = \" \u003c\u003c uint16Max \u003c\u003c endl;  \n  \n  cout \u003c\u003c \"\\n4 bytes / 32 bits Data types\"                    \u003c\u003c endl;  \n  cout \u003c\u003c  \"------------------------------------\"             \u003c\u003c endl;   \n  cout \u003c\u003c \"sizeof(int)           = \" \u003c\u003c sizeof(int)           \u003c\u003c \" min = \" \u003c\u003c intMin \u003c\u003c \" max = \" \u003c\u003c intMax \u003c\u003c endl;  \n  cout \u003c\u003c \"sizeof(int32_t)       = \" \u003c\u003c sizeof(int32_t)       \u003c\u003c endl;\n  cout \u003c\u003c \"sizeof(int64_t)       = \" \u003c\u003c sizeof(int64_t)       \u003c\u003c endl;\n  \n  cout \u003c\u003c \"sizeof(float)         = \" \u003c\u003c sizeof(float)         \u003c\u003c endl;  \n    cout \u003c\u003c \"\\n8 bytes / 64 bits Data types\"                    \u003c\u003c endl;  \n  cout \u003c\u003c  \"------------------------------------\"             \u003c\u003c endl;    \n  cout \u003c\u003c \"sizeof(long)          = \" \u003c\u003c sizeof(long)          \u003c\u003c endl;\n  cout \u003c\u003c \"sizeof(long long)     = \" \u003c\u003c sizeof(long long)     \u003c\u003c endl;    \n  cout \u003c\u003c \"sizeof(double)        = \" \u003c\u003c sizeof(double)        \u003c\u003c endl;  \n  \n  return 0;\n}\n\n#+END_SRC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaiorss%2Forg-nav-theme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaiorss%2Forg-nav-theme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaiorss%2Forg-nav-theme/lists"}