[ckan-dev] CKAN 2.2: Custom CSS in config no longer working (fully)

Ralf user66 at arcor.de
Mon Feb 10 06:59:42 UTC 2014


Hi Aaron,

I am not a CKAN developer and my custom adaptations are done via an extension.

But from what I've seen in CKAN 2.2 they changed the HTML code a bit.  
Just have a look at

src/ckan/ckan/templates/home/layout1.html
src/ckan/ckan/templates/home/snippets/promoted.html

So you need to

1) change "hero-primary" to "hero"
2) change "header" to "section" (depending on your needs)

Result:

div.hero section {
...
...
}

Cheers
Ralf

Quoting Aaron McGlinchy <McGlinchyA at landcareresearch.co.nz>:

> Hi, we have some custom CSS (which worked fine in v 2.1) in the  
> sysadmin config settings which changes the background image, and  
> replaced the default "this is a featured section/blank 420 x 220  
> image".
>
> In 2.2 this no longer works completely - the background image change  
> works (first 2 rows below), but the featured section remains as the  
> default 420 x 220 blank image.
>
> .hero { background: lightsteelblue; }
> .hero { background-image:  
> url("/base/images/LCR-ckan-homepage-background.jpg");}
>
> /* Remove the feature image */
> div.hero-primary section.featured.media-overlay {
> display: none;
> }
> /* Style up front page */
> div.hero-primary header {
> background-image:  
> url(http://www.landcareresearch.co.nz/__data/assets/image/0015/15504/6-Measuring-Biodiversity.jpg);
> background-size: cover;
> background-repeat: no-repeat;
> background-position: center;
> height: 185px; /* 185 = works in both IE and Firefox, 250=good,  
> 264=height of main background image */
> padding-top: 24px; /* originally was 42, but 24 works better in IE  
> at height 185 */
> padding-bottom: 24px;
> border-radius: 3px;
> font-size: 1.3em;
> font-weight: bold;
> color: white;
> text-shadow: 2px 2px 2px black;
> text-align: center;
> }
>
> Any ideas appreciated.
>
> Thanks
> Aaron
>
> ________________________________
>
> Please consider the environment before printing this email
> Warning: This electronic message together with any attachments is  
> confidential. If you receive it in error: (i) you must not read,  
> use, disclose, copy or retain it; (ii) please contact the sender  
> immediately by reply email and then delete the emails.
> The views expressed in this email may not be those of Landcare  
> Research New Zealand Limited. http://www.landcareresearch.co.nz
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev





More information about the ckan-dev mailing list