<commit_before>(ns arachnida.html-renderer)

(require '[hiccup.core                   :as hiccup])
(require '[hiccup.page                   :as page])
(require '[hiccup.form                   :as form])

(defn render-html-header
    "Renders part of HTML page - the header."
    []
    [:head
        [:title "Arachnida"]
        [:meta {:name "Author"    :content "<NAME>"}]
        [:meta {:name "Generator" :content "Clojure"}]
        [:meta {:http-equiv "Content-type" :content "text/html; charset=utf-8"}]
        ;(page/include-css "http://torment.usersys.redhat.com/openjdk/style.css")]
        (page/include-css "http://10.34.3.139/bootstrap.min.css")
        (page/include-js  "http://10.34.3.139/bootstrap.min.js")
        [:script {:type "text/javascript" :src "http://10.34.3.139/flotr/lib/prototype-1.6.0.2.js"}]
        [:script {:type "text/javascript" :src "http://10.34.3.139/flotr/lib/canvas2image.js"}]
        [:script {:type "text/javascript" :src "http://10.34.3.139/flotr/lib/canvastext.js"}]
        [:script {:type "text/javascript" :src "http://10.34.3.139/flotr/flotr.debug-0.2.0-alpha.js"}]
    ] ; head
)

(defn render-html-footer
    "Renders part of HTML page - the footer."
    []
    [:div (str "<br /><br /><br /><br />Author: <NAME> &lt;<a href='mailto:<EMAIL>'><EMAIL></a>&gt;&nbsp;&nbsp;&nbsp;"
          "<br />")])

<commit_msg>Index page renderer + proper include of all .css and .js<commit_after>(ns arachnida.html-renderer)

(require '[hiccup.core                   :as hiccup])
(require '[hiccup.page                   :as page])
(require '[hiccup.form                   :as form])

(defn render-html-header
    "Renders part of HTML page - the header."
    []
    [:head
        [:title "Arachnida"]
        [:meta {:name "Author"    :content "<NAME>"}]
        [:meta {:name "Generator" :content "Clojure"}]
        [:meta {:http-equiv "Content-type" :content "text/html; charset=utf-8"}]
        (page/include-css "http://10.34.3.139/bootstrap.min.css")
        (page/include-css "http://10.34.3.139/bootstrap.min.css")
        (page/include-css "http://10.34.3.139/arachnida.css")
        (page/include-js  "http://10.34.3.139/bootstrap.min.js")
        (page/include-js  "http://10.34.3.139/flotr/lib/prototype-1.6.0.2.js")
        (page/include-js  "http://10.34.3.139/flotr/lib/canvas2image.js")
        (page/include-js  "http://10.34.3.139/flotr/lib/canvastext.js")
        (page/include-js  "http://10.34.3.139/flotr/flotr.debug-0.2.0-alpha.js")
    ] ; head
)

(defn render-html-footer
    "Renders part of HTML page - the footer."
    []
    [:div (str "<br /><br /><br /><br />Author: <NAME> &lt;<a href='mailto:<EMAIL>'><EMAIL></a>&gt;&nbsp;&nbsp;&nbsp;"
          "<br />")])

(defn render-navigation-bar-section
    "Renders whole navigation bar."
    []
    [:nav {:class "navbar navbar-inverse navbar-fixed-top" :role "navigation"}
        [:div {:class "container-fluid"}
            [:div {:class "row"}
                [:div {:class "col-md-4"}
                    [:div {:class "navbar-header"}
                        [:a {:href "/" :class "navbar-brand"} "Arachnida"]
                    ] ; ./navbar-header
                ] ; col ends
                [:div {:class "col-md-4"}
                    [:div {:class "navbar-header"}
                        [:div {:class "navbar-brand"}
                            ""
                        ]
                    ]
                ] ; col ends
                [:div {:class "col-md-4"}
                    ""
                ] ; col ends
            ] ; row ends
        ] ; /.container-fluid
]); </nav>

(defn render-index-page
    []
    (page/xhtml
        (render-html-header)
        [:body
            [:div {:class "container"}
                (render-navigation-bar-section)
                [:h1 "Products"]
                [:table {:class "table table-condensed table-hover table-bordered" :rules "all"}
                ]
                [:h1 "Writers"]
                [:table {:class "table table-condensed table-hover table-bordered" :rules "all"}
                ]
                [:br][:br][:br][:br]
                (render-html-footer)
            ] ; </div class="container">
        ] ; </body>
    ))


{'fraction_non_alphanumeric': 0.18881283927307058, 'fraction_numerical': 0.03186216662733066, 'mean_word_length': 1.802910052910053, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 16, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3287382', 'n_tokens_mistral': 1558, 'n_tokens_neox': 1396, 'n_words': 264}