This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; definition of Layout component - the root component for the application | |
(defr Layout | |
[component prop _] | |
[:div.nav-slide-wrap {:on-click handle-body-clicks} | |
;; a sub component - it's passed the entire `prop` even though it | |
;; doesn't need all of it. Eventually it'll be smart for me to only pass the necessary data to components. | |
[Nav prop] | |
[:div {:class-name (str "main-body " (if (:user prop) "signedIn" "notSignedIn"))} | |
[Header prop] | |
[Content prop] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Whole application shares this markup: --> | |
<body> | |
<ul id="nav"> | |
<li>Home</li> | |
<li>Other Page</li> | |
</ul> | |
<div id="content"></div> | |
</body> | |
<!-- Home Page 'focus' --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//============================================================================== | |
// template utilities | |
// making Meteor's template api a bit less, well, awful | |
//============================================================================== | |
define([ | |
"lib/ext" | |
], | |
function(ext){ | |
"use strict"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Posts.find({}, { | |
fields: { | |
upvoters: { | |
$elemMatch: { | |
id: userId //userId is the current user's id. | |
} | |
} | |
} | |
}); |
NewerOlder