emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-orgmode@gnu.org
Subject: Re: Org-Mode Homepage error
Date: Wed, 17 Aug 2011 17:58:23 +0200	[thread overview]
Message-ID: <871uwk9gio.fsf@Rainer.invalid> (raw)
In-Reply-To: 8739h1i0cb.fsf@gnu.org

[-- Attachment #1: Type: text/plain, Size: 772 bytes --]

Bastien <bzg@altern.org> writes:
> Well, the HTML page was empty -- same error than with the unpatched
> version of org-info.js.

Fetching a stale copy from cache perhaps?  I did all my testing locally
and changed things around to make sure it would really load the version
I just created...

> If you're confident this works with this structure:
>
>   <div id="preamble">
>     <h1 class="title">Title</h1>
>   <div>
>   
>   <div id="content">
>   ...
>   <div>
>
> then I will apply the patch (with a ChangeLog!)

That works for me in Firefox6 and Konqueror (both KHTML and WebKit mode)
in both the minified and the source version.  I've used the latest
version of yuicompressor (2.4.6 instead of 2.4.2), but that should not
make a difference.  Proper patch attached.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Find-title-differently-to-allow-it-to-reside-in-prea.patch --]
[-- Type: text/x-patch, Size: 1155 bytes --]

From 55fd3d1b7f82460e28d8fcc50c6ea0eb41197fef Mon Sep 17 00:00:00 2001
From: Achim Gratz <Stromeko@Stromeko.DE>
Date: Wed, 17 Aug 2011 17:49:56 +0200
Subject: [PATCH] Find title differently to allow it to reside in preamble

  * org-info-src.js: find the title heading via it's class property instead of
    relying on it to be the first heading in div content

TINYCHANGE
---
 code/org-info-js/org-info-src.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/code/org-info-js/org-info-src.js b/code/org-info-js/org-info-src.js
index 2e49e9c..b521c50 100644
--- a/code/org-info-js/org-info-src.js
+++ b/code/org-info-js/org-info-src.js
@@ -738,7 +738,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 = document.getElementsByClassName("title")[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)
-- 
1.7.6


[-- Attachment #3: Type: text/plain, Size: 183 bytes --]



Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

  reply	other threads:[~2011-08-17 15:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-25 19:33 Org-Mode Homepage error Renger van Nieuwkoop
2011-07-25 19:42 ` Michael Markert
     [not found]   ` <2152B3DFC552DE47A0A36CCC93D735310439FF7D@mx01.ecoplan.local>
2011-07-25 20:10     ` Michael Markert
2011-07-25 20:26   ` Sebastien Vauban
2011-07-25 20:30   ` Nick Dokos
2011-07-25 21:29     ` Bastien
2011-07-26 12:36       ` Sebastien Vauban
2011-07-26 15:04         ` Bastien
2011-07-26 16:00           ` Achim Gratz
2011-07-26 21:19             ` Sebastien Vauban
2011-07-27 17:33             ` Bastien
2011-07-28 18:49               ` Achim Gratz
2011-07-31 17:42               ` Achim Gratz
2011-08-16 20:10                 ` Bastien
2011-08-17 15:58                   ` Achim Gratz [this message]
2011-08-17 16:18                     ` Bastien
2011-08-17 16:50                       ` Achim Gratz
2011-08-18  7:02                         ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871uwk9gio.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).