[ckan-discuss] Customizing ckan
Anton Lundin
anton at dohi.se
Tue Sep 10 15:08:26 BST 2013
On 10 September, 2013 - Javier Coque Garcia wrote:
> Hi! I am customizing my ckan. Where it appears "This is a featured section", I would like to show a image. I wrote in the development.ini:
>
> ckan.template_footer_end = <style type="text/css">
>
> .media-image a { background-image : url("base/images/photo.jpg");}
>
> </style>
>
> but it doesn't appear any image. How can I fix it?
>
> cheers.
Hi.
We don't use the ckan.template_footer_end, we use the "Custom CSS"
feature in /ckan-admin/config panel and to restyle that area we run
something like:
/* Remove the feature image */
div.hero-primary section.featured.media-overlay {
display: none;
}
/* Style up fron page */
div.hero-primary header {
background-image: url(http://url-to-image/image.jpg);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
height: 59px;
padding-top: 42px;
padding-bottom: 42px;
border-radius: 3px;
}
The height and padding is so that it aligns nice with the "Search Your
Data" box to the right.
The whole styling is we use is documented at:
https://github.com/openumea/openumea-deployment/blob/master/CKAN-2.1-THEMING.txt
and you can have a look at the result at http://openumea.se/
//Anton
--
Anton Lundin
anton at dohi.se
http://www.dohi.se/
More information about the ckan-discuss
mailing list