Style terms table

This commit is contained in:
Peter Desmet 2015-01-13 15:56:20 +01:00
parent 5b589e377b
commit 7ea811eaaf
3 changed files with 3561 additions and 1972 deletions

View File

@ -56,11 +56,32 @@ body {
text-decoration: none; text-decoration: none;
} }
.class-section, .class-group,
.term-dl { .term-definition {
padding-top: 70px; padding-top: 70px; /* Avoid anchor links from sticking to the top */
margin-top: -70px; margin-top: -70px;
} }
.class-group .well h2 {
margin-top: 10px;
}
.class-group .table {
table-layout: fixed;
}
.class-group .table col:first-child {
width: 120px; /* Labels */
}
.class-group .class-definition .table tr { /* Class definitions */;
background-color: #f5f5f5;
}
.class-group .table tr:first-child { /* Header for each definition */
background-color: #e7e7e7;
font-size: 16px;
font-weight: bold;
}
.class-group .table td {
word-wrap: break-word;
}
@media screen and (max-width: 767px){ @media screen and (max-width: 767px){
.terms-sidebar { .terms-sidebar {

View File

@ -82,26 +82,35 @@
#def showTerm($t, $isProperty) #def showTerm($t, $isProperty)
#if $t.uri is not None #if $t.uri is not None
#if $isProperty #if $isProperty
<dl id="$t.name_simple" class="dl-horizontal term-dl"> <div id="$t.name_simple" class="term-definition">
<table class="table table-bordered table-condensed">
<tbody>
#else #else
<dl class="dl-horizontal class-dl"> <div class="class-definition">
<table class="table table-bordered table-condensed">
<tbody>
#end if #end if
<dt>Name</dt><dd>$t.name</dd> <colgroup>
<dt>Label</dt><dd>$t.label</dd> <col />
<dt>Identifier</dt><dd><a href="$t.uri">$t.uri</a></dd> <col />
</colgroup>
<tr><td colspan="2">$t.name</td></tr>
<tr><td>Label</td><td>$t.label</td></tr>
<tr><td>Identifier</td><td><a href="$t.uri">$t.uri</a></td></tr>
#if $isProperty #if $isProperty
<dt>Class</dt><dd>$t.class</dd> <tr><td>Class</td><td>$t.class</td></tr>
#end if #end if
<dt>Definition</dt><dd>$t.definition</dd> <tr><td>Definition</td><td>$t.definition</td></tr>
<dt>Comment</dt><dd>$t.comment</dd> <tr><td>Comment</td><td>$t.comment</td></tr>
<dt>Reference</dt><dd><a href="http://terms.tdwg.org/wiki/$t.name_prefixed">http://terms.tdwg.org/wiki/$t.name_prefixed</a></dd> <tr><td>Reference</td><td><a href="http://terms.tdwg.org/wiki/$t.name_prefixed">http://terms.tdwg.org/wiki/$t.name_prefixed</a></td></tr>
<dt>History</dt><dd><a href="$t.version">$t.version</a></dd> <tr><td>History</td><td><a href="$t.version">$t.version</a></td></tr>
</dl> </tbody>
</table>
</div>
#end if #end if
#end def #end def
#for $group in $groups #for $group in $groups
<section id="$group.name_simple" class="class-section"> <section id="$group.name_simple" class="class-group">
<header class="well"> <header class="well">
<h2>$group.name</h2> <h2>$group.name</h2>
<ul class="list-inline term-index"> <ul class="list-inline term-index">

File diff suppressed because it is too large Load Diff