@@ -5,19 +5,19 @@ const props = defineProps({
55});
66
77function externalSite (article ) {
8- if (! article? .external_url ) return ' '
9- if (article? .external_site ) return article .external_site
8+ if (! article? .external_url ) return " " ;
9+ if (article? .external_site ) return article .external_site ;
1010 try {
11- const u = new URL (article .external_url )
12- return u .hostname .replace (/ ^ www\. / , ' ' )
11+ const u = new URL (article .external_url );
12+ return u .hostname .replace (/ ^ www\. / , " " );
1313 } catch {
14- return article .external_url
14+ return article .external_url ;
1515 }
1616}
1717< / script>
1818
1919< template>
20- < section class = " container mx-auto space-y-2" >
20+ < section class = " container space-y-2" >
2121 < div class = " grid grid-cols-1 gap-3" >
2222 < div v- for = " (article, ix) of articles" : key= " ix" >
2323 < NuxtLink : to= " article.path" >
@@ -32,7 +32,10 @@ function externalSite(article) {
3232 {{ article .title }}
3333 < / div>
3434 < div class = " flex items-center gap-2 md:ml-auto" >
35- < ExternalIndicator v- if = " article.external_url" : site= " externalSite(article)" / >
35+ < ExternalIndicator
36+ v- if = " article.external_url"
37+ : site= " externalSite(article)"
38+ / >
3639 < / div>
3740 < / div>
3841 < template v- if = " show_dates" >
0 commit comments