-
-
Save gf3/991fe68c75d98ad4b8de to your computer and use it in GitHub Desktop.
Dynamic garden stylesheet generation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns app.css | |
(:refer-clojure :exclude [+ - * /]) | |
(:require [garden.core :refer [css]] | |
[garden.color :as color :refer [hsl hsla rgb]] | |
[garden.arithmetic :refer [+ - * /]] | |
[garden.units :as u :refer [em px pt]])) | |
(def active-color "#1292C9") | |
(def app-background-color "#F6F6F6") | |
(def background-color "#3E3A60") | |
(def dark-color "#40464B") | |
(def action-text {:font-weight 700 | |
:text-transform "uppercase"}) | |
(def main | |
(css | |
;;----------------------------------------------------------------------------- | |
;; Base | |
;;----------------------------------------------------------------------------- | |
[:html :body | |
{:height "100%"}])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns app.routes | |
(:require [compojure.core :refer :all] | |
[app.css :as css])) | |
(defroutes css-routes | |
(GET "/css/main.css" [] | |
{:status 200 | |
:headers {"Content-Type" "text/css; charset=utf-8"} | |
:body css/main})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment