suttacentral / legacy-suttacentral

Source code and related files (CSS, images, etc.) for SuttaCentral
http://suttacentral.net/
Other
14 stars 4 forks source link

"Language" pages are weird and have ill-formed CSS #159

Closed sujato closed 6 years ago

sujato commented 8 years ago

I didn't even know we had them, but we do. Pages like https://suttacentral.net/lzh list all the texts for a language. So that's handy, but they seem to include a weird bunch of texts chosen at random. Also, the styling is poor. If we are to keep them, they should work properly. So the first thing would be to ensure that they actually list all the texts.

As for styling, in the language.scss file, the scope is not properly restricted, so the rules apply elsewhere. For example, I noticed that the subdivisions in regular division tables had extra padding which inherited from the language file, so I removed it.

So we need to:

  1. Ensure that the scope of the language rules is restricted to the language pages.
  2. Fix the sucky CSS.

My suggestions:

Nix the text-transform, grey color, letter-spacing for all elements, and make subdivision and lower font-weight normal.

ghost commented 8 years ago

This better? screenshot from 2016-08-15 10-30-09

sujato commented 8 years ago

That looks great.

BTW, I'm just getting an error on these pages now.

ghost commented 8 years ago

I have changed it a little bit from the above screenshot. Mainly because the Division text (Digha Nikaya, etc) and it's css are also used on the next page (click on the Division to see the next page) and they use the same class. As it is somewhere in the python/jinja2 I have not actually found how to change this yet without changing the whole setup of how the language pages are formed. So I have made things a little bit different so both pages don't look too bad (I think anyway, you might not agree :-)).

I have changed the look of the pages as well to just reflect the main divisions on the first page, rather than list all the suttas for languages that do not have so many translations so it is more consistent. But I can change this back if you want.

This will work for most translations except for lzh, vn, en. This has something strange to do with Chinese Sekiya rule 52 not having any parallels (?) so it throws and error. I hope this will be solved when @blake-sc changes over to json.

It will also not work properly for the root languages like pali, sanskrit, chinese, tibetan, etc. where it only takes part of the texts. This has to do with the tree-structure so maybe it will also change automatically with the new json setup.

The polish page looks cool (https://suttacentral.net/pl) because it has a translation of the introduction page. Maybe we can ask some people (like LXNDR?) to translate into other languages too? But such an introduction would make the mentioning of the language at the top a bit redundant.

sujato commented 8 years ago

Generally this is looking better, thanks. I'd imagine it's probably best to wait before doing much more, as this interacts with both the new JSON and the i18n project.

Just one thing: never, ever use faux small caps. font-variant:small-caps produces artificially scaled fonts on all browsers, and it looks terrible. If you want to use small-caps, always use the dedicated fonts we supply with SC for exactly this purpose. In addition, as you can see in the relevant classes, small-caps always requires a small amount of letterspacing. See http://practicaltypography.com/small-caps.html

ghost commented 8 years ago

Yes, yes, I know .... I've fixed the small caps now.

And I really could not resist making this: https://suttacentral.net/nl Didn't realise how difficult it is to translate something in your own language ... I'm ashamed to admit I needed Google Translate. (OK, I left Holland over 20 years ago).

English site indeed works if I take out the <span class="add"><a id="sk97"> and <span class="add"><a id="sk52"> out of file lzh-dg-bu-pm.html. Something about no group found for the parallels. Same thing happens with Vietnamese. Other languages don't have translations of the Chinese Sekhiya rules.

sujato commented 8 years ago

Okay, looking good.