[Seaside] Images in a CSS style library

Pavel Krivanek squeak3 at continentalbrno.cz
Wed Apr 20 10:59:24 CEST 2005


Hi,

    I use this solution: I have my own WAKom subclass with special HTTP
request processing:

processHttpRequest: aRequest

    (aRequest url endsWithAnyOf: #( '.gif' '.jpg' '.htm' '.html' '.css'))
        ifTrue: [
            | img |
            img := StaticDocumentsRepository at: aRequest url allButFirst
ifAbsent: [ ^ nil ] .
            ^ HttpResponse fromStream: img readStream contentType:  ''  ].

        ^ self process: aRequest

-- Pavel

----- Original Message ----- 
From: "David Röthlisberger" <davidroe at bluewin.ch>
To: <seaside at lists.squeakfoundation.org>
Sent: Wednesday, April 20, 2005 10:45 AM
Subject: [Seaside] Images in a CSS style library


> Hello,
>
>
> I would like to know if it's possible to store images in a style library
> (subclass of WAStyleLibrary)? I know how to store images in the Squeak
> image, but is it also possible to refer to this image from within a CSS
> definition?
>
> So far we have something like this in the CSS style:
> ...
> background: url(http://foobar.com/images/header-logo.png) no-repeat;
> ...
>
> So the images are stored on a remote server from which they are loaded
into
> the website. Now we would like to have this header-logo.png directly in
the
> Squeak image, so we need a way to specify in the CSS definition the place
> where this picture is stored in the image. We would like to have a method
in
> our style library where the data of the image is stored as a byte array,
but
> how can we do the link to the CSS definition?
> Is this possible? Or is there any other way to store pictures in the
Squeak
> image and to refer to them via CSS?
>
>
> Kind regards,
> David
>
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
>



More information about the Seaside mailing list