Thanks: works perfectly. 

The minimum html is (more or less):

<html>
    <head>
        <link 
href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"; 
rel="stylesheet" type="text/css" class="style" />
    </head>
    <body>
        <div id="app"></div>
        <script src="http://fb.me/react-0.11.1.js";></script>
        <script src="out/goog/base.js" type="text/javascript"></script>
        <script src="om_boot.js" type="text/javascript"></script>
        <script 
type="text/javascript">goog.require("om_boot.core");</script>
    </body>
</html>

My minimum cljs example derived from the mies-om template (and ignoring the 
state) was:

(ns om-boot.core
  (:require [om.core :as om :include-macros true]
            [om.dom :as dom :include-macros true]
            [om-bootstrap.button :as b]))

(enable-console-print!)

(def app-state (atom {:text "Hello world!"}))

(om/root
  (fn [app owner]
    (reify om/IRender
      (render [_]
        (b/toolbar {}
           (b/button {} "Default")
           (b/button {:bs-style "primary"} "Primary")
           (b/button {:bs-style "success"} "Success")
           (b/button {:bs-style "info"} "Info")
           (b/button {:bs-style "warning"} "Warning")
           (b/button {:bs-style "danger"} "Danger")
           (b/button {:bs-style "link"} "Link")))))
  app-state
  {:target (. js/document (getElementById "app"))})

....woohoo! Bootstrap in Om in React. I'm three illusions to the left!!

Andy

Hey Andy,
>
> All you should need is the usual Om project layout, similar to the 
> index.html you mentioned, plus this line in your project's header to 
> include the Bootstrap CSS that Om-Bootstrap uses:
>
> <link href="
> https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"; rel
> ="stylesheet" type="text/css" class="style" />
>
> For the om-bootstrap docs project, I jammed the Bootstrap CSS into the 
> resources folder to make local development easier when I'm offline, but 
> it's totally fine to just reference the CDNed version in your project. 
> There's no need to know anything about the resources folder to use 
> Om-Bootstrap.
>
> I'll add this information to the documentation site today on this 
> barebones, TODO Getting Started page:
>
> http://om-bootstrap.herokuapp.com/getting-started
>  
>   Andy Dwelly <javascript:>
>  August 28, 2014 at 6:05 AM
> I've got a working knowledge of Clojure and I'm trying to extend my reach 
> into Clojurescript, om, and bootstrap as I want the resulting website to 
> look reasonable. 
> I've worked my way through the om tutorials and I have a simple plain om 
> example of my own which doesn't use bootstrap.
>
> Apart from the [om-bootstrap "0.2.6"] dependancy, it seems that to get 
> started with om-bootstrap  I need an initial index.html file similar to the 
> one generated with the 'lein new mies-om' 
> command, but referencing bootstrap, and some idea of the structure of the 
> resources directory - presumably various bits of the bootstrap project.
>
> Can you give any guidance in this area ?
>
> -A
>
> On Monday, August 25, 2014 2:14:04 AM UTC+1, Sam Ritchie wrote:
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected] <javascript:>
> Note that posts from new members are moderated - please be patient with 
> your first post.
> To unsubscribe from this group, send email to
> [email protected] <javascript:>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>   Sam Ritchie <javascript:>
>  August 24, 2014 at 7:13 PM
>  Hey all,
>
> I wanted to share a library I've been putting together for writing 
> Bootstrap 3 components in Om. It's called, creatively, Om-Bootstrap.
>
> Here's the git repository: https://github.com/racehub/om-bootstrap
>
> Version 0.2.5 is on Clojars <https://clojars.org/racehub/om-bootstrap>:
>
> [racehub/om-bootstrap "0.2.5"]
>
> I've also written an interactive documentation site for the project, a la 
> the Bootstrap doc site:
>
> http://om-bootstrap.herokuapp.com
>
> This site has working examples of every component in the library, and 
> TODOs in the spots that I intend to cover. Every example snippet has a 
> "show code" toggle that lets you see the code used to generate that 
> example. You should be able to copy the code over to your project and have 
> it work right away.
>
> There's a lot of cool stuff in this project that I hope to document. The 
> README describes how to get the embedded websocket repl running. I'll post 
> on how I do the embedded example snippets soon. The plan is to add 
> server-side HTML generation and client side routing once the doc site gets 
> a few more pages.
>
> Huge props to David for Om, and to the react-bootstrap 
> <https://github.com/react-bootstrap/react-bootstrap> project for 
> inspiration... I've been tracking off of them and their killer doc site for 
> this initial push.
>
> Let me know what you guys think!
>  
>
> -- 
> Sam Ritchie (@sritchie)
> Paddleguru Co-Founder
> 703.863.8561
> www.paddleguru.com
> Twitter <http://twitter.com/paddleguru> // Facebook 
> <http://facebook.com/paddleguru>
>  

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to