Repository navigation
Commit 39eab2f
authored
feat: add target and rel to website listing links (#15269)
Listings and listing items now accept `target` and `rel`, with the same
meaning as on navbar and sidebar items. A listing-level value applies to
all its items, and an item value wins. A new-tab target without `rel`
defaults to `noopener`.
- Default, grid and table listings build link attributes from one
helper, `listing.utilities.targetAttrs(item)`. Feeds and custom
templates ignore both options.
- With `table-hover`, a row click on an item with a target clicks the
row's link, so the browser applies its `target` and `rel`.
- `encodeAttributeValue` escaped only the first match of each character
and double-escaped `&`, which broke `image-alt` values containing
quotes. It now escapes every character once, and table links escape
the item path too.
- `link-external-newwindow` no longer overrides a `target` set
explicitly on a link.
- Every link that opens a new tab gets the "(opens in a new tab)"
description, not only links the option opened.
See #12276
See #9469
See quarto-dev/quarto-web#23381 parent 664486a commit 39eab2f
31 files changed
Lines changed: 625 additions & 38 deletions
File tree
- news
- src
- core
- project/types/website/listing
- resources
- editor/tools
- yaml
- formats/html/templates
- projects/website/listing
- schema
- types
- zod
- tests
- docs/playwright/listings
- external-links
- link-target
- integration/playwright/tests
- unit/core
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
3 | 7 | | |
4 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
5 | 13 | | |
6 | 14 | | |
7 | 15 | | |
| |||
11 | 19 | | |
12 | 20 | | |
13 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
14 | 29 | | |
15 | 30 | | |
16 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 18 | + | |
22 | 19 | | |
23 | 20 | | |
24 | 21 | | |
| |||
72 | 69 | | |
73 | 70 | | |
74 | 71 | | |
| 72 | + | |
75 | 73 | | |
76 | 74 | | |
77 | 75 | | |
78 | 76 | | |
79 | 77 | | |
| 78 | + | |
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
| |||
600 | 599 | | |
601 | 600 | | |
602 | 601 | | |
603 | | - | |
| 602 | + | |
604 | 603 | | |
605 | 604 | | |
606 | 605 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
| |||
173 | 177 | | |
174 | 178 | | |
175 | 179 | | |
| 180 | + | |
| 181 | + | |
176 | 182 | | |
177 | 183 | | |
178 | 184 | | |
| |||
216 | 222 | | |
217 | 223 | | |
218 | 224 | | |
| 225 | + | |
| 226 | + | |
219 | 227 | | |
220 | 228 | | |
221 | 229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
311 | 313 | | |
312 | 314 | | |
313 | 315 | | |
| 316 | + | |
| 317 | + | |
314 | 318 | | |
315 | 319 | | |
316 | 320 | | |
| |||
394 | 398 | | |
395 | 399 | | |
396 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
397 | 414 | | |
398 | 415 | | |
399 | 416 | | |
| |||
404 | 421 | | |
405 | 422 | | |
406 | 423 | | |
407 | | - | |
408 | | - | |
409 | | - | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
410 | 427 | | |
411 | 428 | | |
412 | 429 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11002 | 11002 | | |
11003 | 11003 | | |
11004 | 11004 | | |
| 11005 | + | |
| 11006 | + | |
| 11007 | + | |
| 11008 | + | |
| 11009 | + | |
| 11010 | + | |
| 11011 | + | |
| 11012 | + | |
| 11013 | + | |
| 11014 | + | |
11005 | 11015 | | |
11006 | 11016 | | |
11007 | 11017 | | |
| |||
11015 | 11025 | | |
11016 | 11026 | | |
11017 | 11027 | | |
11018 | | - | |
| 11028 | + | |
| 11029 | + | |
| 11030 | + | |
| 11031 | + | |
| 11032 | + | |
| 11033 | + | |
| 11034 | + | |
| 11035 | + | |
| 11036 | + | |
| 11037 | + | |
| 11038 | + | |
11019 | 11039 | | |
11020 | 11040 | | |
11021 | 11041 | | |
| |||
22790 | 22810 | | |
22791 | 22811 | | |
22792 | 22812 | | |
| 22813 | + | |
| 22814 | + | |
| 22815 | + | |
| 22816 | + | |
22793 | 22817 | | |
22794 | 22818 | | |
22795 | 22819 | | |
| |||
25824 | 25848 | | |
25825 | 25849 | | |
25826 | 25850 | | |
25827 | | - | |
| 25851 | + | |
25828 | 25852 | | |
25829 | 25853 | | |
25830 | 25854 | | |
25831 | 25855 | | |
25832 | | - | |
| 25856 | + | |
25833 | 25857 | | |
25834 | 25858 | | |
25835 | 25859 | | |
| |||
25845 | 25869 | | |
25846 | 25870 | | |
25847 | 25871 | | |
25848 | | - | |
| 25872 | + | |
25849 | 25873 | | |
25850 | 25874 | | |
25851 | 25875 | | |
| |||
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3975 | 3975 | | |
3976 | 3976 | | |
3977 | 3977 | | |
| 3978 | + | |
| 3979 | + | |
| 3980 | + | |
| 3981 | + | |
| 3982 | + | |
| 3983 | + | |
| 3984 | + | |
| 3985 | + | |
| 3986 | + | |
| 3987 | + | |
3978 | 3988 | | |
3979 | 3989 | | |
3980 | 3990 | | |
| |||
3988 | 3998 | | |
3989 | 3999 | | |
3990 | 4000 | | |
3991 | | - | |
| 4001 | + | |
| 4002 | + | |
| 4003 | + | |
| 4004 | + | |
| 4005 | + | |
| 4006 | + | |
| 4007 | + | |
| 4008 | + | |
| 4009 | + | |
| 4010 | + | |
| 4011 | + | |
3992 | 4012 | | |
3993 | 4013 | | |
3994 | 4014 | | |
| |||
15763 | 15783 | | |
15764 | 15784 | | |
15765 | 15785 | | |
| 15786 | + | |
| 15787 | + | |
| 15788 | + | |
| 15789 | + | |
15766 | 15790 | | |
15767 | 15791 | | |
15768 | 15792 | | |
| |||
18797 | 18821 | | |
18798 | 18822 | | |
18799 | 18823 | | |
18800 | | - | |
| 18824 | + | |
18801 | 18825 | | |
18802 | 18826 | | |
18803 | 18827 | | |
18804 | 18828 | | |
18805 | | - | |
| 18829 | + | |
18806 | 18830 | | |
18807 | 18831 | | |
18808 | 18832 | | |
| |||
18818 | 18842 | | |
18819 | 18843 | | |
18820 | 18844 | | |
18821 | | - | |
| 18845 | + | |
18822 | 18846 | | |
18823 | 18847 | | |
18824 | 18848 | | |
| |||
0 commit comments