GenderDysphoria / GenderDysphoria.fyi

Site code
Other
224 stars 63 forks source link

Fancy <abbr> tag #97

Closed gjvnq closed 1 year ago

gjvnq commented 2 years ago

Added CSS to allow for fancy usage of the tag. Also added JS to show the term definition on click so that mobile users aren't left out.

Screen Shot 2022-05-30 at 11 41 27

ErdaradunGaztea commented 2 years ago

Ooooh, I like this one! Would use a lot for Polish translation, since we don't even have an abbreviation like AFAB/AMAB, so it's "o męskiej/żeńskiej płci przypisanej przy urodzeniu" everywhere and that's kinda long. I can volunteer to help with placing these in text (clean up some AFAB/AMAB placements, add HRT and others) if the proposal is accepted :)

I worry a little about printing GDB pages, since it's hard to print tooltips. Not to say it's a problem, I can see four more or less feasible solutions to that:

gjvnq commented 2 years ago

A glossary would be the best. However, of the abbreviations are explained when first introduced, the text as a whole is still readable without the tooltips.

An advantage of having a glossary is that it allows us to automatically introduce the tooltips without making them explicit on the markdown which for now requires a little HTML code every time the term is shown.

Perhaps we could write something like usually [AFABs](#) are ... in the markdown and have JS autoreplace these "fake links" with the <abbr> tag. Having them as links on the markdown will likely make scripting easier.

Twipped commented 2 years ago

This is something I've been wanting to do for a long time, but wanted to automate it against a proper glossary catalog. There is an ABBR plugin for markdown-it that we could tie in. https://github.com/markdown-it/markdown-it-abbr

gjvnq commented 2 years ago

This is something I've been wanting to do for a long time, but wanted to automate it against a proper glossary catalog. There is an ABBR plugin for markdown-it that we could tie in. https://github.com/markdown-it/markdown-it-abbr

That is great and will probaby make the whole thing easier.

gjvnq commented 2 years ago

This pull request is unecessary if #100 is merged,

Twipped commented 1 year ago

Closing this in favor of #100.