Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

138
LINES

< > BotCompany Repo | #1014142 // Randall Homepage

JavaX source code (desktop) [tags: butter use-pretranspiled] - run with: x30.jar - homepage

Download Jar. Libraryless. Click here for Pure Java version (9256L/65K).

1  
!7
2  
3  
html {
4  
  new Matches m;
5  
  
6  
  L<S> artists = mechList("Randall | Artist names");
7  
  final SS artistLinks = 
8  
    litcimap("1st Crevolution" := "https://www.reverbnation.com/crevolution");
9  
    //mechMapCI("Randall | Artist Links");
10  
    
11  
  final SS artistImages = litcimap(
12  
    "1st Crevolution" := "http://eyeocr.sourceforge.net/filestore/filestore.php?cmd=serve&file=blob_1014262&contentType=image/jpeg",
13  
    "Indra Afia" := "http://eyeocr.sourceforge.net/filestore/filestore.php?cmd=serve&file=blob_1014263&contentType=image/jpeg",
14  
    "Midnyte Flyte Band" := "http://eyeocr.sourceforge.net/filestore/filestore.php?cmd=serve&file=blob_1014264&contentType=image/jpeg");
15  
  
16  
  if (eqic(uri, "/artists")) {
17  
    ret hhtml(
18  
      hhead(htitle("Future Rootz Records | Artists") + headStuff())
19  
      + hbody(bodyTopStuff() + hcenter(
20  
      topStuff())
21  
    + h2("Artists", style := "margin-top: 30px")
22  
    + htableRaw2(map(func(fS artist) -> L {
23  
        S link = or(artistLinks.get(artist), myLink("/artist/" + urlencode(artist)));
24  
        S facebook = mechMapCI("Randall | Artist Facebook pages").get(artist);
25  
        S twitter = mechMapCI("Randall | Artist twitter links").get(artist);
26  
        SS albums = mechMap("Randall | " + artist + " | Albums");
27  
        L<S> songs = mechList("Randall | " + artist + " | Songs");
28  
        
29  
        ret ll(targetBlank(link, himg(artistImages.get(artist), width := 200)),
30  
          targetBlank(link, b(htmlencode(artist)))
31  
            + (nempty(facebook) ? " " + targetBlank(facebook, hsnippetimg(#1101174, width := 24, height := 24, align := "absmiddle")) : "")
32  
            + (nempty(twitter) ? " " + targetBlank(twitter, hsnippetimg(#1101176, width := 24, height := 24, align := "absmiddle")) : "")
33  
            + " " + targetBlank("https://www.youtube.com/channel/UCidR6RXZ6u2-bdxUh_n2cQA", hsnippetimg(#1101189, width := 24, height := 24, align := "absmiddle"))
34  
            + " | " + ahref(rawSelfLink("/gallery/" + urlencode(artist)), "Photo Gallery")
35  
            + " | " + ahref(rawSelfLink("/events/" + urlencode(artist)), "Events")
36  
            + " | " + targetBlank("https://www.youtube.com/channel/UCidR6RXZ6u2-bdxUh_n2cQA", "TV")
37  
            //+ " | " + targetBlank("https://youtu.be/ST-9ez6jk1k", "TV 2")
38  
          + (empty(albums) ? "" : p("Albums")
39  
          + ul_noEncode(map(func(S album, S link) -> S {
40  
        htmlencode(album) + " | Album | Price: &euro;20 | " + ahref(link, "Buy")
41  
      }, albums)))
42  
43  
          + (empty(songs) ? "" : p("Songs")
44  
          + ul_noEncode(map(func(S song) -> S {
45  
        S link = mechMapCI("Randall | " + artist + " | Songs | YouTube").get(song);
46  
        ret ahref(myLink("/song/" + urlencode(artist) + "/" + urlencode(song)), htmlencode(song))
47  
        + (nempty(link) ? " | " + ahref(link, "Preview") : "");
48  
        /*" | Format: MP3 (256kbit) | Price: 99c | " + ahref("http://futurerootsrecordings.bigcartel.com/product/1st-crevolution", "Buy")*/
49  
      }, songs)))
50  
          );
51  
      }, artists), ll(style := "width: 100%"), ll(style := "background-image: url(" + snippetImageURL(#1101190) + "); background-position: center;"), ll(style := "color: white;  text-shadow: 2px 2px #000000;"))
52  
    , style := "background-color: white"));
53  
  }
54  
  
55  
  if (swic(uri, "/gallery/", m)) {
56  
    fS artist = urldecode(m.rest());
57  
    if (!contains(artists, artist)) ret subBot_serve404();
58  
    L<S> ids = mL("Randall | " + artist + " | Photo IDs");
59  
    ret h1_title(htmlencode(artist))
60  
      + h3("Gallery")
61  
      + lines(map(ids, func(S photoID) -> S {
62  
        hsnippetimg(photoID, height := 200)
63  
      }));
64  
  }
65  
  
66  
  if (swic(uri, "/artist/", m)) {
67  
    fS artist = urldecode(m.rest());
68  
    if (!contains(artists, artist)) ret subBot_serve404();
69  
    ret h1_title(htmlencode(artist))
70  
      + h3("Songs")
71  
      + ul_noEncode(map(func(S song) -> S {
72  
        ahref(myLink("/song/" + urlencode(artist) + "/" + urlencode(song)), htmlencode(song))
73  
      }, mechList("Randall | " + artist + " | Songs")));
74  
  }
75  
  
76  
  if (swic(uri, "/song/", m))
77  
    ret "Song page for " + htmlencode(urldecode(m.rest()))
78  
    + soundcloudEmbed("194090074", eq("1", params.get("autoplay")));
79  
    
80  
  if (eqic(uri, "/contact")) ret "Contact page";
81  
  
82  
  // home page
83  
  if (eq(uri, "/"))
84  
    ret hhtml(
85  
      hhead(htitle("Future Rootz Recordings")
86  
        + headStuff())
87  
      + hbody(
88  
      	 bodyTopStuff()
89  
      	 + hcenter(
90  
      topStuffWithCircles()
91  
      + p(himg("http://eyeocr.sourceforge.net/filestore/filestore.php?cmd=serve&file=blob_1014262&contentType=image/jpeg", width := 700))
92  
      + p("&nbsp;", style := "margin-bottom: 40px")
93  
    //+ p(treeImg())
94  
    //+ [[ <script id="cid0020000185153197831" data-cfasync="false" async src="//st.chatango.com/js/gz/emb.js" style="width: 250px;height: 350px;">{"handle":"futurerootzrecords","arch":"js","styles":{"a":"CC0000","b":100,"c":"FFFFFF","d":"FFFFFF","k":"CC0000","l":"CC0000","m":"CC0000","n":"FFFFFF","p":"10","q":"CC0000","r":100,"fwtickm":1}}</script>]]
95  
    )/*, style := "background-color: #66cc00"*/));
96  
    
97  
  ret subBot_serve404();
98  
}
99  
100  
sS recordImg(O... params) {
101  
  ret himg("http://eyeocr.sourceforge.net/filestore/filestore.php?cmd=serve&file=blob_1014261&contentType=image/png",
102  
    arrayPlus(params, width := 60, align := "absmiddle"));
103  
}
104  
105  
sS treeImg() {
106  
  ret himg("http://eyeocr.sourceforge.net/filestore/filestore.php?cmd=serve&file=blob_1014260&contentType=image/jpeg");
107  
}
108  
109  
sS topStuffWithCircles() {
110  
  ret hjssnippet(#1014798) + topStuff();
111  
}
112  
113  
sS topStuff() {
114  
  ret h1(
115  
    recordImg(style := "margin-right: 40px") + " " + ahref(myLink("/"), "Future Rootz Recordings", style := "color: black; text-decoration: none; background-color: white; padding-left: 1em; padding-right: 1em; border: 1px solid black") + " " + recordImg(style := "margin-left: 40px"),
116  
      style := "color: #e60000; font-family: Hind Siliguri; font-weight: 700; font-size: 40px")
117  
      + p(ahref(myLink("/"), "Home")
118  
      + " | " + ahref(myLink("/artists"), "Artists") + " | " + ahref("/", "Booking")
119  
      + " | " + ahref("/", "News")+ " | "
120  
      + ahref("/", "About us") + " | " + ahref("/", "Shop")
 + " | " + ahref("/", "Newsletter")
121  
      + " | " + ahref("/", "Impressum")
122  
      + " " + hsnippetimg(#1101186, width := 24, height := 24, align := 'absmiddle));
123  
}
124  
125  
sS headStuff() {
126  
  ret hmobilefix()
127  
      + hcss("body { margin: 0; background-color: white; }")
128  
      + hGoogleFont("Hind Siliguri:700");
129  
}
130  
131  
sS bodyTopStuff() {
132  
  ret hfulltag('canvas, "", id := "canva", style := "position: fixed; top: 0; z-index: -1;")
133  
      	 // footer
134  
      	 + div(targetBlank("http://facebook.com/", hsnippetimg(#1101174, width := 24, align := 'absmiddle))
135  
      	   + " " + targetBlank("http://instagram.com/", hsnippetimg(#1101188, width := 24, height := 24, align := 'absmiddle))
136  
      	   + " " + targetBlank("http://twitter.com/", hsnippetimg(#1101176, width := 24, height := 24, align := 'absmiddle)),
137  
      	     style := "position: fixed; bottom: 0; width: 100%; padding-top: 3px; padding-bottom: 3px; background: white; text-align: center; border-top: 1px solid black");
138  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1014142
Snippet name: Randall Homepage
Eternal ID of this version: #1014142/158
Text MD5: 6c7871e868a30f736a78d23df60d5485
Transpilation MD5: f4c3ac3e579a77f9fa8dc6f2817a0e1a
Author: stefan
Category: javax / homepages
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-02 17:06:23
Source code size: 7155 bytes / 138 lines
Pitched / IR pitched: No / No
Views / Downloads: 1299 / 5066
Version history: 157 change(s)
Referenced in: [show references]