Skip to content
This repository has been archived by the owner on Jan 12, 2018. It is now read-only.
/ glimpse Public archive

A view composition library in Clojure supporting a view-first workflow

License

Notifications You must be signed in to change notification settings

tessellator/glimpse

Repository files navigation

Glimpse Build Status

This project is no longer maintained

When I was a child
I caught a fleeting glimpse
Out of the corner of my eye.

I turned to look but it was gone
I cannot put my finger on it now
The child is grown,
The dream is gone.


— Pink Floyd, "Comfortably Numb"

Glimpse is a view composition library in Clojure supporting a view-first workflow. It is inspired by Pakyow.

Installation

Add the following dependency to your project.clj file:

Clojars Project

Supported Clojure Versions

Glimpse requires Clojure 1.7+.

Usage

Following is the interesting portion of a small Ring/Compojure application using Glimpse.

<h1>Hello from Glimpse</h1>

<article data-scope="post">
  <header data-prop="title">Post Title</header>
  <p data-prop="text">Post text goes here</p>
  <span data-prop="author">Author</span>
</article>
(ns hello-world.core
  (:require [compojure.core :refer :all]
            [glimpse.views :as glimpse]))

(defroutes app
  (GET "/" [] (-> (glimpse/view "/")
                  (glimpse/bind :post {:author "Abraham Lincoln"
                                       :title "The Gettysburg Address"
                                       :text "Four score and seven years ago..."})
                  (glimpse/render))))

Please refer to the warmup for a complete example. You can find the API documentation here and other documentation here.

License

Copyright © 2015 Thomas C. Taylor and contributors.

Distributed under the Eclipse Public License, the same as Clojure.

About

A view composition library in Clojure supporting a view-first workflow

Resources

License

Stars

Watchers

Forks

Packages

No packages published