org: improve TOC display and specify viewport

* doc/org/spot.css: Improve TOC.
* doc/org/.dir-locals.el.in, doc/org/init.el.in: Specify viewport.
This commit is contained in:
Alexandre Duret-Lutz 2015-06-22 09:24:32 +02:00
parent a184507848
commit 41a7b906d8
3 changed files with 25 additions and 21 deletions

View file

@ -34,9 +34,9 @@
:recursive t :recursive t
:publishing-function org-publish-org-to-html :publishing-function org-publish-org-to-html
; Org 8 ; Org 8
:html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"spot.css\" />" :html-head "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"syntax.css\" />\n<link rel=\"stylesheet\" type=\"text/css\" href=\"spot.css\" />"
; Org 7 ; Org 7
:style "<link rel=\"stylesheet\" type=\"text/css\" href=\"spot.css\" />" :style "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"syntax.css\" />\n<link rel=\"stylesheet\" type=\"text/css\" href=\"spot.css\" />"
:auto-preamble t) :auto-preamble t)
("spot-static" ("spot-static"
:base-directory "." :base-directory "."

View file

@ -52,9 +52,9 @@
,(if (require 'org-publish nil t) 'org-publish-org-to-html ; Org 7 ,(if (require 'org-publish nil t) 'org-publish-org-to-html ; Org 7
'org-html-publish-to-html) ; Org 8 'org-html-publish-to-html) ; Org 8
; Org 8 ; Org 8
:html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"syntax.css\" />\n<link rel=\"stylesheet\" type=\"text/css\" href=\"spot.css\" />" :html-head "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"syntax.css\" />\n<link rel=\"stylesheet\" type=\"text/css\" href=\"spot.css\" />"
; Org 7 ; Org 7
:style "\n<link rel=\"stylesheet\" type=\"text/css\" href=\"syntax.css\" />\n<link rel=\"stylesheet\" type=\"text/css\" href=\"spot.css\" />" :style "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"syntax.css\" />\n<link rel=\"stylesheet\" type=\"text/css\" href=\"spot.css\" />"
:auto-preamble t) :auto-preamble t)
("spot-static" ("spot-static"
:base-directory "@abs_top_srcdir@/doc/org/" :base-directory "@abs_top_srcdir@/doc/org/"

View file

@ -33,11 +33,13 @@
/* TOC inspired by http://jashkenas.github.com/coffee-script */ /* TOC inspired by http://jashkenas.github.com/coffee-script */
#table-of-contents { #table-of-contents {
font-size: 10pt; font-size: 80%;
max-width: 30em;
position: fixed; position: fixed;
right: 0em; right: 0em;
top: 0em; top: 0em;
padding-right: 8pt; padding-left: 0.5em;
padding-right: 0.5em;
-webkit-box-shadow: 0 0 1em #777777; -webkit-box-shadow: 0 0 1em #777777;
-moz-box-shadow: 0 0 1em #777777; -moz-box-shadow: 0 0 1em #777777;
-webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-left-radius: 5px;
@ -46,21 +48,23 @@
/* ensure doesn't flow off the screen when expanded */ /* ensure doesn't flow off the screen when expanded */
max-height: 80%; max-height: 80%;
overflow: auto; } overflow: auto; }
#table-of-contents h2 { #table-of-contents ul {
font-size: 10pt; padding-left: 1em;
max-width: 8em; }
font-weight: normal; #table-of-contents h2 {
padding-left: 0.5em; font-size: 100%;
padding-left: 0.5em; font-weight: normal;
padding-top: 0.05em; padding-left: 0.5em;
padding-bottom: 0.05em; } padding-right: 0.5em;
#table-of-contents #text-table-of-contents { padding-top: 0.05em;
display: none; padding-bottom: 0.05em; }
text-align: left; } #table-of-contents #text-table-of-contents {
#table-of-contents:hover #text-table-of-contents { display: none;
display: block; text-align: left; }
padding: 0.5em; #table-of-contents:hover #text-table-of-contents {
margin-top: -1.5em; } display: block;
padding: 0.5em;
margin-top: -1.5em; }
.rss_box {} .rss_box {}
.rss_title, rss_title a {} .rss_title, rss_title a {}