[lxml-dev] New CSS style for the lxml website @ codespeak
Hi list, As I found the current style a bit "too big" I refactored the css to get this: http://champiland.homelinux.net/lxml-newstyle/ If you like it I can check that in the svn. I enclose a patch to list the changes. To Stefan: your work on mail.txt has been done only in branch/lxml-0.9.x and not in trunk. Is it intentional? + it would be nice if your changes could went online. Who is in charge of the publishing process? Regards, -- Olivier Index: style.css =================================================================== --- style.css (revision 27205) +++ style.css (working copy) @@ -1,33 +1,62 @@ body { + /* CSS Hack for IE that does not respect the "margin: auto" rule at the + * document level */ + text-align: center; + padding: 1em; +} + +div.document { + width: 45em; + font: 13px Arial, Verdana, Helvetica, sans-serif; + margin: 1em auto 1em auto; + background-color: white; + color: #222; + text-align: left; +} + +h1.title { background: url(http://codespeak.net/img/codespeak1b.png) no-repeat; - font: 120% Arial, Verdana, Helvetica, sans-serif; - border: 0; - margin: 0.5em 0em 0.5em 0.5em; - padding: 0 0 0 145px; + padding: 20px 0 0 180px; + height: 60px; + font-size: 200%; } -a { - text-decoration: underline; - background-color: transparent; +h1, h2, h3 { + color: #333; + font-weight: bold; } -p { - /*margin: 0.5em 0em 1em 0em;*/ - text-align: left; - line-height: 1.5em; - margin: 0.5em 0em 0em 0em; +h1 { + font-size: 120%; } -p a { - text-decoration: underline; +h2 { + font-size: 110%; } +h3 { + font-size: 105%; +} -p a:active { - color: Red; +a, a:visited { background-color: transparent; + font-weight: bold; + color: Black; + text-decoration: none; } +a:active { + color: Red; + text-decoration: underline; +} + +p { + /*margin: 0.5em 0em 1em 0em;*/ + text-align: justify; + line-height: 1.5em; + margin: 0.5em 0em 0em 0em; +} + hr { clear: both; height: 1px; @@ -35,10 +64,8 @@ background-color: transparent; } - -ul { +ul { line-height: 1.5em; - /*list-style-image: url("bullet.gif"); */ margin-left: 1em; } @@ -47,28 +74,21 @@ margin-left: 0em; } -ul a, ol a { - text-decoration: underline; -} - blockquote { font-family: Times, "Times New Roman", serif; font-style: italic; - font-size: 120%; } code { - font-size: 120%; color: Black; - /*background-color: #dee7ec;*/ background-color: #cccccc; + font-family: Courier, monospace; } pre { - font-size: 120%; - padding: 1em; + padding: 0.5em; border: 1px solid #8cacbb; color: Black; - background-color: #dee7ec; background-color: #cccccc; + font-family: Courier, monospace; } Index: publish.py =================================================================== --- publish.py (revision 27205) +++ publish.py (working copy) @@ -1,9 +1,12 @@ -import os, sys +import os, shutil, sys def publish(dirname, lxml_path, release): if not os.path.exists(dirname): os.mkdir(dirname) - stylesheet_url = 'http://codespeak.net/lxml/style.css' + stylesheet_url = 'style.css' + + shutil.copy(stylesheet_url, dirname) + for name in ['main.txt', 'intro.txt', 'api.txt', 'compatibility.txt', 'extensions.txt', 'namespace_extensions.txt', 'sax.txt']: path = os.path.join(lxml_path, 'doc', name) @@ -22,10 +25,10 @@ os.path.join(dirname, 'index.html')) def rest2html(source_path, dest_path, stylesheet_url): - - command = ('rest2html --stylesheet=%s %s > %s' % + + command = ('rest2html --stylesheet=%s --link-stylesheet %s > %s' % (stylesheet_url, source_path, dest_path)) os.system(command) - + if __name__ == '__main__': publish(sys.argv[1], sys.argv[2], sys.argv[3])
Olivier Grisel wrote:
As I found the current style a bit "too big" I refactored the css to get this:
http://champiland.homelinux.net/lxml-newstyle/
If you like it I can check that in the svn. I enclose a patch to list the changes.
Cool, I like them! Feel free to check them in, unless Stefan objects.
To Stefan: your work on mail.txt has been done only in branch/lxml-0.9.x and not in trunk. Is it intentional? + it would be nice if your changes could went online. Who is in charge of the publishing process?
I am, but I haven't been able to keep up with Stefan as well as I should. I think I should arrange for some other people to have access to the lxml web directory as well; running the website generation script isn't hard so I can easily explain what I do. Regards, Martijn
Martijn Faassen a écrit :
Olivier Grisel wrote:
As I found the current style a bit "too big" I refactored the css to get this:
http://champiland.homelinux.net/lxml-newstyle/
If you like it I can check that in the svn. I enclose a patch to list the changes.
Cool, I like them! Feel free to check them in, unless Stefan objects.
Done.
To Stefan: your work on mail.txt has been done only in branch/lxml-0.9.x and not in trunk. Is it intentional? + it would be nice if your changes could went online. Who is in charge of the publishing process?
I am, but I haven't been able to keep up with Stefan as well as I should. I think I should arrange for some other people to have access to the lxml web directory as well; running the website generation script isn't hard so I can easily explain what I do.
Yes I have used that script after having removed the hardcoded reference to the style.css url to be able to run the script on my personal webserver. -- Olivier
Hey, Stefan, shall I rerun the script so we get the new layout? Does the 0.9 branch have the changes to the text you made as well or is this only the trunk? Regards, Martijn
Hi Olivier, Olivier Grisel wrote:
As I found the current style a bit "too big" I refactored the css to get this: http://champiland.homelinux.net/lxml-newstyle/ If you like it I can check that in the svn. I enclose a patch to list the changes.
Thanks for working on that. However, I generally dislike web pages that try to tell me what size I should have used for the browser window. For example, it doesn't always work for the code exampled, which can exceed the provisioned width (although this may mean we'd better fix the examples). And I find it very irritating that headlines and links look the same. I'd be happy if you could fix that. The original style wasn't that bad, although it may be enough to underline the links in the new style.
To Stefan: your work on mail.txt has been done only in branch/lxml-0.9.x and not in trunk. Is it intentional?
As the branch represents the latest official version (both of lxml and the web pages), I find it more important to have the web pages up-to-date there. I wanted to merge the changes into the trunk later on, but I had conflicts, so I decided to wait until after my vacation. Stefan
Hi Martijn, Martijn Faassen wrote:
Stefan, shall I rerun the script so we get the new layout?
I'd prefer seeing some changes as I mentioned in my previous post, before going online with the new pages. The right place to update the styles and all that is currently the 0.9.x branch, as it contains the current version of the web site.
Does the 0.9 branch have the changes to the text you made as well or is this only the trunk?
The web pages in the 0.9.x branch should be consistent with version 0.9.2. The pages in the trunk contain changes that reflect code changes in the trunk, however, some of the design updates from the branch are not yet in the trunk. I'll merges them as soon as I find the time. Stefan
Stefan Behnel a écrit :
Hi Olivier,
Olivier Grisel wrote:
As I found the current style a bit "too big" I refactored the css to get this: http://champiland.homelinux.net/lxml-newstyle/ If you like it I can check that in the svn. I enclose a patch to list the changes.
Thanks for working on that. However, I generally dislike web pages that try to tell me what size I should have used for the browser window. For example, it doesn't always work for the code exampled, which can exceed the provisioned width (although this may mean we'd better fix the examples).
The style I wrote takes care of having the main content width remain approximately constant in terms of number of characters. Try to resize the fonts in your browser window with ctrl-scroll wheel to see what I mean. I tend to dislike website with a lot of textual content to spread horizontally having more than 20 words on a line. That makes it really difficult to read. Most blog or newspaper sites with textual content do not spread the text too much horizontally to not hurt the readers eyes. The examples should be resized to 79 chars max (as all source code should) in order to both enhance readability and match the CSS style assumptions. If you still disagree, I can set the column width to some 80% value for instance instead of an "em" based value.
And I find it very irritating that headlines and links look the same. I'd be happy if you could fix that. The original style wasn't that bad, although it may be enough to underline the links in the new style.
I find underlined links a bit to heavy as well but I agree headlines and links are too similars. I'll give it another try tonight.
To Stefan: your work on mail.txt has been done only in branch/lxml-0.9.x and not in trunk. Is it intentional?
As the branch represents the latest official version (both of lxml and the web pages), I find it more important to have the web pages up-to-date there. I wanted to merge the changes into the trunk later on, but I had conflicts, so I decided to wait until after my vacation.
Ok. -- Olivier
Olivier Grisel a écrit :
Stefan Behnel a écrit :
And I find it very irritating that headlines and links look the same. I'd be happy if you could fix that. The original style wasn't that bad, although it may be enough to underline the links in the new style.
I find underlined links a bit to heavy as well but I agree headlines and links are too similar. I'll give it another try tonight.
Done: http://champiland.homelinux.net/lxml-newstyle/ Headlines are a bit bigger, in gray and use Helvetica instead of Arial. -- Olivier
Salut Olivier, Olivier Grisel wrote:
Olivier Grisel a écrit :
Stefan Behnel a écrit :
And I find it very irritating that headlines and links look the same. I'd be happy if you could fix that. The original style wasn't that bad, although it may be enough to underline the links in the new style. I find underlined links a bit to heavy as well but I agree headlines and links are too similar. I'll give it another try tonight.
Done:
http://champiland.homelinux.net/lxml-newstyle/
Headlines are a bit bigger, in gray and use Helvetica instead of Arial.
Thanks, that's *much* better. One little thing: headlines get underlined when the mouse touches them. That's the infamous "<a href" != "<a name" problem... So, if you want to commit it to the branch now, you're welcome. Please tell Martijn to upload the pages when you're done. Stefan
Stefan Behnel a écrit :
Salut Olivier,
Hallo Stefan :)
http://champiland.homelinux.net/lxml-newstyle/
Headlines are a bit bigger, in gray and use Helvetica instead of Arial.
Thanks, that's *much* better. One little thing: headlines get underlined when the mouse touches them. That's the infamous "<a href" != "<a name" problem...
So, if you want to commit it to the branch now, you're welcome. Please tell Martijn to upload the pages when you're done.
Done. All changes occurred in lxml/www/style.css and lxml/www/publish.py thus above the branch/trunk separation. So, Martjin you can upload the new style website by using the script as follows: $ cd lxml/www $ python publish.py target_dir ../branches/lxml-0.9.x 0.9.2 (As far as I understand how it works ...) -- Olivier
participants (3)
-
Martijn Faassen
-
Olivier Grisel
-
Stefan Behnel