Agreed. This is what I ended up doing. Thanks for the ideas all.

On Mon, May 10, 2010 at 3:28 PM, Jeremy Thomerson <jer...@wickettraining.com
> wrote:

> Instead of doing this, use cascading stylesheets like they were intended to
> be used:
>
> In both applications, have a "global.css" or similar that handles all of
> the
> layout, etc, that is common to both sites.
>
> Then, in each application, include a "appXYZ.css" that simply changes
> colors, background images, etc, that you would presumably be doing on a
> per-site basis.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Mon, May 10, 2010 at 7:17 AM, Eric Hamel <dantehick...@gmail.com>
> wrote:
>
> > Good Point. In all honesty, I'm looking for a practical way to "skin" 2
> > applications which are identical layout wise. Inherently, I don't want to
> > manage 2 different stylesheets as that will lead to maintenance hell.
> >
> > The idea was to build a Template implemented in both applications to
> which
> > I
> > would override/pass to the template
> > colors/background-colors/background-image. Might not be the best
> > approach...
> >
> > On Sat, May 8, 2010 at 3:42 AM, Chris Colman
> > <chr...@stepaheadsoftware.com>wrote:
> >
> > > That method of css generation you propose would be generating CSS (even
> > > if it were into a separate .css file) with each page render. If you're
> > > dealing with a lot of CSS that probably isn't the most efficient
> method.
> > >
> > > Generating CSS at render time would mean the browser could not take
> > > advantage of CSS caching - which would be bad in these days of quite
> > > large CSS files.
> > >
> > > You might be better off considering a separate CSS generator that
> > > doesn't generate CSS at 'page render time'.
> > >
> > >
> > > >-----Original Message-----
> > > >From: Eric Hamel [mailto:dantehick...@gmail.com]
> > > >Sent: Saturday, 8 May 2010 5:52 AM
> > > >To: users@wicket.apache.org
> > > >Subject: CSS Templating
> > > >
> > > >All,
> > > >
> > > >I've been exploring the use of TextTemplateHeaderContributor.forCss
> > > method
> > > >to build a CSS template for multiple application.
> > > >
> > > >Take for example:
> > > >
> > > >IModel<Map<String, Object>> model = new
> > > >AbstractReadOnlyModel<Map<String,Object>>(){
> > > >
> > > >private static final long serialVersionUID = 1L;
> > > >
> > > >@Override
> > > >public Map<String, Object> getObject() {
> > > > HashMap<String,Object> map = new HashMap<String, Object>();
> > > >map.put("body-bgcolor", "red");
> > > > return map;
> > > >}
> > > >
> > > >};
> > > > add(TextTemplateHeaderContributor.forCss(WelcomePage.class,
> > > >"Template.css",
> > > >model));
> > > >
> > > >with CSS template:
> > > >
> > > >body{
> > > >
> > > >background-color: ${body-bgcolor};
> > > >
> > > >}
> > > >
> > > >
> > > >
> > > >The output works. However, the template is contributing to the header
> > > in
> > > >the
> > > >form of:
> > > >
> > > ><style type="text/css"><!-- body{ background-color: red; }--></style>
> > > >
> > > >which is unacceptable. Is there a way to generate a .css file to be
> > > used by
> > > >the application ?
> > > >
> > > >Thank you
> > > >
> > > >--
> > > >Sent by Eric Hamel
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> >
> >
> > --
> > Sent by Eric Hamel
> >
>



-- 
Sent by Eric Hamel

Reply via email to