-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2343 from ewels/sigs-blog-post
Blog post: special interest groups
- Loading branch information
Showing
34 changed files
with
791 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ repos: | |
hooks: | ||
- id: prettier | ||
additional_dependencies: | ||
- [email protected].2 | ||
- [email protected].5 | ||
- prettier-plugin-svelte@^3.1.2 | ||
- prettier-plugin-astro@^0.12.3 | ||
files: \.(astro|svelte|mdx|md|yml|yaml)$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+186 KB
src/assets/images/blog/special_interest_groups/cross-functional-organisation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,70 @@ | ||
<script lang="ts"> | ||
export let name: string; | ||
export let count: number = 0; | ||
export let image: string; | ||
export let image: string = 'https://github.com/' + name + '.png'; | ||
export let size: number = 60; | ||
export let circle: boolean = false; | ||
export let wrapperClasses = ''; | ||
export let imgClasses = ''; | ||
export let linkClasses: string = ''; | ||
export let wrapperClasses: string = ''; | ||
export let imgClasses: string = ''; | ||
export let containerQuery: boolean = false; | ||
const tooltip = count > 0 ? `${name} (${count} commits)` : name; | ||
let tooltip = count > 0 ? `${name} (${count} commits)` : name; | ||
tooltip = count === 1 ? `${name} (1 commit)` : tooltip; | ||
tooltip = containerQuery ? '' : tooltip; | ||
const avatar_url = image.match(/\?/) ? `${image}&s=${size}` : `${image}?s=${size}`; | ||
</script> | ||
|
||
<a | ||
href="https://github.com/{name}" | ||
class={'text-decoration-none me-1 ' + wrapperClasses} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<img | ||
src={avatar_url} | ||
width={size} | ||
height={size} | ||
class:rounded-circle={circle} | ||
data-bs-placement="bottom" | ||
data-bs-toggle="tooltip" | ||
title={tooltip} | ||
alt={`Github user ${name}`} | ||
<div class={wrapperClasses} class:github-profile={containerQuery}> | ||
<a | ||
href="https://github.com/{name}" | ||
class={'text-decoration-none d-block ' + linkClasses} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
style="--size:{size};" | ||
class={imgClasses} | ||
/> | ||
<slot /> | ||
</a> | ||
> | ||
<img | ||
src={avatar_url} | ||
width={size} | ||
height={size} | ||
class:rounded-circle={circle} | ||
data-bs-placement="bottom" | ||
data-bs-toggle="tooltip" | ||
title={tooltip} | ||
alt={`Github user ${name}`} | ||
style="--size:{size};" | ||
class={' ' + imgClasses} | ||
/> | ||
<div class="profile-name text-nowrap"> | ||
<slot /> | ||
</div> | ||
</a> | ||
</div> | ||
|
||
<style lang="scss"> | ||
@import '@styles/_variables.scss'; | ||
@import '../styles/_variables.scss'; | ||
img { | ||
max-height: calc(var(--size) * 1px); | ||
background-color: $white; | ||
} | ||
.github-profile { | ||
container-type: size; | ||
container-name: github-profile; | ||
flex-grow: 1; | ||
} | ||
a { | ||
width: fit-content; | ||
} | ||
@container github-profile (width < 10rem) { | ||
:global(.profile-name) { | ||
display: none; | ||
} | ||
} | ||
:global(.github-profile:hover) { | ||
z-index: 1000; | ||
width: 40%; // should cover most cases, but extra long usernames, will still be not completely covered | ||
:global(.profile-name) { | ||
display: block !important; | ||
z-index: 1000; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
<script lang="ts"> | ||
import ListingTableHeader from '@components/ListingTableHeader.svelte'; | ||
import ListingCard from './ListingCard.svelte'; | ||
import { DisplayStyle, SearchQuery } from '@components/store'; | ||
import GitHubProfilePictureExtended from '@components/GitHubProfilePictureExtended.svelte'; | ||
import type { CollectionEntry } from 'astro:content'; | ||
export let groups: CollectionEntry<'special-interest-groups'>[] = []; | ||
let filteredGroups = groups; | ||
</script> | ||
|
||
<div class="listing px-2 py-4"> | ||
{#if $DisplayStyle === 'grid'} | ||
<div class="grid"> | ||
{#if filteredGroups.length === 0 && $SearchQuery !== ''} | ||
<div class="g-col-12 g-col-md-8 g-start-md-3"> | ||
<div class="alert alert-secondary text-center" role="alert"> | ||
No Groups found. Try changing your search query or filters. | ||
</div> | ||
</div> | ||
{:else} | ||
{#each filteredGroups as group (group.id)} | ||
<div class="g-col-12 g-col-lg-6 g-col-xl-6 g-col-xxl-4 g-col-xxxxl-2"> | ||
<ListingCard footer={true}> | ||
<a slot="card-header" href={'/special-interest-groups/' + group.slug} class="success" | ||
>{group.data.groupName}</a | ||
> | ||
<p slot="card-body">{group.data.subtitle}</p> | ||
<div slot="card-footer" class="grid align-content-start"> | ||
<div class="pipeline-badges small g-col-8"> | ||
{#if group.data.pipelines} | ||
<p class="text-muted small mb-1">Pipelines:</p> | ||
{#each group.data.pipelines as pipeline} | ||
<span class={`badge me-2 pipeline-badge small`}>{pipeline}</span> | ||
{/each} | ||
{/if} | ||
</div> | ||
<div class="small g-col-4"> | ||
{#if group.data.leads} | ||
<p class="text-muted small mb-2">Group leads:</p> | ||
<div class="leads d-flex flex-wrap w-100"> | ||
{#each group.data.leads as lead} | ||
{#if typeof lead === 'string'} | ||
<GitHubProfilePictureExtended | ||
username={lead} | ||
size={25} | ||
wrapperClasses="flex-grow-1" | ||
labelClasses="" | ||
/> | ||
{:else} | ||
<GitHubProfilePictureExtended | ||
username={Object.keys(lead)[0]} | ||
size={25} | ||
wrapperClasses="flex-grow-1" | ||
labelClasses="" | ||
> | ||
{Object.values(lead)[0]} | ||
</GitHubProfilePictureExtended> | ||
{/if} | ||
{/each} | ||
</div> | ||
{/if} | ||
</div> | ||
</div></ListingCard | ||
> | ||
</div> | ||
{/each} | ||
{/if} | ||
</div> | ||
{:else} | ||
<table class="table table-hove table-responsive"> | ||
<thead> | ||
<tr> | ||
<ListingTableHeader name="Name" /> | ||
<th scope="col">Description</th> | ||
<th scope="col">Included pipelines</th> | ||
<th scope="col">Leads</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{#each filteredGroups as group (group.id)} | ||
<tr> | ||
<td class=" name p-0"> | ||
<div class="position-relative p-3"> | ||
<a class="stretched-link" href={'/special-interest-groups' + group.slug + '/'} | ||
>{group.data.title}</a | ||
> | ||
</div> | ||
</td> | ||
<td class="text-small"> | ||
{group.data.subtitle} | ||
</td> | ||
<td class="pipeline-badges small"> | ||
{#each group.data.pipelines ?? [] as pipeline} | ||
<span class={`badge me-2 pipeline-badge`}>{pipeline}</span> | ||
{/each} | ||
</td> | ||
<td> | ||
{#each group.data.leads ?? [] as lead} | ||
{#if typeof lead === 'string'} | ||
<GitHubProfilePictureExtended username={lead} size={25} /> | ||
{:else} | ||
<GitHubProfilePictureExtended username={Object.keys(lead)[0]} size={25}> | ||
{Object.values(lead)[0]} | ||
</GitHubProfilePictureExtended> | ||
{/if} | ||
{/each} | ||
</td> | ||
</tr> | ||
{/each} | ||
</tbody> | ||
</table> | ||
{/if} | ||
</div> | ||
|
||
<style lang="scss"> | ||
.leads { | ||
width: fit-content; | ||
} | ||
:global(h2) a { | ||
color: var(--bs-success); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.