From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: Org-Mode Homepage error Date: Tue, 26 Jul 2011 18:00:34 +0200 Message-ID: <87vcupdobh.fsf@Rainer.invalid> References: <2152B3DFC552DE47A0A36CCC93D735310439FF32@mx01.ecoplan.local> <874o2ai1up.fsf@googlemail.com> <4524.1311625834@alphaville.americas.hpqcorp.net> <87oc0ihwvk.fsf@gnu.org> <80bowhxlpz.fsf@somewhere.org> <87mxg1ozgc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:57096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qlk41-0008Tb-Th for emacs-orgmode@gnu.org; Tue, 26 Jul 2011 12:01:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qlk3x-0006Ga-Ac for emacs-orgmode@gnu.org; Tue, 26 Jul 2011 12:00:57 -0400 Received: from lo.gmane.org ([80.91.229.12]:56295) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qlk3w-0006Fn-O5 for emacs-orgmode@gnu.org; Tue, 26 Jul 2011 12:00:53 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Qlk3u-0001m7-BE for emacs-orgmode@gnu.org; Tue, 26 Jul 2011 18:00:50 +0200 Received: from p57aaccf8.dip.t-dialin.net ([87.170.204.248]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Jul 2011 18:00:50 +0200 Received: from Stromeko by p57aaccf8.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Jul 2011 18:00:50 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Bastien writes: > I fail to understand why an additional
> should break Sebastian's tool. > For starters, the title now resides in the preamble, but the script looks for it in content. This error is easily fixed, but I don't know if it has further repercussions. --8<---------------cut here---------------start------------->8--- diff --git a/code/org-info-js/org-info-src.js b/code/org-info-js/org-info-src.js index 2e49e9c..33faaac 100644 --- a/code/org-info-js/org-info-src.js +++ b/code/org-info-js/org-info-src.js @@ -522,6 +522,14 @@ var org_html_manager = { } else { // be backward compatible t.BODY = document.getElementsByTagName("body")[0]; }} + t.PREA = document.getElementById("preamble"); + t.POST = document.getElementById("postamble"); + if(null == t.PREA) { + t.PREA = t.BODY; + } + if(null == t.POST) { + t.POST = t.BODY; + } if(! t.WINDOW) { t.WINDOW = document.createElement("div"); t.WINDOW.style.marginBottom = "40px"; @@ -738,7 +746,7 @@ var org_html_manager = { // Move the title into the first visible section. // TODO: show title above everything if FIXED_TOC !!! - t.TITLE = t.BODY.getElementsByTagName("h1")[0]; + t.TITLE = t.PREA.getElementsByTagName("h1")[0]; if(t.INNER_TITLE && !t.FIXED_TOC && t.VIEW != t.SLIDE_VIEW) { t.INNER_TITLE = t.TITLE.cloneNode(true); /* TODO: this is still based on wrong behaviour of browsers (same id for two elements) --8<---------------cut here---------------end--------------->8--- Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Terratec KOMPLEXER: http://Synth.Stromeko.net/Downloads.html#KomplexerWaves