mirror of
https://github.com/ivabus/gui
synced 2025-06-07 15:50:27 +03:00
#101 news and essential workshops should open browser
This commit is contained in:
parent
f063c576cb
commit
4e4fa27364
5 changed files with 9 additions and 4 deletions
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
<PanelHeader title="Essential Workshops" ctaLabel="View all" ctaLink="/" />
|
<PanelHeader title="Essential Workshops" ctaLabel="View all" ctaLink="/" />
|
||||||
{#if courses.length}
|
{#if courses.length}
|
||||||
<Posts posts={courses} />
|
<Posts posts={courses} linkTarget="_blank" />
|
||||||
{:else}
|
{:else}
|
||||||
<section class="h-64 border border-gray bg-black p-4">
|
<section class="h-64 border border-gray bg-black p-4">
|
||||||
<Preloader />
|
<Preloader />
|
||||||
|
|
|
@ -23,4 +23,5 @@
|
||||||
imageUrl: course.banner_image_url,
|
imageUrl: course.banner_image_url,
|
||||||
link: course.link
|
link: course.link
|
||||||
}))}
|
}))}
|
||||||
|
linkTarget="_blank"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
<PanelHeader title="Open-source News" ctaLabel="Read more articles >" ctaLink="/" />
|
<PanelHeader title="Open-source News" ctaLabel="Read more articles >" ctaLink="/" />
|
||||||
{#if news.length}
|
{#if news.length}
|
||||||
<Posts posts={news} />
|
<Posts posts={news} linkTarget="_blank" />
|
||||||
{:else}
|
{:else}
|
||||||
<section class="h-64 border border-gray bg-black p-4">
|
<section class="h-64 border border-gray bg-black p-4">
|
||||||
<Preloader />
|
<Preloader />
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
import GalleryItem from './GalleryItem.svelte';
|
import GalleryItem from './GalleryItem.svelte';
|
||||||
|
|
||||||
export let title = '';
|
export let title = '';
|
||||||
|
export let linkTarget = '';
|
||||||
|
|
||||||
interface GalleryItemShape {
|
interface GalleryItemShape {
|
||||||
imageUrl: string;
|
imageUrl: string;
|
||||||
|
@ -77,7 +78,7 @@
|
||||||
<section class="absolute top-0 flex h-full" style={styleFeaturedPackages}>
|
<section class="absolute top-0 flex h-full" style={styleFeaturedPackages}>
|
||||||
{#each items as item}
|
{#each items as item}
|
||||||
<div class="h-full" style={`width:${width}px`}>
|
<div class="h-full" style={`width:${width}px`}>
|
||||||
<a href={item.link}>
|
<a href={item.link} target={linkTarget} rel="noopener">
|
||||||
<GalleryItem {...item} {width} />
|
<GalleryItem {...item} {width} />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import '../app.css';
|
import '../app.css';
|
||||||
import type { AirtablePost } from '../types';
|
import type { AirtablePost } from '../types';
|
||||||
|
|
||||||
|
export let linkTarget = '';
|
||||||
export let posts: AirtablePost[] = [];
|
export let posts: AirtablePost[] = [];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -15,7 +16,9 @@
|
||||||
<section class="w-2/3 p-4 font-sono">
|
<section class="w-2/3 p-4 font-sono">
|
||||||
<h1 class="text-xl text-primary">{article.title}</h1>
|
<h1 class="text-xl text-primary">{article.title}</h1>
|
||||||
<p class="my-4 text-sm line-clamp-4">{article.short_description}</p>
|
<p class="my-4 text-sm line-clamp-4">{article.short_description}</p>
|
||||||
<a href={article.link} class="text-sm text-primary underline">Read more ...</a>
|
<a href={article.link} target={linkTarget} class="text-sm text-primary underline"
|
||||||
|
>Read more ...</a
|
||||||
|
>
|
||||||
</section>
|
</section>
|
||||||
</article>
|
</article>
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in a new issue