Changeset e0e6bde


Ignore:
Timestamp:
Sep 6, 2005 8:05:09 PM (15 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
177aeeb
Parents:
e6b1457
git-author:
jrandom <jrandom> (09/06/05 20:05:09)
git-committer:
zzz <zzz@…> (09/06/05 20:05:09)
Message:

throw css around like mad (very minimal stylesheet in place)

Files:
21 edited

Legend:

Unmodified
Added
Removed
  • apps/syndie/java/src/net/i2p/syndie/BlogManager.java

    re6b1457 re0e6bde  
    186186   
    187187    public String login(User user, String login, String pass) {
    188         if ( (login == null) || (pass == null) ) return "Login not specified";
     188        if ( (login == null) || (pass == null) ) return "<span class=\"b_loginMsgErr\">Login not specified</span>";
    189189        Hash userHash = _context.sha().calculateHash(DataHelper.getUTF8(login));
    190190        Hash passHash = _context.sha().calculateHash(DataHelper.getUTF8(pass));
     
    209209            } catch (IOException ioe) {
    210210                ioe.printStackTrace();
    211                 return "Error logging in - corrupt userfile";
     211                return "<span class=\"b_loginMsgErr\">Error logging in - corrupt userfile</span>";
    212212            }
    213213        } else {
    214             return "User does not exist";
     214            return "<span class=\"b_loginMsgErr\">User does not exist</span>";
    215215        }
    216216    }
     
    295295   
    296296    public String authorizeRemoteAccess(User user, String password) {
    297         if (!user.getAuthenticated()) return "Not logged in";
     297        if (!user.getAuthenticated()) return "<span class=\"b_remoteMsgErr\">Not logged in</span>";
    298298        String remPass = getRemotePasswordHash();
    299299        if (remPass == null)
    300             return "Remote access password not configured - please specify a remote archive password in your syndie.config or on /admin.jsp";
     300            return "<span class=\"b_remoteMsgErr\">Remote access password not configured - please <a href=\"admin.jsp\">specify</a> a remote " +
     301                   "archive password</span>";
    301302       
    302303        if (authorizeRemote(password)) {
    303304            user.setAllowAccessRemote(true);
    304305            saveUser(user);
    305             return "Remote access authorized";
     306            return "<span class=\"b_remoteMsgOk\">Remote access authorized</span>";
    306307        } else {
    307             return "Remote access denied";
     308            return "<span class=\"b_remoteMsgErr\">Remote access denied</span>";
    308309        }
    309310    }
     
    330331            try {
    331332                if (!hashedRegistrationPassword.equals(Base64.encode(_context.sha().calculateHash(registrationPassword.getBytes("UTF-8")).getData())))
    332                     return "Invalid registration password";
     333                    return "<span class=\"b_regMsgErr\">Invalid registration password</span>";
    333334            } catch (UnsupportedEncodingException uee) {
    334                 return "Error registering";
     335                return "<span class=\"b_regMsgErr\">Error registering</span>";
    335336            }
    336337        }
     
    338339        File userFile = new File(_userDir, userHash);
    339340        if (userFile.exists()) {
    340             return "Cannot register the login " + login + ": it already exists";
     341            return "<span class=\"b_regMsgErr\">Cannot register the login " + login + ": it already exists</span>";
    341342        } else {
    342343            BlogInfo info = createBlog(blogName, blogDescription, contactURL, null);
     
    356357            } catch (IOException ioe) {
    357358                ioe.printStackTrace();
    358                 return "Internal error registering - " + ioe.getMessage();
     359                return "<span class=\"b_regMsgErr\">Internal error registering - " + ioe.getMessage() + "</span>";
    359360            } finally {
    360361                if (out != null) try { out.close(); } catch (IOException ioe) {}
     
    368369    public String exportHosts(User user) {
    369370        if (!user.getAuthenticated() || !user.getAllowAccessRemote())
    370             return "Not authorized to export the hosts";
     371            return "<span class=\"b_addrMsgErr\">Not authorized to export the hosts</span>";
    371372        Map newNames = new HashMap();
    372373        PetNameDB db = user.getPetNameDB();
     
    396397                } catch (IOException ioe) {
    397398                    ioe.printStackTrace();
    398                     return "Error exporting the hosts: " + ioe.getMessage();
    399                 }
    400             }
    401         }
    402         return "Hosts exported";
     399                    return "<span class=\"b_addrMsgErr\">Error exporting the hosts: " + ioe.getMessage() + "</span>";
     400                }
     401            }
     402        }
     403        return "<span class=\"b_addrMsgOk\">Hosts exported</span>";
    403404    }
    404405   
     
    528529
    529530    public String addAddress(User user, String name, String protocol, String location, String schema) {
    530         if (!user.getAuthenticated()) return "Not logged in";
     531        if (!user.getAuthenticated()) return "<span class=\"b_addrMsgErr\">Not logged in</span>";
    531532        boolean ok = validateAddressName(name);
    532         if (!ok) return "Invalid name: " + HTMLRenderer.sanitizeString(name);
     533        if (!ok) return "<span class=\"b_addrMsgErr\">Invalid name: " + HTMLRenderer.sanitizeString(name) + "</span>";
    533534        ok = validateAddressLocation(location);
    534         if (!ok) return "Invalid location: " + HTMLRenderer.sanitizeString(location);
    535         if (!validateAddressSchema(schema)) return "Unsupported schema: " + HTMLRenderer.sanitizeString(schema);
     535        if (!ok) return "<span class=\"b_addrMsgErr\">Invalid location: " + HTMLRenderer.sanitizeString(location) + "</span>";
     536        if (!validateAddressSchema(schema)) return "<span class=\"b_addrMsgErr\">Unsupported schema: " + HTMLRenderer.sanitizeString(schema) + "</span>";
    536537        // no need to quote user/location further, as they've been sanitized
    537538       
    538539        PetNameDB names = user.getPetNameDB();
    539540        if (names.exists(name))
    540             return "Name is already in use";
     541            return "<span class=\"b_addrMsgErr\">Name is already in use</span>";
    541542        PetName pn = new PetName(name, schema, protocol, location);
    542543        names.set(name, pn);
     
    544545        try {
    545546            names.store(user.getAddressbookLocation());
    546             return "Address " + name + " written to your addressbook";
    547         } catch (IOException ioe) {
    548             return "Error writing out the name: " + ioe.getMessage();
     547            return "<span class=\"b_addrMsgOk\">Address " + name + " written to your addressbook</span>";
     548        } catch (IOException ioe) {
     549            return "<span class=\"b_addrMsgErr\">Error writing out the name: " + ioe.getMessage() + "</span>";
    549550        }
    550551    }
  • apps/syndie/java/src/net/i2p/syndie/User.java

    re6b1457 re0e6bde  
    109109        if (!hpass.equals(expectedPass)) {
    110110            _authenticated = false;
    111             return "Incorrect password";
     111            return "<span class=\"b_loginMsgErr\">Incorrect password</span>";
    112112        }
    113113       
     
    195195    }
    196196   
    197     public static final String LOGIN_OK = "Logged in";
     197    public static final String LOGIN_OK = "<span class=\"b_loginMsgOk\">Logged in</span>";
    198198   
    199199    public String export() {
  • apps/syndie/java/src/net/i2p/syndie/sml/HTMLPreviewRenderer.java

    re6b1457 re0e6bde  
    3838            String name = (String)_filenames.get(id);
    3939            String type = (String)_fileTypes.get(id);
    40             _bodyBuffer.append("<a href=\"").append(getAttachmentURL(id)).append("\">");
     40            _bodyBuffer.append("<a ").append(getClass("attachmentView")).append(" href=\"").append(getAttachmentURL(id)).append("\">");
    4141            _bodyBuffer.append(sanitizeString(anchorText)).append("</a>");
    42             _bodyBuffer.append(" (").append(f.length()/1024).append("KB, ");
    43             _bodyBuffer.append(" \"").append(sanitizeString(name)).append("\", ");
    44             _bodyBuffer.append(sanitizeString(type)).append(")");
     42            _bodyBuffer.append(getSpan("attachmentSummary")).append(" (");
     43            _bodyBuffer.append(getSpan("attachmentSummarySize")).append(f.length()/1024).append("KB</span>, ");
     44            _bodyBuffer.append(getSpan("attachmentSummaryName")).append(" \"").append(sanitizeString(name)).append("\"</span>, ");
     45            _bodyBuffer.append(getSpan("attachmentSummaryType")).append(sanitizeString(type)).append("</span>)</span>");
    4546        }
    4647    }
     
    4849    public void receiveEnd() {
    4950        _postBodyBuffer.append("</td></tr>\n");
    50         _postBodyBuffer.append("<tr>\n");
     51        _postBodyBuffer.append("<tr ").append(getClass("summDetail")).append(" >\n");
    5152        _postBodyBuffer.append("<form action=\"").append(getAttachmentURLBase()).append("\">\n");
    52         _postBodyBuffer.append("<td colspan=\"2\" valign=\"top\" align=\"left\" class=\"syndieEntryAttachmentsCell\"\n");
     53        _postBodyBuffer.append("<td colspan=\"2\" valign=\"top\" align=\"left\" ").append(getClass("summDetail")).append("> \n");
    5354
    5455        if (_files.size() > 0) {
    55             _postBodyBuffer.append("<b>Attachments:</b> ");
    56             _postBodyBuffer.append("<select name=\"").append(ArchiveViewerBean.PARAM_ATTACHMENT).append("\">\n");
     56            _postBodyBuffer.append(getSpan("summDetailAttachment")).append("Attachments:</span> ");
     57            _postBodyBuffer.append("<select ").append(getClass("summDetailAttachmentId")).append(" name=\"").append(ArchiveViewerBean.PARAM_ATTACHMENT).append("\">\n");
    5758            for (int i = 0; i < _files.size(); i++) {
    5859                _postBodyBuffer.append("<option value=\"").append(i).append("\">");
     
    6566            }
    6667            _postBodyBuffer.append("</select>\n");
    67             _postBodyBuffer.append("<input type=\"submit\" value=\"Download\" name=\"Download\" /><br />\n");
     68            _postBodyBuffer.append("<input ").append(getClass("summDetailAttachmentDl")).append(" type=\"submit\" value=\"Download\" name=\"Download\" /><br />\n");
    6869        }
    6970
    7071        if (_blogs.size() > 0) {
    71             _postBodyBuffer.append("<b>Blog references:</b> ");
     72            _postBodyBuffer.append(getSpan("summDetailBlog")).append("Blog references:</span> ");
    7273            for (int i = 0; i < _blogs.size(); i++) {
    7374                Blog b = (Blog)_blogs.get(i);
    74                 _postBodyBuffer.append("<a href=\"").append(getPageURL(new Hash(Base64.decode(b.hash)), b.tag, b.entryId, -1, -1, (_user != null ? _user.getShowExpanded() : false), (_user != null ? _user.getShowImages() : false)));
     75                boolean expanded = (_user != null ? _user.getShowExpanded() : false);
     76                boolean images = (_user != null ? _user.getShowImages() : false);
     77                _postBodyBuffer.append("<a ").append(getClass("summDetailBlogLink")).append(" href=\"");
     78                _postBodyBuffer.append(getPageURL(new Hash(Base64.decode(b.hash)), b.tag, b.entryId, -1, -1, expanded, images));
    7579                _postBodyBuffer.append("\">").append(sanitizeString(b.name)).append("</a> ");
    7680            }
     
    7983
    8084        if (_links.size() > 0) {
    81             _postBodyBuffer.append("<b>External links:</b> ");
     85            _postBodyBuffer.append(getSpan("summDetailExternal")).append("External links:</span> ");
    8286            for (int i = 0; i < _links.size(); i++) {
    8387                Link l = (Link)_links.get(i);
    84                 _postBodyBuffer.append("<a href=\"externallink.jsp?schema=");
    85                 _postBodyBuffer.append(sanitizeURL(l.schema)).append("&location=");
    86                 _postBodyBuffer.append(sanitizeURL(l.location));
     88                _postBodyBuffer.append("<a ").append(getClass("summDetailExternalLink")).append(" href=\"externallink.jsp?");
     89                if (l.schema != null)
     90                    _postBodyBuffer.append("schema=").append(sanitizeURL(l.schema)).append('&');
     91                if (l.location != null)
     92                    _postBodyBuffer.append("location=").append(sanitizeURL(l.location)).append('&');
    8793                _postBodyBuffer.append("\">").append(sanitizeString(l.location));
    88                 _postBodyBuffer.append(" (").append(sanitizeString(l.schema)).append(")</a> ");
     94                _postBodyBuffer.append(getSpan("summDetailExternalNet")).append(" (").append(sanitizeString(l.schema)).append(")</span></a> ");
    8995            }
    9096            _postBodyBuffer.append("<br />\n");
     
    9298
    9399        if (_addresses.size() > 0) {
    94             _postBodyBuffer.append("<b>Addresses:</b> ");
     100            _postBodyBuffer.append(getSpan("summDetailAddr")).append("Addresses:</span>");
    95101            for (int i = 0; i < _addresses.size(); i++) {
    96102                Address a = (Address)_addresses.get(i);
    97                
     103
    98104                String knownName = null;
    99105                if (_user != null)
    100106                    knownName = _user.getPetNameDB().getNameByLocation(a.location);
    101107                if (knownName != null) {
    102                     _postBodyBuffer.append(' ').append(sanitizeString(knownName));
     108                    _postBodyBuffer.append(' ').append(getSpan("summDetailAddrKnown"));
     109                    _postBodyBuffer.append(sanitizeString(knownName)).append("</span>");
    103110                } else {
    104                     _postBodyBuffer.append(" <a href=\"addresses.jsp?network=");
    105                     _postBodyBuffer.append(sanitizeTagParam(a.schema)).append("&location=");
    106                     _postBodyBuffer.append(sanitizeTagParam(a.location)).append("&name=");
    107                     _postBodyBuffer.append(sanitizeTagParam(a.protocol)).append("&protocol=");
    108                     _postBodyBuffer.append(sanitizeTagParam(a.name));
     111                    _postBodyBuffer.append(" <a ").append(getClass("summDetailAddrLink")).append(" href=\"addresses.jsp?");
     112                    if (a.schema != null)
     113                        _postBodyBuffer.append("network=").append(sanitizeTagParam(a.schema)).append('&');
     114                    if (a.location != null)
     115                        _postBodyBuffer.append("location=").append(sanitizeTagParam(a.location)).append('&');
     116                    if (a.name != null)
     117                        _postBodyBuffer.append("name=").append(sanitizeTagParam(a.name)).append('&');
     118                    if (a.protocol != null)
     119                        _postBodyBuffer.append("protocol=").append(sanitizeTagParam(a.protocol)).append('&');
    109120                    _postBodyBuffer.append("\">").append(sanitizeString(a.name)).append("</a>");
    110121                }
     
    114125
    115126        if (_archives.size() > 0) {
    116             _postBodyBuffer.append("<b>Archives:</b>");
     127            _postBodyBuffer.append(getSpan("summDetailArchive")).append("Archives:</span>");
    117128            for (int i = 0; i < _archives.size(); i++) {
    118129                ArchiveRef a = (ArchiveRef)_archives.get(i);
    119                 _postBodyBuffer.append(" <a href=\"").append(getArchiveURL(null, new SafeURL(a.locationSchema + "://" + a.location)));
     130                _postBodyBuffer.append(" <a ").append(getClass("summDetailArchiveLink")).append(" href=\"").append(getArchiveURL(null, new SafeURL(a.locationSchema + "://" + a.location)));
    120131                _postBodyBuffer.append("\">").append(sanitizeString(a.name)).append("</a>");
    121132                if (a.description != null)
    122                     _postBodyBuffer.append(": ").append(sanitizeString(a.description));
     133                    _postBodyBuffer.append(": ").append(getSpan("summDetailArchiveDesc")).append(sanitizeString(a.description)).append("</span>");
     134                if (null == _user.getPetNameDB().getNameByLocation(a.location)) {
     135                    _postBodyBuffer.append(" <a ").append(getClass("summDetailArchiveBookmark")).append(" href=\"");
     136                    _postBodyBuffer.append(getBookmarkURL(a.name, a.location, a.locationSchema, "syndiearchive"));
     137                    _postBodyBuffer.append("\">bookmark</a>");
     138                }
    123139            }
    124140            _postBodyBuffer.append("<br />\n");
  • apps/syndie/java/src/net/i2p/syndie/sml/HTMLRenderer.java

    re6b1457 re0e6bde  
    6262    }
    6363   
     64    /**
     65     * Retrieve: class="s_summary_$element" or class="s_detail_$element ss_$style_detail_$element"
     66     */
     67    protected String getClass(String element) {
     68        StringBuffer rv = new StringBuffer(64);
     69        rv.append(" class=\"s_");
     70        if (_cutBody)
     71            rv.append("summary_");
     72        else
     73            rv.append("detail_");
     74        rv.append(element);
     75        if (_entry != null) {
     76            String style = sanitizeStyle(_entry.getHeader(HEADER_STYLE));
     77            if (style != null) {
     78                rv.append(" ss_").append(style);
     79                if (_cutBody)
     80                    rv.append("summary_");
     81                else
     82                    rv.append("detail_");
     83                rv.append(element);
     84            }
     85        }
     86        rv.append("\" ");
     87        return rv.toString();
     88    }
     89    protected String getSpan(String element) {
     90        return "<span " + getClass(element) + ">";
     91    }
     92   
    6493    public void renderUnknownEntry(User user, Archive archive, BlogURI uri, Writer out) throws IOException {
    6594        BlogInfo info = archive.getBlogInfo(uri);
    6695        if (info == null)
    67             out.write("<br />The blog " + uri.getKeyHash().toBase64() + " is not known locally.  "
    68                       + "Please get it from an archive and <a href=\""
     96            out.write("<br /><span " + getClass("unknownBlog") + ">The blog <span " + getClass("blogURI") + ">" + uri.getKeyHash().toBase64() + "</span> is not known locally.  "
     97                      + "Please get it from an archive and <a " + getClass("unknownRetry") + " href=\""
    6998                      + getPageURL(uri.getKeyHash(), null, uri.getEntryId(), -1, -1, user.getShowExpanded(), user.getShowImages())
    70                       + "\">try again</a>");
     99                      + "\">try again</a></span>");
    71100        else
    72             out.write("<br />The blog <a href=\""
     101            out.write("<br /><span " + getClass("unknownEntry") + ">The blog <a " + getClass("unknownRetry") + " href=\""
    73102                      + getPageURL(uri.getKeyHash(), null, -1, -1, -1, user.getShowExpanded(), user.getShowImages())
    74103                      + "\">" + info.getProperty(BlogInfo.NAME) + "</a> is known, but the entry " + uri.getEntryId() + " is not.  "
    75                       + "Please get it from an archive and <a href=\""
     104                      + "Please get it from an archive and <a " + getClass("unknownRetry") + " href=\""
    76105                      + getPageURL(uri.getKeyHash(), null, uri.getEntryId(), -1, -1, user.getShowExpanded(), user.getShowImages())
    77                       + "\">try again</a>");
     106                      + "\">try again</a></span>");
    78107    }
    79108   
     
    119148    public void receiveBold(String text) {
    120149        if (!continueBody()) { return; }
    121         _bodyBuffer.append("<b>").append(sanitizeString(text)).append("</b>");
     150        _bodyBuffer.append("<em ").append(getClass("bold")).append(" >").append(sanitizeString(text)).append("</em>");
    122151    }
    123152    public void receiveItalic(String text) {
    124153        if (!continueBody()) { return; }
    125         _bodyBuffer.append("<i>").append(sanitizeString(text)).append("</i>");
     154        _bodyBuffer.append("<em ").append(getClass("italic")).append(" >").append(sanitizeString(text)).append("</em>");
    126155    }
    127156    public void receiveUnderline(String text) {
    128157        if (!continueBody()) { return; }
    129         _bodyBuffer.append("<u>").append(sanitizeString(text)).append("</u>");
     158        _bodyBuffer.append("<em ").append(getClass("underline")).append(" >").append(sanitizeString(text)).append("</em>");
    130159    }
    131160    public void receiveHR() {
    132161        if (!continueBody()) { return; }
    133         _bodyBuffer.append("<hr />");
     162        _bodyBuffer.append(getSpan("hr")).append("<hr /></span>");
    134163    }
    135164    public void receiveH1(String body) {
    136165        if (!continueBody()) { return; }
    137         _bodyBuffer.append("<h1>").append(sanitizeString(body)).append("</h1>");
     166        _bodyBuffer.append("<h1 ").append(getClass("h1")).append(" >").append(sanitizeString(body)).append("</span></h1>");
    138167    }
    139168    public void receiveH2(String body) {
    140169        if (!continueBody()) { return; }
    141         _bodyBuffer.append("<h2>").append(sanitizeString(body)).append("</h2>");
     170        _bodyBuffer.append("<h2 ").append(getClass("h2")).append(" >").append(sanitizeString(body)).append("</span></h2>");
    142171    }
    143172    public void receiveH3(String body) {
    144173        if (!continueBody()) { return; }
    145         _bodyBuffer.append("<h3>").append(sanitizeString(body)).append("</h3>");
     174        _bodyBuffer.append("<h3 ").append(getClass("h3")).append(" >").append(sanitizeString(body)).append("</span></h3>");
    146175    }
    147176    public void receiveH4(String body) {
    148177        if (!continueBody()) { return; }
    149         _bodyBuffer.append("<h4>").append(sanitizeString(body)).append("</h4>");
     178        _bodyBuffer.append("<h4 ").append(getClass("h4")).append(" >").append(sanitizeString(body)).append("</span></h4>");
    150179    }
    151180    public void receiveH5(String body) {
    152181        if (!continueBody()) { return; }
    153         _bodyBuffer.append("<h5>").append(sanitizeString(body)).append("</h5>");
     182        _bodyBuffer.append("<h5 ").append(getClass("h5")).append(" >").append(sanitizeString(body)).append("</span></h5>");
    154183    }
    155184    public void receivePre(String body) {
    156185        if (!continueBody()) { return; }
    157         _bodyBuffer.append("<pre>").append(sanitizeString(body)).append("</pre>");
     186        _bodyBuffer.append("<pre ").append(getClass("pre")).append(" >").append(sanitizeString(body)).append("</pre>");
    158187    }
    159188   
    160189    public void receiveQuote(String text, String whoQuoted, String quoteLocationSchema, String quoteLocation) {
    161190        if (!continueBody()) { return; }
    162         _bodyBuffer.append("<quote>").append(sanitizeString(text)).append("</quote>");
     191        _bodyBuffer.append("<quote ").append(getClass("quote")).append(" >").append(sanitizeString(text)).append("</quote>");
    163192    }
    164193    public void receiveCode(String text, String codeLocationSchema, String codeLocation) {
    165194        if (!continueBody()) { return; }
    166            _bodyBuffer.append("<code>").append(sanitizeString(text)).append("</code>");
     195           _bodyBuffer.append("<code ").append(getClass("code")).append(" >").append(sanitizeString(text)).append("</code>");
    167196    }
    168197    public void receiveImage(String alternateText, int attachmentId) {
    169198        if (!continueBody()) { return; }
    170199        if (_showImages) {
    171             _bodyBuffer.append("<img src=\"").append(getAttachmentURL(attachmentId)).append("\"");
     200            _bodyBuffer.append("<img ").append(getClass("img")).append(" src=\"").append(getAttachmentURL(attachmentId)).append("\"");
    172201            if (alternateText != null)
    173202                _bodyBuffer.append(" alt=\"").append(sanitizeTagParam(alternateText)).append("\"");
    174203            _bodyBuffer.append(" />");
    175204        } else {
    176             _bodyBuffer.append("[image: attachment ").append(attachmentId);
    177             _bodyBuffer.append(": ").append(sanitizeString(alternateText));
    178             _bodyBuffer.append(" <a href=\"").append(getEntryURL(true)).append("\">view images</a>]");
     205            _bodyBuffer.append(getSpan("imgSummary")).append("[image: ").append(getSpan("imgSummaryAttachment")).append(" attachment ").append(attachmentId);
     206            _bodyBuffer.append(":</span> ").append(getSpan("imgSummaryAlt")).append(sanitizeString(alternateText));
     207            _bodyBuffer.append("</span> <a ").append(getClass("imgSummaryLink")).append(" href=\"").append(getEntryURL(true)).append("\">view images</a>]</span>");
    179208        }
    180209    }
     
    184213        _cutReached = true;
    185214        if (_cutBody) {
    186             _bodyBuffer.append("<a href=\"").append(getEntryURL()).append("\">");
     215            _bodyBuffer.append("<a ").append(getClass("cutExplicit")).append(" href=\"").append(getEntryURL()).append("\">");
    187216            if ( (summaryText != null) && (summaryText.length() > 0) )
    188217                _bodyBuffer.append(sanitizeString(summaryText));
     
    192221        } else {
    193222            if (summaryText != null)
    194                 _bodyBuffer.append(sanitizeString(summaryText));
     223                _bodyBuffer.append(getSpan("cutIgnore")).append(sanitizeString(summaryText)).append("</span>\n");
    195224        }
    196225    }
     
    203232        if (!rv && !_cutReached) {
    204233            // exceeded the allowed size
    205             _bodyBuffer.append("<a href=\"").append(getEntryURL()).append("\">more inside...</a>");
     234            _bodyBuffer.append("<a ").append(getClass("cutImplicit")).append(" href=\"").append(getEntryURL()).append("\">more inside...</a>\n");
    206235            _cutReached = true;
    207236        }
     
    212241        if (!continueBody()) { return; }
    213242        if (true || (_lastNewlineAt >= _bodyBuffer.length()))
    214             _bodyBuffer.append("<br />\n");
     243            _bodyBuffer.append(getSpan("nl")).append("<br /></span>\n");
    215244        else
    216245            _lastNewlineAt = _bodyBuffer.length();
     
    218247    public void receiveLT() {
    219248        if (!continueBody()) { return; }
    220         _bodyBuffer.append("&lt;");
     249        _bodyBuffer.append(getSpan("lt")).append("&lt;</span>");
    221250    }
    222251    public void receiveGT() {
    223252        if (!continueBody()) { return; }
    224         _bodyBuffer.append("&gt;");
     253        _bodyBuffer.append(getSpan("gt")).append("&gt;</span>");
    225254    }
    226255    public void receiveBegin() {}
    227256    public void receiveLeftBracket() {
    228257        if (!continueBody()) { return; }
    229         _bodyBuffer.append('[');
     258        _bodyBuffer.append(getSpan("lb")).append("[</span>");
    230259    }
    231260    public void receiveRightBracket() {
    232261        if (!continueBody()) { return; }
    233         _bodyBuffer.append(']');
     262        _bodyBuffer.append(getSpan("rb")).append("]</span>");
    234263    }
    235264   
     
    288317        if (entryId > 0) {
    289318            String pageURL = getPageURL(blog, tag, entryId, -1, -1, true, (_user != null ? _user.getShowImages() : false));
    290             _bodyBuffer.append("<a href=\"").append(pageURL).append("\">");
     319            _bodyBuffer.append("<a ").append(getClass("blogEntryLink")).append(" href=\"").append(pageURL).append("\">");
    291320            if ( (description != null) && (description.trim().length() > 0) ) {
    292321                _bodyBuffer.append(sanitizeString(description));
     
    301330       
    302331        String url = getPageURL(blog, null, -1, -1, -1, (_user != null ? _user.getShowExpanded() : false), (_user != null ? _user.getShowImages() : false));
    303         _bodyBuffer.append(" [<a href=\"").append(url);
     332        _bodyBuffer.append(getSpan("blogEntrySummary")).append(" [<a ").append(getClass("blogLink")).append(" href=\"").append(url);
    304333        _bodyBuffer.append("\">");
    305334        if ( (name != null) && (name.trim().length() > 0) )
     
    307336        else
    308337            _bodyBuffer.append("view");
    309         _bodyBuffer.append("</a> (<a href=\"").append(getMetadataURL(blog)).append("\">meta</a>)");
     338        _bodyBuffer.append("</a> (<a ").append(getClass("blogMeta")).append(" href=\"").append(getMetadataURL(blog)).append("\">meta</a>)");
    310339        if ( (tag != null) && (tag.trim().length() > 0) ) {
    311340            url = getPageURL(blog, tag, -1, -1, -1, false, false);
    312             _bodyBuffer.append(" <a href=\"").append(url);
     341            _bodyBuffer.append(" <a ").append(getClass("blogTagLink")).append(" href=\"").append(url);
    313342            _bodyBuffer.append("\">Tag: ").append(sanitizeString(tag)).append("</a>");
    314343        }
    315344        if ( (locations != null) && (locations.size() > 0) ) {
    316             _bodyBuffer.append(" Archives: ");
     345            _bodyBuffer.append(getSpan("blogArchive")).append(" Archives: ");
    317346            for (int i = 0; i < locations.size(); i++) {
    318347                SafeURL surl = (SafeURL)locations.get(i);
    319348                if (_user.getAuthenticated() && _user.getAllowAccessRemote())
    320                     _bodyBuffer.append("<a href=\"").append(getArchiveURL(blog, surl)).append("\">").append(sanitizeString(surl.toString())).append("</a> ");
     349                    _bodyBuffer.append("<a ").append(getClass("blogArchiveView")).append(" href=\"").append(getArchiveURL(blog, surl)).append("\">").append(sanitizeString(surl.toString())).append("</a> ");
    321350                else
    322                     _bodyBuffer.append(sanitizeString(surl.toString())).append(' ');
    323             }
    324         }
    325         _bodyBuffer.append("] ");
     351                    _bodyBuffer.append(getSpan("blogArchiveURL")).append(sanitizeString(surl.toString())).append("</span> ");
     352            }
     353            _bodyBuffer.append("</span>");
     354        }
     355        _bodyBuffer.append("]</span> ");
    326356    }
    327357   
     
    351381        if (!continueBody()) { return; }
    352382       
    353         _bodyBuffer.append(sanitizeString(anchorText)).append(" [Archive ");
     383        _bodyBuffer.append(getSpan("archive")).append(sanitizeString(anchorText)).append("</span>");
     384        _bodyBuffer.append(getSpan("archiveSummary")).append(" [Archive ");
    354385        if (name != null)
    355             _bodyBuffer.append(sanitizeString(name));
     386            _bodyBuffer.append(getSpan("archiveSummaryName")).append(sanitizeString(name)).append("</span>");
    356387        if (location != null) {
    357388            _bodyBuffer.append(" at ");
    358389            SafeURL surl = new SafeURL(locationSchema + "://" + location);
    359             _bodyBuffer.append("<a href=\"").append(getArchiveURL(null, surl));
     390            _bodyBuffer.append("<a ").append(getClass("archiveSummaryLink")).append(" href=\"").append(getArchiveURL(null, surl));
    360391            _bodyBuffer.append("\">").append(sanitizeString(surl.toString())).append("</a>");
    361392        }
    362393        if (description != null)
    363             _bodyBuffer.append(": ").append(sanitizeString(description));
    364         _bodyBuffer.append("]");
     394            _bodyBuffer.append(": ").append(getSpan("archiveSummaryDesc")).append(sanitizeString(description)).append("</span>");
     395        _bodyBuffer.append("]</span>");
    365396    }
    366397   
     
    382413        if (!continueBody()) { return; }
    383414        if ( (schema == null) || (location == null) ) return;
    384         _bodyBuffer.append("<a href=\"externallink.jsp?schema=");
     415        _bodyBuffer.append("<a ").append(getClass("externalLink")).append(" href=\"externallink.jsp?schema=");
    385416        _bodyBuffer.append(sanitizeURL(schema)).append("&location=");
    386417        _bodyBuffer.append(sanitizeURL(location)).append("&description=");
     
    413444            knownName = _user.getPetNameDB().getNameByLocation(location);
    414445        if (knownName != null) {
    415             _bodyBuffer.append(sanitizeString(anchorText));
    416             _bodyBuffer.append(" <i>(").append(sanitizeString(knownName)).append(")</i>");
     446            _bodyBuffer.append(getSpan("addr")).append(sanitizeString(anchorText)).append("</span>");
     447            _bodyBuffer.append(getSpan("addrKnownName")).append("(").append(sanitizeString(knownName)).append(")</span>");
    417448        } else {
    418449            System.err.println("Receiving address [" + location + "]");
    419             _bodyBuffer.append("<a href=\"addresses.jsp?network=");
    420             _bodyBuffer.append(sanitizeTagParam(schema)).append("&name=");
    421             _bodyBuffer.append(sanitizeTagParam(name)).append("&protocol=");
    422             _bodyBuffer.append(sanitizeTagParam(protocol)).append("&location=");
    423             _bodyBuffer.append(sanitizeTagParam(location)).append("\">").append(sanitizeString(anchorText)).append("</a>");
     450            _bodyBuffer.append("<a ").append(getClass("addrAdd")).append(" href=\"addresses.jsp?");
     451            if (schema != null)
     452                _bodyBuffer.append("network=").append(sanitizeTagParam(schema)).append('&');
     453            if (name != null)
     454                _bodyBuffer.append("name=").append(sanitizeTagParam(name)).append('&');
     455            if (protocol != null)
     456                _bodyBuffer.append("protocol=").append(sanitizeTagParam(protocol)).append('&');
     457            if (location != null)
     458                _bodyBuffer.append("location=").append(sanitizeTagParam(location));
     459            _bodyBuffer.append("\">").append(sanitizeString(anchorText)).append("</a>");
    424460        }
    425461    }
     
    429465        Attachment attachments[] = _entry.getAttachments();
    430466        if ( (id < 0) || (id >= attachments.length)) {
    431             _bodyBuffer.append(sanitizeString(anchorText));
     467            _bodyBuffer.append(getSpan("attachmentUnknown")).append(sanitizeString(anchorText)).append("</span>");
    432468        } else {
    433             _bodyBuffer.append("<a href=\"").append(getAttachmentURL(id)).append("\">");
     469            _bodyBuffer.append("<a ").append(getClass("attachmentView")).append(" href=\"").append(getAttachmentURL(id)).append("\">");
    434470            _bodyBuffer.append(sanitizeString(anchorText)).append("</a>");
    435             _bodyBuffer.append(" (").append(attachments[id].getDataLength()/1024).append("KB, ");
    436             _bodyBuffer.append(" \"").append(sanitizeString(attachments[id].getName())).append("\", ");
    437             _bodyBuffer.append(sanitizeString(attachments[id].getMimeType())).append(")");
     471            _bodyBuffer.append(getSpan("attachmentSummary")).append(" (");
     472            _bodyBuffer.append(getSpan("attachmentSummarySize")).append(attachments[id].getDataLength()/1024).append("KB</span>, ");
     473            _bodyBuffer.append(getSpan("attachmentSummaryName")).append(" \"").append(sanitizeString(attachments[id].getName())).append("\"</span>, ");
     474            _bodyBuffer.append(getSpan("attachmentSummaryDesc")).append(" \"").append(sanitizeString(attachments[id].getDescription())).append("\"</span>, ");
     475            _bodyBuffer.append(getSpan("attachmentSummaryType")).append(sanitizeString(attachments[id].getMimeType())).append("</span>)</span>");
    438476        }
    439477    }
    440478   
    441479    public void receiveEnd() {
    442         _postBodyBuffer.append("</td></tr>\n");
     480        _postBodyBuffer.append("</td></tr>\n<!-- end of the post body -->");
    443481        if (_cutBody) {
    444             _postBodyBuffer.append("<tr class=\"syndieEntryAttachmentsCell\">\n");
    445             _postBodyBuffer.append("<td colspan=\"2\" valign=\"top\" align=\"left\" class=\"syndieEntryAttachmentsCell\">");
    446             _postBodyBuffer.append("<a href=\"").append(getEntryURL()).append("\">View details...</a> ");
    447            
     482            _postBodyBuffer.append("<!-- beginning of the post summary -->\n");
     483            _postBodyBuffer.append("<tr ").append(getClass("summ")).append("\">\n");
     484            _postBodyBuffer.append("<td colspan=\"2\" valign=\"top\" align=\"left\" ").append(getClass("summ")).append(" >");
     485            _postBodyBuffer.append("<a ").append(getClass("summLink")).append(" href=\"").append(getEntryURL()).append("\">View details...</a> ");
     486            _postBodyBuffer.append(getSpan("summ"));
    448487            if ( (_entry != null) && (_entry.getAttachments() != null) && (_entry.getAttachments().length > 0) ) {
    449488                int num = _entry.getAttachments().length;
     
    490529            String inReplyTo = (String)_headers.get(HEADER_IN_REPLY_TO);
    491530            if ( (inReplyTo != null) && (inReplyTo.trim().length() > 0) )
    492                 _postBodyBuffer.append(" <a href=\"").append(getPageURL(sanitizeTagParam(inReplyTo))).append("\">(view parent)</a>\n");
     531                _postBodyBuffer.append(" <a ").append(getClass("summParent")).append(" href=\"").append(getPageURL(sanitizeTagParam(inReplyTo))).append("\">(view parent)</a>\n");
    493532           
    494             _postBodyBuffer.append("</td></tr>\n");
     533            _postBodyBuffer.append("</span></td></tr>\n");
     534            _postBodyBuffer.append("<!-- end of the post summary -->\n");
    495535        } else {
    496             _postBodyBuffer.append("<tr class=\"syndieEntryAttachmentsCell\">\n");
     536            _postBodyBuffer.append("<!-- beginning of the post summary details -->\n");
     537            _postBodyBuffer.append("<tr ").append(getClass("summDetail")).append(">\n");
    497538            _postBodyBuffer.append("<form action=\"").append(getAttachmentURLBase()).append("\">\n");
    498539            _postBodyBuffer.append("<input type=\"hidden\" name=\"").append(ArchiveViewerBean.PARAM_BLOG);
     
    510551                _postBodyBuffer.append("unknown");
    511552            _postBodyBuffer.append("\" />\n");
    512             _postBodyBuffer.append("<td colspan=\"2\" valign=\"top\" align=\"left\" class=\"syndieEntryAttachmentsCell\">\n");
     553            _postBodyBuffer.append("<td colspan=\"2\" valign=\"top\" align=\"left\" ").append(getClass("summDetail")).append(" >\n");
    513554
    514555            if ( (_entry != null) && (_entry.getAttachments() != null) && (_entry.getAttachments().length > 0) ) {
    515                 _postBodyBuffer.append("<b>Attachments:</b> ");
    516                 _postBodyBuffer.append("<select name=\"").append(ArchiveViewerBean.PARAM_ATTACHMENT).append("\">\n");
     556                _postBodyBuffer.append(getSpan("summDetailAttachment")).append("Attachments:</span> ");
     557                _postBodyBuffer.append("<select ").append(getClass("summDetailAttachmentId")).append(" name=\"").append(ArchiveViewerBean.PARAM_ATTACHMENT).append("\">\n");
    517558                for (int i = 0; i < _entry.getAttachments().length; i++) {
    518559                    _postBodyBuffer.append("<option value=\"").append(i).append("\">");
     
    527568                }
    528569                _postBodyBuffer.append("</select>\n");
    529                 _postBodyBuffer.append("<input type=\"submit\" value=\"Download\" name=\"Download\" /><br />\n");
     570                _postBodyBuffer.append("<input ").append(getClass("summDetailAttachmentDl")).append(" type=\"submit\" value=\"Download\" name=\"Download\" /><br />\n");
    530571            }
    531572
    532573            if (_blogs.size() > 0) {
    533                 _postBodyBuffer.append("<b>Blog references:</b> ");
     574                _postBodyBuffer.append(getSpan("summDetailBlog")).append("Blog references:</span>");
    534575                for (int i = 0; i < _blogs.size(); i++) {
    535576                    Blog b = (Blog)_blogs.get(i);
    536                     _postBodyBuffer.append("<a href=\"").append(getPageURL(new Hash(Base64.decode(b.hash)), b.tag, b.entryId, -1, -1, (_user != null ? _user.getShowExpanded() : false), (_user != null ? _user.getShowImages() : false)));
     577                    _postBodyBuffer.append("<a ").append(getClass("summDetailBlogLink")).append(" href=\"");
     578                    boolean expanded = (_user != null ? _user.getShowExpanded() : false);
     579                    boolean images = (_user != null ? _user.getShowImages() : false);
     580                    _postBodyBuffer.append(getPageURL(new Hash(Base64.decode(b.hash)), b.tag, b.entryId, -1, -1, expanded, images));
    537581                    _postBodyBuffer.append("\">").append(sanitizeString(b.name)).append("</a> ");
    538582                }
     
    541585
    542586            if (_links.size() > 0) {
    543                 _postBodyBuffer.append("<b>External links:</b> ");
     587                _postBodyBuffer.append(getSpan("summDetailExternal")).append("External links:</span> ");
    544588                for (int i = 0; i < _links.size(); i++) {
    545589                    Link l = (Link)_links.get(i);
    546                     _postBodyBuffer.append("<a href=\"externallink.jsp?schema=");
    547                     _postBodyBuffer.append(sanitizeURL(l.schema)).append("&location=");
    548                     _postBodyBuffer.append(sanitizeURL(l.location));
     590                    _postBodyBuffer.append("<a ").append(getClass("summDetailExternalLink")).append(" href=\"externallink.jsp?");
     591                    if (l.schema != null)
     592                        _postBodyBuffer.append("schema=").append(sanitizeURL(l.schema)).append('&');
     593                    if (l.location != null)
     594                        _postBodyBuffer.append("location=").append(sanitizeURL(l.location)).append('&');
    549595                    _postBodyBuffer.append("\">").append(sanitizeString(l.location));
    550                     _postBodyBuffer.append(" (").append(sanitizeString(l.schema)).append(")</a> ");
     596                    _postBodyBuffer.append(getSpan("summDetailExternalNet")).append(" (").append(sanitizeString(l.schema)).append(")</span></a> ");
    551597                }
    552598                _postBodyBuffer.append("<br />\n");
     
    554600
    555601            if (_addresses.size() > 0) {
    556                 _postBodyBuffer.append("<b>Addresses:</b>");
     602                _postBodyBuffer.append(getSpan("summDetailAddr")).append("Addresses:</span>");
    557603                for (int i = 0; i < _addresses.size(); i++) {
    558604                    Address a = (Address)_addresses.get(i);
     
    562608                        knownName = _user.getPetNameDB().getNameByLocation(a.location);
    563609                    if (knownName != null) {
    564                         _postBodyBuffer.append(' ').append(sanitizeString(knownName));
     610                        _postBodyBuffer.append(' ').append(getSpan("summDetailAddrKnown"));
     611                        _postBodyBuffer.append(sanitizeString(knownName)).append("</span>");
    565612                    } else {
    566                         _postBodyBuffer.append(" <a href=\"addresses.jsp?network=");
    567                         _postBodyBuffer.append(sanitizeTagParam(a.schema)).append("&location=");
    568                         _postBodyBuffer.append(sanitizeTagParam(a.location)).append("&name=");
    569                         _postBodyBuffer.append(sanitizeTagParam(a.name)).append("&protocol=");
    570                         _postBodyBuffer.append(sanitizeTagParam(a.protocol));
     613                        _postBodyBuffer.append(" <a ").append(getClass("summDetailAddrLink")).append(" href=\"addresses.jsp?");
     614                        if (a.schema != null)
     615                            _postBodyBuffer.append("network=").append(sanitizeTagParam(a.schema)).append('&');
     616                        if (a.location != null)
     617                            _postBodyBuffer.append("location=").append(sanitizeTagParam(a.location)).append('&');
     618                        if (a.name != null)
     619                            _postBodyBuffer.append("name=").append(sanitizeTagParam(a.name)).append('&');
     620                        if (a.protocol != null)
     621                            _postBodyBuffer.append("protocol=").append(sanitizeTagParam(a.protocol)).append('&');
    571622                        _postBodyBuffer.append("\">").append(sanitizeString(a.name)).append("</a>");
    572623                    }
     
    576627
    577628            if (_archives.size() > 0) {
    578                 _postBodyBuffer.append("<b>Archives:</b>");
     629                _postBodyBuffer.append(getSpan("summDetailArchive")).append("Archives:</span>");
    579630                for (int i = 0; i < _archives.size(); i++) {
    580631                    ArchiveRef a = (ArchiveRef)_archives.get(i);
    581                     _postBodyBuffer.append(" <a href=\"").append(getArchiveURL(null, new SafeURL(a.locationSchema + "://" + a.location)));
     632                    _postBodyBuffer.append(" <a ").append(getClass("summDetailArchiveLink")).append(" href=\"").append(getArchiveURL(null, new SafeURL(a.locationSchema + "://" + a.location)));
    582633                    _postBodyBuffer.append("\">").append(sanitizeString(a.name)).append("</a>");
    583634                    if (a.description != null)
    584                         _postBodyBuffer.append(": ").append(sanitizeString(a.description));
    585                     _postBodyBuffer.append(" <a href=\"");
    586                     _postBodyBuffer.append(getBookmarkURL(a.name, a.location, a.locationSchema, "syndiearchive"));
    587                     _postBodyBuffer.append("\">bookmark</a>");
     635                        _postBodyBuffer.append(": ").append(getSpan("summDetailArchiveDesc")).append(sanitizeString(a.description)).append("</span>");
     636                    if (null == _user.getPetNameDB().getNameByLocation(a.location)) {
     637                        _postBodyBuffer.append(" <a ").append(getClass("summDetailArchiveBookmark")).append(" href=\"");
     638                        _postBodyBuffer.append(getBookmarkURL(a.name, a.location, a.locationSchema, "syndiearchive"));
     639                        _postBodyBuffer.append("\">bookmark</a>");
     640                    }
    588641                }
    589642                _postBodyBuffer.append("<br />\n");
     
    593646                List replies = _archive.getIndex().getReplies(_entry.getURI());
    594647                if ( (replies != null) && (replies.size() > 0) ) {
    595                     _postBodyBuffer.append("<b>Replies:</b> ");
     648                    _postBodyBuffer.append(getSpan("summDetailReplies")).append("Replies:</span> ");
    596649                    for (int i = 0; i < replies.size(); i++) {
    597650                        BlogURI reply = (BlogURI)replies.get(i);
    598                         _postBodyBuffer.append("<a href=\"");
     651                        _postBodyBuffer.append("<a ").append(getClass("summDetailReplyLink")).append(" href=\"");
    599652                        _postBodyBuffer.append(getPageURL(reply.getKeyHash(), null, reply.getEntryId(), -1, -1, true, _user.getShowImages()));
    600653                        _postBodyBuffer.append("\">");
     654                        _postBodyBuffer.append(getSpan("summDetailReplyAuthor"));
    601655                        BlogInfo replyAuthor = _archive.getBlogInfo(reply);
    602656                        if (replyAuthor != null) {
     
    605659                            _postBodyBuffer.append(reply.getKeyHash().toBase64().substring(0,16));
    606660                        }
    607                         _postBodyBuffer.append(" on ");
     661                        _postBodyBuffer.append("</span> on ");
     662                        _postBodyBuffer.append(getSpan("summDetailReplyDate"));
    608663                        _postBodyBuffer.append(getEntryDate(reply.getEntryId()));
    609                         _postBodyBuffer.append("</a> ");
     664                        _postBodyBuffer.append("</a></span> ");
    610665                    }
    611666                    _postBodyBuffer.append("<br />");
     
    615670            String inReplyTo = (String)_headers.get(HEADER_IN_REPLY_TO);
    616671            if ( (inReplyTo != null) && (inReplyTo.trim().length() > 0) ) {
    617                 _postBodyBuffer.append(" <a href=\"").append(getPageURL(sanitizeTagParam(inReplyTo))).append("\">(view parent)</a><br />\n");
     672                _postBodyBuffer.append(" <a ").append(getClass("summDetailParent")).append(" href=\"").append(getPageURL(sanitizeTagParam(inReplyTo))).append("\">(view parent)</a><br />\n");
    618673            }
    619674               
    620675            _postBodyBuffer.append("</td>\n</form>\n</tr>\n");
     676            _postBodyBuffer.append("<!-- end of the post summary details -->\n");
    621677        }
    622678        _postBodyBuffer.append("</table>\n");
     
    645701   
    646702    public void receiveHeaderEnd() {
    647         _preBodyBuffer.append("<table width=\"100%\" border=\"0\">\n");
     703        _preBodyBuffer.append("<table ").append(getClass("overall")).append(" width=\"100%\" border=\"0\">\n");
    648704        renderSubjectCell();
    649705        renderMetaCell();
     
    658714   
    659715    private void renderSubjectCell() {
    660         _preBodyBuffer.append("<tr class=\"syndieEntrySubjectCell\"><td align=\"left\" valign=\"top\" class=\"syndieEntrySubjectCell\" width=\"400\"> ");
     716        _preBodyBuffer.append("<form action=\"index.jsp\">");
     717        _preBodyBuffer.append("<tr ").append(getClass("subject")).append(">");
     718        _preBodyBuffer.append("<td ").append(getClass("subject")).append(" align=\"left\" valign=\"top\" width=\"400\"> ");
    661719        String subject = (String)_headers.get(HEADER_SUBJECT);
    662720        if (subject == null)
    663721            subject = "[no subject]";
    664         _preBodyBuffer.append(sanitizeString(subject));
    665         _preBodyBuffer.append("</td>\n");
     722        _preBodyBuffer.append(getSpan("subjectText")).append(sanitizeString(subject));
     723        _preBodyBuffer.append("</span></td>\n");
    666724    }
    667725   
    668726    private void renderPreBodyCell() {
     727        _preBodyBuffer.append("</form>");
    669728        String bgcolor = (String)_headers.get(HEADER_BGCOLOR);
    670         if (_cutBody)
    671             _preBodyBuffer.append("<tr class=\"syndieEntrySummaryCell\"><td colspan=\"2\" align=\"left\" valign=\"top\" class=\"syndieEntrySummaryCell\" " + (bgcolor != null ? "bgcolor=\"" + sanitizeTagParam(bgcolor) + "\"" : "") + "\">");
    672         else
    673             _preBodyBuffer.append("<tr class=\"syndieEntryBodyCell\"><td colspan=\"2\" align=\"left\" valign=\"top\" class=\"syndieEntryBodyCell\" " + (bgcolor != null ? "bgcolor=\"" + sanitizeTagParam(bgcolor) + "\"" : "") + "\">");
     729        _preBodyBuffer.append("<tr ").append(getClass("body")).append(" >");
     730        _preBodyBuffer.append("<td colspan=\"2\" align=\"left\" valign=\"top\" ").append(getClass("body"));
     731        _preBodyBuffer.append((bgcolor != null ? " bgcolor=\"" + sanitizeTagParam(bgcolor) + "\"" : "") + ">");
    674732    }
    675733   
    676734    private void renderMetaCell() {
    677735        String tags[] = (_entry != null ? _entry.getTags() : null);
    678         if ( (tags != null) && (tags.length > 0) )
    679             _preBodyBuffer.append("<form action=\"index.jsp\">");
    680         _preBodyBuffer.append("<td nowrap=\"true\" align=\"right\" valign=\"top\" class=\"syndieEntryMetaCell\">\n");
     736        _preBodyBuffer.append("<td nowrap=\"nowrap\" align=\"right\" valign=\"top\" ");
     737        _preBodyBuffer.append(getClass("meta")).append(">\n");
    681738       
    682739        String knownName = null;
     
    690747            info = _archive.getBlogInfo(_entry.getURI());
    691748        if (info != null) {
    692             _preBodyBuffer.append("<a href=\"").append(getMetadataURL()).append("\">");
     749            _preBodyBuffer.append("<a ").append(getClass("metaLink")).append(" href=\"").append(getMetadataURL()).append("\">");
    693750            if (knownName != null) {
    694                 _preBodyBuffer.append(sanitizeString(knownName));
     751                _preBodyBuffer.append(getSpan("metaKnown")).append(sanitizeString(knownName)).append("</span>");
    695752            } else {
    696753                String nameStr = info.getProperty("Name");
    697754                if (nameStr == null)
    698                     _preBodyBuffer.append("[no name]");
     755                    _preBodyBuffer.append(getSpan("metaUnknown")).append("[no name]</span>");
    699756                else
    700                     _preBodyBuffer.append(sanitizeString(nameStr));
     757                    _preBodyBuffer.append(getSpan("metaUnknown")).append(sanitizeString(nameStr)).append("</span>");
    701758            }
    702759            _preBodyBuffer.append("</a>");
    703760        } else {
    704             _preBodyBuffer.append("[unknown blog]");
     761            _preBodyBuffer.append(getSpan("metaUnknown")).append("[unknown blog]</span>");
    705762        }
    706763
     
    709766            PetName pn = _user.getPetNameDB().get(knownName);
    710767            if ( (pn == null) || (!pn.isMember("Favorites")) )
    711                 _preBodyBuffer.append(" <input type=\"submit\" name=\"action\" value=\"Bookmark blog\" />");
     768                _preBodyBuffer.append(" <input ").append(getClass("bookmark")).append(" type=\"submit\" name=\"action\" value=\"Bookmark blog\" />");
    712769            if ( (pn == null) || (!pn.isMember("Ignore")) )
    713                 _preBodyBuffer.append(" <input type=\"submit\" name=\"action\" value=\"Ignore blog\" />");
     770                _preBodyBuffer.append(" <input ").append(getClass("ignore")).append(" type=\"submit\" name=\"action\" value=\"Ignore blog\" />");
    714771            else
    715                 _preBodyBuffer.append(" <input type=\"submit\" name=\"action\" value=\"Unignore blog\" />");
     772                _preBodyBuffer.append(" <input ").append(getClass("unignore")).append(" type=\"submit\" name=\"action\" value=\"Unignore blog\" />");
    716773            _preBodyBuffer.append(" <input type=\"hidden\" name=\"blog\" value=\"").append(_entry.getURI().getKeyHash().toBase64()).append("\" />");
    717774            if (info != null)
     
    721778       
    722779        if ( (tags != null) && (tags.length > 0) ) {
    723             _preBodyBuffer.append(" Tags: ");
    724             _preBodyBuffer.append("<select name=\"selector\">");
     780            _preBodyBuffer.append(getSpan("metaTags")).append(" Tags: ");
     781            _preBodyBuffer.append("<select ").append(getClass("metaTagList")).append(" name=\"selector\">");
    725782            for (int i = 0; tags != null && i < tags.length; i++) {
    726783                _preBodyBuffer.append("<option value=\"blogtag://");
     
    740797            }
    741798            _preBodyBuffer.append("</select>");
    742             _preBodyBuffer.append("<input type=\"submit\" value=\"View\" />\n");
     799            _preBodyBuffer.append("<input ").append(getClass("metaTagView")).append(" type=\"submit\" value=\"View\" /></span>\n");
    743800            //_preBodyBuffer.append("</i>");
    744801        }
     
    750807         */
    751808       
     809        _preBodyBuffer.append(getSpan("metaDate"));
    752810        if (_entry != null)
    753811            _preBodyBuffer.append(getEntryDate(_entry.getURI().getEntryId()));
    754812        else
    755813            _preBodyBuffer.append(getEntryDate(new Date().getTime()));
     814        _preBodyBuffer.append("</span>");
     815       
    756816        if ( (_user != null) && (_user.getAuthenticated()) ) {
    757             _preBodyBuffer.append(" <a href=\"").append(getPostURL(_user.getBlog(), true)).append("\">Reply</a>\n");
     817            _preBodyBuffer.append(" <a ").append(getClass("replyLink"));
     818            _preBodyBuffer.append(" href=\"").append(getPostURL(_user.getBlog(), true)).append("\">Reply</a>\n");
    758819        }
    759820        _preBodyBuffer.append("\n</td>");
    760         if ( (tags != null) && (tags.length > 0) )
    761             _preBodyBuffer.append("</form>");
    762821        _preBodyBuffer.append("</tr>\n");
    763822    }
     
    801860    }
    802861
    803     public static final String sanitizeURL(String str) { return Base64.encode(DataHelper.getUTF8(str)); }
     862    public static final String sanitizeURL(String str) {
     863        if (str == null) return "";
     864        return Base64.encode(DataHelper.getUTF8(str));
     865    }
    804866    public static final String sanitizeTagParam(String str) {
     867        if (str == null) return "";
    805868        str = str.replace('&', '_'); // this should be &amp;
    806869        if (str.indexOf('\"') < 0)
     
    811874   
    812875    public static final String sanitizeXML(String orig) {
     876        if (orig == null) return "";
    813877        if (orig.indexOf('&') < 0) return orig;
    814878        StringBuffer rv = new StringBuffer(orig.length()+32);
     
    822886    }
    823887    public static final String sanitizeXML(StringBuffer orig) {
     888        if (orig == null) return "";
    824889        if (orig.indexOf("&") < 0) return orig.toString();
    825890        for (int i = 0; i < orig.length(); i++) {
     
    831896        return orig.toString();
    832897    }
    833    
     898
     899    private static final String STYLE_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_";
     900    public static String sanitizeStyle(String style) {
     901        if ( (style == null) || (style.trim().length() <= 0) ) return null;
     902        char c[] = style.toCharArray();
     903        for (int i = 0; i < c.length; i++)
     904            if (STYLE_CHARS.indexOf(c[i]) < 0)
     905                c[i] = '_';
     906        return new String(c);
     907    }
     908       
    834909    protected String getEntryURL() { return getEntryURL(_user != null ? _user.getShowImages() : false); }
    835910    protected String getEntryURL(boolean showImages) {
  • apps/syndie/java/src/net/i2p/syndie/web/ArchiveViewerBean.java

    re6b1457 re0e6bde  
    2020        else
    2121            return HTMLRenderer.sanitizeString(info.getProperty("Name"));
    22     }
    23     public static String getEntryTitle(String keyHash, long entryId) {
    24         String name = getBlogName(keyHash);
    25         return getEntryTitleDate(name, entryId);
    26     }
    27    
    28     private static final SimpleDateFormat _dateFormat = new SimpleDateFormat("yyyy/MM/dd", Locale.UK);
    29     public static final String getEntryTitleDate(String blogName, long when) {
    30         synchronized (_dateFormat) {
    31             try {
    32                 String str = _dateFormat.format(new Date(when));
    33                 long dayBegin = _dateFormat.parse(str).getTime();
    34                 return blogName + ":<br /> <i>" + str + "-" + (when - dayBegin) + "</i>";
    35             } catch (ParseException pe) {
    36                 pe.printStackTrace();
    37                 // wtf
    38                 return "unknown";
    39             }
    40         }
    4122    }
    4223   
     
    9273        }
    9374       
    94         out.write("<select name=\"");
     75        out.write("<select class=\"b_selector\" name=\"");
    9576        out.write(PARAM_SELECTOR);
    9677        out.write("\">");
     
    9879        out.write(getDefaultSelector(user, parameters));
    9980        out.write("\">Default blog filter</option>\n");
    100         out.write("\">");
    10181        out.write("<option value=\"");
    10282        out.write(SEL_ALL);
     
    422402                if (numPerPage * pages < entries.size())
    423403                    pages++;
    424                 out.write("<i>");
    425404                if (pageNum > 0) {
    426405                    String prevURL = null;
     
    430409                        prevURL = HTMLRenderer.getPageURL(user, selector, numPerPage, pageNum-1);
    431410                    System.out.println("prevURL: " + prevURL);
    432                     out.write(" <a href=\"" + prevURL + "\">&lt;&lt;</a>");
     411                    out.write(" <a class=\"b_selectorPrevMore\" href=\"" + prevURL + "\">&lt;&lt;</a>");
    433412                } else {
    434                     out.write(" &lt;&lt; ");
    435                 }
    436                 out.write("Page " + (pageNum+1) + " of " + pages);
     413                    out.write(" <span class=\"b_selectorPrevNone\">&lt;&lt;</span> ");
     414                }
     415                out.write("<span class=\"b_selectorPage\">Page " + (pageNum+1) + " of " + pages + "</span>");
    437416                if (pageNum + 1 < pages) {
    438417                    String nextURL = null;
     
    442421                        nextURL = HTMLRenderer.getPageURL(user, selector, numPerPage, pageNum+1);
    443422                    System.out.println("nextURL: " + nextURL);
    444                     out.write(" <a href=\"" + nextURL + "\">&gt;&gt;</a>");
     423                    out.write(" <a class=\"b_selectorNextMore\" href=\"" + nextURL + "\">&gt;&gt;</a>");
    445424                } else {
    446                     out.write(" &gt;&gt;");
    447                 }
    448                 out.write("</i>");
     425                    out.write(" <span class=\"b_selectorNextNone\">&gt;&gt;</span>");
     426                }
    449427            }
    450428        }
     
    671649   
    672650    private static void renderInvalidAttachment(Map parameters, OutputStream out) throws IOException {
    673         out.write(DataHelper.getUTF8("<b>No such entry, or no such attachment</b>"));
     651        out.write(DataHelper.getUTF8("<span class=\"b_msgErr\">No such entry, or no such attachment</span>"));
    674652    }
    675653   
     
    685663            }
    686664            String props[] = info.getProperties();
    687             out.write("<table border=\"0\">");
     665            out.write("<table class=\"b_meta\" border=\"0\">");
    688666            for (int i = 0; i < props.length; i++) {
    689667                if (props[i].equals(BlogInfo.OWNER_KEY)) {
    690                     out.write("<tr><td><b>Blog:</b></td><td>");
     668                    out.write("<tr class=\"b_metaBlog\"><td class=\"b_metaBlog\"><span class=\"b_metaBlog\">Blog:</span></td>");
    691669                    String blogURL = HTMLRenderer.getPageURL(blog, null, -1, -1, -1, false, false);
    692                     out.write("<a href=\"" + blogURL + "\">" + Base64.encode(blog.getData()) + "</td></tr>\n");
     670                    out.write("<td class=\"b_metaBlog\"><a class=\"b_metaBlog\" href=\"" + blogURL + "\">" + Base64.encode(blog.getData()) + "</td></tr>\n");
    693671                } else if (props[i].equals(BlogInfo.SIGNATURE)) {
    694672                    continue;
     
    696674                    SigningPublicKey keys[] = info.getPosters();
    697675                    if ( (keys != null) && (keys.length > 0) ) {
    698                         out.write("<tr><td><b>Allowed authors:</b></td><td>");
     676                        out.write("<tr class=\"b_metaAuthor\"><td class=\"b_metaAuthor\"><span class=\"b_metaAuthor\">Allowed authors:</span></td>");
     677                        out.write("<td class=\"b_metaAuthor\">");
    699678                        for (int j = 0; j < keys.length; j++) {
    700                             out.write(keys[j].calculateHash().toBase64());
     679                            out.write("<span class=\"b_metaAuthor\">" + keys[j].calculateHash().toBase64() + "</span>");
    701680                            if (j + 1 < keys.length)
    702681                                out.write("<br />\n");
     
    705684                    }
    706685                } else {
    707                     out.write("<tr><td>" + HTMLRenderer.sanitizeString(props[i]) + ":</td><td>" +
    708                               HTMLRenderer.sanitizeString(info.getProperty(props[i])) + "</td></tr>\n");
     686                    out.write("<tr class=\"b_metaField\"><td class=\"b_metaField\"><span class=\"b_metaField\">" + HTMLRenderer.sanitizeString(props[i])
     687                              + ":</span></td><td class=\"b_metaValue\"><span class=\"b_metaValue\">" + HTMLRenderer.sanitizeString(info.getProperty(props[i])) + "</span></td></tr>\n");
    709688                }
    710689            }
    711690            List tags = BlogManager.instance().getArchive().getIndex().getBlogTags(blog);
    712691            if ( (tags != null) && (tags.size() > 0) ) {
    713                 out.write("<tr><td>Known tags:</td><td>");
     692                out.write("<tr class=\"b_metaTags\"><td class=\"b_metaTags\"><span class=\"b_metaTags\">Known tags:</span></td><td class=\"b_metaTags\">");
    714693                for (int i = 0; i < tags.size(); i++) {
    715694                    String tag = (String)tags.get(i);
    716                     out.write("<a href=\"" + HTMLRenderer.getPageURL(blog, tag, -1, -1, -1, false, false) + "\">" +
     695                    out.write("<a class=\"b_metaTag\" href=\"" + HTMLRenderer.getPageURL(blog, tag, -1, -1, -1, false, false) + "\">" +
    717696                              HTMLRenderer.sanitizeString(tag) + "</a> ");
    718697                }
     
    721700            out.write("</table>");
    722701        } else {
    723             out.write("Blog not specified");
     702            out.write("<span class=\"b_metaMsgErr\">Blog not specified</span>");
    724703        }
    725704    }
  • apps/syndie/java/src/net/i2p/syndie/web/RemoteArchiveBean.java

    re6b1457 re0e6bde  
    559559        Archive archive = BlogManager.instance().getArchive();
    560560        StringBuffer buf = new StringBuffer(512);
    561         buf.append("<b>New blogs:</b> <select name=\"blog\"><option value=\"ALL\">All</option>\n");
     561        buf.append("<em class=\"b_remMeta\">New blogs:</em> <select class=\"b_remMeta\"name=\"blog\"><option value=\"ALL\">All</option>\n");
    562562        Set localBlogs = archive.getIndex().getUniqueBlogs();
    563563        Set remoteBlogs = _remoteIndex.getUniqueBlogs();
     
    574574        if (newBlogs > 0) {
    575575            out.write(buf.toString());
    576             out.write("</select> <input type=\"submit\" name=\"action\" value=\"Fetch metadata\" /><br />\n");
     576            out.write("</select> <input class=\"b_remMetaFetch\" type=\"submit\" name=\"action\" value=\"Fetch metadata\" /><br />\n");
    577577        }
    578578       
    579579        int newEntries = 0;
    580580        int localNew = 0;
    581         out.write("<table border=\"1\" width=\"100%\">\n");
     581        out.write("<table class=\"b_remDelta\" border=\"1\" width=\"100%\">\n");
    582582        List entries = new ArrayList();
    583583        for (Iterator iter = remoteBlogs.iterator(); iter.hasNext(); ) {
     
    587587            buf.setLength(0);
    588588            int shownEntries = 0;
    589             buf.append("<tr><td colspan=\"5\" align=\"left\" valign=\"top\">\n");
     589            buf.append("<tr class=\"b_remBlog\"><td class=\"b_remBlog\" colspan=\"5\" align=\"left\" valign=\"top\">\n");
    590590            BlogInfo info = archive.getBlogInfo(blog);
    591591            if (info != null) {
    592                 buf.append("<a href=\"" + HTMLRenderer.getPageURL(blog, null, -1, -1, -1, user.getShowExpanded(), user.getShowImages()) + "\"><b>" + HTMLRenderer.sanitizeString(info.getProperty(BlogInfo.NAME)) + "</b></a>: " +
    593                 HTMLRenderer.sanitizeString(info.getProperty(BlogInfo.DESCRIPTION)) + "\n");
     592                buf.append("<a class=\"b_remBlog\" href=\"");
     593                buf.append(HTMLRenderer.getPageURL(blog, null, -1, -1, -1, user.getShowExpanded(), user.getShowImages()));
     594                buf.append("\">").append(HTMLRenderer.sanitizeString(info.getProperty(BlogInfo.NAME))).append("</a>: ");
     595                buf.append("<span class=\"b_remBlogDesc\">").append(HTMLRenderer.sanitizeString(info.getProperty(BlogInfo.DESCRIPTION)));
     596                buf.append("</span>\n");
    594597            } else {
    595                 buf.append("<b>" + blog.toBase64() + "</b>\n");
     598                buf.append("<span class=\"b_remBlog\">" + blog.toBase64() + "</span>\n");
    596599            }
    597600            buf.append("</td></tr>\n");
    598             buf.append("<tr><td>&nbsp;</td><td nowrap=\"true\"><b>Posted on</b></td><td nowrap=\"true\"><b>#</b></td><td nowrap=\"true\"><b>Size</b></td><td width=\"90%\" nowrap=\"true\"><b>Tags</b></td></tr>\n");
     601            buf.append("<tr class=\"b_remHeader\"><td class=\"b_remHeader\">&nbsp;</td><td class=\"b_remHeader\" nowrap=\"nowrap\">");
     602            buf.append("<em class=\"b_remHeader\">Posted on</em></td>");
     603            buf.append("<td class=\"b_remHeader\" nowrap=\"nowrap\"><em class=\"b_remHeader\">#</em></td>");
     604            buf.append("<td class=\"b_remHeader\" nowrap=\"nowrap\"><em class=\"b_remHeader\">Size</em></td>");
     605            buf.append("<td class=\"b_remHeader\" width=\"90%\" nowrap=\"true\"><em class=\"b_remHeader\">Tags</em></td></tr>\n");
    599606            entries.clear();
    600607            _remoteIndex.selectMatchesOrderByEntryId(entries, blog, null);
    601608            for (int i = 0; i < entries.size(); i++) {
    602609                BlogURI uri = (BlogURI)entries.get(i);
    603                 buf.append("<tr>\n");
     610                buf.append("<tr class=\"b_remDetail\">\n");
    604611                if (!archive.getIndex().getEntryIsKnown(uri)) {
    605                     buf.append("<td><input type=\"checkbox\" name=\"entry\" value=\"" + uri.toString() + "\" /></td>\n");
     612                    buf.append("<td class=\"b_remDetail\"><input class=\"b_remSelect\" type=\"checkbox\" name=\"entry\" value=\"" + uri.toString() + "\" /></td>\n");
    606613                    newEntries++;
    607614                    shownEntries++;
     
    609616                    String page = HTMLRenderer.getPageURL(blog, null, uri.getEntryId(), -1, -1,
    610617                    user.getShowExpanded(), user.getShowImages());
    611                     buf.append("<td><a href=\"" + page + "\">(local)</a></td>\n");
    612                 }
    613                 buf.append("<td>" + getDate(uri.getEntryId()) + "</td>\n");
    614                 buf.append("<td>" + getId(uri.getEntryId()) + "</td>\n");
    615                 buf.append("<td>" + _remoteIndex.getBlogEntrySizeKB(uri) + "KB</td>\n");
    616                 buf.append("<td>");
     618                    buf.append("<td class=\"b_remDetail\"><a class=\"b_remLocal\" href=\"" + page + "\">(local)</a></td>\n");
     619                }
     620                buf.append("<td class=\"b_remDetail\"><span class=\"b_remDate\">" + getDate(uri.getEntryId()) + "</span></td>\n");
     621                buf.append("<td class=\"b_remDetail\"><span class=\"b_remNum\">" + getId(uri.getEntryId()) + "</span></td>\n");
     622                buf.append("<td class=\"b_remDetail\"><span class=\"b_remSize\">" + _remoteIndex.getBlogEntrySizeKB(uri) + "KB</span></td>\n");
     623                buf.append("<td class=\"b_remDetail\">");
    617624                for (Iterator titer = new TreeSet(_remoteIndex.getBlogEntryTags(uri)).iterator(); titer.hasNext(); ) {
    618625                    String tag = (String)titer.next();
    619                     buf.append("<a href=\"" + HTMLRenderer.getPageURL(blog, tag, -1, -1, -1, user.getShowExpanded(), user.getShowImages()) + "\">" + tag + "</a> \n");
     626                    buf.append("<a class=\"b_remTag\" href=\"" + HTMLRenderer.getPageURL(blog, tag, -1, -1, -1, user.getShowExpanded(), user.getShowImages()) + "\">" + tag + "</a> \n");
    620627                }
    621628                buf.append("</td>\n");
     
    631638            entries.clear();
    632639            localIndex.selectMatchesOrderByEntryId(entries, blog, null);
    633             buf.append("<tr><td colspan=\"5\">Entries we have, but the remote Syndie doesn't:</td></tr>\n");
     640            buf.append("<tr class=\"b_remLocalHeader\"><td class=\"b_remLocalHeader\" colspan=\"5\"><span class=\"b_remLocalHeader\">Entries we have, but the remote Syndie doesn't:</span></td></tr>\n");
    634641            for (int i = 0; i < entries.size(); i++) {
    635642                BlogURI uri = (BlogURI)entries.get(i);
    636643                if (!_remoteIndex.getEntryIsKnown(uri)) {
    637                     buf.append("<tr>\n");
    638                     buf.append("<td><input type=\"checkbox\" name=\"localentry\" value=\"" + uri.toString() + "\" /></td>\n");
     644                    buf.append("<tr class=\"b_remLocalDetail\">\n");
     645                    buf.append("<td class=\"b_remLocalDetail\"><input class=\"b_remLocalSend\" type=\"checkbox\" name=\"localentry\" value=\"" + uri.toString() + "\" /></td>\n");
    639646                    shownEntries++;
    640647                    newEntries++;
    641648                    localNew++;
    642                     buf.append("<td>" + getDate(uri.getEntryId()) + "</td>\n");
    643                     buf.append("<td>" + getId(uri.getEntryId()) + "</td>\n");
    644                     buf.append("<td>" + localIndex.getBlogEntrySizeKB(uri) + "KB</td>\n");
    645                     buf.append("<td>");
     649                    buf.append("<td class=\"b_remLocalDate\"><span class=\"b_remLocalDate\">" + getDate(uri.getEntryId()) + "</span></td>\n");
     650                    buf.append("<td class=\"b_remLocalNum\"><span class=\"b_remLocalNum\">" + getId(uri.getEntryId()) + "</span></td>\n");
     651                    buf.append("<td class=\"b_remLocalSize\"><span class=\"b_remLocalSize\">" + localIndex.getBlogEntrySizeKB(uri) + "KB</span></td>\n");
     652                    buf.append("<td class=\"b_remLocalTags\">");
    646653                    for (Iterator titer = new TreeSet(localIndex.getBlogEntryTags(uri)).iterator(); titer.hasNext(); ) {
    647654                        String tag = (String)titer.next();
    648                         buf.append("<a href=\"" + HTMLRenderer.getPageURL(blog, tag, -1, -1, -1, user.getShowExpanded(), user.getShowImages()) + "\">" + tag + "</a> \n");
     655                        buf.append("<a class=\"b_remLocalTag\" href=\"" + HTMLRenderer.getPageURL(blog, tag, -1, -1, -1, user.getShowExpanded(), user.getShowImages()) + "\">" + tag + "</a> \n");
    649656                    }
    650657                    buf.append("</td>\n");
     
    660667        int newBefore = localNew;
    661668        buf.setLength(0);
    662         buf.append("<tr><td colspan=\"5\">Blogs the remote Syndie doesn't have</td></tr>\n");
     669        buf.append("<tr class=\"b_remLocalHeader\"><td class=\"b_remLocalHeader\" colspan=\"5\"><span class=\"b_remLocalHeader\">Blogs the remote Syndie doesn't have</span></td></tr>\n");
    663670        for (Iterator iter = localBlogs.iterator(); iter.hasNext(); ) {
    664671            Hash blog = (Hash)iter.next();
     
    673680            for (int i = 0; i < entries.size(); i++) {
    674681                BlogURI uri = (BlogURI)entries.get(i);
    675                 buf.append("<tr>\n");
    676                 buf.append("<td><input type=\"checkbox\" name=\"localentry\" value=\"" + uri.toString() + "\" /></td>\n");
    677                 buf.append("<td>" + getDate(uri.getEntryId()) + "</td>\n");
    678                 buf.append("<td>" + getId(uri.getEntryId()) + "</td>\n");
    679                 buf.append("<td>" + localIndex.getBlogEntrySizeKB(uri) + "KB</td>\n");
    680                 buf.append("<td>");
     682                buf.append("<tr class=\"b_remLocalDetail\">\n");
     683                buf.append("<td class=\"b_remLocalDetail\"><input class=\"b_remLocalSend\" type=\"checkbox\" name=\"localentry\" value=\"" + uri.toString() + "\" /></td>\n");
     684                buf.append("<td class=\"b_remLocalDate\"><span class=\"b_remLocalDate\">" + getDate(uri.getEntryId()) + "</span></td>\n");
     685                buf.append("<td class=\"b_remLocalNum\"><span class=\"b_remLocalNum\">" + getId(uri.getEntryId()) + "</span></td>\n");
     686                buf.append("<td class=\"b_remLocalSize\"><span class=\"b_remLocalSize\">" + localIndex.getBlogEntrySizeKB(uri) + "KB</span></td>\n");
     687                buf.append("<td class=\"b_remLocalTags\">");
    681688                for (Iterator titer = new TreeSet(localIndex.getBlogEntryTags(uri)).iterator(); titer.hasNext(); ) {
    682689                    String tag = (String)titer.next();
    683                     buf.append("<a href=\"" + HTMLRenderer.getPageURL(blog, tag, -1, -1, -1, user.getShowExpanded(), user.getShowImages()) + "\">" + tag + "</a> \n");
     690                    buf.append("<a class=\"b_remLocalTag\" href=\"" + HTMLRenderer.getPageURL(blog, tag, -1, -1, -1, user.getShowExpanded(), user.getShowImages()) + "\">" + tag + "</a> \n");
    684691                }
    685692                buf.append("</td>\n");
     
    693700        out.write("</table>\n");
    694701        if (newEntries > 0) {
    695             out.write("<input type=\"submit\" name=\"action\" value=\"Fetch selected entries\" /> \n");
    696             out.write("<input type=\"submit\" name=\"action\" value=\"Fetch all new entries\" /> \n");
     702            out.write("<input class=\"b_remFetchSelected\" type=\"submit\" name=\"action\" value=\"Fetch selected entries\" /> \n");
     703            out.write("<input class=\"b_remFetchAll\" type=\"submit\" name=\"action\" value=\"Fetch all new entries\" /> \n");
    697704        } else {
    698             out.write(HTMLRenderer.sanitizeString(_remoteLocation) + " has no new posts to offer us\n");
     705            out.write("<span class=\"b_remNoRemotePosts\">" + HTMLRenderer.sanitizeString(_remoteLocation) + " has no new posts to offer us</span>\n");
    699706        }
    700707        if (localNew > 0) {
    701             out.write("<input type=\"submit\" name=\"action\" value=\"Post selected entries\" /> \n");
     708            out.write("<input class=\"b_remPostSelected\" type=\"submit\" name=\"action\" value=\"Post selected entries\" /> \n");
    702709        }
    703710        out.write("<hr />\n");
  • apps/syndie/jsp/_bodyindex.jsp

    re6b1457 re0e6bde  
    3232  }
    3333}
    34 %><table border="0" width="100%">
    35 <tr><form action="index.jsp"><td nowrap="true">
    36 <b>Blogs:</b> <%ArchiveViewerBean.renderBlogSelector(user, request.getParameterMap(), out);%>
    37 <input type="submit" value="Refresh" />
    38 <input type="submit" name="action" value="<%=ArchiveViewerBean.SEL_ACTION_SET_AS_DEFAULT%>" />
    39 <!-- char encoding: [<%=response.getCharacterEncoding()%>] content type [<%=response.getContentType()%>] Locale [<%=response.getLocale()%>] -->
     34%><table border="0" width="100%" class="b_content">
     35<tr class="b_content"><form action="index.jsp"><td nowrap="true">
     36<em class="b_selectorTitle">Blogs:</em> <span class="b_selector"><%ArchiveViewerBean.renderBlogSelector(user, request.getParameterMap(), out);%></span>
     37<input type="submit" value="Refresh" class="b_selectorRefresh" />
     38<input type="submit" name="action" value="<%=ArchiveViewerBean.SEL_ACTION_SET_AS_DEFAULT%>" class="b_selectorDefault" />
    4039<%ArchiveViewerBean.renderBlogs(user, request.getParameterMap(), out, "</td></form></tr><tr><td align=\"left\" valign=\"top\">");%></td></tr></table>
  • apps/syndie/jsp/_topnav.jsp

    re6b1457 re0e6bde  
    11<%@page import="net.i2p.syndie.*, net.i2p.syndie.sml.*, net.i2p.syndie.web.*" %>
    22<jsp:useBean scope="session" class="net.i2p.syndie.User" id="user" />
    3 <td valign="top" align="left" class="syndieTopNavBlogsCell" height="10"><a href="index.jsp">Home</a></td>
    4 <td valign="top" align="left" class="syndieTopNavRemoteCell" height="10">
    5 <a href="admin.jsp">Syndie admin</a>
    6 <a href="remote.jsp">Remote archives</a>
    7 <a href="import.jsp">Import</a>
    8 </td>
    93<form action="<%=request.getRequestURI() + "?" + (request.getQueryString() != null ? request.getQueryString() : "")%>">
    10 <td nowrap="true" valign="top" align="right" class="syndieTopNavManageCell" height="10"><%
     4<td nowrap="true" colspan="2" height="10" class="b_topnav">
     5<span class="b_topnavHome"><a href="index.jsp" class="b_topnavHome">Home</a></span>
     6<a href="admin.jsp" class="b_topnavAdmin">Syndie admin</a>
     7<a href="remote.jsp" class="b_topnavRemote">Remote archives</a>
     8<a href="import.jsp" class="b_topnavImport">Import</a>
     9</td><td nowrap="true" height="10" class="b_topnavUser"><%
    1110if ("true".equals(request.getParameter("logout"))) {
    1211  user.invalidate();
     12  RemoteArchiveBean rem = (RemoteArchiveBean)session.getAttribute("remote");
     13  if (rem != null) rem.reinitialize();
     14  PostBean post = (PostBean)session.getAttribute("post");
     15  if (post != null) post.reinitialize();
    1316}
    1417String login = request.getParameter("login");
     
    1821  String loginResult = BlogManager.instance().login(user, login, pass);
    1922  if (!user.getAuthenticated())
    20     out.write("<b>" + loginResult + "</b>");
     23    out.write("<b class=\"b_topnavLoginResult\">" + loginResult + "</b>");
    2124}
    2225%>
    2326<% if (user.getAuthenticated()) { %>
    24 Logged in as: <b><jsp:getProperty property="username" name="user" />:</b>
    25 <a href="<%=HTMLRenderer.getPageURL(user.getBlog(), null, -1, -1, -1, user.getShowExpanded(), user.getShowImages())%>"><%=HTMLRenderer.sanitizeString(ArchiveViewerBean.getBlogName(user.getBlogStr()))%></a>
    26 <a href="<%=HTMLRenderer.getPostURL(user.getBlog())%>">Post</a>
    27 <a href="<%=HTMLRenderer.getMetadataURL(user.getBlog())%>">Metadata</a>
    28 <a href="addresses.jsp">Addressbook</a>
    29 <a href="index.jsp?logout=true">Logout</a><br />
     27<span class="b_topnavUsername">Logged in as:</span> <em class="b_topnavUsername"><jsp:getProperty property="username" name="user" />:</em>
     28<a class="b_topnavBlog" href="<%=HTMLRenderer.getPageURL(user.getBlog(), null, -1, -1, -1, user.getShowExpanded(), user.getShowImages())%>"><%=HTMLRenderer.sanitizeString(ArchiveViewerBean.getBlogName(user.getBlogStr()))%></a>
     29<a class="b_topnavPost" href="<%=HTMLRenderer.getPostURL(user.getBlog())%>">Post</a>
     30<a class="b_topnavMeta" href="<%=HTMLRenderer.getMetadataURL(user.getBlog())%>">Metadata</a>
     31<a class="b_topnavAddr" href="addresses.jsp">Addressbook</a>
     32<a class="b_topnavLogout" href="index.jsp?logout=true">Logout</a>
    3033<%} else {%>
    31 Login: <input type="text" name="login" size="8" />
    32 Pass: <input type="password" name="password" size="8" /><%
     34<span class="b_topnavLogin">Login:</span> <input class="b_topnavLogin" type="text" name="login" size="8" />
     35<span class="b_topnavPass">Pass:</span> <input class="b_topnavPass" type="password" name="password" size="8" /><%
    3336java.util.Enumeration params = request.getParameterNames();
    3437while (params.hasMoreElements()) {
     
    3740 %><input type="hidden" name="<%=p%>" value="<%=val%>" /><%
    3841}%>
    39 <input type="submit" name="Login" value="Login" />
    40 <a href="register.jsp">Register</a>
     42<input class="b_topnavLoginSubmit" type="submit" name="Login" value="Login" />
     43<a class="b_topnavRegister" href="register.jsp">Register</a>
    4144<% } %>
    42 
    4345</td>
    4446</form>
  • apps/syndie/jsp/addresses.jsp

    re6b1457 re0e6bde  
    1 <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.data.Base64, net.i2p.syndie.web.*, net.i2p.syndie.sml.*, net.i2p.syndie.data.*, net.i2p.syndie.*, org.mortbay.servlet.MultiPartRequest, java.util.*, java.io.*" %>
    2 <% request.setCharacterEncoding("UTF-8"); %>
    3 <jsp:useBean scope="session" class="net.i2p.syndie.User" id="user" />
     1<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.data.Base64, net.i2p.syndie.web.*, net.i2p.syndie.sml.*, net.i2p.syndie.data.*, net.i2p.syndie.*, org.mortbay.servlet.MultiPartRequest, java.util.*, java.io.*" %><%
     2 request.setCharacterEncoding("UTF-8"); %><jsp:useBean scope="session" class="net.i2p.syndie.User" id="user"
     3/><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
    44<html>
    55<head>
    66<title>SyndieMedia addressbook</title>
    7 <link href="style.jsp" rel="stylesheet" type="text/css" />
     7<link href="style.jsp" rel="stylesheet" type="text/css" >
    88</head>
    99<body>
    1010<table border="1" cellpadding="0" cellspacing="0" width="100%">
    11 <tr><td colspan="5" valign="top" align="left"><jsp:include page="_toplogo.jsp" /></td></tr>
    12 <tr><td valign="top" align="left" rowspan="2"><jsp:include page="_leftnav.jsp" /></td>
     11<tr class="b_toplogo"><td colspan="5" valign="top" align="left" class="b_toplogo"><jsp:include page="_toplogo.jsp" /></td></tr>
     12<tr><td valign="top" align="left" rowspan="2" class="b_leftnav"><jsp:include page="_leftnav.jsp" /></td>
    1313    <jsp:include page="_topnav.jsp" />
    14     <td valign="top" align="left" rowspan="2"><jsp:include page="_rightnav.jsp" /></td></tr>
    15 <tr><td valign="top" align="left" colspan="3"><%
     14    <td valign="top" align="left" rowspan="2" class="b_rightnav"><jsp:include page="_rightnav.jsp" /></td></tr>
     15<tr class="b_content"><td valign="top" align="left" colspan="3" class="b_content"><%
    1616if (!user.getAuthenticated()) {
    17     %>You must log in to view your addressbook<%
     17    %><span class="b_addrMsgErr">You must log in to view your addressbook</span><%
    1818} else {
    1919    PetNameDB names = user.getPetNameDB();
     
    3232          names.set(cur.getName(), cur);
    3333          names.store(user.getAddressbookLocation());
    34           %><b>Address updated</b><%
     34          %><span class="b_addrMsgOk">Address updated</span><%
    3535        }
    3636    } else if ( (action != null) && ("Add".equals(action)) ) {
    3737        PetName cur = names.get(request.getParameter("name"));
    38         if (cur != null) { %><b>Address already exists</b><% } else {
     38        if (cur != null) { %><span class="b_addrMsgErr">Address already exists</span><% } else {
    3939          cur = new PetName();
    4040          cur.setName(request.getParameter("name"));
     
    4646          names.set(cur.getName(), cur);
    4747          names.store(user.getAddressbookLocation());
    48           %><b>Address added</b><%
     48          %><span class="b_addrMsgOk">Address added</span><%
    4949        }
    5050    } else if ( (action != null) && ("Delete".equals(action)) ) {
     
    5353          names.remove(cur.getName());
    5454          names.store(user.getAddressbookLocation());
    55           %><b>Address removed</b><%
     55          %><span class="b_addrMsgOk">Address removed</span><%
    5656        }
    5757    } else if ( (action != null) && ("Export".equals(action)) ) {
     
    5959    }
    6060    TreeSet sorted = new TreeSet(names.getNames());
    61     %><table border="0" width="100%">
    62 <tr><td><b>Name</b></td><td><b>Network</b></td><td><b>Protocol</b></td><td><b>Location</b></td><td><b>Public?</b></td><td><b>Groups</b><td>&nbsp;</td></tr>
     61    %><table border="0" width="100%" class="b_addr">
     62<tr class="b_addrHeader">
     63 <td class="b_addrHeader"><em class="b_addrHeader">Name</em></td>
     64 <td class="b_addrHeader"><em class="b_addrHeader">Network</em></td>
     65 <td class="b_addrHeader"><em class="b_addrHeader">Protocol</em></td>
     66 <td class="b_addrHeader"><em class="b_addrHeader">Location</em></td>
     67 <td class="b_addrHeader"><em class="b_addrHeader">Public?</em></td>
     68 <td class="b_addrHeader"><em class="b_addrHeader">Groups</em></td>
     69 <td class="b_addrHeader">&nbsp;</td></tr>
    6370<%
    6471    StringBuffer buf = new StringBuffer(128);
    6572    for (Iterator iter = sorted.iterator(); iter.hasNext(); ) {
    6673        PetName name = names.get((String)iter.next());
    67         buf.append("<tr><form action=\"addresses.jsp\" method=\"POST\">");
     74        buf.append("<tr class=\"b_addrDetail\"><form action=\"addresses.jsp\" method=\"POST\">");
    6875        buf.append("<input type=\"hidden\" name=\"petname\" value=\"").append(name.getName()).append("\" />");
    69         buf.append("<td><input type=\"text\" size=\"20\" name=\"name\" value=\"").append(name.getName()).append("\" /></td><td>");
    70         buf.append("<select name=\"network\">");
     76        buf.append("<td class=\"b_addrName\"><input class=\"b_addrName\" type=\"text\" size=\"20\" name=\"name\" value=\"").append(name.getName()).append("\" /></td>");
     77        buf.append("<td class=\"b_addrNet\"><select class=\"b_addrNet\" name=\"network\">");
    7178        String net = name.getNetwork();
    7279        if (net == null) net = "";
     
    96103        buf.append("/>Internet</option>");
    97104
    98         buf.append("</select></td><td><select name=\"protocol\">");
     105        buf.append("</select></td>");
     106
     107        buf.append("<td class=\"b_addrProto\"><select class=\"b_addrProto\" name=\"protocol\">");
    99108        String proto = name.getProtocol();
    100109        if (proto == null) proto = "";
     
    125134        buf.append("/>Syndie blog</option>");
    126135
    127         buf.append("</select></td><td>");
     136        buf.append("</select></td>");
     137
     138        buf.append("<td class=\"b_addrLoc\">");
    128139        if (name.getLocation() != null)
    129             buf.append("<input name=\"location\" size=\"50\" value=\"").append(name.getLocation()).append("\" />");
     140            buf.append("<input class=\"b_addrLoc\" name=\"location\" size=\"50\" value=\"").append(name.getLocation()).append("\" />");
    130141        else
    131             buf.append("<input name=\"location\" size=\"50\" value=\"\" />");
    132 
    133         buf.append("</td><td><input type=\"checkbox\" name=\"isPublic\" ");
     142            buf.append("<input class=\"b_addrLoc\" name=\"location\" size=\"50\" value=\"\" />");
     143
     144        buf.append("</td>");
     145        buf.append("<td class=\"b_addrPublic\"><input class=\"b_addrPublic\" type=\"checkbox\" name=\"isPublic\" ");
    134146        if (name.getIsPublic())
    135147            buf.append("checked=\"true\" ");
    136         buf.append(" /></td><td><input type=\"text\" name=\"groups\" size=\"10\" value=\"");
     148        buf.append(" /></td>");
     149        buf.append("<td class=\"b_addrGroup\"><input class=\"b_addrGroup\" type=\"text\" name=\"groups\" size=\"10\" value=\"");
    137150        for (int j = 0; j < name.getGroupCount(); j++) {
    138151            buf.append(HTMLRenderer.sanitizeTagParam(name.getGroup(j)));
     
    140153                buf.append(',');
    141154        }
    142         buf.append("\" /></td><td nowrap=\"true\">");
    143         buf.append("<input type=\"submit\" name=\"action\" value=\"Change\" /> <input type=\"submit\" name=\"action\" value=\"Delete\" />");
     155        buf.append("\" /></td><td class=\"b_addrDetail\" nowrap=\"true\">");
     156        buf.append("<input class=\"b_addrChange\" type=\"submit\" name=\"action\" value=\"Change\" /> <input class=\"b_addrDelete\" type=\"submit\" name=\"action\" value=\"Delete\" />");
    144157        buf.append("</td></form></tr>");
    145158        out.write(buf.toString());
     
    157170    if (loc == null || active) loc= "";
    158171    %>
    159     <tr><form action="addresses.jsp" method="POST"><td><input type="text" name="name" size="20" value="<%=name%>" /></td>
    160         <td><select name="network">
     172    <tr class="b_addrDetail"><form action="addresses.jsp" method="POST">
     173        <td class="b_addrName"><input class="b_addrName" type="text" name="name" size="20" value="<%=name%>" /></td>
     174        <td class="b_addrNet"><select class="b_addrNet" name="network">
    161175            <option value="i2p" <%="i2p".equalsIgnoreCase(net) ? " selected=\"true\" " : ""%>>I2P</option>
    162176            <option value="syndie" <%="syndie".equalsIgnoreCase(net) ? " selected=\"true\" " : ""%>>Syndie</option>
     
    164178            <option value="freenet" <%="freenet".equalsIgnoreCase(net) ? " selected=\"true\" " : ""%>>Freenet</option>
    165179            <option value="internet" <%="internet".equalsIgnoreCase(net) ? " selected=\"true\" " : ""%>>Internet</option></select></td>
    166         <td><select name="protocol">
     180        <td class="b_addrProto"><select class="b_addrProto" name="protocol">
    167181            <option value="http" <%="http".equalsIgnoreCase(proto) ? " selected=\"true\" " : ""%>>HTTP</option>
    168182            <option value="irc" <%="irc".equalsIgnoreCase(proto) ? " selected=\"true\" " : ""%>>IRC</option>
     
    170184            <option value="syndiearchive" <%="syndiearchive".equalsIgnoreCase(proto) ? " selected=\"true\" " : ""%>>Syndie archive</option>
    171185            <option value="syndieblog" <%="syndieblog".equalsIgnoreCase(proto) ? " selected=\"true\" " : ""%>>Syndie blog</option></select></td>
    172         <td><input type="text" size="50" name="location" value="<%=loc%>" /></td>
    173         <td><input type="checkbox" name="isPublic" /></td>
    174         <td><input type="text" name="groups" size="10" /></td>
    175         <td><input type="submit" name="action" value="Add" /></td>
     186        <td class="b_addrLoc"><input class="b_addrLoc" type="text" size="50" name="location" value="<%=loc%>" /></td>
     187        <td class="b_addrPublic"><input class="b_addrPublic" type="checkbox" name="isPublic" /></td>
     188        <td class="b_addrGroup"><input class="b_addrGroup" type="text" name="groups" size="10" /></td>
     189        <td class="b_addrDetail"><input class="b_addrAdd" type="submit" name="action" value="Add" /></td>
    176190    </form></tr>
    177     <tr><form action="addresses.jsp" method="POST">
    178         <td colspan="7">Export the eepsites to your router's userhosts.txt: <input type="submit" name="action" value="Export" /></td>
     191    <tr class="b_addrExport"><form action="addresses.jsp" method="POST">
     192        <td class="b_addrExport" colspan="7">
     193          <span class="b_addrExport">Export the eepsites to your router's userhosts.txt:</span>
     194          <input class="b_addrExportSubmit" type="submit" name="action" value="Export" /></td>
    179195        </form></tr>
    180196    </table>
  • apps/syndie/jsp/admin.jsp

    re6b1457 re0e6bde  
    1 <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.data.Base64, net.i2p.syndie.web.*, net.i2p.syndie.sml.*, net.i2p.syndie.data.*, net.i2p.syndie.*, org.mortbay.servlet.MultiPartRequest, java.util.*, java.io.*" %>
    2 <% request.setCharacterEncoding("UTF-8"); %>
    3 <jsp:useBean scope="session" class="net.i2p.syndie.User" id="user" />
    4 <html>
     1<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.data.Base64, net.i2p.syndie.web.*, net.i2p.syndie.sml.*, net.i2p.syndie.data.*, net.i2p.syndie.*, org.mortbay.servlet.MultiPartRequest, java.util.*, java.io.*" %><%
     2request.setCharacterEncoding("UTF-8");
     3%><jsp:useBean scope="session" class="net.i2p.syndie.User" id="user"
     4/><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"><html>
    55<head>
    66<title>SyndieMedia admin</title>
    7 <link href="style.jsp" rel="stylesheet" type="text/css" />
     7<link href="style.jsp" rel="stylesheet" type="text/css" >
    88</head>
    99<body>
    1010<table border="1" cellpadding="0" cellspacing="0" width="100%">
    11 <tr><td colspan="5" valign="top" align="left"><jsp:include page="_toplogo.jsp" /></td></tr>
    12 <tr><td valign="top" align="left" rowspan="2"><jsp:include page="_leftnav.jsp" /></td>
     11<tr class="b_toplogo"><td colspan="5" valign="top" align="left" class="b_toplogo"><jsp:include page="_toplogo.jsp" /></td></tr>
     12<tr><td valign="top" align="left" rowspan="2" class="b_leftnav"><jsp:include page="_leftnav.jsp" /></td>
    1313    <jsp:include page="_topnav.jsp" />
    14     <td valign="top" align="left" rowspan="2"><jsp:include page="_rightnav.jsp" /></td></tr>
    15 <tr><td valign="top" align="left" colspan="3"><%
     14    <td valign="top" align="left" rowspan="2" class="b_rightnav"><jsp:include page="_rightnav.jsp" /></td></tr>
     15<tr class="b_content"><td valign="top" align="left" colspan="3" class="b_content"><%
    1616if (!user.getAuthenticated()) {
    17   %>You must be logged in to configure your Syndie instance!<%
     17  %><span class="b_adminMsgErr">You must be logged in to configure your Syndie instance!</span><%
    1818} else {
    1919  String action = request.getParameter("action");
     
    3131        try { port = Integer.parseInt(proxyPort); } catch (NumberFormatException nfe) { port = 4444; }
    3232        BlogManager.instance().configure(regPass, remotePass, adminPass, selector, proxyHost, port, null);
    33         %>Configuration updated<%
     33        %><span class="b_adminMsgOk">Configuration updated</span><%
    3434      } else {
    35         %>Invalid admin password.  If you lost it, please update your syndie.config.<%
     35        %><span class="b_adminMsgErr">Invalid admin password.  If you lost it, please update your syndie.config.</span><%
    3636      }
    3737    } else {
     
    3939      try { port = Integer.parseInt(proxyPort); } catch (NumberFormatException nfe) { port = 4444; }
    4040      BlogManager.instance().configure(regPass, remotePass, adminPass, selector, proxyHost, port, null);
    41       %>Configuration saved<%
     41      %><span class="b_adminMsgOk">Configuration saved</span><%
    4242    }
    4343  } else {
    4444%><form action="admin.jsp" method="POST">
    45 <b>Registration password:</b> <input type="text" name="regpass" size="10" /><br />
    46 Users must specify this password on the registration form to proceed.  If this is
    47 blank, anyone can register.<br />
    48 <b>Remote password:</b> <input type="text" name="remotepass" size="10" /><br />
    49 To access remote archives, users must first provide this password on their
     45<em class="b_adminField">Registration password:</em> <input class="b_adminField" type="text" name="regpass" size="10" /><br />
     46<span class="b_adminDescr">Users must specify this password on the registration form to proceed.  If this is
     47blank, anyone can register.</span><br />
     48<em class="b_adminField">Remote password:</em> <input class="b_adminField" type="text" name="remotepass" size="10" /><br />
     49<span class="b_adminDescr">To access remote archives, users must first provide this password on their
    5050metadata page.  Remote access is 'dangerous', as it allows the user to instruct
    5151this Syndie instance to establish HTTP connections with arbitrary locations.  If
    52 this field is not specified, no one can use remote archives.<br />
    53 <b>Default remote proxy host:</b> <input type="text" name="proxyhost" size="20" value="localhost" /><br />
    54 <b>Default remote proxy port:</b> <input type="text" name="proxyport" size="5" value="4444" /><br />
    55 This is the default HTTP proxy shown on the remote archive page.<br />
    56 <b>Default blog selector:</b> <input type="text" name="selector" size="40" value="ALL" /><br />
    57 The selector lets you choose what blog (or blogs) are shown on the front page for
    58 new, unregistered users.  Valid values include:<ul>
    59  <li><code>ALL<code>: all blogs</li>
    60  <li><code>blog://$blogHash</code>: all posts in the blog identified by $blogHash</li>
    61  <li><code>blogtag://$blogHash/$tagBase64</code>: all posts in the blog identified by $blogHash
     52this field is not specified, no one can use remote archives.</span><br />
     53<em class="b_adminField">Default remote proxy host:</em> <input class="b_adminField" type="text" name="proxyhost" size="20" value="localhost" /><br />
     54<em class="b_adminField">Default remote proxy port:</em> <input class="b_adminField" type="text" name="proxyport" size="5" value="4444" /><br />
     55<span class="b_adminDescr">This is the default HTTP proxy shown on the remote archive page.</span><br />
     56<em class="b_adminField">Default blog selector:</em> <input class="b_adminField" type="text" name="selector" size="40" value="ALL" /><br />
     57<span class="b_adminDescr">The selector lets you choose what blog (or blogs) are shown on the front page for
     58new, unregistered users.  Valid values include:<ul class="b_adminDescr">
     59 <li class="b_adminDescr"><code class="b_adminDescr">ALL</code>: all blogs</li>
     60 <li class="b_adminDescr"><code class="b_adminDescr">blog://$blogHash</code>: all posts in the blog identified by $blogHash</li>
     61 <li class="b_adminDescr"><code class="b_adminDescr">blogtag://$blogHash/$tagBase64</code>: all posts in the blog identified by $blogHash
    6262           tagged by the tag whose modified base64 encoding is $tagBase64</li>
    63  <li><code>tag://$tagBase64</code>: all posts in any blog tagged by the tag whose
     63 <li class="b_adminDescr"><code class="b_adminDescr">tag://$tagBase64</code>: all posts in any blog tagged by the tag whose
    6464           modified base64 encoding is $tagBase64</li>
    6565</ul>
     66</span>
    6667<hr />
    6768<% if (!BlogManager.instance().isConfigured()) {
    6869long passNum = new Random().nextLong(); %>
    69 <b>Administrative password:</b> <input type="password" name="adminpass" size="10" value="<%=passNum%>" /> <br />
    70 Since this Syndie instance is not already configured, you can specify a new
     70<em class="b_adminField">Administrative password:</em> <input class="b_adminField" type="password" name="adminpass" size="10" value="<%=passNum%>" /> <br />
     71<span class="b_adminDescr b_adminDescrFirstRun">Since this Syndie instance is not already configured, you can specify a new
    7172administrative password which must be presented whenever you update this configuration.
    72 The default value filled in there is <code><%=passNum%></code><br />
     73The default value filled in there is <code class="b_adminDescr b_adminDescrFirstRun"><%=passNum%></code></span><br />
    7374<% } else { %>
    74 <b>Administrative password:</b> <input type="password" name="adminpass" size="10" value="" /> <br />
     75<em class="b_adminField">Administrative password:</em> <input class="b_adminField" type="password" name="adminpass" size="10" value="" /> <br />
    7576<% } %>
    76 <input type="submit" name="action" value="Save" />
     77<input class="b_adminSave" type="submit" name="action" value="Save" />
    7778<% }
    7879} %>
  • apps/syndie/jsp/externallink.jsp

    re6b1457 re0e6bde  
    1 <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.data.*, net.i2p.syndie.web.*, net.i2p.syndie.sml.*" %>
    2 <% request.setCharacterEncoding("UTF-8"); %>
     1<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.data.*, net.i2p.syndie.web.*, net.i2p.syndie.sml.*" %><%
     2request.setCharacterEncoding("UTF-8");
     3%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
    34<html>
    45<head>
    56<title>SyndieMedia</title>
    6 <link href="style.jsp" rel="stylesheet" type="text/css" />
     7<link href="style.jsp" rel="stylesheet" type="text/css" >
    78</head>
    89<body>
    910<table border="1" cellpadding="0" cellspacing="0" width="100%">
    10 <tr><td colspan="5" valign="top" align="left"><jsp:include page="_toplogo.jsp" /></td></tr>
    11 <tr><td valign="top" align="left" rowspan="2"><jsp:include page="_leftnav.jsp" /></td>
     11<tr class="b_toplogo"><td colspan="5" valign="top" align="left" class="b_toplogo"><jsp:include page="_toplogo.jsp" /></td></tr>
     12<tr><td valign="top" align="left" rowspan="2" class="b_leftnav"><jsp:include page="_leftnav.jsp" /></td>
    1213    <jsp:include page="_topnav.jsp" />
    13     <td valign="top" align="left" rowspan="2"><jsp:include page="_rightnav.jsp" /></td></tr>
    14 <tr><td valign="top" align="left" colspan="3">Are you sure you really want to go to
     14    <td valign="top" align="left" rowspan="2" class="b_rightnav"><jsp:include page="_rightnav.jsp" /></td></tr>
     15<tr class="b_content"><td valign="top" align="left" colspan="3" class="b_content">
     16<span class="b_externalWarning">Are you sure you really want to go to
    1517<%
    1618String loc = request.getParameter("location");
     
    2224
    2325if ( (loc != null) && (schema != null) ) {
    24   out.write(loc + " (" + schema + ")");
     26  out.write("<span class=\"b_externalLoc\">" + loc + "</span> <span class=\"b_externalNet\"(" + schema + ")</span>");
    2527  if (desc != null)
    26     out.write(": " + desc);
     28    out.write(": <span class=\"b_externalDesc\"" + desc + "\"</span>");
    2729  out.write("? ");
    28   out.write("<a href=\"" + loc + "\">yes</a>");
     30  out.write("<a class=\"b_external\" href=\"" + loc + "\">yes</a>");
    2931} else {
    30   out.write("(some unspecified location...)");
     32  out.write("<span class=\"b_externalUnknown\">(some unspecified location...)</span>");
    3133}
    32 %></td></tr>
     34%></span></td></tr>
    3335</table>
    3436</body>
  • apps/syndie/jsp/import.jsp

    re6b1457 re0e6bde  
    1 <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.data.Base64, net.i2p.syndie.web.*, net.i2p.syndie.sml.*, net.i2p.syndie.data.*, net.i2p.syndie.*, org.mortbay.servlet.MultiPartRequest, java.util.*, java.io.*" %>
    2 <% request.setCharacterEncoding("UTF-8"); %>
    3 <jsp:useBean scope="session" class="net.i2p.syndie.data.TransparentArchiveIndex" id="archive" />
     1<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.data.Base64, net.i2p.syndie.web.*, net.i2p.syndie.sml.*, net.i2p.syndie.data.*, net.i2p.syndie.*, org.mortbay.servlet.MultiPartRequest, java.util.*, java.io.*" %><%
     2request.setCharacterEncoding("UTF-8");
     3%><jsp:useBean scope="session" class="net.i2p.syndie.data.TransparentArchiveIndex" id="archive"
     4/><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
    45<html>
    56<head>
    67<title>SyndieMedia import</title>
    7 <link href="style.jsp" rel="stylesheet" type="text/css" />
     8<link href="style.jsp" rel="stylesheet" type="text/css" >
    89</head>
    910<body>
    1011<table border="1" cellpadding="0" cellspacing="0" width="100%">
    11 <tr><td colspan="5" valign="top" align="left"><jsp:include page="_toplogo.jsp" /></td></tr>
    12 <tr><td valign="top" align="left" rowspan="2"><jsp:include page="_leftnav.jsp" /></td>
     12<tr class="b_toplogo"><td colspan="5" valign="top" align="left" class="b_toplogo"><jsp:include page="_toplogo.jsp" /></td></tr>
     13<tr><td valign="top" align="left" rowspan="2" class="b_leftnav"><jsp:include page="_leftnav.jsp" /></td>
    1314    <jsp:include page="_topnav.jsp" />
    14     <td valign="top" align="left" rowspan="2"><jsp:include page="_rightnav.jsp" /></td></tr>
    15 <tr><td valign="top" align="left" colspan="3"><%
     15    <td valign="top" align="left" rowspan="2" class="b_rightnav"><jsp:include page="_rightnav.jsp" /></td></tr>
     16<tr class="b_content"><td valign="top" align="left" colspan="3" class="b_content"><%
    1617
    1718String contentType = request.getContentType();
     
    2425        break;
    2526      if (!BlogManager.instance().importBlogMetadata(meta)) {
    26         System.err.println("blog meta " + metaId + " failed to be imported");
     27        %><span class="b_importMsgErr">Metadata <%=metaId%> failed to be imported</span><br /><%
    2728        break;
    2829       }
     
    3536        break;
    3637      if (!BlogManager.instance().importBlogEntry(entry)) {
    37         System.err.println("blog entry " + entryId + " failed to be imported");
     38        %><span class="b_importMsgErr">Entry <%=entryId%> failed to be imported</span><br /><%
    3839        break;
    3940      }
     
    4546      session.setAttribute("index", BlogManager.instance().getArchive().getIndex());
    4647    }
    47 %>Imported <%=entryId%> posts and <%=metaId%> blog metadata files.
     48%><span class="b_importMsgOk">Imported <%=entryId%> posts and <%=metaId%> blog metadata files.</span>
    4849<%
    4950} else { %><form action="import.jsp" method="POST" enctype="multipart/form-data">
    50 Blog metadata 0: <input type="file" name="blogmeta0" /><br />
    51 Blog metadata 1: <input type="file" name="blogmeta1" /><br />
    52 Post 0: <input type="file" name="blogpost0" /><br />
    53 Post 1: <input type="file" name="blogpost1" /><br />
    54 Post 2: <input type="file" name="blogpost2" /><br />
    55 Post 3: <input type="file" name="blogpost3" /><br />
    56 Post 4: <input type="file" name="blogpost4" /><br />
    57 Post 5: <input type="file" name="blogpost5" /><br />
    58 Post 6: <input type="file" name="blogpost6" /><br />
    59 Post 7: <input type="file" name="blogpost7" /><br />
    60 Post 8: <input type="file" name="blogpost8" /><br />
    61 Post 9: <input type="file" name="blogpost9" /><br />
     51<span class="b_importField">Blog metadata 0:</span> <input class="b_importField" type="file" name="blogmeta0" /><br />
     52<span class="b_importField">Blog metadata 1:</span> <input class="b_importField" type="file" name="blogmeta1" /><br />
     53<span class="b_importField">Post 0:</span> <input class="b_importField" type="file" name="blogpost0" /><br />
     54<span class="b_importField">Post 1:</span> <input class="b_importField" type="file" name="blogpost1" /><br />
     55<span class="b_importField">Post 2:</span> <input class="b_importField" type="file" name="blogpost2" /><br />
     56<span class="b_importField">Post 3:</span> <input class="b_importField" type="file" name="blogpost3" /><br />
     57<span class="b_importField">Post 4:</span> <input class="b_importField" type="file" name="blogpost4" /><br />
     58<span class="b_importField">Post 5:</span> <input class="b_importField" type="file" name="blogpost5" /><br />
     59<span class="b_importField">Post 6:</span> <input class="b_importField" type="file" name="blogpost6" /><br />
     60<span class="b_importField">Post 7:</span> <input class="b_importField" type="file" name="blogpost7" /><br />
     61<span class="b_importField">Post 8:</span> <input class="b_importField" type="file" name="blogpost8" /><br />
     62<span class="b_importField">Post 9:</span> <input class="b_importField" type="file" name="blogpost9" /><br />
    6263<hr />
    63 <input type="submit" name="Post" value="Post entry" /> <input type="reset" value="Cancel" />
     64<input class="b_importSubmit" type="submit" name="Post" value="Post entry" /> <input class="b_importCancel" type="reset" value="Cancel" />
    6465<% } %>
    6566</td></tr>
  • apps/syndie/jsp/index.jsp

    re6b1457 re0e6bde  
    1 <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.syndie.web.*" %>
    2 <% request.setCharacterEncoding("UTF-8"); %>
     1<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.syndie.web.*" %><%
     2request.setCharacterEncoding("UTF-8");
     3%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
    34<html>
    45<head>
    56<title>SyndieMedia</title>
    6 <link href="style.jsp" rel="stylesheet" type="text/css" />
     7<link href="style.jsp" rel="stylesheet" type="text/css" >
    78<link href="rss.jsp?<%
    89if (request.getParameter("blog") != null)
     
    1415if (request.getParameter("selector") != null)
    1516  out.write("selector=" + request.getParameter("selector") + "&");
    16 %>" rel="alternate" type="application/rss+xml" />
     17%>" rel="alternate" type="application/rss+xml" >
    1718</head>
    1819<body>
    1920<table border="1" cellpadding="0" cellspacing="0" width="100%">
    20 <tr><td colspan="5" valign="top" align="left"><jsp:include page="_toplogo.jsp" /></td></tr>
    21 <tr><td valign="top" align="left" rowspan="2"><jsp:include page="_leftnav.jsp" /></td>
     21<tr class="b_toplogo"><td colspan="5" valign="top" align="left" class="b_toplogo"><jsp:include page="_toplogo.jsp" /></td></tr>
     22<tr><td valign="top" align="left" rowspan="2" class="b_leftnav"><jsp:include page="_leftnav.jsp" /></td>
    2223    <jsp:include page="_topnav.jsp" />
    23     <td valign="top" align="left" rowspan="2"><jsp:include page="_rightnav.jsp" /></td></tr>
    24 <tr><td valign="top" align="left" colspan="3"><jsp:include page="_bodyindex.jsp" /></td></tr>
     24    <td valign="top" align="left" rowspan="2" class="b_rightnav"><jsp:include page="_rightnav.jsp" /></td></tr>
     25<tr class="b_content"><td valign="top" align="left" colspan="3" class="b_content"><jsp:include page="_bodyindex.jsp" /></td></tr>
    2526</table>
    2627</body>
  • apps/syndie/jsp/post.jsp

    re6b1457 re0e6bde  
    1 <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.data.Base64, net.i2p.syndie.web.*, net.i2p.syndie.sml.*, net.i2p.syndie.data.*, net.i2p.syndie.*, org.mortbay.servlet.MultiPartRequest, java.util.*" %>
    2 <% request.setCharacterEncoding("UTF-8"); %>
    3 <jsp:useBean scope="session" class="net.i2p.syndie.User" id="user" />
    4 <jsp:useBean scope="session" class="net.i2p.syndie.web.PostBean" id="post" />
     1<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.data.Base64, net.i2p.syndie.web.*, net.i2p.syndie.sml.*, net.i2p.syndie.data.*, net.i2p.syndie.*, org.mortbay.servlet.MultiPartRequest, java.util.*" %><%
     2request.setCharacterEncoding("UTF-8");
     3%><jsp:useBean scope="session" class="net.i2p.syndie.User" id="user"
     4/><jsp:useBean scope="session" class="net.i2p.syndie.web.PostBean" id="post"
     5/><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
    56<html>
    67<head>
    7 <title>SyndieMedia</title>
    8 <link href="style.jsp" rel="stylesheet" type="text/css" />
     8<title>SyndieMedia post</title>
     9<link href="style.jsp" rel="stylesheet" type="text/css" >
    910</head>
    1011<body>
    1112<table border="1" cellpadding="0" cellspacing="0" width="100%">
    12 <tr><td colspan="5" valign="top" align="left"><jsp:include page="_toplogo.jsp" /></td></tr>
    13 <tr><td valign="top" align="left" rowspan="2"><jsp:include page="_leftnav.jsp" /></td>
     13<tr class="b_toplogo"><td colspan="5" valign="top" align="left" class="b_toplogo"><jsp:include page="_toplogo.jsp" /></td></tr>
     14<tr><td valign="top" align="left" rowspan="2" class="b_leftnav"><jsp:include page="_leftnav.jsp" /></td>
    1415    <jsp:include page="_topnav.jsp" />
    15     <td valign="top" align="left" rowspan="2"><jsp:include page="_rightnav.jsp" /></td></tr>
    16 <tr><td valign="top" align="left" colspan="3"><%
     16    <td valign="top" align="left" rowspan="2" class="b_rightnav"><jsp:include page="_rightnav.jsp" /></td></tr>
     17<tr class="b_content"><td valign="top" align="left" colspan="3" class="b_content"><%
    1718
    1819if (!user.getAuthenticated()) {
    19   %>You must be logged in to post<%
     20  %><span class="b_postMsgErr">You must be logged in to post</span><%
    2021} else {
    2122  String confirm = request.getParameter("action");
     
    2526    BlogURI uri = post.postEntry();
    2627    if (uri != null) {
    27       %>Blog entry <a href="<%=HTMLRenderer.getPageURL(user.getBlog(), null, uri.getEntryId(), -1, -1,
    28                                                         user.getShowExpanded(), user.getShowImages())%>">posted</a>!<%
     28      %><span class="b_postMsgOk">Blog entry <a class="b_postOkLink" href="<%=HTMLRenderer.getPageURL(user.getBlog(), null, uri.getEntryId(), -1, -1,
     29                                                        user.getShowExpanded(), user.getShowImages())%>">posted</a>!</span><%
    2930    } else {
    30       %>There was an unknown error posting the entry...<%
     31      %><span class="b_postMsgErro">There was an unknown error posting the entry...</span><%
    3132    }
    3233    post.reinitialize();
     
    9697
    9798        post.renderPreview(out);
    98         %><hr /><form action="post.jsp" method="POST">
     99        %><hr /><span class="b_postConfirm"><form action="post.jsp" method="POST">
    99100Please confirm that the above is ok<% if (user.getAllowAccessRemote()) { %>, and select what additional archives you
    100101want the post transmitted to.  Otherwise, just hit your browser's back arrow and
    101102make changes.
    102 <select name="archive">
     103<select class="b_postConfirm" name="archive">
    103104<option name="">-None-</option>
    104105<%
     
    116117}
    117118%>
    118 </select><br /><% } %>
    119 <input type="submit" name="action" value="Confirm" /><%
     119</select><br /><% } %></span>
     120<input class="b_postConfirm" type="submit" name="action" value="Confirm" /><%
    120121    } else {
    121122      // logged in and not confirmed because they didn't send us anything! 
    122123      // give 'em a new form
    123124%><form action="post.jsp" method="POST" enctype="multipart/form-data">
    124 Post subject: <input type="text" size="80" name="entrysubject" value="<%=post.getSubject()%>" /><br />
    125 Post tags: <input type="text" size="20" name="entrytags" value="<%=post.getTags()%>" /><br />
    126 Post style: <select name="style">
     125<span class="b_postField">Post subject:</span> <input class="b_postSubject" type="text" size="80" name="entrysubject" value="<%=post.getSubject()%>" /><br />
     126<span class="b_postField">Post tags:</span> <input class="b_postTags" type="text" size="20" name="entrytags" value="<%=post.getTags()%>" /><br />
     127<span class="b_postField">Post style:</span> <select class="b_postStyle" name="style">
    127128 <option value="default" selected="true">Default</option>
    128129 <option value="meta">Meta (hide everything but the metadata)</option>
    129130</select><br />
    130 Include public names? <input type="checkbox" name="includenames" value="true" /><br />
    131 Post content (in raw SML, no headers):<br />
    132 <textarea rows="6" cols="80" name="entrytext"><%=post.getText()%></textarea><br />
    133 <b>SML cheatsheet:</b><br /><textarea rows="6" cols="80" readonly="true">
     131<span class="b_postField">Include public names?</span> <input class="b_postNames" type="checkbox" name="includenames" value="true" /><br />
     132<span class="b_postField">Post content (in raw SML, no headers):</span><br />
     133<textarea class="b_postText" rows="6" cols="80" name="entrytext"><%=post.getText()%></textarea><br />
     134<span class="b_postField">SML cheatsheet:</span><br /><textarea class="b_postCheatsheet" rows="6" cols="80" readonly="true">
    134135* newlines are newlines are newlines.
    135136* all &lt; and &gt; are replaced with their &amp;symbol;
     
    151152* textfont = font to put most text into
    152153</textarea><br />
    153 SML post headers:<br />
    154 <textarea rows="3" cols="80" name="entryheaders"><%=post.getHeaders()%></textarea><br /><%
     154<span class="b_postField">SML post headers:</span><br />
     155<textarea class="b_postHeaders" rows="3" cols="80" name="entryheaders"><%=post.getHeaders()%></textarea><br /><%
    155156String s = request.getParameter(ArchiveViewerBean.PARAM_IN_REPLY_TO);
    156157if ( (s != null) && (s.trim().length() > 0) ) {%>
    157158<input type="hidden" name="<%=ArchiveViewerBean.PARAM_IN_REPLY_TO%>" value="<%=request.getParameter(ArchiveViewerBean.PARAM_IN_REPLY_TO)%>" />
    158159<% } %>
    159 Attachment 0: <input type="file" name="entryfile0" /><br />
    160 Attachment 1: <input type="file" name="entryfile1" /><br />
    161 Attachment 2: <input type="file" name="entryfile2" /><br />
    162 Attachment 3: <input type="file" name="entryfile3" /><br /><!--
    163 Attachment 4: <input type="file" name="entryfile4" /><br />
    164 Attachment 5: <input type="file" name="entryfile5" /><br />
    165 Attachment 6: <input type="file" name="entryfile6" /><br />
    166 Attachment 7: <input type="file" name="entryfile7" /><br />
    167 Attachment 8: <input type="file" name="entryfile8" /><br />
    168 Attachment 9: <input type="file" name="entryfile9" /><br />-->
     160<span class="b_postField">Attachment 0:</span> <input class="b_postField" type="file" name="entryfile0" /><br />
     161<span class="b_postField">Attachment 1:</span> <input class="b_postField" type="file" name="entryfile1" /><br />
     162<span class="b_postField">Attachment 2:</span> <input class="b_postField" type="file" name="entryfile2" /><br />
     163<span class="b_postField">Attachment 3:</span> <input class="b_postField" type="file" name="entryfile3" /><br />
    169164<hr />
    170 <input type="submit" name="Post" value="Preview..." /> <input type="reset" value="Cancel" />
     165<input class="b_postPreview" type="submit" name="Post" value="Preview..." /> <input class="b_postReset" type="reset" value="Cancel" />
    171166<%
    172167    } // end of the 'logged in, not confirmed, nothing posted' section
  • apps/syndie/jsp/register.jsp

    re6b1457 re0e6bde  
    1 <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.data.Base64, net.i2p.syndie.web.*, net.i2p.syndie.sml.*, net.i2p.syndie.*" %>
    2 <% request.setCharacterEncoding("UTF-8"); %>
    3 <jsp:useBean scope="session" class="net.i2p.syndie.User" id="user" />
     1<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.data.Base64, net.i2p.syndie.web.*, net.i2p.syndie.sml.*, net.i2p.syndie.*" %><%
     2request.setCharacterEncoding("UTF-8");
     3%><jsp:useBean scope="session" class="net.i2p.syndie.User" id="user"
     4/><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
    45<html>
    56<head>
    67<title>SyndieMedia</title>
    7 <link href="style.jsp" rel="stylesheet" type="text/css" />
     8<link href="style.jsp" rel="stylesheet" type="text/css" >
    89</head>
    910<body>
    1011<table border="1" cellpadding="0" cellspacing="0" width="100%">
    11 <tr><td colspan="5" valign="top" align="left"><jsp:include page="_toplogo.jsp" /></td></tr>
    12 <tr><td valign="top" align="left" rowspan="2"><jsp:include page="_leftnav.jsp" /></td>
     12<tr class="b_toplogo"><td colspan="5" valign="top" align="left" class="b_toplogo"><jsp:include page="_toplogo.jsp" /></td></tr>
     13<tr><td valign="top" align="left" rowspan="2" class="b_leftnav"><jsp:include page="_leftnav.jsp" /></td>
    1314    <jsp:include page="_topnav.jsp" />
    14     <td valign="top" align="left" rowspan="2"><jsp:include page="_rightnav.jsp" /></td></tr>
    15 <tr><td valign="top" align="left" colspan="3"><%
     15    <td valign="top" align="left" rowspan="2" class="b_rightnav"><jsp:include page="_rightnav.jsp" /></td></tr>
     16<tr class="b_content"><td valign="top" align="left" colspan="3" class="b_content"><%
    1617String regLogin = request.getParameter("login");
    1718boolean showForm = true;
     
    2425  String regResult = BlogManager.instance().register(user, regLogin, regUserPass, regPass, blogName, desc, url);
    2526  if (User.LOGIN_OK.equals(regResult)) {
    26     out.print("<b>Registration successful.</b>  <a href=\"index.jsp\">Continue...</a>\n");
    27     showForm = false;
     27    %><span class="b_regMsgOk">Registration successful.</span> <a class="b_reg" href="index.jsp">Continue...</a>
     28<%  showForm = false;
    2829  } else {
    29     out.print("<b>" + regResult + "</b>");
     30    %><span class="b_regMsgErr"><%=regResult%></span><%
    3031  }
    3132}
    3233if (showForm) {%><form action="register.jsp" method="POST">
    33 <p>To create a new blog (and Syndie user account), please fill out the following form. 
     34<p class="b_reg">To create a new blog (and Syndie user account), please fill out the following form. 
    3435You may need to enter a registration password given to you by this Syndie instance's
    3536operator, or there may be no registration password in place (in which case you can
    3637leave that field blank).</p>
    37 <p>
    38 <b>Syndie login:</b> <input type="text" size="8" name="login" /><br />
    39 <b>New password:</b> <input type="password" size="8" name="password" /><br />
    40 <b>Registration password:</b> <input type="password" size="8" name="registrationpassword" /><br />
    41 <b>Blog name:</b> <input type="text" size="32" name="blogname" /><br />
    42 <b>Brief description:</b> <input type="text" size="60" name="description" /><br />
    43 <b>Contact URL:</b> <input type="text" size="20" name="contacturl" /> <i>(e.g. mailto://user@mail.i2p, http://foo.i2p/, etc)</i><br />
    44 <input type="submit" name="Register" value="Register" />
     38<p class="b_reg">
     39<em class="b_regField">Syndie login:</em> <input class="b_regField" type="text" size="8" name="login" /><br />
     40<em class="b_regField">New password:</em> <input class="b_regField" type="password" size="8" name="password" /><br />
     41<em class="b_regField">Registration password:</em> <input class="b_regField" type="password" size="8" name="registrationpassword" /><br />
     42<em class="b_regField">Blog name:</em> <input class="b_regField" type="text" size="32" name="blogname" /><br />
     43<em class="b_regField">Brief description:</em> <input class="b_regField" type="text" size="60" name="description" /><br />
     44<em class="b_regField">Contact URL:</em> <input class="b_regField" type="text" size="20" name="contacturl" /> <span class="b_reg">(e.g. mailto://user@mail.i2p, http://foo.i2p/, etc)</span><br />
     45<input class="b_regSubmit" type="submit" name="Register" value="Register" />
    4546</p>
    4647</form><% } %>
  • apps/syndie/jsp/remote.jsp

    re6b1457 re0e6bde  
    1 <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.syndie.web.*, net.i2p.syndie.*, net.i2p.syndie.sml.*, java.util.*" %>
    2 <% request.setCharacterEncoding("UTF-8"); %>
    3 <jsp:useBean scope="session" class="net.i2p.syndie.web.RemoteArchiveBean" id="remote" />
    4 <jsp:useBean scope="session" class="net.i2p.syndie.User" id="user" />
    5 <jsp:useBean scope="session" class="net.i2p.syndie.data.TransparentArchiveIndex" id="archive" />
     1<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.syndie.web.*, net.i2p.syndie.*, net.i2p.syndie.sml.*, java.util.*" %><%
     2request.setCharacterEncoding("UTF-8");
     3%><jsp:useBean scope="session" class="net.i2p.syndie.web.RemoteArchiveBean" id="remote"
     4/><jsp:useBean scope="session" class="net.i2p.syndie.User" id="user"
     5/><jsp:useBean scope="session" class="net.i2p.syndie.data.TransparentArchiveIndex" id="archive"
     6/><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
    67<html>
    78<head>
    8 <title>SyndieMedia</title>
    9 <link href="style.jsp" rel="stylesheet" type="text/css" />
     9<title>SyndieMedia remote</title>
     10<link href="style.jsp" rel="stylesheet" type="text/css" >
    1011</head>
    1112<body>
    1213<table border="1" cellpadding="0" cellspacing="0" width="100%">
    13 <tr><td colspan="5" valign="top" align="left"><jsp:include page="_toplogo.jsp" /></td></tr>
    14 <tr><td valign="top" align="left" rowspan="2"><jsp:include page="_leftnav.jsp" /></td>
     14<tr class="b_toplogo"><td colspan="5" valign="top" align="left" class="b_toplogo"><jsp:include page="_toplogo.jsp" /></td></tr>
     15<tr><td valign="top" align="left" rowspan="2" class="b_leftnav"><jsp:include page="_leftnav.jsp" /></td>
    1516    <jsp:include page="_topnav.jsp" />
    16     <td valign="top" align="left" rowspan="2"><jsp:include page="_rightnav.jsp" /></td></tr>
    17 <tr><form action="remote.jsp" method="POST"><td valign="top" align="left" colspan="3">
    18 <%
     17    <td valign="top" align="left" rowspan="2" class="b_rightnav"><jsp:include page="_rightnav.jsp" /></td></tr>
     18<tr class="b_content"><td valign="top" align="left" colspan="3" class="b_content"><%
    1919if (!user.getAuthenticated() || !user.getAllowAccessRemote()) {
    20 %>Sorry, you are not allowed to access remote archives from here.  Perhaps you should install Syndie yourself?<%
    21 } else { %>Import from:
    22 <select name="schema">
     20%><span class="b_remoteMsgErr">Sorry, you are not allowed to access remote archives from here.  Perhaps you should install Syndie yourself?</span><%
     21} else { %><form action="remote.jsp" method="POST"><span class="b_remoteChooser"><span class="b_remoteChooserField">Import from:</span>
     22<select class="b_remoteChooserNet" name="schema">
    2323 <option value="web" <%=("web".equals(request.getParameter("schema")) ? "selected=\"true\"" : "")%>>I2P/TOR/Freenet</option>
    2424 <option value="mnet" <%=("mnet".equals(request.getParameter("schema")) ? "selected=\"true\"" : "")%>>MNet</option>
     
    2626 <option value="usenet" <%=("usenet".equals(request.getParameter("schema")) ? "selected=\"true\"" : "")%>>Usenet</option>
    2727</select>
    28 Proxy <input type="text" size="10" name="proxyhost" value="<%=BlogManager.instance().getDefaultProxyHost()%>" />:<input type="text" size="4" name="proxyport" value="<%=BlogManager.instance().getDefaultProxyPort()%>" /><br />
    29 Bookmarked archives: <select name="archivepetname"><option value="">Custom location</option><%
     28<span class="b_remoteChooserField">Proxy</span>
     29  <input class="b_remoteChooserHost" type="text" size="10" name="proxyhost" value="<%=BlogManager.instance().getDefaultProxyHost()%>" />
     30  <input class="b_remoteChooserPort" type="text" size="4" name="proxyport" value="<%=BlogManager.instance().getDefaultProxyPort()%>" /><br />
     31<span class="b_remoteChooserField">Bookmarked archives:</span> <select class="b_remoteChooserPN" name="archivepetname"><option value="">Custom location</option><%
    3032for (Iterator iter = user.getPetNameDB().getNames().iterator(); iter.hasNext(); ) {
    3133  PetName pn = user.getPetNameDB().get((String)iter.next());
     
    3537}
    3638%></select> or
    37 <input name="location" size="30" value="<%=(request.getParameter("location") != null ? request.getParameter("location") : "")%>" />
    38 <input type="submit" name="action" value="Continue..." /><br />
     39<input class="b_remoteChooserLocation" name="location" size="30" value="<%=(request.getParameter("location") != null ? request.getParameter("location") : "")%>" />
     40<input class="b_remoteChooserContinue" type="submit" name="action" value="Continue..." /><br />
     41</span>
    3942<%
    4043  String action = request.getParameter("action");
     
    5962  }
    6063  String msgs = remote.getStatus();
    61   if ( (msgs != null) && (msgs.length() > 0) ) { %><pre><%=msgs%>
    62 <a href="remote.jsp">Refresh</a></pre><br /><%
     64  if ( (msgs != null) && (msgs.length() > 0) ) { %><pre class="b_remoteProgress"><%=msgs%>
     65<a class="b_remoteProgress" href="remote.jsp">Refresh</a></pre><br /><%
    6366  }
    64   if (remote.getFetchIndexInProgress()) { %><b>Please wait while the index is being fetched
    65 from <%=remote.getRemoteLocation()%></b>. <%
     67  if (remote.getFetchIndexInProgress()) { %><span class="b_remoteProgress">Please wait while the index is being fetched
     68from <%=remote.getRemoteLocation()%>.</span><%
    6669  } else if (remote.getRemoteIndex() != null) {
    6770    // remote index is NOT null!
    68    %><b><%=remote.getRemoteLocation()%></b>
    69 <a href="remote.jsp?schema=<%=remote.getRemoteSchema()%>&location=<%=remote.getRemoteLocation()%><%
     71   %><span class="b_remoteLocation"><%=remote.getRemoteLocation()%></span>
     72<a class="b_remoteRefetch" href="remote.jsp?schema=<%=remote.getRemoteSchema()%>&location=<%=remote.getRemoteLocation()%><%
    7073if (remote.getProxyHost() != null && remote.getProxyPort() > 0) {
    7174  %>&proxyhost=<%=remote.getProxyHost()%>&proxyport=<%=remote.getProxyPort()%><%
    7275} %>&action=Continue...">(refetch)</a>:<br />
    7376<%remote.renderDeltaForm(user, archive, out);%>
    74 <textarea style="font-size:8pt" rows="5" cols="120"><%=remote.getRemoteIndex()%></textarea><%
     77<textarea class="b_remoteIndex" rows="5" cols="120"><%=remote.getRemoteIndex()%></textarea><%
    7578  }
    7679}
  • apps/syndie/jsp/style.jsp

    re6b1457 re0e6bde  
    1 <%@page contentType="text/css; charset=UTF-8" pageEncoding="UTF-8" %>
     1<%@page contentType="text/css; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.util.FileUtil" %>
    22<% request.setCharacterEncoding("UTF-8"); %>
    33<%@include file="syndie.css" %>
     4<%
     5String content = FileUtil.readTextFile("./docs/syndie_standard.css", -1, true);
     6if (content != null) out.write(content);
     7%>
  • apps/syndie/jsp/syndie.css

    re6b1457 re0e6bde  
    1 .syndieEntrySubjectCell {
    2     background-color: #999999;
    3     font-size: 12px;
    4     font-weight: bold;
    5     margin: 0px 0px 0px 0px;
    6     padding: 0px 0px 0px 0px;
    7     border: 0px;
    8 }
    9 .syndieEntryMetaCell {
    10     background-color: #888888;
    11     font-size: 10px;
    12     margin: 0px 0px 0px 0px;
    13     padding: 0px 0px 0px 0px;
    14     border: 0px;
    15 }
    16 .syndieEntryAttachmentsCell {
    17     background-color: #aaaaaa;
    18     font-size: 12px;
    19     margin: 0px 0px 0px 0px;
    20     padding: 0px 0px 0px 0px;
    21     border: 0px;
    22 }
    23 .syndieEntrySummaryCell {
    24     background-color: #eeeeee;
    25     font-size: 12px;
    26     margin: 0px 0px 0px 0px;
    27     padding: 0px 0px 0px 0px;
    28     border: 0px;
    29 }
    30 .syndieEntryBodyCell {
    31     background-color: #eeeeee;
    32     font-size: 12px;
    33     margin: 0px 0px 0px 0px;
    34     padding: 0px 0px 0px 0px;
    35     border: 0px;
    36 }
    37 .syndieTopNavBlogsCell {
    38     background-color: #888888;
    39     font-size: 14px;
    40     margin: 0px 0px 0px 0px;
    41     padding: 0px 0px 0px 0px;
    42     border: 0px;
    43 }
    44 .syndieTopNavRemoteCell {
    45     background-color: #888888;
    46     font-size: 14px;
    47     margin: 0px 0px 0px 0px;
    48     padding: 0px 0px 0px 0px;
    49     border: 0px;
    50 }
    51 .syndieTopNavManageCell {
    52     background-color: #888888;
    53     font-size: 14px;
    54     margin: 0px 0px 0px 0px;
    55     padding: 0px 0px 0px 0px;
    56     border: 0px;
    57 }
    58 
    591body {
    602        margin : 0px;
    613        padding : 0px;
    62         text-align : center;
    634        font-family: Arial, Helvetica, sans-serif;
    64         background-color : #FFFFFF;
     5        background-color : #EEEEEE;
    656        color: #000000;
    66     font-size: 12px;
     7        font-size: 12px;
    678}
     9.b_topnavUser {
     10        text-align: right;
     11        background-color: #CCCCDD;
     12        border-spacing: 0px;
     13        margin: 0px;
     14        padding: 0px;
     15        border-width: 0px;
     16        border: 0px;
     17}
     18.b_topnavHome {
     19        background-color: #CCCCDD;
     20        color: #000000;
     21        width: 50px;
     22        text-align: left;
     23}
     24.b_topnav {
     25        background-color: #CCCCDD;
     26        border-spacing: 0px;
     27        margin: 0px;
     28        padding: 0px;
     29        border-width: 0px;
     30        border: 0px;
     31}
     32.s_detail_subject {
     33        font-size: 10px;
     34        text-align: left;
     35        background-color: #BBBBFF;
     36        border-spacing: 0px;
     37        margin: 0px;
     38        padding: 0px;
     39        border-width: 0px;
     40        border: 0px;
     41        border-style: none;
     42}
     43.s_detail_meta {
     44        font-size: 10px;
     45        text-align: right:
     46        background-color: #BBBBFF;
     47        border-spacing: 0px;
     48        margin: 0px;
     49        padding: 0px;
     50        border-width: 0px;
     51        border: 0px;
     52        border-style: none;
     53}
     54
     55.s_summary_subject {
     56        font-size: 10px;
     57        text-align: left;
     58        background-color: #BBBBFF;
     59        border-spacing: 0px;
     60        margin: 0px;
     61        padding: 0px;
     62        border-width: 0px;
     63        border: 0px;
     64        border-style: none;
     65}
     66.s_summary_meta {
     67        font-size: 10px;
     68        text-align: right:
     69        background-color: #BBBBFF;
     70        border-spacing: 0px;
     71        margin: 0px;
     72        padding: 0px;
     73        border-width: 0px;
     74        border: 0px;
     75        border-style: none;
     76}
     77.s_summary_summDetail {
     78        font-size: 10px;
     79}
     80.s_detail_summDetail {
     81}
     82.s_detail_summDetailBlog {
     83}
     84.s_detail_summDetailBlogLink {
     85}
     86td.s_detail_summDetail {
     87        background-color: #DDDDFF;
     88}
     89td.s_summary_summ {
     90        font-size: 10px;
     91        background-color: #DDDDFF;
     92}
  • apps/syndie/jsp/viewmetadata.jsp

    re6b1457 re0e6bde  
    1 <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.syndie.web.*, net.i2p.syndie.*" %>
    2 <% request.setCharacterEncoding("UTF-8"); %>
    3 <jsp:useBean scope="session" class="net.i2p.syndie.User" id="user" />
     1<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.syndie.web.*, net.i2p.syndie.*" %><%
     2request.setCharacterEncoding("UTF-8");
     3%><jsp:useBean scope="session" class="net.i2p.syndie.User" id="user"
     4/><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
    45<html>
    56<head>
    6 <title>SyndieMedia</title>
    7 <link href="style.jsp" rel="stylesheet" type="text/css" />
     7<title>SyndieMedia metadata</title>
     8<link href="style.jsp" rel="stylesheet" type="text/css" >
    89</head>
    910<body>
    1011<table border="1" cellpadding="0" cellspacing="0" width="100%">
    11 <tr><td colspan="5" valign="top" align="left"><jsp:include page="_toplogo.jsp" /></td></tr>
    12 <tr><td valign="top" align="left" rowspan="2"><jsp:include page="_leftnav.jsp" /></td>
     12<tr class="b_toplogo"><td colspan="5" valign="top" align="left" class="b_toplogo"><jsp:include page="_toplogo.jsp" /></td></tr>
     13<tr><td valign="top" align="left" rowspan="2" class="b_leftnav"><jsp:include page="_leftnav.jsp" /></td>
    1314    <jsp:include page="_topnav.jsp" />
    14     <td valign="top" align="left" rowspan="2"><jsp:include page="_rightnav.jsp" /></td></tr>
    15 <tr><td valign="top" align="left" colspan="3"><%
     15    <td valign="top" align="left" rowspan="2" class="b_rightnav"><jsp:include page="_rightnav.jsp" /></td></tr>
     16<tr class="b_content"><td valign="top" align="left" colspan="3" class="b_content"><%
    1617ArchiveViewerBean.renderMetadata(request.getParameterMap(), out);
    1718if (user.getAuthenticated()) {
    1819  if ("Authorize".equals(request.getParameter("action"))) {
    19     %><b><%=BlogManager.instance().authorizeRemoteAccess(user, request.getParameter("password"))%></b><%
     20    %><span class="b_metaStatus"><%=BlogManager.instance().authorizeRemoteAccess(user, request.getParameter("password"))%></span><%
    2021  }
    2122  if (!user.getAllowAccessRemote()) {
     
    2324  %><hr /><form action="viewmetadata.jsp" method="POST">
    2425<input type="hidden" name="blog" value="<%=request.getParameter("blog")%>" />
    25 To access remote instances from this instance, please supply the Syndie administration password: <input type="password" name="password" />
    26 <input type="submit" name="action" value="Authorize" />
     26<span class="b_metaAuthorize">To access remote instances from this instance, please supply the Syndie administration password:</span>
     27<input class="b_metaAuthorize" type="password" name="password" />
     28<input class="b_metaAuthorizeSubmit" type="submit" name="action" value="Authorize" />
    2729</form><%
    2830    }
  • core/java/src/net/i2p/crypto/SHA256Generator.java

    re6b1457 re0e6bde  
    55import java.util.List;
    66import net.i2p.I2PAppContext;
     7import net.i2p.data.Base64;
    78import net.i2p.data.Hash;
    89
     
    7374        d.doFinal(out, 0);
    7475        System.out.println("eq? " + net.i2p.data.DataHelper.eq(out, old.getData()));
     76        for (int i = 0; i < args.length; i++)
     77            System.out.println("SHA256 [" + args[i] + "] = [" + Base64.encode(ctx.sha().calculateHash(args[i].getBytes()).getData()) + "]");
    7578    }
    7679}
  • core/java/src/net/i2p/util/FileUtil.java

    re6b1457 re0e6bde  
    132132     * @param startAtBeginning if true, read the first maxNumLines, otherwise read
    133133     *                         the last maxNumLines
     134     * @param maxNumLines max number of lines (or -1 for unlimited)
    134135     *
    135136     */
     
    141142            fis = new FileInputStream(f);
    142143            BufferedReader in = new BufferedReader(new InputStreamReader(fis));
    143             List lines = new ArrayList(maxNumLines);
     144            List lines = new ArrayList(maxNumLines > 0 ? maxNumLines : 64);
    144145            String line = null;
    145146            while ( (line = in.readLine()) != null) {
    146147                lines.add(line);
    147                 if (lines.size() >= maxNumLines) {
     148                if ( (maxNumLines > 0) && (lines.size() >= maxNumLines) ) {
    148149                    if (startAtBeginning)
    149150                        break;
Note: See TracChangeset for help on using the changeset viewer.