Branding, the next level

From EPrints Documentation
Revision as of 09:38, 27 February 2007 by Kiz (Talk | contribs)

Jump to: navigation, search

The redesign process is not an easy one.
No, let me rephrase that: When designing a complete re-branding, altering the EPrints files is pretty - easy however the design, the xhtml and the css all requires some skill and knowledge. That part of the process is not discussed here, sorry.

Step One: design

Get the design right.
Speak to Web Designers/Greaphic Artists about layout/graphics/composition.
Speak to xhtml coders and CSS monkeys.
Make up some static pages to get the page right before you edit the EPrints files.

This is our design: Overview.png

Step Two: impliment

Let us assume that you have configured the basic repository, created the database, and created an admin user.
Let us further assume that you are at the top of the installed EPrints software (/opt/ or /usr/local or /home/eprints or wherever you've installed it)

Edit the default template for your repository:

vi archives/deposit/cfg/lang/en/templates/default.xml

Edit the file, or delete all the contents and start again.

the head section

<?xml version="1.0" standalone="no" ?>
<!DOCTYPE html SYSTEM "entities.dtd" > 

<html xmlns="" xmlns:epc="" xml:lang="en" lang="en">
    <title><epc:pin ref="title" textonly="yes"/> - <epc:phrase ref="archive_name"/></title>
    <script src="/javascript/auto.js" type="text/javascript"></script>
    <style type="text/css" media="screen">@import url(/style/auto.css);</style>
    <style type="text/css" media="screen"> @import  url(/style/eprints.css); </style>
    <style type="text/css" media="print">@import url(/style/print.css);</style>
<!--[if IE]>
    <style type="text/css" media="screen">@import url(/style/IE_Hacks.css);</style>

    <link rel="icon" href="/favicon.ico" type="image/x-icon"/>
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
    <link rel="Top" href="{$config{frontpage}}"/>
    <link rel="Search" href="/perl/search"/>
    <epc:pin ref="head"/>

This is the head section of the xhtml for our demo page.

  • <title><epc:pin ref="title" textonly="yes"/> - <epc:phrase ref="archive_name"/></title> shows that the title is made from two elements defined in one of the phrases files
  • <script src="/javascript/auto.js" type="text/javascript"></script> is the line that pulls in the auto-completer javascript
  • <style type="text/css" media="screen">@import url(/style/auto.css);</style> is the bit that pulls in all the default javascript styling
  • <style type="text/css" media="screen"> @import url(/style/eprints.css); </style> is my extra CSS for my design
  • <style type="text/css" media="print">@import url(/style/print.css);</style> is the css that is referenced when printing to the page
  • <!--[if IE]><style type="text/css" media="screen">@import url(/style/IE_Hacks.css);</style><![endif]--> is the hack to include IE-specific CSS that the web validators won't see (or complain about)
  • <epc:pin ref="head"/> is a pin-holder for any extra head-section tags that are defined (where?)

the body section

<noscript><style type='text/css'>@import url(/style/nojs.css);</style></noscript>
     <epc:pin ref="page"/>

So - what do we have here?

  • <noscript><style type='text/css'>@import url(/style/nojs.css);</style></noscript>
    is a non-complient bodge to include extra CSS (used by the core eprints code) when there is no Javascript available.
  • is the bit that defines the toolbar (more later)
  • <epc:pin ref="page"/>
    is the bit that defines where the code sits

The rest is all design and layout (and there is a lot of design and layout in /style/eprints.css