SHOW:
|
|
- or go back to the newest paste.
1 | <div class="col-xs-2 col-sm-2 col-md-4 col-lg-4 center-block info text-center"> | |
2 | ||
3 | {{>artist_info}} | |
4 | </div> | |
5 | ||
6 | <template name="artist_info"> | |
7 | {{#if name}} | |
8 | <div class="infoblock"> | |
9 | <div class="row info-header"> | |
10 | {{name}} | |
11 | </div> | |
12 | ||
13 | <div class="row info-elements"> | |
14 | {{#if soundcloud}} | |
15 | <p class="link"><a target="_blank" href="{{soundcloud}}">SOUNDCLOUD</a></p> | |
16 | {{/if}} | |
17 | {{#if bandcamp}} | |
18 | <p class="link"><a target="_blank" href="{{bandcamp}}">BANDCAMP</a></p> | |
19 | {{/if}} | |
20 | {{#if facebook}} | |
21 | <p class="link"><a target="_blank" href="{{facebook}}">FACEBOOK</a></p> | |
22 | {{/if}} | |
23 | {{#if website}} | |
24 | <p class="link"><a target="_blank" href="{{website}}">WEBSITE</a></p> | |
25 | {{/if}} | |
26 | {{#if vk}} | |
27 | <p class="link"><a target="_blank" href="{{vk}}">VKONTAKTE</a></p> | |
28 | {{/if}} | |
29 | {{#if email}} | |
30 | <p class="link"><a href="mailto:{{email}}">EMAIL</a></p> | |
31 | {{/if}} | |
32 | </div> | |
33 | ||
34 | ||
35 | </div> | |
36 | {{/if}} | |
37 | - | </template> |
37 | + | </template> |
38 | ||
39 | ||
40 | ||
41 | ||
42 | ||
43 | ||
44 | IN JS | |
45 | Template.artist_info.helpers({ | |
46 | name: function () { | |
47 | return Session.get("artist").name | |
48 | }, | |
49 | soundcloud: function () { | |
50 | return Session.get("artist").soundcloud | |
51 | }, | |
52 | bandcamp: function () { | |
53 | return Session.get("artist").bandcamp | |
54 | }, | |
55 | facebook: function () { | |
56 | return Session.get("artist").facebook | |
57 | }, | |
58 | website: function () { | |
59 | return Session.get("artist").website | |
60 | }, | |
61 | vk: function () { | |
62 | return Session.get("artist").vk | |
63 | }, | |
64 | email: function () { | |
65 | return Session.get("artist").email | |
66 | }, | |
67 | ||
68 | }); |