;;; ID: $Id: index.xhtml-data,v 1.55 2017/05/23 15:20:32 ttn Exp $

;;; Copyright (C) 1999-2014, 2017 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 ((me "/software/")
      (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))
          (flattr/payment-link me)
          (~title "Free Software"))
   (~body

    (~h1 (let ((parts `(,(~a 'href "../patronage.html" "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 ~maintained (all-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.xhtml-data.html.gz")
                 ("up"     "../")))
        (~br)
        (flattr/auto-submit-anchor
         me "GNUVOLA Software"
         'description "Free Software TTN Maintains"
         'tags        '("free software"
                        "GNU"
                        "GPLv3+")
         'category    'software)))))

;;; index.xhtml-data ends here