Back
include-css (clj)
(source)function
(include-css & styles)
Include a list of external stylesheet files.
Examples
hiccup
(ns hiccup.page_test
(:require [clojure.test :refer :all]
[hiccup.page :refer :all])
(:import java.net.URI))
(deftest include-css-test
(is (= (include-css "foo.css")
(list [:link {:type "text/css", :href (URI. "foo.css"), :rel "stylesheet"}])))
(is (= (include-css "foo.css" "bar.css")
(list [:link {:type "text/css", :href (URI. "foo.css"), :rel "stylesheet"}]
[:link {:type "text/css", :href (URI. "bar.css"), :rel "stylesheet"}]))))
Deraen/saapas
(ns backend.index
(:require
[hiccup.core :refer [html]]
[hiccup.page :refer [html5 include-js include-css]]))
(def index-page
(html
(html5
[:head
[:title "Saapas"]
[:meta {:charset "utf-8"}]
[:meta {:http-equiv "X-UA-Compatible" :content "IE=edge"}]
[:meta {:name "viewport" :content "width=device-width, initial-scale=1.0"}]
(include-css "css/main.css")]
[:body
[:div.container [:div#app.app-wrapper]]
(include-js "js/main.js")])))
prestancedesign/pingcrm-clojure
(ns pingcrm.templates.404
(:require [hiccup.page :as page]))
(def not-found
(page/html5
{:class "h-full bg-gray-100"}
[:head
[:meta {:charset "utf-8"}]
[:link {:rel "icon" :type "image/svg+xml" :href "/favicon.svg"}]
[:meta {:name "viewport" :content "width=device-width, initial-scale=1.0"}]
[:title "404 | Not found"]
(page/include-css "/css/app.css")]
[:body.antialiased
[:div.relative.flex.items-top.justify-center.min-h-screen.bg-gray-100.dark:bg-gray-900.sm:items-center.sm:pt-0
[:div.max-w-xl.mx-auto.sm:px-6.lg:px-8
[:div.flex.items-center.pt-8.sm:justify-start.sm:pt-0
[:div.px-4.text-lg.text-gray-500.border-r.border-gray-400.tracking-wider
"404"]
[:div.ml-4.text-lg.text-gray-500.uppercase.tracking-wider "Not Found"]]]]]))
sneerteam/sneer
(ns reagent-spike.handler
(:require [compojure.core :refer [GET defroutes]]
[compojure.route :refer [not-found resources]]
[hiccup.page :refer [include-js include-css html5]]
[reagent-spike.middleware :refer [wrap-middleware]]
[environ.core :refer [env]]))
(def loading-page
(html5
[:head
[:meta {:charset "utf-8"}]
[:meta {:name "viewport"
:content "width=device-width, initial-scale=1"}]
(include-css (if (env :dev) "/css/site.css" "/css/site.min.css"))]
[:body
mount-target
(include-js "/js/app.js")]))
noir-clojure/cljs-template
(ns {{name}}.views.common
(:require [noir.cljs.core :as cljs])
(:use [noir.core :only [defpartial]]
[hiccup.page :only [include-css html5]]))
(defpartial layout [& content]
(html5
[:head
[:title "{{name}}"]
(include-css "/css/reset.css")
(include-css "/css/default.css")]
[:body
[:div#wrapper
content]
(cljs/include-scripts :with-jquery)]))
jcouyang/gh-omnibar
(ns github-omnibar.handler
(:require [compojure.core :refer [GET defroutes]]
[compojure.route :refer [not-found resources]]
[hiccup.page :refer [include-js include-css html5]]
[github-omnibar.middleware :refer [wrap-middleware]]
[environ.core :refer [env]]))
(def loading-page
(html5
[:head
[:meta {:charset "utf-8"}]
[:meta {:name "viewport"
:content "width=device-width, initial-scale=1"}]
(include-css "/css/github.css")
(include-css "/css/frameworks.css")
(include-js "/js/jquery.min.js")
(include-js "/js/string_score.js")
(include-css "/css/site.css")
]
[:body
mount-target
(include-js "/js/app.js")]))