;;; ID: $Id: index.html-data,v 1.41 2010/07/24 16:29:45 ttn Exp $

;;; Copyright (C) 1999-2010 Thien-Thi Nguyen
;;; This program is provided under the terms of the GNU GPL, version 2.
;;; See http://www.fsf.org/copyleft/gpl.html for details.

(let ((in-heart '(("GNU Emacs" "http://www.gnu.org/software/emacs/")
                  ("SWIG"      "http://www.swig.org/")
                  ("GNU Go"    "http://www.gnu.org/software/gnugo/")))

      (at-large '(("GNU"       "http://www.gnu.org/software/")
                  ("Freshmeat" "http://www.freshmeat.net/")))

      (style '((".centered-table"
                margin-left "auto"
                margin-right "auto")
               (".L" text-align "left")
               (".C" text-align "center")
               (".R" text-align "right")
               ("a" text-decoration "none")
               ("body"
                text-align "center"
                max-width "25cm"
                margin-left "auto"
                margin-right "auto"))))

  (~simple-strict-xhtml
   (~head (~style 'type "text/css" (map css-tree style))
          (~title "Free Software"))
   (~body

    (~h1 (let ((parts `("please"
                        "share and enjoy"
                        "free software")))
           (define (pick-one)
             (let ((sel (list-ref parts (random (length parts)))))
               (set! parts (delq sel parts))
               (list "(" sel ")")))
           (set! *random-state* (seed->random-state (let ((p (gettimeofday)))
                                                      (* (car p) (cdr p)))))
           (list (pick-one)
                 (~br)
                 (pick-one)
                 (~br)
                 (pick-one))))

    (~hr)

    (~h2 "free software ttn maintains")
    (~table
     'class "centered-table"
     'width "70%"
     (map (lambda (proj)
            (~tr (~td 'class "L"
                      (~a 'href (proj #:url)
                          'id (proj #:enc)
                          'name (proj #:enc)
                          (proj #:name))
                      (let ((orig (proj #:orig)))
                        (if (string-null? orig)
                            :NULL
                            (~ulol `((,orig (,(proj #:url)
                                             "HISTORY")))))))
                 (~td 'class "R"
                      (~a 'href (proj #:file)
                          (strftime "%Y-%m-%d" (gmtime (proj #:mt)))))))
          (*sorted-projects)))

    (~h2 "free software ttn loves")
    (~p (~ulol in-heart))

    (~h2 "free software on the net")
    (~p (~ulol at-large))

    (~hr)
    (~p (copyright-since 1999) (~br)
        (~ulol '(("source" "index.html-data.html.gz")
                 ("up"     "../")))))))

;;; since you're looking at source, you might as well check out:
;;; <http://www.gnuvola.org/software/.cron.html.gz>

;;; index.html-data ends here