Browse files

Adds some styling.

  • Loading branch information...
1 parent 154d4a5 commit b50f79afad522059694f53692fe7e07e477f31d0 @BertrandBordage committed Aug 28, 2012
View
40 cmsplugin_footnote/templates/cmsplugin_footnote/footnote_list.html
@@ -2,36 +2,70 @@
{% addtoblock 'css' %}
<style type="text/css">
+ .cms-footnote-list-hline {
+ background-color: lightGrey;
+ width: 100%;
+ max-width: 300px;
+ height: 1px;
+ }
+
+ .cms-footnote-list {
+ margin: 5px 0;
+ }
+
.cms-footnote-list .footnote {
vertical-align: top;
}
- .cms-footnote-list .footnote p {
+
+ .cms-footnote-list .footnote>* {
+ padding-top: 5px;
+ padding-bottom: 5px;
+ }
+ .cms-footnote-list .footnote:first-of-type>* {
+ padding-top: 0;
+ }
+ .cms-footnote-list .footnote:last-of-type>* {
+ padding-bottom: 0;
+ }
+
+ .cms-footnote-list .footnote p:first-of-type {
margin-top: 0;
}
+ .cms-footnote-list .footnote p:last-of-type {
+ margin-bottom: 0;
+ }
+
+ .cms-footnote-list .footnote:target .footnote-symbol,
+ .footnote-symbol:target {
+ background-color: #FF6;
+ }
</style>
{% endaddtoblock %}
{% spaceless %}
{% for footnote_plugin in footnote_plugins %}
{% if forloop.first %}
+ <div class="cms-footnote-list-hline"></div>
<table class="cms-footnote-list">
+ <tbody>
{% endif %}
{% with counter=forloop.counter %}
<tr class="footnote" id="{{ placeholder_name }}_footnote_{{ counter }}">
- <td>
+ <td class="footnote-symbol">
<a href="#{{ placeholder_name }}_footnote_{{ counter }}_symbol">
{{ footnote_plugin.symbol|default:counter }}.
</a>
</td>
- <td>
+ <td class="footnote-body">
{{ footnote_plugin.body|safe }}
</td>
</tr>
{% endwith %}
{% if forloop.last %}
+ </tbody>
</table>
{% endif %}
View
3 cmsplugin_footnote/templates/cmsplugin_footnote/footnote_symbol.html
@@ -1,6 +1,7 @@
{% spaceless %}
<a href="#{{ placeholder_name }}_footnote_{{ counter }}">
- <sup id="{{ placeholder_name }}_footnote_{{ counter }}_symbol"
+ <sup id="{{ placeholder_name }}_footnote_{{ counter }}_symbol"
+ class="footnote-symbol"
>{{ object.symbol|default:counter }}</sup>
</a>
{% endspaceless %}

0 comments on commit b50f79a

Please sign in to comment.