Changeset 25601 in project


Ignore:
Timestamp:
11/29/11 05:01:28 (8 years ago)
Author:
Jim Ursetto
Message:

chickadee 0.9.11: Improve response time & Firefox rendering with <script> at end; fix TOC flash

Move <script>s to end of HTML, improving responsiveness, avoiding starting mid-page
in Firefox, and correcting flash of unhidden TOC. Introduce js/no-js class into
<html> a la Modernizr, though we do it with a one-line inline script.

Location:
release/4/chickadee/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • release/4/chickadee/trunk/chickadee-driver-3e8.scm

    r20515 r25601  
    66(access-log "access.log")
    77(error-log "error.log")
    8 (server-port 8383)
     8(server-port 8388)
    99(max-connections 8)
    1010
    1111(ajax-log #f)   ;; Slow; not recommended for production.
    1212(cdoc-uri (uri "/cdoc"))
    13 (chickadee-uri (uri "/chickadee"))
     13(chickadee-uri (uri "/doc"))
    1414(incremental-search-uri (uri "/cdoc/ajax/prefix"))
    15 (chickadee-css-files (list (uri "/cdoc/chickadee.css?12")))
     15(chickadee-css-files (list (uri "/cdoc/chickadee.css?16")))
    1616(chickadee-js-files (list (uri "http://code.jquery.com/jquery-1.4.2.min.js")
    1717                          (uri "/cdoc/jquery.metadata.2.1.min.js")
    18                           (uri "/cdoc/chickadee-jquery.js?3")))
     18                          (uri "/cdoc/chickadee-jquery.js?6")))
    1919
    2020(maximum-match-results 250)
  • release/4/chickadee/trunk/chickadee-jquery.js

    r21898 r25601  
    3838    $(this).next().toggle();
    3939  });
    40   $('#toc h2').next().hide();
    4140});
    4241
  • release/4/chickadee/trunk/chickadee.css

    r21898 r25601  
    9494  text-transform: lowercase;
    9595}
    96 #toc > ul {
     96.js #toc ul.toc {    /* want #toc > ul but not compat w/IE6 */
     97  display: none;
     98}
     99#toc ul.toc {
    97100  padding-left: 0.5em;
    98101}
     
    530533        float: left;
    531534    }
     535    .no-js ul.contents-list {
     536        /* Don't collapse for non-JS.  Can be obtrusive, would probably look better at bottom. */
     537        display: block;
     538    }
    532539    ul.contents-list li {
    533540        float: left;
  • release/4/chickadee/trunk/chickadee.meta

    r23255 r25601  
    1111        (chicken-doc 0.4.0)
    1212        sxml-transforms uri-generic (chicken-doc-admin 0.4.0)
    13         chicken-doc-html)
     13        (chicken-doc-html 0.2.4))
    1414 (files "chickadee-cmd.scm" "chickadee-config.scm" "chickadee-driver-3e8.scm" "chickadee.setup" "chickadee.release-info" "jquery.metadata.min.js" "chickadee.meta" "mag.png" "chickadee.js" "chickadee.scm" "chickadee-config-nginx.scm" "install.sh" "chickadee-jquery.js" "chickadee.css" "chickadee-driver.scm"))
  • release/4/chickadee/trunk/chickadee.scm

    r21731 r25601  
    319319  (sxml->html
    320320   `((lit "<!doctype html>")
    321      (html
     321     (html (@ class "no-js")
    322322      (head ,(charset "utf-8")
    323             ,(map javascript (chickadee-js-files))
    324323            ,(map css-link (chickadee-css-files))
     324            ;; Remove "no-js" class and add "js" class to <HTML> when JS enabled, a la Modernizr.
     325            (script "this.document.documentElement.className = "
     326                    "this.document.documentElement.className.replace(/\\bno-js\\b/, '') + ' js '")
    325327            (title ,(if page-title
    326328                        `(,page-title " | chickadee")
     
    364366       (div (@ (id "body"))
    365367            (div (@ (id "main"))
    366                  ,body)))))))
     368                 ,body)))
     369      ,(map javascript (chickadee-js-files))))))
    367370
    368371(define (node-page title contents body #!key (page-title #f))
  • release/4/chickadee/trunk/chickadee.setup

    r21898 r25601  
    11;; -*- scheme -*-
    22
    3 (define +version+ "0.9.10")
     3(define +version+ "0.9.11")
    44
    55(compile -s -O2 -d1 -S chickadee.scm -j chickadee)
Note: See TracChangeset for help on using the changeset viewer.