aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Summers <matthew.summers@liquidustech.com>2010-08-25 14:53:27 -0500
committerMatthew Summers <matthew.summers@liquidustech.com>2010-08-25 14:53:27 -0500
commitfab3b3b571f90ba3385513978a2700ff32309012 (patch)
tree4022dadac1095932a0c637d71e748523fb65c879 /gentoo_ads/ads/templates/ads.html
parentadded target="_parent" to <a> tag in template (diff)
downloadgentoo-ads-fab3b3b571f90ba3385513978a2700ff32309012.tar.gz
gentoo-ads-fab3b3b571f90ba3385513978a2700ff32309012.tar.bz2
gentoo-ads-fab3b3b571f90ba3385513978a2700ff32309012.zip
New plain text ad type is available
Change to template to accomodate the new type conditionally. New css styles in template for text ads. Change to example_ads.py that will show you how to use new type. that is all.
Diffstat (limited to 'gentoo_ads/ads/templates/ads.html')
-rw-r--r--gentoo_ads/ads/templates/ads.html21
1 files changed, 20 insertions, 1 deletions
diff --git a/gentoo_ads/ads/templates/ads.html b/gentoo_ads/ads/templates/ads.html
index 67f5860..0af4e69 100644
--- a/gentoo_ads/ads/templates/ads.html
+++ b/gentoo_ads/ads/templates/ads.html
@@ -27,13 +27,32 @@
text-align: center;
clear: both;
}
+ div.ads a h2 {
+ font-size: 100%;
+ text-align: center;
+ text-decoration: none;
+ }
+ div.ads a p {
+ font-size: 80%;
+ text-align: justify;
+ text-decoration: none;
+ }
</style>
</head>
<body>
<div class="ads">
{% for ad in ads %}
<hr />
- <a href="{{ad.url}}" target="_parent"><img src="{{ MEDIA_URL }}{{ ad.img }}" alt="{{ ad.title|slice:":50" }}" title="{{ ad.title|slice:":50" }}" height="{{ ad.height }}" width="{{ ad.width }}" /></a>
+ {% ifequal ad.type 'txt' %}
+ <a href="{{ad.url}}" target="_parent">
+ <h2>{{ ad.title }}</h2>
+ <p>
+ {{ ad.text }}
+ </p>
+ </a>
+ {% else %}
+ <a href="{{ad.url}}" target="_parent"><img src="{{ MEDIA_URL }}{{ ad.img }}" alt="{{ ad.title|slice:":50" }}" title="{{ ad.title|slice:":50" }}" height="{{ ad.height }}" width="{{ ad.width }}" /></a>
+ {% endifequal %}
{% endfor %}
<hr />
</div>