Advertisement
Guest User

Untitled

a guest
Feb 28th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (def container ui/Container)
  2. (def grid ui/Grid)
  3. (def row ui/Grid.Row)
  4. (def column ui/Grid.Column)
  5. (def form ui/Form)
  6. (def form-field ui/Form.Field)
  7. (def form-checkbox ui/Form.Checkbox)
  8. (def form-button ui/Form.Button)
  9. (def form-dropdown ui/Form.Dropdown)
  10. (def form-input ui/Input)
  11. (def icon ui/Icon)
  12. (def segment ui/Segment)
  13. (def segment-group ui/Segment.Group)
  14. (def menu ui/Menu)
  15. (def menu-item ui/Menu.Item)
  16. (def menu-nested ui/Menu.Menu)
  17. (def search ui/Search)
  18. (def divider ui/Divider)
  19. (def label ui/Label)
  20. (def breadcrumb ui/Breadcrumb)
  21. (def breadcrumb-section ui/Breadcrumb.Section)
  22. (def breadcrumb-divider ui/Breadcrumb.Divider)
  23. (def dropdown ui/Dropdown)
  24. (def dropdown-menu ui/Dropdown.Menu)
  25. (def dropdown-header ui/Dropdown.Header)
  26. (def dropdown-item ui/Dropdown.Item)
  27. (def popup ui/Popup)
  28. (def image ui/Image)
  29. (def button ui/Button)
  30.  
  31. (defn home [] [:p "This is the home page"])
  32. (defn about [] [:p "This is the about page"])
  33.  
  34. (defn home-page-example [] (let [active (reagent/atom "home")
  35.                                  main (reagent/atom home)]
  36.                              (fn []
  37.                              [:> grid
  38.                               [:> row
  39.                                [:> column
  40.                                 [:> menu {:secondary "true" :pointing "true" :color "teal" :size "tiny"}
  41.                                  [:> menu-item
  42.                                   [:> image
  43.                                    {:size "tiny" :src "https://www.graphicsprings.com/filestorage/images/292/logomakersamples53.png?width=150&height=70&quality=80&crop=0&method=crop"}]]
  44.                                  [:> menu-nested
  45.                                   {:position "right"}
  46.                                   [:> menu-item
  47.                                    {:id "home"
  48.                                     :active (if (= @active "home") true false)
  49.                                     :on-click #(js/alert (.getElementById js/document "about"))}
  50.                                    "Home"]
  51.                                   [:> menu-item
  52.                                    {:id "about"
  53.                                     :active (if (= @active "about") true false)
  54.                                     :on-click #(js/alert (.getElementById js/document "home"))}
  55.                                    "About-Us"]
  56.                                   [:> menu-item {:name "contact"} "Contact"]
  57.                                   [:> menu-item [:> button {:compact "true" :size "mini"} "Log-in"]]]]]]
  58.                                [:> row {:stretched "true"}
  59.                                 [:> column {:width "three"}
  60.                                  [side-bar]]
  61.                                   [:> column {:width "thirteen"}
  62.                                   [:> segment {}
  63.                                    [@main]]]]
  64.                               [:> row
  65.                                [:> column
  66.                                   [:> segment
  67.                                    [:p "This is an example of a footer"]]]]])))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement