diff options
author | Matthew Summers <matthew.summers@liquidustech.com> | 2010-08-25 15:20:57 -0500 |
---|---|---|
committer | Matthew Summers <matthew.summers@liquidustech.com> | 2010-08-25 15:20:57 -0500 |
commit | 3f81c893810dd1934e2b1ee785091b7e6a7fbac5 (patch) | |
tree | 309e3062d36967edc9bab845afa9fdc02397b30f /gentoo_ads | |
parent | New plain text ad type is available (diff) | |
download | gentoo-ads-3f81c893810dd1934e2b1ee785091b7e6a7fbac5.tar.gz gentoo-ads-3f81c893810dd1934e2b1ee785091b7e6a7fbac5.tar.bz2 gentoo-ads-3f81c893810dd1934e2b1ee785091b7e6a7fbac5.zip |
Added feature: ad type arbitrary html
Some styles and template work to accomodate
Example usage in example_ads.py
Diffstat (limited to 'gentoo_ads')
-rw-r--r-- | gentoo_ads/ads/templates/ads.html | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/gentoo_ads/ads/templates/ads.html b/gentoo_ads/ads/templates/ads.html index 0af4e69..70dca67 100644 --- a/gentoo_ads/ads/templates/ads.html +++ b/gentoo_ads/ads/templates/ads.html @@ -37,6 +37,24 @@ text-align: justify; text-decoration: none; } + div.arbit { + width:100%; + height: 100% + } + div.arbit a { + text-decoration: underline; + color: #0000FF; + } + div.arbit h2 { + font-size: 100%; + text-align: center; + text-decoration: none; + } + div.arbit p { + font-size: 80%; + text-align: justify; + text-decoration: none; + } </style> </head> <body> @@ -51,7 +69,13 @@ </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> + {% ifequal ad.type 'html' %} + <div class="arbit"> + {{ ad.html|safe }} + </div> + {% 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 %} {% endifequal %} {% endfor %} <hr /> |