X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=www%2Fjssrc%2Fblerg%2FWelcome.js;h=ece3d6f00b778373883a8f82b2a2b8fcb8efb8c9;hb=HEAD;hp=2d3357e6f71fa5c09230c5c41107dbafcdc5415f;hpb=3e5f69d01b9488475413d4ecce8161ab7a889ca2;p=blerg.git diff --git a/www/jssrc/blerg/Welcome.js b/www/jssrc/blerg/Welcome.js index 2d3357e..ece3d6f 100644 --- a/www/jssrc/blerg/Welcome.js +++ b/www/jssrc/blerg/Welcome.js @@ -12,7 +12,7 @@ enyo.kind({ {components: [ {style: "float: right; text-align: center; margin: 0 0 1em 1em;", components: [ {style: "font-size: 14pt; margin-bottom: 4pt;", content: "Curious? Click this unbelievably obnoxious button!"}, - {kind: "onyx.Button", content: "I want to Blërg!", style: "font-size: 40pt; padding: 1em; background-color: #C0F; color: #F88;", onclick: "startSignup"} + {kind: "onyx.Button", content: "I want to Blërg!", classes: "signup-button", onclick: "startSignup"} ]} ]}, {allowHtml: true, content: '

I am 12 and what is this

Blërg is a microblogging platform. Or maybe a miniblogging platform. Blërg is not sure. Blërg is a lot like Twitter, but aims to fix some of its idiosyncracies. Blërg does not want to be a full blogging platform like Wordpress or Livejournal. Blërg is also an open source tagged text database engine written in C that does the back-end work. Blërg\'s author finds it entertaining to anthropomorphize Blërg in the third person.

'}, @@ -20,10 +20,18 @@ enyo.kind({ {style: "clear: both;"}, {name: "contentBox", allowHtml: true}, {classes: "latest", components: [ - {tag: "h2", content: "Latest posts"}, - {name: "latestPosts", classes: "latest-posts", onmouseover: "pauseTicker", onmouseout: "startTicker"}, - {tag: "h2", content: "Latest tags"}, - {name: "latestTags", classes: "latest-tags"} + {classes: "latest-posts", components: [ + {name: "latestPostsScroller", classes: "latest-scroller", onmouseover: "pauseTicker", onmouseout: "startTicker", components: [ + {tag: "h2", content: "Latest posts"}, + {name: "latestPosts"} + ]} + ]}, + {classes: "latest-tags", components: [ + {classes: "latest-scroller", components: [ + {tag: "h2", content: "Latest tags"}, + {name: "latestTags"} + ]} + ]} ]} ], create: function() { @@ -79,10 +87,17 @@ enyo.kind({ req.go(); }, startTickerCycle: function() { - this.tickerTimeout = setTimeout(function() { - this.$.latestPosts.node.scrollTop = 0; - this.startTicker(); - }.bind(this), 2500); + var starter = function() { + if (this.$.latestPostsScroller.hasNode()) { + var n = this.$.latestPostsScroller.node; + if (n.scrollTop >= n.scrollHeight - n.clientHeight) + n.scrollTop = 0; + this.startTicker(); + } else { + this.tickerTimeout = setTimeout(starter, 1000); + } + }.bind(this) + this.tickerTimeout = setTimeout(starter, 2500); }, startTicker: function() { if (this.tickerInterval) @@ -100,7 +115,7 @@ enyo.kind({ this.tickerInterval = null; }, ticker: function() { - var n = this.$.latestPosts.node; + var n = this.$.latestPostsScroller.node; if (n.scrollTop < n.scrollHeight - n.clientHeight) { n.scrollTop += 2; } else {