File tree Expand file tree Collapse file tree 4 files changed +51
-32
lines changed Expand file tree Collapse file tree 4 files changed +51
-32
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " minifolio" ,
3- "version" : " 0.6.2 " ,
3+ "version" : " 0.6.3 " ,
44 "private" : true ,
55 "license" : " GPL-3.0-only" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -31,25 +31,38 @@ A generic card element.
3131Children are rendered on a colored card with rounded corners.
3232-->
3333
34- <a
35- href ={linkHref }
36- onclick ={async (e ) => {
37- if (link ) {
38- await goto (link .url );
39- } else if (onclick ) {
40- onclick (e );
41- }
42- }}
43- target ={linkNewTab }
44- >
34+ {#snippet content ()}
4535 <div
4636 class =" card"
4737 style:--base-color ={baseColor }
4838 style:--hover-color ={hoverColor }
4939 >
5040 {@render children ()}
5141 </div >
52- </a >
42+ {/ snippet }
43+
44+ <!--
45+ HACK: Workaround for https://github.com/sveltejs/kit/issues/11057
46+ Very yucky, but I'll have to live with it since technically this is the only way to get valid HTML
47+ :(
48+ -->
49+ {#if link }
50+ <a
51+ href ={linkHref }
52+ onclick ={async (e ) => {
53+ if (link ) {
54+ await goto (link .url );
55+ } else if (onclick ) {
56+ onclick (e );
57+ }
58+ }}
59+ target ={linkNewTab }
60+ >
61+ {@render content ()}
62+ </a >
63+ {:else }
64+ {@render content ()}
65+ {/if }
5366
5467<style >
5568 a {
Original file line number Diff line number Diff line change 2727 );
2828 </script >
2929
30- <Card
31- link ={editing ? undefined : { url: ` /${groupId }/${itemId } ` , newTab: false }}
32- color ={item .info .color }
33- {onclick }
34- >
30+ <Card color ={item .info .color } {onclick }>
3531 <div class =" card-outer" >
36- <div class:card-icon ={item .info .icon } class:flex-grow ={true }>
37- {#if item .info .icon }
38- <img
39- src ="/ {groupId }/ {itemId }/ {item .info .icon }"
40- alt ="Icon for {item .info .name }"
41- class =" label-icon"
42- />
43- {/if }
44- <div >
45- <h3 >{item .info .name }</h3 >
46- <p >{item .info .description }</p >
32+ <a
33+ href ={editing ? undefined : ` /${groupId }/${itemId } ` }
34+ class:flex-grow ={true }
35+ >
36+ <div class:card-icon ={item .info .icon }>
37+ {#if item .info .icon }
38+ <img
39+ src ="/ {groupId }/ {itemId }/ {item .info .icon }"
40+ alt ="Icon for {item .info .name }"
41+ class =" label-icon"
42+ />
43+ {/if }
44+ <div >
45+ <h3 >{item .info .name }</h3 >
46+ <p >{item .info .description }</p >
47+ </div >
4748 </div >
48- </div >
49+ </a >
4950 {#if ! editing }
5051 <div >
5152 <ItemChipList
6162</Card >
6263
6364<style >
65+ a {
66+ color : black ;
67+ text-decoration : none ;
68+ }
69+
6470 h3 {
6571 margin-bottom : 0 ;
6672 }
You can’t perform that action at this time.
0 commit comments