1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-09 03:19:56 +00:00
TiddlyWiki5/core/wiki/macros
Mateusz Wilczek db6b4f17e8
Improve translink macro, fixes 4877 (#7425)
* Improve translink macro

Changes:
- Change styles to adapt colours to the current palette, instead of hard-coded white inside black box with grey borders.
- Simplify the design to a single div (inspired by the Community links on tiddlywiki.com), instead of two nested contrasting divs.

Comments:
- I found pre-border and pre-background to be the most consistently readable across the default palettes (better than relying on e.g. tiddler-border, tiddler-background, page-background, code-border, code-background). Cupertino Dark, Gruvbox Dark, Nord, Solar Flare, Spartan Day, Spartan Night, Spartan Day, and Twilight have same or very similar pre-border and pre-background colours, so if the macro is nested (translinking a tiddler that contains a translink), the inner frames are not distinguishable, but I think it's an acceptable edge case.
- Padding is defined separately for block and inline modes of the macro to make it appear consistent.

* Update translink macro

Change the `<h1>` styling so that it is only applied to the transcluded tiddler's title and not to any potential `<h1>` in its text.

* Update translink macro

Change the class-constructing filter so that the empty message is displayed with consistent padding in block mode.

* Update translink.tid

* Add styles for translink macro to vanilla/base.tid

Split `pre` element styling, to allow part of it be reused with `.tc-pre-border` (used by translink macro).
Add `.tc-big-bold` class under Other utility classes (used by translink macro).

* Update base.tid

Add `.tc-big-bold` class under Other utility classes (used by translink macro).

* Update translink.tid

Update `tc-pre-border` class name to match the one in vanilla/base.tid

* Update translink.tid

Simplify by always wrapping transclusion in `<p>` element (adjusts padding when inline mode or tiddler missing).

* Update translink.tid

Localise missing tiddler message (`$:/language/MissingTiddler/Hint`)

* Update vanilla/base.tid

- Modify class `tc-pre-background`, so that it can be applied to elements other than `pre`. The styling of `pre` remains unchanged, it is only split into two parts, for one part to be reused in the `tc-pre-background` class (used e.g. in translink macro).
- Add `tc-big-v-gap` and `tc-big-bold` in the *Other utility classes* section (used e.g. in translink macro).

* Update translink.tid

Improve styling to depend only on classes specified in vanilla/base.tid

* Update base.tid

Update class `tc-translink` and CSS selectors to make styling the translink macro easier

* Update translink.tid

Change the classes of elements, so that changing the style is possible by modifying the stylesheet only

* Update base.tid

Add selectors to support new inline mode in translink macro

* Update translink.tid

Change behaviour of the inline mode, now the whole macro is inline, not just the transcluded text.

* Update base.tid

Fix padding of tc-translink class to account for multiline inline content.

* Update base.tid

Remove pseudo-element parentheses from inline translink macro

* Update translink.tid

Add parentheses around inline macro
2023-05-10 21:57:15 +01:00
..
colour-picker.tid Trim Saga: I think this is the last batch (#6611) 2022-04-16 17:19:05 +01:00
copy-to-clipboard.tid Trim Saga: I think this is the last batch (#6611) 2022-04-16 17:19:05 +01:00
CSS.tid Revert "Give plugin authors the chance to extend a palette (#6624)" 2022-04-16 17:37:08 +01:00
diff.tid Trim saga: The big macros (#6269) 2022-04-01 12:09:59 +01:00
dumpvariables.tid Trim Saga: I think this is the last batch (#6611) 2022-04-16 17:19:05 +01:00
export.tid Fix ViewToolbar items inconsistent spacing (#5473) 2021-05-24 19:24:37 +01:00
image-picker.tid Trim Saga: Edit and View templates (#6276) 2022-03-26 14:16:01 +00:00
keyboard-driven-input.tid Make tag-picker and keyboard-driven-input macros human readable (#7118) 2023-01-19 20:44:00 +00:00
lingo.tid First pass at accessibility improvements for #650 2014-06-14 18:06:56 +01:00
list.tid Fully committing core to the $genesis widget (#7129) 2023-01-19 17:48:23 +00:00
tabs.tid Parameterised transclusions (#6666) 2023-04-19 11:55:25 +01:00
tag-picker.tid Make tag-picker and keyboard-driven-input macros human readable (#7118) 2023-01-19 20:44:00 +00:00
tag.tid Fix 6731 tag and field name trim (#6740) 2022-07-09 08:35:38 +01:00
thumbnails.tid Trim Saga: I think this is the last batch (#6611) 2022-04-16 17:19:05 +01:00
timeline.tid Make timeline macro more customisable (#5947) 2022-11-14 17:11:26 +00:00
toc.tid Small gap fix for the updated toc macro (alternative to tc-tiny-gap-left) (#7219) 2023-01-20 10:15:35 +00:00
translink.tid Improve translink macro, fixes 4877 (#7425) 2023-05-10 21:57:15 +01:00
tree.tid Trim Saga: Another batch of medium-sized files (#6270) 2022-03-26 15:19:04 +00:00
utils.tid Add/refactor PaletteManager (#3832) 2019-06-26 12:36:13 +01:00