<commit_before>(ns frontend.components.features
  (:require [cljs.core.async :as async :refer [>! <! alts! chan sliding-buffer close!]]
            [clojure.string :as str]
            [frontend.async :refer [raise!]]
            [frontend.components.common :as common]
            [frontend.components.plans :as plans-component]
            [frontend.components.shared :as shared]
            [frontend.components.landing :as landing]
            [frontend.state :as state]
            [frontend.stefon :as stefon]
            [frontend.utils :as utils :include-macros true]
            [om.core :as om :include-macros true])
  (:require-macros [frontend.utils :refer [defrender html]]))

(defn ui-example [name]
  [:img { :src (utils/cdn-path (str "/img/outer/features/ui-" name ".svg"))}])

(defn customer-image-src [shortname]
  (utils/cdn-path (str "/img/outer/customers/customer-" shortname ".svg")))

(defn language [name]
  [:img.background.language {:class name
                             :src (utils/cdn-path (str "/img/outer/languages/language-" name ".svg"))}])

(def language-background
  (map language ["rails-1"
                 "clojure-1"
                 "java-1"
                 "python-1"]))

(defn practice [app owner]
  (reify
    om/IDisplayName (display-name [_] "Home Practice")
    om/IRender
    (render [_]
      (let [selected-customer (get-in app state/customer-logo-customer-path :shopify)
            selected-toolset (get-in app state/selected-toolset-path :languages)]
        (html
         [:section
          (let [hovered-customer (om/get-state owner [:hovered-customer])
                tools (get-in landing/customer-brands [hovered-customer :tools] #{})]
            [:div.container-fluid
             [:div.row
              [:div.col-xs-4.col-xs-offset-4
               [:div.practice-tools
                [:article
                 (for [[toolset template] landing/supported-tools]
                   (html ; use html in for loops for perf
                         [:div.supported-tools {:class (when (= selected-toolset toolset) "active")}
                          [:div.supported-tools-upper
                           (for [tool (:upper template)]
                             (html
                               [:div.supported-tool {:class (when (contains? tools tool) "hover")
                                                     :alt (name tool)}
                                [:figure
                                 [:svg {:class (str "tool-logo-" (name tool))
                                        :x "0" :y "0" :view-box "0 0 100 100"}
                                  [:path {:d (get landing/tools-logos tool)}]]]]))]
                          [:div.supported-tools-lower
                           (for [tool (:lower template)]
                             (html
                               [:div.supported-tool {:class (when (contains? tools tool) "hover")
                                                     :alt (name tool)}
                                [:figure
                                 [:svg {:class (str "tool-logo-" (name tool))
                                        :x "0" :y "0" :view-box "0 0 100 100"}
                                  [:path {:d (get landing/tools-logos tool)}]]]]))]]))]]]]])

          [:div.practice-articles
           [:article
            [:h2.text-center "Devs rely on us to just work; we support the right tools."]
            [:p
             (for [toolset ["Languages" "databases" "queues" "browsers" "deployment"]]
               (html
                [:span [:a {:on-mouse-enter #(raise! owner [:toolset-clicked {:toolset (keyword (str/lower-case toolset))}])} toolset] ", "]))
             "we support all of your tools.
              If it runs on Linux, then it will work on CircleCI.
              We'll even be around to help you install your own tools.
              The best development teams in the world trust us as their continuous integration and delivery solution because of our unmatched support and our ability to scale with them.
              We're built for teams."]]]])))))

(defn testimonial
  [{:keys [company-name company-short customer-quote employee-name employee-title]}]
  [:div.testimonial
   [:img.customer-header {:src (customer-image-src company-short)
                          :alt company-name}]
   [:div.customer-quote {:class (str "quote-" company-short)}
    [:blockquote customer-quote]]
   [:div.customer-citation
    [:div.customer-employee-name employee-name]
    [:div
     employee-title
     " at "
     [:span.customer-company-name company-name]
     " – "
     [:a.customer-story {:href (str "/stories/" company-short)}
      "Read the story"]]]])

(defrender features [app owner]
  (html
    [:div#features
     [:div.jumbotron
      (list language-background)
      (language "python-1")
      (language "ruby-1")
      (language "javascript-1")
      (language "node-1")
      (language "php-1")
      [:section.container
       [:div.row
        [:article.hero-title.center-block
         [:div.text-center
          [:img.hero-logo {:src (utils/cdn-path "/img/outer/enterprise/logo-circleci.svg")}]]
         [:h1.text-center "Improve Productivity, Reduce Risk, and Scale with CircleCI"]
         [:h3.text-center "Let CircleCI help your team focus on making a great product. Speed up your testing and development cycle to improve productivity. CircleCI is flexible to run in your environment and scale with your growth. Have the peace of mind by reducing bugs and improving the quality of your application."]]]]

      [:div.row.text-center
       (common/sign-up-cta owner "features")]]
     [:div.outer-section
      [:section.container
       [:div.row
        [:div.col-xs-12
         [:h2.text-center
          "Speed and Productivity"
          [:br]<commit_msg>Only show "Read the story" for shopify<commit_after>(ns frontend.components.features
  (:require [cljs.core.async :as async :refer [>! <! alts! chan sliding-buffer close!]]
            [clojure.string :as str]
            [frontend.async :refer [raise!]]
            [frontend.components.common :as common]
            [frontend.components.plans :as plans-component]
            [frontend.components.shared :as shared]
            [frontend.components.landing :as landing]
            [frontend.state :as state]
            [frontend.stefon :as stefon]
            [frontend.utils :as utils :include-macros true]
            [om.core :as om :include-macros true])
  (:require-macros [frontend.utils :refer [defrender html]]))

(defn ui-example [name]
  [:img { :src (utils/cdn-path (str "/img/outer/features/ui-" name ".svg"))}])

(defn customer-image-src [shortname]
  (utils/cdn-path (str "/img/outer/customers/customer-" shortname ".svg")))

(defn language [name]
  [:img.background.language {:class name
                             :src (utils/cdn-path (str "/img/outer/languages/language-" name ".svg"))}])

(def language-background
  (map language ["rails-1"
                 "clojure-1"
                 "java-1"
                 "python-1"]))

(defn practice [app owner]
  (reify
    om/IDisplayName (display-name [_] "Home Practice")
    om/IRender
    (render [_]
      (let [selected-customer (get-in app state/customer-logo-customer-path :shopify)
            selected-toolset (get-in app state/selected-toolset-path :languages)]
        (html
         [:section
          (let [hovered-customer (om/get-state owner [:hovered-customer])
                tools (get-in landing/customer-brands [hovered-customer :tools] #{})]
            [:div.container-fluid
             [:div.row
              [:div.col-xs-4.col-xs-offset-4
               [:div.practice-tools
                [:article
                 (for [[toolset template] landing/supported-tools]
                   (html ; use html in for loops for perf
                         [:div.supported-tools {:class (when (= selected-toolset toolset) "active")}
                          [:div.supported-tools-upper
                           (for [tool (:upper template)]
                             (html
                               [:div.supported-tool {:class (when (contains? tools tool) "hover")
                                                     :alt (name tool)}
                                [:figure
                                 [:svg {:class (str "tool-logo-" (name tool))
                                        :x "0" :y "0" :view-box "0 0 100 100"}
                                  [:path {:d (get landing/tools-logos tool)}]]]]))]
                          [:div.supported-tools-lower
                           (for [tool (:lower template)]
                             (html
                               [:div.supported-tool {:class (when (contains? tools tool) "hover")
                                                     :alt (name tool)}
                                [:figure
                                 [:svg {:class (str "tool-logo-" (name tool))
                                        :x "0" :y "0" :view-box "0 0 100 100"}
                                  [:path {:d (get landing/tools-logos tool)}]]]]))]]))]]]]])

          [:div.practice-articles
           [:article
            [:h2.text-center "Devs rely on us to just work; we support the right tools."]
            [:p
             (for [toolset ["Languages" "databases" "queues" "browsers" "deployment"]]
               (html
                [:span [:a {:on-mouse-enter #(raise! owner [:toolset-clicked {:toolset (keyword (str/lower-case toolset))}])} toolset] ", "]))
             "we support all of your tools.
              If it runs on Linux, then it will work on CircleCI.
              We'll even be around to help you install your own tools.
              The best development teams in the world trust us as their continuous integration and delivery solution because of our unmatched support and our ability to scale with them.
              We're built for teams."]]]])))))

(defn testimonial
  [{:keys [company-name company-short customer-quote employee-name employee-title]}]
  [:div.testimonial
   [:img.customer-header {:src (customer-image-src company-short)
                          :alt company-name}]
   [:div.customer-quote {:class (str "quote-" company-short)}
    [:blockquote customer-quote]]
   [:div.customer-citation
    [:div.customer-employee-name employee-name]
    [:div
     employee-title
     " at "
     [:span.customer-company-name company-name]
     ;; HACK: there's only one story right now, and the others are 404ing.
     (when (= company-short "shopify")
       [:span
        " – "
        [:a.customer-story {:href (str "/stories/" company-short)}
         "Read the story"]])]]])

(defrender features [app owner]
  (html
    [:div#features
     [:div.jumbotron
      (list language-background)
      (language "python-1")
      (language "ruby-1")
      (language "javascript-1")
      (language "node-1")
      (language "php-1")
      [:section.container
       [:div.row
        [:article.hero-title.center-block
         [:div.text-center
          [:img.hero-logo {:src (utils/cdn-path "/img/outer/enterprise/logo-circleci.svg")}]]
         [:h1.text-center "Improve Productivity, Reduce Risk, and Scale with CircleCI"]
         [:h3.text-center "Let CircleCI help your team focus on making a great product. Speed up your testing and development cycle to improve productivity. CircleCI is flexible to run in your environment and scale with your growth. Have the peace of mind by reducing bugs and improving the quality of your application."]]]]

      [:div.row.text-center
       (common/sign-up-cta owner "features")]]
     [:div.outer-section
      [:section.container
       [:div.row
        [:div.col-xs-12
         [:h2.text-center
          "Speed and Productivity"
          [:br]
{'fraction_non_alphanumeric': 0.12966087396659357, 'fraction_numerical': 0.006495697654800067, 'mean_word_length': 1.751218380134602, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3301949', 'n_tokens_mistral': 3438, 'n_tokens_neox': 3195, 'n_words': 925}