Fossil

View Ticket
Login

View Ticket

Ticket Hash: 49395d4e70940fb0591fb7b930a1a845c866fe9b
Title: Styling: Separate HTML and CSS files from C source
Status: Open Type: Feature_Request
Severity: Minor Priority:
Subsystem: Resolution: Open
Last Modified: 2014-06-09 16:17:45
Version Found In:
Description:
By separating the files required by the web UI it would be easier to implement fixes and improvements. Maybe the packaging of these files could happen in the build step instead of having strings of HTML in the C source?

ttmrichter added on 2010-07-10 06:07:24:
I have to agree with this. Every time I look at trying to amend or clean up any of the HTML/CSS stuff in Fossil I kind of shrink away because it's scattered everywhere. If the HTML/CSS stuff were in one place and treated like, say, a language resource file for i18n it would be easier to update, fix, amend, enhance, etc. Fossil's HTML/CSS handling.


eric added on 2010-07-10 09:50:07:
I think what you are asking for is, in effect, the creation or adoption of a templating language. This would make layout easier at the expense of making functionality changes more difficult (i.e. code _and_ template). A bad idea in my opinion.

CSS is already separate, and it would be good if every HTML object had a class attribute, but that's it.


ttmrichter added on 2010-07-10 10:46:20:
I'm not asking so much for a templating language as just having all the HTML and CSS in one place. Where the code currently has HTML fragments all over the place, I'm advocating keeping the HTML in a single documented resource file (perhaps just a C file with a bunch of named string variables or a hash map with well-known key names) so that it's easier to find the snippets and edit them as needed.

User Comments:
nobody added on 2014-05-08 12:30:00:

It's sad to see that this suggestion from 2010 has not been followed up on... Separating the HTML/CSS from code would have so many advantages, it's hard to know where to begin.

  • easier to build skins
  • easier to internationalise all strings in the interface
  • easier to update the web interface code when web interface standards change - i.e., add HTML5 elements, or use the latest css framework or javascript library
  • easier for in-house designers and non-programmers to tweak the web interface to suit their needs
  • enable user customisation of ALL content pages, individually (admin, tickets, timeline, wiki, etc.) - as opposed to being able to just fiddle with a generic 'header' and 'footer'

Right now, in 2014, the html/css output by Fossil is less-than-optimal: it is riddled with inline styles (very, very bad), uses table-based layout for most of its pages, and makes no use of widely accepted HTML5 elements.

Fossil is a GREAT piece of software, but the web GUI really need an update.


nobody added on 2014-06-09 16:17:45:
Agreed. It's sad to see that after four years, this is still open and pending, What happened to separation of concerns?