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

23
LINES

< > BotCompany Repo | #1002142 // HTML Image Bot (with slogan & bottom link)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (130L/2K/4K).

1  
!752
2  
3  
static S html(S subUri, Map<S, S> params) {
4  
  S id = params.get("id");
5  
  S slogan = params.get("slogan");
6  
  S sloganStyle = params.get("sloganStyle");
7  
  S bottomLink = params.get("bottomLink");
8  
  if (id == null) ret "please specify id";
9  
  S imgURL = snippetImageURL(id);
10  
  new StringBuilder buf;
11  
  buf.append("<html><head><title>" + slogan + "</title></head>\n" +
12  
    "<table width='100%' height='100%' border=0><tr><td align=center>");
13  
  buf.append("<img src=" + htmlQuote(imgURL) + ">");
14  
  if (!empty(slogan)) {
15  
    buf.append("<br><br><br>");
16  
    buf.append("<span style=" + htmlQuote(sloganStyle) + ">" + slogan + "</span>");
17  
  }
18  
  if (!empty(bottomLink))
19  
    buf.append("</td></tr> <tr height=1><td align=center>" + bottomLink);
20  
  buf.append("</td></tr></table>\n" +
21  
    "<body></body></html>");
22  
  ret str(buf);
23  
}

Author comment

Began life as a copy of #1002139

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1002142
Snippet name: HTML Image Bot (with slogan & bottom link)
Eternal ID of this version: #1002142/1
Text MD5: 483c93be82f433887c5b925789efa5c1
Transpilation MD5: fd1f9b68cc1622122c86e1b5eaaf8264
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-12-21 21:04:15
Source code size: 846 bytes / 23 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 708 / 1353
Referenced in: [show references]