Changeset 9585 for lang/gauche

Show
Ignore:
Timestamp:
04/16/08 21:14:51 (5 years ago)
Author:
kiyoka
Message:

Changed rule of page title of Wiki Page. WikiName? + firstline of wiki source.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/gauche/oldtype/trunk/Kahua/oldtype/oldtype/oldtype.kahua

    r8676 r9585  
    4949         (else 
    5050          #t)))) 
    51  
    52  
     51   
    5352;; utility : internal sxml format to barcode link 
    5453(define (sxml->barcode sxmls page-src) 
     
    129128                                                            (string-append orig "\n"))) 
    130129                                                      page-src))) 
     130                                                   "" 
    131131                                                   ))))) 
    132132                                         (node-set 
     
    245245 
    246246 
    247 (define (standard-page wikiname barcode nodes) 
    248   (html/ (head/ (title/ wikiname) 
     247(define (standard-page wikiname barcode nodes first-line) 
     248  (html/ (head/ (title/ (string-append wikiname first-line)) 
    249249                (link/ (@/ (rel "stylesheet") (type "text/css") 
    250250                           (href (string-append "/kahua/" (kahua-worker-type) "/oldtype.css")))) 
     
    285285 
    286286 
     287(define (oldtype-first-line page-src) 
     288  (car  
     289   (filter 
     290    (lambda (x) 
     291      (not (#/^[ ]*$/ x))) 
     292    page-src))) 
     293 
     294 
    287295(define (show-page/page wikiname) 
    288296  (let1 sexp (oldtype:load-sexp (kahua-site-root) wikiname) 
    289         (standard-page 
    290          wikiname 
    291          (if sexp 
    292              (sxml->barcode 
    293               (car (assq-ref sexp 'sxml)) 
    294               (car (assq-ref sexp 'src))) 
    295              (br/)) 
    296          (if sexp 
    297              (sxml->higher-order-tag 
    298               wikiname 
    299               (car (assq-ref sexp 'sxml)) 
    300               (car (assq-ref sexp 'src))) 
    301              (div/ 
    302               (p/ 
    303                (@/ (class "center")) 
    304                (strong/ 
    305                 (@/ (class "caption")) 
    306                 "This wikipage was not found."))))))) 
    307  
     297        (let ((sxml (car (assq-ref sexp 'sxml))) 
     298              (src  (car (assq-ref sexp 'src)))) 
     299          (standard-page 
     300           wikiname 
     301           (if sexp 
     302               (sxml->barcode sxml src) 
     303               (br/)) 
     304           (if sexp 
     305               (sxml->higher-order-tag wikiname sxml src) 
     306               (div/ 
     307                (p/ 
     308                 (@/ (class "center")) 
     309                 (strong/ 
     310                  (@/ (class "caption")) 
     311                  "This wikipage was not found.")))) 
     312           (oldtype-first-line src))))) 
    308313 
    309314