minor changes to the links on top bar, left bar, sideboxes so they track the

CSS classes yet keep consistent with the font sizes on the rest of the page...
allows us to do the "hover-underline" trick that nrpa.org uses
This commit is contained in:
Eric J. Bowersox 2001-10-31 17:51:29 +00:00
parent ec878e9dfc
commit f1584f3f4a
5 changed files with 42 additions and 37 deletions

View File

@ -12,7 +12,7 @@
A.tbar:visited { color: ${color.top.link}; A.tbar:visited { color: ${color.top.link};
} }
.lbar { font-family: ${font}, sans-serif; background: ${color.left.background}; .lbar { font-family: ${font}, sans-serif; background: ${color.left.background};
color: ${color.left.foreground}; font-size: 12pt; color: ${color.left.foreground}; font-size: 11pt;
} }
A.lbar { color: ${color.left.link}; A.lbar { color: ${color.left.link};
} }
@ -41,7 +41,7 @@
color: ${color.sidebox.top.foreground}; font-size: 14pt; color: ${color.sidebox.top.foreground}; font-size: 14pt;
} }
.sidebox { font-family: ${font}, sans-serif; background: ${color.sidebox.background}; .sidebox { font-family: ${font}, sans-serif; background: ${color.sidebox.background};
color: ${color.sidebox.foreground}; font-size: 12pt; color: ${color.sidebox.foreground}; font-size: 11pt;
} }
A.sidebox { color: ${color.sidebox.link}; A.sidebox { color: ${color.sidebox.link};
} }

View File

@ -71,7 +71,10 @@ public class SideBoxConferences implements ContentRender, ColorSelectors
public void renderHere(Writer out, RenderData rdat) throws IOException public void renderHere(Writer out, RenderData rdat) throws IOException
{ {
String hilite = rdat.getStdColor(SIDEBOX_CONTENT_LINK); String norm_font = rdat.getStdFontTag(SIDEBOX_CONTENT_FOREGROUND,2);
String hilite = rdat.getStdFontTag(SIDEBOX_CONTENT_LINK,2);
String purple_ball = rdat.getFullImagePath("purple-ball.gif");
String new_image = rdat.getFullImagePath("tag_new.gif");
if (hotlist.size()>0) if (hotlist.size()>0)
{ // display the list of conferences { // display the list of conferences
out.write("<TABLE ALIGN=CENTER BORDER=0 CELLPADDING=0 CELLSPACING=2>\n"); out.write("<TABLE ALIGN=CENTER BORDER=0 CELLPADDING=0 CELLSPACING=2>\n");
@ -81,17 +84,14 @@ public class SideBoxConferences implements ContentRender, ColorSelectors
ConferenceHotlistEntry hle = (ConferenceHotlistEntry)(it.next()); ConferenceHotlistEntry hle = (ConferenceHotlistEntry)(it.next());
ConferenceContext conf = hle.getConference(); ConferenceContext conf = hle.getConference();
String href = "confdisp?sig=" + conf.getEnclosingSIG().getSIGID() + "&conf=" + conf.getConfID(); String href = "confdisp?sig=" + conf.getEnclosingSIG().getSIGID() + "&conf=" + conf.getConfID();
out.write("<TR VALIGN=MIDDLE>\n<TD ALIGN=CENTER WIDTH=14><IMG SRC=\"" out.write("<TR VALIGN=MIDDLE>\n<TD ALIGN=CENTER WIDTH=14><IMG SRC=\"" + purple_ball
+ rdat.getFullImagePath("purple-ball.gif")
+ "\" ALT=\"*\" WIDTH=14 HEIGHT=14 BORDER=0></TD>\n<TD ALIGN=LEFT CLASS=\"sidebox\">\n" + "\" ALT=\"*\" WIDTH=14 HEIGHT=14 BORDER=0></TD>\n<TD ALIGN=LEFT CLASS=\"sidebox\">\n"
+ rdat.getStdFontTag(SIDEBOX_CONTENT_FOREGROUND,2) + "<B><A HREF=\"" + norm_font + "<B><A CLASS=\"sidebox\" HREF=\"" + rdat.getEncodedServletPath(href) + "\">"
+ rdat.getEncodedServletPath(href) + "\"><FONT COLOR=\"" + hilite + "\">" + hilite + StringUtil.encodeHTML(conf.getName()) + "</FONT></A></B> ("
+ StringUtil.encodeHTML(conf.getName()) + "</FONT></A></B> ("
+ StringUtil.encodeHTML(conf.getEnclosingSIG().getName()) + ")</FONT>\n"); + StringUtil.encodeHTML(conf.getEnclosingSIG().getName()) + ")</FONT>\n");
if (conf.anyUnread()) if (conf.anyUnread())
out.write("&nbsp;<A HREF=\"" + rdat.getEncodedServletPath(href + "&rnm=1") + "\"><IMG SRC=\"" out.write("&nbsp;<A HREF=\"" + rdat.getEncodedServletPath(href + "&rnm=1") + "\"><IMG SRC=\""
+ rdat.getFullImagePath("tag_new.gif") + new_image + "\" ALT=\"New!\" BORDER=0 WIDTH=40 HEIGHT=20></A>\n");
+ "\" ALT=\"New!\" BORDER=0 WIDTH=40 HEIGHT=20></A>\n");
out.write("</TD>\n</TR>\n"); out.write("</TD>\n</TR>\n");
} // end while } // end while
@ -100,14 +100,13 @@ public class SideBoxConferences implements ContentRender, ColorSelectors
} // end if } // end if
else else
out.write(rdat.getStdFontTag(SIDEBOX_CONTENT_FOREGROUND,2) out.write(norm_font + "<EM>You have no conferences in your hotlist.</EM></FONT>\n");
+ "<EM>You have no conferences in your hotlist.</EM></FONT>\n");
if (uc.isLoggedIn()) if (uc.isLoggedIn())
{ // write the link at the end { // write the link at the end
out.write("<P>" + rdat.getStdFontTag(SIDEBOX_CONTENT_FOREGROUND,1) + "<B>[ <A HREF=\"" out.write("<P>" + rdat.getStdFontTag(SIDEBOX_CONTENT_FOREGROUND,1) + "<B>[ <A CLASS=\"sidebox\" HREF=\""
+ rdat.getEncodedServletPath("settings?cmd=H") + "\"><FONT COLOR=\"" + hilite + rdat.getEncodedServletPath("settings?cmd=H") + "\">"
+ "\">Manage</FONT></A> ]</B></FONT>"); + rdat.getStdFontTag(SIDEBOX_CONTENT_LINK,1) + "Manage</FONT></A> ]</B></FONT>");
} // end if } // end if

View File

@ -73,20 +73,26 @@ public class SideBoxSIGs implements ContentRender, ColorSelectors
{ {
if (sig_list.size()>0) if (sig_list.size()>0)
{ // display the list of available SIGs { // display the list of available SIGs
String purple_ball = rdat.getFullImagePath("purple-ball.gif");
String link_font = rdat.getStdFontTag(SIDEBOX_CONTENT_LINK,2);
String host_image = null;
out.write("<TABLE ALIGN=CENTER BORDER=0 CELLPADDING=0 CELLSPACING=2>\n"); out.write("<TABLE ALIGN=CENTER BORDER=0 CELLPADDING=0 CELLSPACING=2>\n");
Iterator it = sig_list.iterator(); Iterator it = sig_list.iterator();
while (it.hasNext()) while (it.hasNext())
{ // display the names of the SIGs one by one { // display the names of the SIGs one by one
SIGContext sig = (SIGContext)(it.next()); SIGContext sig = (SIGContext)(it.next());
out.write("<TR VALIGN=MIDDLE>\n<TD ALIGN=CENTER WIDTH=14><IMG SRC=\"" out.write("<TR VALIGN=MIDDLE>\n<TD ALIGN=CENTER WIDTH=14><IMG SRC=\"" + purple_ball
+ rdat.getFullImagePath("purple-ball.gif")
+ "\" ALT=\"*\" WIDTH=14 HEIGHT=14 BORDER=0></TD>\n<TD ALIGN=LEFT CLASS=\"sidebox\">\n" + "\" ALT=\"*\" WIDTH=14 HEIGHT=14 BORDER=0></TD>\n<TD ALIGN=LEFT CLASS=\"sidebox\">\n"
+ "<A HREF=\"" + rdat.getEncodedServletPath("sig/" + sig.getAlias()) + "\">" + "<A CLASS=\"sidebox\" HREF=\"" + rdat.getEncodedServletPath("sig/" + sig.getAlias())
+ rdat.getStdFontTag(SIDEBOX_CONTENT_LINK,2) + "<B>" + StringUtil.encodeHTML(sig.getName()) + "\">" + link_font + "<B>" + StringUtil.encodeHTML(sig.getName()) + "</B></FONT></A>\n");
+ "</B></FONT></A>\n");
if (sig.isAdmin()) if (sig.isAdmin())
out.write("&nbsp;<IMG SRC=\"" + rdat.getFullImagePath("tag_host.gif") { // write the "Host!" image at the end
+ "\" ALT=\"Host!\" BORDER=0 WIDTH=40 HEIGHT=20>\n"); if (host_image==null)
host_image = rdat.getFullImagePath("tag_host.gif");
out.write("&nbsp;<IMG SRC=\"" + host_image + "\" ALT=\"Host!\" BORDER=0 WIDTH=40 HEIGHT=20>\n");
} // end if
out.write("</TD>\n</TR>\n"); out.write("</TD>\n</TR>\n");
} // end while } // end while
@ -100,12 +106,12 @@ public class SideBoxSIGs implements ContentRender, ColorSelectors
if (uc.isLoggedIn()) if (uc.isLoggedIn())
{ // write the two links at the end { // write the two links at the end
String hilite = rdat.getStdColor(SIDEBOX_CONTENT_LINK); String hilite = rdat.getStdFontTag(SIDEBOX_CONTENT_LINK,1);
out.write("<P>" + rdat.getStdFontTag(SIDEBOX_CONTENT_FOREGROUND,1) + "<B>[ <A HREF=\"" out.write("<P>" + rdat.getStdFontTag(SIDEBOX_CONTENT_FOREGROUND,1) + "<B>[ <A CLASS=\"sidebox\" HREF=\""
+ rdat.getEncodedServletPath("settings?cmd=S") + "\"><FONT COLOR=\"" + hilite + rdat.getEncodedServletPath("settings?cmd=S") + "\">" + hilite
+ "\">Manage</FONT></A> | <A HREF=\"" + "Manage</FONT></A> | <A CLASS=\"sidebox\" HREF=\""
+ rdat.getEncodedServletPath("sigops?cmd=C") + "\"><FONT COLOR=\"" + hilite + rdat.getEncodedServletPath("sigops?cmd=C") + "\">" + hilite
+ "\">Create New</FONT></A> ]</B></FONT>"); + "Create New</FONT></A> ]</B></FONT>");
} // end if } // end if

View File

@ -72,7 +72,7 @@ abstract class LeftMenuItem implements ComponentRender, ColorSelectors
buf.append("<FONT COLOR=\"").append(rdat.getStdColor(CONTENT_DISABLED)).append("\">"); buf.append("<FONT COLOR=\"").append(rdat.getStdColor(CONTENT_DISABLED)).append("\">");
else else
{ // write the <A> tag { // write the <A> tag
buf.append("<A HREF=\""); buf.append("<A CLASS=\"lbar\" HREF=\"");
appendURL(buf,rdat); appendURL(buf,rdat);
buf.append('"'); buf.append('"');
if (new_window) if (new_window)

View File

@ -26,7 +26,7 @@
UserContext user = Variables.getUserContext(application,request,session); UserContext user = Variables.getUserContext(application,request,session);
RenderData rdat = RenderConfig.createRenderData(application,request,response); RenderData rdat = RenderConfig.createRenderData(application,request,response);
String header_font = rdat.getStdFontTag(ColorSelectors.TITLE_FOREGROUND,3); String header_font = rdat.getStdFontTag(ColorSelectors.TITLE_FOREGROUND,3);
String header_link_hilite = "<FONT COLOR=\"" + rdat.getStdColor(ColorSelectors.TITLE_LINK) + "\">"; String header_link_hilite = rdat.getStdFontTag(ColorSelectors.TITLE_LINK,3);
String stdfont = rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2); String stdfont = rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2);
String leftfont = rdat.getStdFontTag(ColorSelectors.LEFT_FOREGROUND,2); String leftfont = rdat.getStdFontTag(ColorSelectors.LEFT_FOREGROUND,2);
String smallfont = rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,1); String smallfont = rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,1);
@ -55,9 +55,9 @@
<TD ALIGN=CENTER WIDTH=30% CELLPADDING=2 CLASS="tbar"><%= header_font %><B> <TD ALIGN=CENTER WIDTH=30% CELLPADDING=2 CLASS="tbar"><%= header_font %><B>
<% if (rdat.useHTMLComments()) { %><!-- Links to Front Page, Help, Find --><% } %> <% if (rdat.useHTMLComments()) { %><!-- Links to Front Page, Help, Find --><% } %>
<A HREF="<%= rdat.getEncodedServletPath("top") %>"><%= header_link_hilite %>Front Page</FONT></A><P> <A CLASS="tbar" HREF="<%= rdat.getEncodedServletPath("top") %>"><%= header_link_hilite %>Front Page</FONT></A><P>
<A HREF="/TODO"><%= header_link_hilite %>Help</FONT></A>&nbsp;|&nbsp; <A CLASS="tbar" HREF="/TODO"><%= header_link_hilite %>Help</FONT></A>&nbsp;|&nbsp;
<A HREF="<%= rdat.getEncodedServletPath("find") %>"><%= header_link_hilite %>Find</FONT></A> <A CLASS="tbar" HREF="<%= rdat.getEncodedServletPath("find") %>"><%= header_link_hilite %>Find</FONT></A>
</B></FONT></TD> </B></FONT></TD>
<TD ALIGN=RIGHT WIDTH=50% CELLPADDING=2 CLASS="tbar"> <TD ALIGN=RIGHT WIDTH=50% CELLPADDING=2 CLASS="tbar">
@ -75,9 +75,9 @@
partial_tgt = "account?tgt=" + URLEncoder.encode(basedat.getLocation()) + "&cmd="; partial_tgt = "account?tgt=" + URLEncoder.encode(basedat.getLocation()) + "&cmd=";
foo = rdat.getEncodedServletPath(partial_tgt + "L"); foo = rdat.getEncodedServletPath(partial_tgt + "L");
%> %>
&nbsp;-&nbsp;<A HREF="<%= foo %>"><%= header_link_hilite %>Log Out</FONT></A> &nbsp;-&nbsp;<A CLASS="tbar" HREF="<%= foo %>"><%= header_link_hilite %>Log Out</FONT></A>
<% foo = rdat.getEncodedServletPath(partial_tgt + "P"); %> <% foo = rdat.getEncodedServletPath(partial_tgt + "P"); %>
&nbsp;|&nbsp;<A HREF="<%= foo %>"><%= header_link_hilite %>Profile</FONT></A> &nbsp;|&nbsp;<A CLASS="tbar" HREF="<%= foo %>"><%= header_link_hilite %>Profile</FONT></A>
<% } // end if %> <% } // end if %>
<% } else { %> <% } else { %>
You are not logged in You are not logged in
@ -86,9 +86,9 @@
partial_tgt = "account?tgt=" + URLEncoder.encode(basedat.getLocation()) + "&cmd="; partial_tgt = "account?tgt=" + URLEncoder.encode(basedat.getLocation()) + "&cmd=";
foo = rdat.getEncodedServletPath(partial_tgt + "L"); foo = rdat.getEncodedServletPath(partial_tgt + "L");
%> %>
&nbsp;-&nbsp;<A HREF="<%= foo %>"><%= header_link_hilite %>Log In</FONT></A> &nbsp;-&nbsp;<A CLASS="tbar" HREF="<%= foo %>"><%= header_link_hilite %>Log In</FONT></A>
<% foo = rdat.getEncodedServletPath(partial_tgt + "C"); %> <% foo = rdat.getEncodedServletPath(partial_tgt + "C"); %>
&nbsp;|&nbsp;<A HREF="<%= foo %>"><%= header_link_hilite %>Create Account</FONT></A> &nbsp;|&nbsp;<A CLASS="tbar" HREF="<%= foo %>"><%= header_link_hilite %>Create Account</FONT></A>
<% } // end if %> <% } // end if %>
<% } // end if %> <% } // end if %>
</FONT></TD></TR> </FONT></TD></TR>