Skip to content

Commit

Permalink
GitHub Issue #15 - add links to cljs-oops project
Browse files Browse the repository at this point in the history
  • Loading branch information
oakmac committed Jan 13, 2018
1 parent 893a80d commit 93bf900
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ grunt.initConfig({

watch: {
files: {
'public/css/main.min.css': 'less/main.less'
'public/css/main.min.css': 'less/000-main.less'
}
}
},
Expand Down
20 changes: 14 additions & 6 deletions cljs-server/cljs_cheatsheet_server/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,10 @@
(fn-link "get-validator")]]]]])


(def cljs-oops-lib-url "https://github.com/binaryage/cljs-oops")
(def cljs-docs-url "https://github.com/binaryage/cljs-oops#object-operations")


(hiccups/defhtml js-interop-section []
[:div.section-31efe
[:h3.section-title-8ccf5 "JavaScript Interop"]
Expand All @@ -345,15 +349,19 @@
[:tr
[:td.label-9e0b7 "Get Property"]
[:td.body-885f4
[:div.row-5dec8 "(.-innerHTML el)"]]]
;; TODO: How to show oget here?
; [:div.row-5dec8 "(" (inside-fn-link "aget") " el \"innerHTML\")"]]]
[:div.row-5dec8 "(.-innerHTML el)"]
[:div.row-5dec8
[:div.msg-b3d36
"Using " [:a {:href cljs-oops-lib-url} "cljs-oops"] " library:"]
[:div "(" [:a.inside-fn-c7607 {:href cljs-docs-url} "oget"] " el \"innerHTML\")"]]]]
[:tr
[:td.label-9e0b7 "Set Property"]
[:td.body-885f4
[:div.row-5dec8 "(" (inside-fn-link "set!") " (.-innerHTML el) \"Hi!\")"]]]
;; TODO: how to show aset here?
; [:div.row-5dec8 "(" (inside-fn-link "aset") " el \"innerHTML\" \"Hi!\")"]]]
[:div.row-5dec8 "(" (inside-fn-link "set!") " (.-innerHTML el) \"Hi!\")"]
[:div.row-5dec8
[:div.msg-b3d36
"Using " [:a {:href cljs-oops-lib-url} "cljs-oops"] " library:"]
[:div "(" [:a.inside-fn-c7607 {:href cljs-docs-url} "aget"] " el \"innerHTML\")"]]]]
[:tr
[:td.label-9e0b7 "Delete Property"]
[:td.body-885f4
Expand Down
2 changes: 2 additions & 0 deletions less/000-main.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import "001-normalize-3.0.3.less";
@import "010-cheatsheet.less";
File renamed without changes.
10 changes: 8 additions & 2 deletions less/main.less → less/010-cheatsheet.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import "normalize-3.0.3.less";

//------------------------------------------------------------------------------
// Fonts
//------------------------------------------------------------------------------
Expand Down Expand Up @@ -745,3 +743,11 @@ em {
.links-446e0 {
margin-bottom: 4px;
}

.msg-b3d36 {
color: #888;
font-family: "Open Sans", sans-serif;
font-size: 12px;
font-style: italic;
margin-bottom: 2px;
}
2 changes: 1 addition & 1 deletion public/index.html

Large diffs are not rendered by default.

0 comments on commit 93bf900

Please sign in to comment.