|
38 | 38 | siteName={getPageTitle(undefined, page.data.siteName)} |
39 | 39 | /> |
40 | 40 |
|
41 | | -<article class="mx-auto mt-8 mb-12 w-7xl p-4 sm:px-6"> |
| 41 | +<article class="@container mx-auto mt-8 mb-12 w-full max-w-7xl p-4 sm:px-6"> |
42 | 42 | {#if data.locale === 'en'} |
43 | 43 | <EnContent /> |
44 | 44 | {:else} |
45 | 45 | <SvContent /> |
46 | 46 | {/if} |
47 | | - <table class="mt-2 w-full"> |
48 | | - <thead class="border-b border-gray-300"> |
49 | | - <tr class="[&>th]:p-3 [&>th]:text-left [&>th]:align-top"> |
50 | | - <th>{page.data.t('help.keyword')}</th> |
51 | | - <th>{page.data.t('help.description')}</th> |
52 | | - </tr> |
53 | | - </thead> |
54 | | - <tbody class="divide-y divide-gray-300 [&>tr>td]:p-3 [&>tr>td]:text-left [&>tr>td]:align-top"> |
55 | | - {#each data.filterDefs as f (f.key)} |
56 | | - <tr id={f.key}> |
57 | | - <td> |
58 | | - <button |
59 | | - class="qualifier text-body bg-accent-50 text-2xs hover:bg-accent-100 inline-block min-h-8 min-w-9 shrink-0 rounded-md px-1.5 font-medium whitespace-nowrap first-letter:capitalize" |
60 | | - onclick={() => addQualifierKey(f.key)} |
| 47 | + <div role="table" class="@container mt-2"> |
| 48 | + <!-- Header row --> |
| 49 | + <div |
| 50 | + role="row" |
| 51 | + class="sr-only border-b border-gray-300 @3xl:not-sr-only @3xl:grid |
| 52 | + @3xl:grid-cols-[1fr_2fr_1.5fr_1fr] @3xl:gap-x-4" |
| 53 | + > |
| 54 | + <div id="filter-header" role="columnheader" class="p-3 font-medium"> |
| 55 | + {page.data.t('help.filter')} |
| 56 | + </div> |
| 57 | + <div id="description-header" role="columnheader" class="p-3 font-medium"> |
| 58 | + {page.data.t('help.description')} |
| 59 | + </div> |
| 60 | + <div id="searchin-header" role="columnheader" class="p-3 font-medium"> |
| 61 | + {page.data.t('help.searchIn')} |
| 62 | + </div> |
| 63 | + <div id="code-header" role="columnheader" class="p-3 font-medium"> |
| 64 | + {page.data.t('help.code')} |
| 65 | + </div> |
| 66 | + </div> |
| 67 | + |
| 68 | + {#each data.filterGroups as g, i (i)} |
| 69 | + <div role="rowgroup" aria-label={g.label}> |
| 70 | + {#if g.label || g.filterGroupDescription} |
| 71 | + <div role="row" class="border-b border-gray-300 bg-neutral-100 px-4 py-3"> |
| 72 | + {#if g.label} |
| 73 | + <div role="columnheader" aria-colspan="4" class="font-semibold"> |
| 74 | + {g.label} |
| 75 | + </div> |
| 76 | + {/if} |
| 77 | + |
| 78 | + {#if g.filterGroupDescription} |
| 79 | + <div class="text-2s text-subtle pt-2 whitespace-pre-line"> |
| 80 | + {g.filterGroupDescription} |
| 81 | + </div> |
| 82 | + {/if} |
| 83 | + </div> |
| 84 | + {/if} |
| 85 | + |
| 86 | + {#each g.filters as f (f.key)} |
| 87 | + <div |
| 88 | + role="row" |
| 89 | + id={f.key} |
| 90 | + class="border-b border-gray-300 py-4 |
| 91 | + @3xl:grid |
| 92 | + @3xl:grid-cols-[1fr_2fr_1.5fr_1fr] |
| 93 | + @3xl:gap-x-4 |
| 94 | + @3xl:py-0" |
| 95 | + > |
| 96 | + <!-- Filter --> |
| 97 | + <div |
| 98 | + role="rowheader" |
| 99 | + id={`row-${f.key}`} |
| 100 | + aria-labelledby="filter-header row-{f.key}" |
| 101 | + class="min-w-0 p-3" |
61 | 102 | > |
62 | | - {f.label} |
63 | | - </button> |
64 | | - <ul class="mt-2 font-mono"> |
65 | | - <li class="text-xs">{f.key}</li> |
66 | | - {#each f.queryCodes as q (q)} |
67 | | - <li class="text-subtle text-xs">{q}</li> |
68 | | - {/each} |
69 | | - </ul> |
70 | | - </td> |
71 | | - <td class={['grid grid-cols-1 gap-3 sm:grid-cols-2']}> |
72 | | - <div> |
73 | | - <span class="whitespace-pre-line">{f.filterDescription}</span> |
| 103 | + <div class="mb-1 text-xs font-medium text-neutral-500 @3xl:hidden"> |
| 104 | + {page.data.t('help.filter')} |
| 105 | + </div> |
| 106 | + |
| 107 | + <button |
| 108 | + class="qualifier text-body bg-accent-50 text-2xs hover:bg-accent-100 inline-block min-h-8 min-w-9 shrink-0 rounded-md px-1.5 font-medium whitespace-nowrap first-letter:capitalize" |
| 109 | + onclick={() => addQualifierKey(f.key)} |
| 110 | + > |
| 111 | + {f.label} |
| 112 | + </button> |
| 113 | + </div> |
| 114 | + |
| 115 | + <!-- Description --> |
| 116 | + <div |
| 117 | + role="cell" |
| 118 | + aria-labelledby={`description-header row-${f.key}`} |
| 119 | + class="min-w-0 p-3" |
| 120 | + > |
| 121 | + <div class="mb-1 text-xs font-medium text-neutral-500 @3xl:hidden"> |
| 122 | + {page.data.t('help.description')} |
| 123 | + </div> |
| 124 | + |
| 125 | + <span class="whitespace-pre-line"> |
| 126 | + {f.filterDescription} |
| 127 | + </span> |
| 128 | + |
74 | 129 | {#if f.descriptionRemark} |
75 | 130 | <div class="mt-4"> |
76 | 131 | {#each f.descriptionRemark as remark, i (i)} |
|
81 | 136 | </div> |
82 | 137 | {/if} |
83 | 138 | </div> |
84 | | - {#if f.propertyChainAxiom} |
85 | | - <div> |
86 | | - <span class="text-2s text-subtle">{page.data.t('help.searchIn')}</span> |
| 139 | + |
| 140 | + <!-- Search in --> |
| 141 | + <div role="cell" aria-labelledby={`searchin-header row-${f.key}`} class="min-w-0 p-3"> |
| 142 | + <div class="mb-1 text-xs font-medium text-neutral-500 @3xl:hidden"> |
| 143 | + {page.data.t('help.searchIn')} |
| 144 | + </div> |
| 145 | + |
| 146 | + {#if f.propertyChainAxiom} |
87 | 147 | <ul> |
88 | 148 | {#each f.propertyChainAxiom as p (p)} |
89 | 149 | <li class="text-s">{p.label}</li> |
90 | | - <li class="text-2xs text-subtle mb-2 font-mono">{p.path}</li> |
| 150 | + <li class="text-2xs text-subtle mb-2 font-mono [overflow-wrap:anywhere]"> |
| 151 | + {p.path} |
| 152 | + </li> |
91 | 153 | {/each} |
92 | 154 | </ul> |
| 155 | + {/if} |
| 156 | + </div> |
| 157 | + |
| 158 | + <!-- Code --> |
| 159 | + <div role="cell" aria-labelledby={`code-header row-${f.key}`} class="min-w-0 p-3"> |
| 160 | + <div class="mb-1 text-xs font-medium text-neutral-500 @3xl:hidden"> |
| 161 | + {page.data.t('help.code')} |
93 | 162 | </div> |
94 | | - {/if} |
95 | | - </td> |
96 | | - </tr> |
97 | | - {/each} |
98 | | - </tbody> |
99 | | - </table> |
100 | | - <!-- |
101 | | - {#each data.filters as f (f['@id'])} |
102 | | - <pre>{JSON.stringify(f, null, 2)}</pre> |
103 | | - {/each} |
104 | | - {#each data.filterDefs as f (f.key)} |
105 | | - <pre>{JSON.stringify(f, null, 2)}</pre> |
106 | | - {/each} |
107 | | - --> |
| 163 | + |
| 164 | + <ul class="font-mono"> |
| 165 | + <li class="text-xs [overflow-wrap:anywhere]">{f.key}</li> |
| 166 | + |
| 167 | + {#each f.queryCodes as q (q)} |
| 168 | + <li class="text-subtle text-xs">{q}</li> |
| 169 | + {/each} |
| 170 | + </ul> |
| 171 | + </div> |
| 172 | + </div> |
| 173 | + {/each} |
| 174 | + </div> |
| 175 | + {/each} |
| 176 | + </div> |
108 | 177 | </article> |
109 | 178 |
|
110 | 179 | <style lang="postcss"> |
|
0 commit comments