Hyrax Customization user manual

From OPeNDAP Documentation
Revision as of 21:37, 15 July 2010 by Rduncan (talk | contribs) (→‎Image Files)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
⧼opendap2-jumptonavigation⧽

Web page customization

Hyrax can be easily customized to fit the end users needs. The public "face" of Hyrax can be easily modified to match an organizations look and feel. Almost all of the web pages can be completely customized by the site administrator by editing a combination of HTML, Image, and CSS files.

Where to make the changes

All of the default versions of the HTML, Image, and CSS files come bundled with Hyrax in the $CATALINA_HOME/webapps/opendap/docs directory. $CATALINA_HOME is the directory that you installed tomcat in. If you did the default install of tomcat, your $CATALINA_HOME will be "/usr/local/apache-tomcat-6.x.x".

CD to you $CATALINA_HOME directory (again default would look like (on Linux machine): cd /usr/local/apache-tomcat-6.x.x) (The -6.x.x is the version number of tomcat you are running, ex. if you are running tomcat 6.0.24 then it would be just that.)

Make a new directory $CATALINA_HOME/content/opendap/docs/. (This would be: mkdir content, cd content, mkdir opendap ...)

Copy (do not move) the files in $CATALINA_HOME/webapps/opendap/docs to $CATALINA_HOME/content/opendap/docs by using: cp -r $CATALINA_HOME/webapps/opendap/docs/ $CATALINA_HOME/content/opendap/docs/

Warning
Do NOT remove files from this new directory (Or the old one for that matter). Each file, in its location, is required by Hyrax. You can make changes to the files but you should not rename or remove them.

The rest of these instructions are written with the assumption that a copy of the docs directory has been made as described above.

What to change

HTML Files

The HTML files provide the static content of a Hyrax server.

File        Location        Description
index.html $CATALINA_HOME/content/opendap/docs The documentation web page for the top level of Hyrax. As shipped it contains a description of Hyrax and links to documentation and funders. The contents.html pages (aka the OPeNDAP directories) links to this document.

error400.html $CATALINA_HOME/content/opendap/docs Contains the default error page that Hyrax will return when the client request generates a Bad Request error (Associated with an HTML status of 400)

error403.html $CATALINA_HOME/content/opendap/docs Contains the default error page that Hyrax will return when the client request generates a Forbidden error. (Associated with an HTML status of 403)

error404.html $CATALINA_HOME/content/opendap/docs Contains the default error page that Hyrax will return when the client request generates a Not Found error. (Associated with an HTML status of 404)

error500.html $CATALINA_HOME/content/opendap/docs Contains the default error page that Hyrax will return when the client request generates an Internal Server Error. (Associated with an HTML status of 500)

error501.html $CATALINA_HOME/content/opendap/docs Contains the default error page that Hyrax will return when the client request generates an Not Implemented. (Associated with an HTML status of 501)

error502.html $CATALINA_HOME/content/opendap/docs Contains the default error page that Hyrax will return when the client request generates an Bad Gateway. (Associated with an HTML status of 502)

CSS Files

File        Location        Description
contents.css $CATALINA_HOME/content/opendap/docs/css The contents.css style sheet provides the default colors and fonts used in the Hyrax site. It is referenced by all of the HTML and XSL files to coordinate the visual aspects of the site.

thredds.css $CATALINA_HOME/content/opendap/docs/css The thredds.css style sheet provides the default colors and fonts used by the THREDDS component of Hyrax.

Image Files

There are a number of image files shipped with Hyrax. Simply replacing key image files will allow you to customize the icons and logos associated with the Hyrax server.

File        Location        Description
logo.gif $CATALINA_HOME/content/opendap/docs/images Main Logo for the directory view (produced by contents.css and contents.xsl)
favicon.ico $CATALINA_HOME/content/opendap/docs/images The cute little icon preceding the URL in the address bar of your browser. To be used this file needs to be installed into Tomcat:cp -r $CATALINA_HOME/webapps/opendap/docs/images/favicon.ico to $CATALINA_HOME/webapps/ROOT/ (OR this is where you can pick another image of your choosing and place in this directory.)
BadDapRequest.gif, BadGateway.png,
favicon.ico, folder.png,
forbidden.png, largeEarth.jpg,
logo.gif, nasa-logo.jpg,
noaa-logo.jpg, nsf-logo.png,
smallEarth.jpg, sml-folder.png,
superman.jpg
$CATALINA_HOME/content/opendap/docs/images These files are referenced by the default collection of web content files (described above) that ship with Hyrax.