(ns com.oly.static-sites.portfolio.clojure-demos-scenes
  (:require [portfolio.dumdom :as d]
            [com.oly.static-sites.ui-tachyon.core :as ui]))

(d/defscene navbar-scene
  (ui/navbar [{:href "/" :text "Home"}
              {:href "/dialects" :text "Dialects"}
              {:href "/dsl" :text "DSLs"}
              {:href "/examples" :text "Examples"}
              {:href "/about" :text "About"}]))

(d/defscene footer-scene
  ui/footer)

(d/defscene article-card-scene
  (ui/article-card
   {:title "Clojure Basics"
    :description "Getting started with clojure syntax"
    :img-src "https://clojure.org/images/clojure-logo-120b.png"}))

(d/defscene articles-list-scene
  (ui/articles-list
   {:title "Clojure Demos"
    :articles [{:title "Clojure Basics"
                :description "Getting started with clojure syntax datatype's sequences conditions"
                :img-src "https://clojure.org/images/clojure-logo-120b.png"}
               {:title "Reagent Demo"
                :description "React application using reagent"
                :img-src "https://raw.githubusercontent.com/reagent-project/reagent/master/logo/logo-text.png"}
               {:title "Honey SQL Demo"
                :description "Build SQL queries with Clojure data structures"
                :img-src "https://miro.medium.com/max/1400/1*CEYFj5R57UFyCXts2nsBqA.png"}]}))

(d/defscene notification-scene
  ui/notification)

(d/defscene header-with-link-scene
  (ui/header-with-link "Example Header" 1))

(d/defscene grouped-articles-list-scene
  (ui/grouped-articles-list
   {:title "Clojure Demos"
    :groups [{:title "Dialects & Interop"
              :articles [{:title "Clojure"
                          :description "The original language running on the jvm with access to the java eco system"
                          :img-src "https://clojure.org/images/clojure-logo-120b.png"}
                         {:title "Clojurescript"
                          :description "Clojure running in the browser or on top of node, with access to the js eco system."
                          :img-src "https://clojurescript.org/images/cljs-logo-60b.png"}]}
             {:title "DSL's"
              :articles [{:title "Hiccup HTML Demo"
                          :description "Hiccup is a DSL for generating HTML it uses data structures over strings to generate html"
                          :icon-image "https://miro.medium.com/max/1400/1*CEYFj5R57UFyCXts2nsBqA.png"}
                         {:title "Honey SQL Demo"
                          :description "Similar to honey but for SQL allows you to split apart your complex queries into parts and compose them together."
                          :icon-image "https://miro.medium.com/max/1400/1*CEYFj5R57UFyCXts2nsBqA.png"}]}]}))

(d/defscene full-page-scene
  ui/full-page)
