Repaired stylesheets in regards to alphabet navigation and fixed alphabet_navigation() in NarrativeWeb.
svn: r13297
This commit is contained in:
parent
281502576f
commit
efa639f62a
@ -30,14 +30,7 @@ see <http://www.gnu.org/licenses/>.
|
||||
--------------------------------------------------------------------------------------------------
|
||||
# $Id: $
|
||||
|
||||
NarrativeWeb
|
||||
----------------------------------------------------------------------------------------------- */
|
||||
body#NarrativeWeb {
|
||||
padding: 158px 0px 0px 0px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Header
|
||||
Header
|
||||
----------------------------------------------------- */
|
||||
div#header {
|
||||
position: fixed;
|
||||
@ -52,7 +45,6 @@ div#header {
|
||||
--------------------------------------------------------------------------------------- */
|
||||
body#NarrativeWeb div#navigation {
|
||||
position: fixed;
|
||||
top: 104px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
}
|
||||
|
@ -30,15 +30,7 @@ see <http://www.gnu.org/licenses/>.
|
||||
--------------------------------------------------------------------------------------------------
|
||||
# $Id: $
|
||||
|
||||
NarrativeWeb
|
||||
------------------------------------------------------------------------------------------------ */
|
||||
body#NarrativeWeb {
|
||||
padding: 136px 0px 0px 54px;
|
||||
margin: 0;
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
/* Header
|
||||
Header
|
||||
----------------------------------------------------- */
|
||||
#header {
|
||||
position: fixed;
|
||||
@ -48,21 +40,13 @@ body#NarrativeWeb {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* NarrativeWeb Navigation
|
||||
------------------------------------------------------------------------------- */
|
||||
body#NarrativeWeb div#navigation {
|
||||
position: fixed;
|
||||
top: 104px;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
/* Alphabet Navigation
|
||||
----------------------------------------------------- */
|
||||
div#alphabet {
|
||||
position: fixed;
|
||||
left: 4px;
|
||||
width: 44px;
|
||||
height: 416px;
|
||||
width: 40px;
|
||||
height: 326px;
|
||||
overflow-x: auto;
|
||||
border-width: 2px 4px 2px 4px;
|
||||
border-style: solid;
|
||||
@ -70,27 +54,28 @@ div#alphabet {
|
||||
div#alphabet ul {
|
||||
display: inline;
|
||||
list-style: none;
|
||||
padding: 0px 9px 0px 9px;
|
||||
margin: 0;
|
||||
}
|
||||
div#alphabet ul li {
|
||||
font: bold 14px/100% sans;
|
||||
padding: 10px 0px 10px 10px;
|
||||
padding: 10px 10px 10px 0px;
|
||||
margin:0;
|
||||
float: left;
|
||||
border-width: 0px 0px 2px 0px;
|
||||
border-style: solid;
|
||||
}
|
||||
div#alphabet ul li:first-child {
|
||||
border: 0;
|
||||
border-top: 0;
|
||||
}
|
||||
div#alphabet ul li:last-child {
|
||||
border: 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
div#alphabet ul li a {
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
padding: 10px 0px 6px 10px;
|
||||
}
|
||||
div#alphabet ul li a:hover {
|
||||
display: block;
|
||||
padding: 6px 10px 6px 10px;
|
||||
background-color: #C1B398;
|
||||
}
|
||||
|
@ -52,15 +52,20 @@ Females Web_Gender_Female.png
|
||||
|
||||
NarrativeWeb Styles
|
||||
-------------------------------------------------------------------------------------------- */
|
||||
body#NarrativeWeb {
|
||||
body {
|
||||
font-family: Arial, sans, sans-serif, Helvetica;
|
||||
color: #000;
|
||||
background-color: #FFF;
|
||||
}
|
||||
body#NarrativeWeb_Horizontal {
|
||||
padding: 158px 0px 0px 0px;
|
||||
}
|
||||
body#NarrativeWeb_Vertical {
|
||||
padding: 128px 0px 0px 44px;
|
||||
}
|
||||
|
||||
/* General Elements
|
||||
----------------------------------------------------- */
|
||||
|
||||
div {
|
||||
margin:0;
|
||||
padding:0;
|
||||
@ -291,6 +296,16 @@ div#alphabet ul li a:hover {
|
||||
div#navigation, div#subnavigation {
|
||||
width: 100%;
|
||||
}
|
||||
body#NarrativeWeb_Horizontal div#navigation {
|
||||
position: fixed;
|
||||
top: 104px;
|
||||
left: 0px;
|
||||
}
|
||||
body#NarrativeWeb_Vertical div#navigation {
|
||||
position: fixed;
|
||||
top: 104px;
|
||||
left: 4px;
|
||||
}
|
||||
div#navigation ul, div#subnavigation ul {
|
||||
list-style:none;
|
||||
min-width:770px;
|
||||
|
@ -304,6 +304,7 @@ class BasePage(object):
|
||||
# are still required.
|
||||
self.html_dir = report.options['target']
|
||||
self.ext = report.options['ext']
|
||||
self.alpha_nav_bar = report.options['alpha_nav_bar']
|
||||
self.noid = report.options['nogid']
|
||||
self.linkhome = report.options['linkhome']
|
||||
self.create_media = report.options['gallery']
|
||||
@ -948,7 +949,13 @@ class BasePage(object):
|
||||
self.report.encoding, xmllang )
|
||||
|
||||
# add narrative specific body id
|
||||
body.attr = 'id="NarrativeWeb" '
|
||||
# add alphabet layout direction to NarrativeWeb to allow for proper spacing for
|
||||
# each individual stylesheet
|
||||
alphabet_layout = "Horizontal"
|
||||
if self.alpha_nav_bar == "Vertical":
|
||||
alphabet_layout = "Vertical"
|
||||
|
||||
body.attr = 'id="NarrativeWeb_%s" ' % alphabet_layout
|
||||
|
||||
# create additional meta tags
|
||||
meta = (Html("meta", attr = _META1) +
|
||||
@ -5793,6 +5800,12 @@ def alphabet_navigation(db, handle_list, key):
|
||||
# remove the number of each occurance of each letter
|
||||
sorted_alpha_index = sorted(sorted_set, key=locale.strxfrm)
|
||||
|
||||
# remove any commas from the letter set
|
||||
sorted_alpha_index = [(ltr) for ltr in sorted_alpha_index if ltr != ',']
|
||||
|
||||
# remove any single spaces from the letter set also
|
||||
sorted_alpha_index = [(ltr) for ltr in sorted_alpha_index if ltr != ' ']
|
||||
|
||||
# if no letters, return None back to its callers
|
||||
if not sorted_alpha_index:
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user