emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] worg table of contents
@ 2013-05-15 17:53 Rick Frankel
  2013-05-16  6:19 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Rick Frankel @ 2013-05-15 17:53 UTC (permalink / raw)
  To: emacs-orgmode

The table of contents on worg is shown/hidden using the :hover
pseudo-element on the #table-of-contents element.

The problem is that this doesn't work on an ipad (or other touch
device). The following javascript snippet will add a function to show
the toc when it is "clicked", but I'm not sure where to put it (at the
bottom of "preamble.html"?)

#+BEGIN_SRC javascript
document.addEventListener('DOMContentLoaded',function() {
document.getElementById("table-of-contents").onclick = function() {
var elem = document.getElementById("text-table-of-contents");
elem.style.display = elem.style.display == "block" ? "none" : "block";
}
});
#+END_SRC

rick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG] worg table of contents
  2013-05-15 17:53 [BUG] worg table of contents Rick Frankel
@ 2013-05-16  6:19 ` Bastien
  2013-05-16 21:50   ` Rick Frankel
  0 siblings, 1 reply; 4+ messages in thread
From: Bastien @ 2013-05-16  6:19 UTC (permalink / raw)
  To: Rick Frankel; +Cc: emacs-orgmode

Hi Rick,

Rick Frankel <rick@rickster.com> writes:

> The following javascript snippet will add a function to show
> the toc when it is "clicked", but I'm not sure where to put it (at the
> bottom of "preamble.html"?)

I'd say it's a good place, yes.

Beware that the new preamble.html will only appear in pages that have
been republished.   I can republish all Worg pages if needed.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG] worg table of contents
  2013-05-16  6:19 ` Bastien
@ 2013-05-16 21:50   ` Rick Frankel
  2013-05-17  6:12     ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Rick Frankel @ 2013-05-16 21:50 UTC (permalink / raw)
  To: emacs-orgmode

On Thu, May 16, 2013 at 08:19:57AM +0200, Bastien wrote:
> Hi Rick,
> 
> Rick Frankel <rick@rickster.com> writes:
> 
> > The following javascript snippet will add a function to show
> > the toc when it is "clicked", but I'm not sure where to put it (at the
> > bottom of "preamble.html"?)
> 
> I'd say it's a good place, yes.
> 
> Beware that the new preamble.html will only appear in pages that have
> been republished.   I can republish all Worg pages if needed.

I have pushed the update. I also pushed a minor fix to org-hacks.org
to check if it works as expected (it does :). Republishing everything
is a great idea.

BTW, i noticed a bad link --- "http://orgmode.org/css/lightbox.css" is
included in the header, but the file does not exist on the server.

rick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG] worg table of contents
  2013-05-16 21:50   ` Rick Frankel
@ 2013-05-17  6:12     ` Bastien
  0 siblings, 0 replies; 4+ messages in thread
From: Bastien @ 2013-05-17  6:12 UTC (permalink / raw)
  To: Rick Frankel; +Cc: emacs-orgmode

Hi Rick,

Rick Frankel <rick@rickster.com> writes:

> I have pushed the update. I also pushed a minor fix to org-hacks.org
> to check if it works as expected (it does :). Republishing everything
> is a great idea.

I just republished everything.

> BTW, i noticed a bad link --- "http://orgmode.org/css/lightbox.css" is
> included in the header, but the file does not exist on the server.

Fixed, thanks!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-17  6:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-15 17:53 [BUG] worg table of contents Rick Frankel
2013-05-16  6:19 ` Bastien
2013-05-16 21:50   ` Rick Frankel
2013-05-17  6:12     ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).