You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

113 lines
3.8 KiB
Scheme

9 years ago
(include "macros")
(import news-macros)
(use posix uri-common)
(generate-path-parameters
(/ site-root "/"
;; static files
(/ res "res"
(/ css "/css"
(/ fonts "/fonts")
(/ css-news "/news.css")
(/ css-lib "/lib.css"))
(/ js "/js"
(/ js-vendor "/vendor")
(/ js-lib "/lib.js")
(/ js-news "/news.js"))
(/ img "/img"
(/ img-original "/original")
(/ source-icon "/source-icons")
(/ img-raster "/raster"
(/ site-icon "/icon.png")
(/ site-logo-normal "/logo-normal.png"))
(/ img-icon "/icons"))
(/ font-awesome-fonts "/fonts"))
;; dynamic pages
(/ popular "popular")
(/ select-sources "select-sources")
(/ select-sources-trampoline "select-sources-trampoline")
(/ select-interests "select-interests")
(/ select-interests-trampoline "select-interests-trampoline")
(/ not-interested-trampoline "not-interested-trampoline")
(/ author "author")
(/ personalize "personalize")
(/ account "account"
(/ account-create "/create")
(/ account-create-trampoline "/create-trampoline")
(/ account-sign-in "/sign-in")
(/ account-sign-in-trampoline "/sign-in-trampoline")
(/ account-password-reset "/password-reset")
(/ account-sign-out "/sign-out")
(/ account-hide-viewed "/hide-viewed")
(/ account-show-viewed "/show-viewed")
(/ account-user-metrics-opt-out "/user-metrics-opt-out")
(/ account-user-metrics-opt-out-trampoline "/user-metrics-opt-out-trampoline"))
(/ doc "doc"
(/ doc-api "/api"
(/ doc-api-landing "/landing")))
(/ source "source"
(/ source-change-trampoline "/change-trampoline"))
(/ ajax "ajax"
(/ subscribe "/subscribe")
(/ unsubscribe "/unsubscribe")
(/ recommended "/recommended")
(/ article-viewed "/article-viewed")
(/ up-vote "/up-vote")
(/ feed "/feed")
(/ subscribe-to-mailing-list "/subscribe-to-mailing-list")
(/ get-invited "/get-invited")
(/ author-search "/author-search"))
(/ admin "admin"
(/ admin-add-article-trampoline "/add-article-trampoline")
(/ admin-articles "/articles")
(/ admin-add-article "/add-article")
(/ admin-save-article "/save-article")))
uri-reference
uri-
js-uri-var)
;; => (define uri-res (make-parameter (uri-reference "/res")))
;; (define uri-css (make-parameter (uri-reference "/res/css")))
;; ...
;; => (define js-uri-var "var uri = {}; uri.uriRes = '/res'; uri.uriCss = '/res/css'; ...")
(generate-path-parameters
(/ root (or (get-environment-variable "NEWS_DIR") "/home/tjhintz/src/scheme/news")
(/ res "/res"
(/ scss "/scss")
(/ css "/css"
(/ css-lib "/lib.css")
(/ css-news "/news.css"))
(/ img "/img"
(/ img-original "/original")
(/ source-icon "/source-icons")
(/ img-raster "/raster"
(/ site-icon "/icon.png")
(/ site-logo-normal "/logo-normal.png"))
(/ img-icon "/icons"))
(/ js "/js"
(/ js-vendor "/vendor"
(/ js-jquery "/jquery.js"))
(/ js-lib "/lib.js")
(/ js-news "/news.js")
(/ js-pre-jquery-news "/pre-jquery-news.js")))
(/ build-static-resources "/build")
(/ pre-generated-html "/pre-generated-html.scm")
(/ widgets "/widgets"))
values
filesystem-path-
js-filesystem-uri-var)
;; (generate-path-parameters
;; (/ site-root "/"
;; (/ res "res"
;; (/ css "/css"
;; (/ fonts "/fonts"))
;; (/ js "/js"
;; (/ js-vendor "/vendor"))
;; (/ img "/img"
;; (/ img-original "/original"))
;; (/ font-awesome-fonts "/fonts")
;; (/ scss "/scss")))
;; path-)