I've completed the following stuff on the new version of the site:
- Stylesheet switching from the menu. For this, I used my own code rather than Greg's, but I also managed to learn something new about the Cookie Selector in Cocoon which enabled me to streamline it considerably. I can now pass the value of a cookie directly into an XSLT transformation as a parameter, like this:
<map:select type="cookie-selector"> <map:parameter name="cookie-name" value="PageStyle"/> <map:when test=""> <map:transform type="saxon" src="xsl/index2.xsl"> <map:parameter name="PageStyle" value="grey" /> </map:transform> </map:when> <map:otherwise> <map:transform type="saxon" src="xsl/index2.xsl"> <map:parameter name="PageStyle" value="{request:cookieMap/PageStyle/value}" /> </map:transform> </map:otherwise> </map:select>
This is well worth remembering. Previously I was doing a complicatedwhen
statement, because I didn't know how to use thecookieMap
. - Document listings filtered by type (prose, verse, engravings, or all). This is now achieved by passing a parameter into the XQuery in the URL. Eventually, the engravings link will go to a special page which uses the gallery layout, but for now it just works as a list like the other pages.
- Readable text everywhere. In some of the stylesheets, text was not readable against its background, for various reasons. This is now fixed.
- Teaser popup functionality and layout. This is all working, but the background image/colour (it's a combination of both) is not quite right yet, and also needs differentiating across the styles.
- Teaser links are buttons. Previously they were text links, but now we've made them into actual buttons, which makes them easier to lay out and style.
- Various fixes to code taken from Greg's site (such as removing
href="#"
attributes, which add an unnecessary hash to the page URL).
Next to be done, in order of ease and practicality:
- Text document output
- Search page
- Menu-based search functionality
- Gallery view of engravings
- Actual image markup output (needs some careful rethinking, and has to be completely rewritten because we've abandoned SVG)