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).

!752

static S html(S subUri, Map<S, S> params) {
  S id = params.get("id");
  S slogan = params.get("slogan");
  S sloganStyle = params.get("sloganStyle");
  S bottomLink = params.get("bottomLink");
  if (id == null) ret "please specify id";
  S imgURL = snippetImageURL(id);
  new StringBuilder buf;
  buf.append("<html><head><title>" + slogan + "</title></head>\n" +
    "<table width='100%' height='100%' border=0><tr><td align=center>");
  buf.append("<img src=" + htmlQuote(imgURL) + ">");
  if (!empty(slogan)) {
    buf.append("<br><br><br>");
    buf.append("<span style=" + htmlQuote(sloganStyle) + ">" + slogan + "</span>");
  }
  if (!empty(bottomLink))
    buf.append("</td></tr> <tr height=1><td align=center>" + bottomLink);
  buf.append("</td></tr></table>\n" +
    "<body></body></html>");
  ret str(buf);
}

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: 705 / 1346
Referenced in: [show references]