suttacentral / legacy-suttacentral

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

Styling of variant readings #149

Closed sujato closed 8 years ago

sujato commented 8 years ago

There are some infelicities in the styling of the variant readings popup.

ghost commented 8 years ago

Can you be a bit more specific as to what exactly is the "variant readings popup"? I'm sure all the terminology is known to you and Blake, but not to me.

sujato commented 8 years ago

when there's a highlighted span class="var", you hover and a popup comes up with the variant readings.

It's table class="deets"

Looking more closely, there are two distinct problems.

The simple one is the vertical alignment. This is in the CSS. .sutta ul is adding a padding of 1.5 em to the bottom. I think it is inheriting this from the list styles in the main sutta body, so we just need a specific override for the CSS in the popups.

The more complex problem is with the horizontal alignment. When I saw this earlier I assumed that there had been a glitch in the CSS, but it seems this is not so, because it does not apply to all entries. Have a look at AN 7.53. With Textual Information on, there's various variant readings. For the first several entries, there's no problem with the horizontal alignment.

But if you go further down, to SC 6, the headwords start to butt up against the edge of the popup, the padding has vanished. I've checked the HTML of the source, it seems to be fine.

But I guess it's no coincidence that one of these entries, for puññañca puññamahī ca taṃ, has a complex markup that is not properly parsed by the JS. As you can see, the information in the popup is not properly formed. I guess the JS for the popups is breaking somehow, and that affects the entries around it. Anyway, have a look, but this may be a job for Blake, as he wrote the script.

sujato commented 8 years ago

I just noticed another instance of this here https://suttacentral.net/pi/pi-tv-kd6#84

Although, come to think of it, this bug will probably become irrelevant under our new data scheme.

ghost commented 8 years ago

I have changed the css and this looks better now.

In AN 7.53 I changed the html to <span class="var" title="puññaṃ hi taṃ (sī , pā1) | puññaṃ puññamahitaṃ (syā1-3) | puññaṃ vā puññamahī vā (ka-ma)" id="note106">. It had commas instead of | which was incorrect. But should things like syā1-3, ka-ma, sī , pā1 not be pointing to something? This happens elsewhere as well: an10.176#10, an4.191#4 for instance.

What I mean is that for instance with the word Etañceva, the html is: <span class="var" title="etañca (bj, pts1) | evañca (s1-3)" id="note104">. Here (bj, pts1) is completed by the js as:

Buddhajayantītripiṭakagranthamālā 2501–2531 (1957–1989)
Pali Text Society 1st ed. 2424–2535 (1881–1992)
sujato commented 8 years ago

Thanks Ayya. As far as the styling goes, there is too much vertical padding. I think the following will fix it: .var table.deets ul, .cross table.deets ul{padding:0}

The more complex problem is the naming of the texts. You are right, each of the texts should be pointing to the correct manuscript name. It appears that when Blake prepared these he did not get all of them right (presumably in complex cases such as this the regex failed). I did a quick search and found 37 instances of one manuscript, so there is a reasonable number.

What we need to do is ensure that these numbers are corrected across the board in the pali texts. The SC IDs are in manuscripts.csv. We changed the abbreviations found in the MS edition. I have a file with these, I'll send you.

ghost commented 8 years ago

Done the styling. Will update the expansion-uid list tomorrow.

ghost commented 8 years ago

The popups should now expand to the right text. Please check if these are OK:

        'sī': ["Bj", "Buddhajayantītripiṭakagranthamālā 2501–2531 (1957–1989)"],
        'pā1': ["PTS 1", "Pali Text Society 1st ed. 2424–2535 (1881–1992)"],
        'pā2': ["PTS 2", "Pali Text Society 2nd ed. 2517–2541 (1974–1998)"],
        'syā1-3': ["S 1-3", "Chulachomklao Pāḷi Tipiṭaka 2436 (1893), Syāmaraṭṭhassa Tepiṭakaṃ 2469–2471 (1926–1928) & 2538 (1995)"], 
        'syā1': ["S 1", "Chulachomklao Pāḷi Tipiṭaka 2436 (1893)"],
        'syā2': ["S 2", "Syāmaraṭṭhassa Tepiṭakaṃ 2469–2471 (1926–1928)"],
        'syā3': ["S 3", "Syāmaraṭṭhassa Tepiṭakaṃ 2538 (1995)"], 
        'ka-ma': ["Mr", "Maramma Tipiṭaka 2541 (1997)"],
        'cha1': ["C1", "Chaṭṭhasaṅgīti Piṭakaṃ 2496–2499 (1952–1955)"],
        'cha2': ["C2", "Chaṭṭhasaṅgīti Piṭakaṃ 2nd ed. 2500–2506 (1956–1962)"],
        'cha3': ["C3", "Chaṭṭhasaṅgīti Piṭakaṃ (1997)"],
        'ka-sī': ["Si", "Sinhala Tipiṭaka 2501 (1957)"],
ghost commented 8 years ago

@Sujato - Can this issue be closed?