New homepage design of d-p-l.org is now live. <eom>

Adam D. Ruppe destructionator at gmail.com
Fri Dec 16 11:19:20 PST 2011


On Friday, 16 December 2011 at 18:28:07 UTC, Nick Sabalausky 
wrote:
> I've started going back to <b> and <i>. Why?

I find this generally sane, but I can't agree with D. (lol)

> And seriously, who's going to be applying a custom stylesheet 
> to my pages?

My work D project recently brought on a new designer. Unlike
the old designer who would mock it up and send me a picture,
the new guy actually edits the site himself.

But, he doesn't have access to all the html, and what he does
have access to, I don't want him to edit anyway.

He restyles the whole site through css; applying a custom
stylesheet to my page. (He, and the boss, fought this for
a while, but I think they are seeing the benefits of my
approach since I pushed back on it.)


It works quite well - the html I output doesn't have to change
for each client, so adding new content doesn't require any
repetition. We just do another stylesheet adjustment. The
same html can be dropped in many places too.

When they wanted the news added to the sidebar, I just said
document.requireElementById("sidebar-new-holder").appendChild(
  getNews().toHtmlElement());

and the sidebar css adjusted it; I didn't have to write new
queries or templates. Very convenient.




The important thing though is to make sure the html describes
the data well. Once you put in any kind of presentation in there,
you break this approach.

class="red" no no, what if it's a blue theme?

class="brand-name" there we go.

class="grid" no no, what if we want it in a linear column?

class="news-item" there we go.

and so on; the html describes the data in as much detail as is
reasonable and the css makes the rest work.


More information about the Digitalmars-d-announce mailing list