4 style: "float: left; width: 40%",
10 {kind: "Image", classes: "logo", src: "images/blerglogo.png", attributes: {width: 125, height: 122}},
11 {tag: "h1", components: [
12 {kind: "blerg.Link", content: "Blërg!"}
14 {tag: "h2", components: [
15 {name: "section", tag: "span"}
17 {name: "userControls", showing: false, components: [
18 {kind: "blerg.Link", onclick: "clickChatter", content: "[chatter]"},
19 {name: "subscribeLink", kind: "blerg.Link", onclick: "clickSubscribe", showing: false, content: "[stalk]"},
20 {name: "unsubscribeLink", kind: "blerg.Link", onclick: "clickUnsubscribe", showing: false, content: "[stop stalking]"}
24 this.inherited(arguments);
25 this.subscribedChanged();
27 clickChatter: function() {
28 this.bubble("onChatter");
30 clickSubscribe: function() {
31 this.bubble("onSubscribe");
33 clickUnsubscribe: function() {
34 this.bubble("onUnsubscribe");
36 subscribedChanged: function() {
37 if (this.subscribed == null) {
38 this.$.subscribeLink.hide();
39 this.$.unsubscribeLink.hide();
40 } else if (this.subscribed) {
41 this.$.subscribeLink.hide();
42 this.$.unsubscribeLink.show();
44 this.$.subscribeLink.show();
45 this.$.unsubscribeLink.hide();
48 sectionChanged: function() {
49 this.$.section.setContent(this.section);
51 showControls: function() {
52 this.$.userControls.hide();
54 hideControls: function() {
55 this.$.userControls.hide();