From: dpvc v. a. <we...@ma...> - 2007-08-29 12:21:25
|
Log Message: ----------- Added the support files needed for the Union theme (since someone added it to the list of themes without adding the support files). I didn't have a gateway template made up, so I hacked this one together based on the ur page. It is only lightly tested. Added Files: ----------- webwork2/htdocs/css: union.css webwork2/conf/templates/union: gateway.template system.template Revision Data ------------- --- /dev/null +++ htdocs/css/union.css @@ -0,0 +1,190 @@ +/******************************************************************************/ +/* union.css classes: These classes appear in ur.template and are NOT + * emitted by WeBWorK code. They need only appear in this template. */ + +body { margin: 0px; } + +/* left table cell, contains logo and menus */ +td.LeftPanel { background-color: #660033; color: white; white-space: nowrap; width: 8em; zoom: 1; } +td.LeftPanel ul { zoom: 1; margin-left: 0em} +td.LeftPanel ul ul ul li { margin-left: .5em} +td.LeftPanel a:link, +td.LeftPanel a:visited { color: #EEBBBB; } + +div.Logo { } +div.Links { font-size: small; } +div.Links ul { list-style: none; margin-left: 0; padding-left: 0; } +div.Links ul ul { list-style: none; margin-left: 0.5em; padding-left: 0; } +div.Siblings { font-size: small; } +div.Siblings ul { list-style: none; margin-left: 0; padding-left: 0; } +div.Siblings ul ul { list-style: none; margin-left: 0.5em; padding-left: 0; } +div.Options { font-size: small; } + +/* top table cell, contains login message and path */ +td.TopPanel { background-color: #660033; color: white; height: 1; } +td.TopPanel a:link, +td.TopPanel a:visited { color: #EEBBBB; } + +.Path { } + +.LoginStatus { text-align: right; font-size: small;} + +.TimeLeft { font-size: small; } +.LittleTimeLeft { font-size: small; color: #FF7777; font-weight: bold; margin: 3px} +.TimeLeftReload { font-size: small; color: #EEBBBB; font-style: italic; } +td.Timestamp { text-align: left; font-size: small; font-style: italic; } + +/* main content panel, contains body */ +td.ContentPanel { background-color: white; color: black; } +td.ContentPanel a:link, +td.ContentPanel a:visited { color: blue; } +td.ContentPanel a:active { color: red; } + +td.SetMakerPanel { background-color: #DDDDDD; color: black; width: 50%; padding: 3px; } + +div.Nav { } +div.Title { font-size: 16pt; padding-bottom: 5px; } +div.SubmitError { color: red; font-style: italic; } +div.Message { font-style: italic; } +div.Body { } +div.Warnings { } + +/* contains info */ +td.InfoPanel { background-color: #DDDDDD; color: black; width: 40%; } +td.InfoPanel a:link, +td.InfoPanel a:visited { color: blue; } +td.InfoPanel a:active { color: red; } +div.Info { } + +/******************************************************************************/ +/* WeBWorK classes: These classes are emitted by WeBWorK code and should + * appear in ANY WeBWorK template. */ + +/* tables used for laying out form fields shouldn't have a border */ +table.FormLayout { border: 0; } +table.FormLayout tr { vertical-align: top; } +table.FormLayout th.LeftHeader { text-align: right; white-space: nowrap; } +table.FormLayout tr.ButtonRow { text-align: left; } +table.FormLayout tr.ButtonRowCenter { text-align: center; } + + +/* for problems which are rendered by themselves, e.g., by Set Maker */ +div.RenderSolo { background-color: #E0E0E0; color: black; padding: 5px; } +div.AuthorComment { background-color: #00E0E0; color: black; } + +/* minimal style for lists of links (generated by the links escape) */ +/* ul.LinksMenu { list-style: none; margin: 0 0 0 0.5em; padding: 0; }*/ +/* ul.LinksMenu ul { list-style: none; margin: 0 0 0 0.5em; padding: 0; }*/ + +a.HelpLink { border: 0px; } +a.HelpLink img { vertical-align: -5px; margin: 1px 2px; border: 0px; } + +/* background colors for success and failure messages */ +div.WarningMessage { background-color: #ffcccc; padding: 3px 3px 3px 3px; } +div.ResultsWithoutError { + margin-right: 6px; margin-left: 6px; + border-color: #009900; border-style: solid; border-width: 1px; + text-align: center; font-weight: bold; font-style: italic; + margin-right: 6px; margin-left: 6px; + background-color: #99ffAA; + padding: 3px 3px 3px 10px; +} /* light green */ +div.ResultsWithError { + margin-right: 6px; margin-left: 6px; + border-color: #CC0000; border-style: solid; border-width: 1px; + text-align: center; font-weight: bold; font-style: italic; + background-color: #ffcccc; + padding: 3px 3px 3px 10px; +} /* light red */ +div.ResultsAlert { + margin-right: 6px; margin-left: 6px; + border-color: #CCCC00; border-style: solid; border-width: 1px; + text-align: center; font-weight: bold; font-style: italic; + background-color: #ffffcc; + padding: 3px 3px 3px 10px; +} /* light yellow */ + +/* styles used by WeBWorK::HTML::ScrollingRecordList */ +div.ScrollingRecordList { padding: 1em; white-space: nowrap; border: thin solid gray; } +div.ScrollingRecordList select.ScrollingRecordList { width: 99%; } + +/* wraps the View Options form (generated by &optionsMacro) */ +/* FIXME: can't this style information just go in div.Options above? */ +div.viewOptions { border: thin groove; background-color: #882848; + line-height: 75%; margin: .5ex; margin-top: 2ex; + padding: 1ex; align: left; } + +.viewChoices { margin: 5px 0px 5px 5px; } +.viewChoices input {margin-top: 0px} + + +/* messages, attempt results, answer previews, etc. go in this DIV */ +/* this used to be "float:left", but that was suspected of causing MSIE peekaboo bug */ + +div.problemHeader {} + +/* styles for the attemptResults table */ +table.attemptResults { + border-style: outset; + border-width: 1px; +# margin: 0px auto 10pt auto; + margin: 0px 10pt; + border-spacing: 1px; +} +table.attemptResults td, +table.attemptResults th { + border-style: inset; + border-width: 1px; + text-align: center; + padding: 2px 5px; + background-color: #DDDDDD; +} +/* override above settings in tables used to display ans_array results */ +table.attemptResults td td, +table.attemptResults td th, +table.ArrayLayout td { + border-style: none; + border-width: 0px; + padding: 0px; +} +table.attemptResults td.Message { text-align: left; width: auto; } +.attemptResultsSummary { font-style:italic; } + +.parsehilight { background-color:yellow; } + +/* the problem TEXT itself does in this box */ +div.problem { + clear: both; padding: 0 5px; color: black; + border-top-style: solid; border-bottom-style: solid; + border-width: 2px; border-color: #DDBBBB; +} + +/* jsMath emits this class when appropriate math fonts aren't available */ +div.NoFontMessage { + padding: 10; + border-style: solid; + border-width:3px; + border-color: #DD0000; + background-color: #FFF8F8; + width: 75%; + text-align: left; + margin: 10px auto 10px 12%; +} + +/* text colors for published and unpublished sets */ +font.Published { font-style: normal; font-weight: normal; color: #000000; } /* black */ +font.Unpublished { font-style: italic; font-weight: normal; color: #aaaaaa; } /* light grey */ + +/* styles used when editing a temporary file */ +.temporaryFile { + margin-right: 6px; margin-left: 6px; + border-color: #AA6600; border-style: solid; border-width: 1px; + text-align: center; font-style: italic; + background-color: #FFBB88; + padding: 3px 3px 3px 10px; +} + +/* text colors for Auditing, Current, and Dropped students */ +.Audit { font-style: normal; color: purple; } +.Enrolled { font-weight: normal; color: black; } +.Drop { font-style: italic; color: grey; } --- /dev/null +++ conf/templates/union/gateway.template @@ -0,0 +1,279 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<!-- +################################################################################ +# WeBWorK Online Homework Delivery System +# Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/ +# $CVSHeader: webwork2/conf/templates/union/gateway.template,v 1.1 2007/08/29 12:15:16 dpvc Exp $ +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of either: (a) the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version, or (b) the "Artistic License" which comes with this package. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the +# Artistic License for more details. +################################################################################ +--> + +<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> +<head> +<title><!--#path style="text" text=" : " textonly="1"--></title> +<!--#head--> +<style type="text/css" media="all">@import "<!--#url type="webwork" name="stylesheet"-->";</style> + +<style type="text/css"> +/******************/ +/* gateway styles */ +/******************/ + +.LoginStatus {position:absolute; right:0px; top:-.5em} + +div.gwMessage { background-color:#dddddd; color: black; } +div.gwTiming { + background-color:#EECCCC; + color: black; + padding: .5em 2em; + float: right; +} +div.gwTiming form {margin:0px} +div.gwWarning { background-color:#ffffdd; color: black; } + +span.resultsWithError { + background-color: #ffcccc; + color: black; + padding: 1px 2em; + margin-left: 1em; +} +span.resultsWithoutError { + background-color: #66ff99; + color: black; + padding: 1px 2em; + margin-left: 1em; +} + +div.gwCorrect { + background-color: #66ff99; + color: black; + padding: 1px 2em; + margin-left: 1em; +} +div.gwIncorrect { + background-color: #ff9999; + color: black; + padding: 1px 2em; + margin-left: 1em; +} + +div.gwProblem { + clear: both; + background-color: white; + color: black; + padding: 1em 2em; + border-top-style: solid; border-bottom-style: solid; + border-width: 2px; border-color: #DDBBBB; +} +hr {display: none} +.div.gwProblem hr {display:block} + +div.gwSoln { +/* background-color: #e0e0ff; */ + background-color: transparent; + color: black; +/* padding: 2px; */, +/* border: dashed black 1px; */ +} +div.gwSoln b { color: navy; } + +p.gwPreview { + font-size: smaller; + text-align: right; + margin-top: 0px; + margin-bottom: 0px; +} + +table.gwAttemptResults { + border-width: 0px; +} +table.gwAttemptResults td.label { + font-weight: bold; + background-color: transparent; + color: navy; +} +table.gwAttemptResults td.output { + padding: 2px; + border: solid black 1px; + background-color: #eeeeee; +} + +</style> +<script language="javascript" type="text/javascript"> +function jumpTo(ref) { // scrolling javascript function + if ( ref ) { + var pn = ref - 1; // we start anchors at 1, not zero + if ( navigator.appName == "Netscape" && + parseFloat(navigator.appVersion) < 5 ) { + var xpos = document.anchors[pn].x; + var ypos = document.anchors[pn].y; + } else { + var xpos = document.anchors[pn].offsetLeft; + var ypos = document.anchors[pn].offsetTop; + } + if ( window.scrollTo == null ) { // cover for anyone + window.scroll(xpos,ypos); // lacking js1.2 + } else { + window.scrollTo(xpos,ypos); + } + } + return false; // prevent link from being followed +} + +// timer for gateway +var theTime = -1; // -1 before we've initialized +var alerted = -1; // -1 = no alert set; 1 = 1st alert set + // this shouldn't really be needed + +function runtimer() { +// aesthetically this is displeasing: we're assuming that the +// ContentGenerator will put the appropriate form elements in that +// page for us to manipulate. even with error checking, it seems sort +// of odd. + if ( document.gwtimer == null ) { // no timer + return; + } else { + var tm = document.gwtimer.gwtime; + var st = document.gwtimer.gwpagetimeleft.value; + + if ( st == 0 ) { // no time limit + return; + } else { + if ( theTime == -1 ) { + theTime = st; + tm.value = toMinSec(theTime); + setTimeout("runtimer()", 1000); // 1000 ms = 1 sec + } else if ( theTime == 0 && alerted != 3 ) { + alert("* You are out of time! *"); + alerted = 3; + } else if ( alerted != 3 ) { + theTime--; + tm.value = toMinSec(theTime); + setTimeout("runtimer()", 1000); // 1000 ms = 1 sec + if ( theTime == 35 && alerted != 2 ) { // time is in seconds + alert("* You have only about 30 seconds to complete " + + "this assignment. Press Grade very soon! *\n" + + "* The timer stops while this alert box is open. *"); + alerted = 2; + theTime -= 5; + } else if ( theTime == 75 && alerted != 1) { + alert("* You have only about a minute left " + + "to complete this assignment! *\n" + + "* The timer stops while this alert box is open. *"); + alerted = 1; + theTime -= 5; + } + } + } + } +} +function toMinSec(t) { +// convert to min:sec + mn = Math.floor(t/60); + sc = t - 60*mn; + if ( mn < 10 && mn > -1 ) { + mn = "0" + mn; + } + if ( sc < 10 ) { + sc = "0" + sc; + } + return mn + ":" + sc; +} +</script> +</head> +<body onload="runtimer();"> +<table width="100%" cellpadding="10" cellspacing="0" border="0"> + <tr valign="top"> +<!-- removed left sidebar --> + <!--#if can="info"--> + <td class="TopPanel" colspan="2"> + <!--#else--> + <td class="TopPanel" > + <!--#endif--> + <div style="position:relative; width:100%;"> + <!--#if can="path"--> + <span class="Path"> + <!--#path style="text" image="/webwork2_files/images/right_arrow.png" text=" > "--> + </span> + <!--#endif--> + + <!--#if loggedin="1"--> + <!--#if can="loginstatus"--> + + <span class="LoginStatus"> + + <!--#loginstatus--> + </span> + <!--#endif--> + <!--#endif--> + </div> + </td> + </tr> + <tr valign="top"> + <!--#if warnings="1"--> + <td class="ContentPanelError" bgcolor="#ffcccc"> + <!--#else--> + <td class="ContentPanel" bgcolor="#ffffff"> + <!--#endif--> +<!-- removed nav button to go up --> + <!--#if can="title"--> + <div class="Title"> + <!--#title--> + </div> + <!--#endif--> + <!--#if can="message"--> + <div class="Message"> + <!--#message--> + </div> + <!--#endif--> + + <!--#if can="submiterror"--> + <div class="SubmitError"> + <!--#submiterror--> + </div> + <!--#endif--> + <!--#if can="body"--> + <div class="Body"> + <!--#body--> + </div> + <!--#endif--> + <!--#if warnings="1"--> + <hr> + <div class="Warnings"> + <!--#warnings--> + </div> + <!--#endif--> + <!--#if can="message"--> + <div class="Message"> + <!--#message--> + </div> + <!--#endif--> + </td> + <!--#if can="info"--> + <td class="InfoPanel"> + <div class="Info"> + <!--#info--> + </div> + </td> + <!--#endif--> + </tr> + <tr> + <td class = "Timestamp", colspan=3> + Updated: <!--#timestamp--> + </td> + </tr> +</table> +</body> +</html> --- /dev/null +++ conf/templates/union/system.template @@ -0,0 +1,159 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<!-- +################################################################################ +# WeBWorK Online Homework Delivery System +# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ +# $CVSHeader: webwork2/conf/templates/union/system.template,v 1.1 2007/08/29 12:15:16 dpvc Exp $ +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of either: (a) the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any later +# version, or (b) the "Artistic License" which comes with this package. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the +# Artistic License for more details. +################################################################################ +--> + +<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> +<head> +<title><!--#path style="text" text=" : " textonly="1"--></title> +<!--#head--> +<style type="text/css" media="all">@import "<!--#url type="webwork" name="stylesheet"-->";</style> +</head> +<body> +<table width="100%" cellpadding="10" cellspacing="0" border="0"> + <tr valign="top"> + <td align="left" valign="top" rowspan="2" class="LeftPanel"> + <a href="http://webwork.math.rochester.edu"> + <img src="/webwork2_files/images/webwork_square.gif" alt="WeBWorK" height="64" width="66" border="0" /><! + ></a> + <br /> + + <!--#if loggedin="1"--> + <!--#if can="links"--> + <hr /> + <div class="Links"> + <!--#links--> + </div> + <!--#if can="siblings"--> + <hr /> + <!--#endif--> + <!--#endif--> + <div class="Siblings"> + <!--#siblings--> + </div> + <!--#if can="options"--> + <div class="Options"> + <!--#options--> + </div> + <!--#endif--> + <!--#endif--> + </td> + <!--#if can="info"--> + <td class="TopPanel" colspan="2"> + <!--#else--> + <td class="TopPanel"> + <!--#endif--> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr> + + <!--#if can="path"--> + <td align="left" class="TopPanel" nowrap> + <span class="Path"> + <!--#path style="text" image="/webwork2_files/images/right_arrow.png" text=" > "--> + </span> + </td> + <!--#endif--> + + <!--#if can="time_left"--> + <td align="center" class="TopPanel" width="100%" nowrap> + <span class="TimeLeft"> + <!--#time_left--> + </span> + </td> + <!--#endif--> + + <!--#if loggedin="1"--> + <!--#if can="loginstatus"--> + <td align="right" class="TopPanel" nowrap> + <span class="LoginStatus"> + <!--#loginstatus--> + </span> + </td> + <!--#endif--> + <!--#endif--> + + </tr> + </table> + </td> + </tr> + + <tr valign="top"> + <!--#if warnings="1"--> + <td class="ContentPanelError" bgcolor="#ffcccc"> + <!--#else--> + <td class="ContentPanel" bgcolor="#ffffff"> + <!--#endif--> + <!--#if can="nav"--> + <div class="Nav"> + <!--#nav style="images" imageprefix="/webwork2_files/images/nav" imagesuffix=".gif" separator=" "--> + </div> + <!--#endif--> + <!--#if can="title"--> + <div class="Title"> + <!--#title--> + </div> + <!--#endif--> + <!--#if can="message"--> + <div class="Message"> + <!--#message--> + </div> + <!--#endif--> + + <!--#if can="submiterror"--> + <div class="SubmitError"> + <!--#submiterror--> + </div> + <!--#endif--> + <!--#if can="body"--> + <div class="Body"> + <!--#body--> + </div> + <!--#endif--> + <!--#if warnings="1"--> + <hr> + <div class="Warnings"> + <!--#warnings--> + </div> + <!--#endif--> + <!--#if can="message"--> + <div class="Message"> + <!--#message--> + </div> + <!--#endif--> + </td> + + <!--#if can="info"--> + <td class="InfoPanel"> + <div class="Info"> + <!--#info--> + </div> + </td> + <!--#endif--> + </tr> + + <tr> + <td class="Timestamp", colspan="3"> + Updated: <!--#timestamp--> + </td> + </tr> + +</table> +</body> +</html> |