-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
662 additions
and
221 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 |
---|---|---|
@@ -1,55 +1,55 @@ | ||
# name: Deploy to GitHub Pages | ||
|
||
# on: | ||
# workflow_dispatch: | ||
# repository_dispatch: | ||
# types: | ||
# - webhook | ||
# push: | ||
# branches: 'main' | ||
|
||
# jobs: | ||
# build_site: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Install Node.js | ||
# uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: 18 | ||
# cache: npm | ||
|
||
# - name: Install dependencies | ||
# run: npm install | ||
|
||
# - name: build | ||
# env: | ||
# BASE_PATH: '/${{ github.event.repository.name }}' | ||
# PUBLIC_API_URL: 'https://cms.jstet.net' | ||
# run: | | ||
# npm run build | ||
|
||
# - name: Upload Artifacts | ||
# uses: actions/upload-pages-artifact@v2 | ||
# with: | ||
# # this should match the `pages` option in your adapter-static options | ||
# path: 'build/' | ||
|
||
# deploy: | ||
# needs: build_site | ||
# runs-on: ubuntu-latest | ||
|
||
# permissions: | ||
# pages: write | ||
# id-token: write | ||
|
||
# environment: | ||
# name: github-pages | ||
# url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
# steps: | ||
# - name: Deploy | ||
# id: deployment | ||
# uses: actions/deploy-pages@v2 | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
workflow_dispatch: | ||
repository_dispatch: | ||
types: | ||
- webhook | ||
push: | ||
branches: 'main' | ||
|
||
jobs: | ||
build_site: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: npm | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: build | ||
env: | ||
BASE_PATH: '/${{ github.event.repository.name }}' | ||
PUBLIC_API_URL: 'https://cms.jstet.net' | ||
run: | | ||
npm run build | ||
- name: Upload Artifacts | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
# this should match the `pages` option in your adapter-static options | ||
path: 'build/' | ||
|
||
deploy: | ||
needs: build_site | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
pages: write | ||
id-token: write | ||
|
||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
steps: | ||
- name: Deploy | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
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> | ||
import { | ||
filter, | ||
genDropdownLists, | ||
setUrlParams, | ||
applyUrlSearchParams, | ||
} from '$lib/js/filter.js'; | ||
import DropdownIcon from '$lib/svg/Dropdown.svelte'; | ||
import _ from 'lodash'; | ||
import Select from 'svelte-select'; | ||
import {onMount} from 'svelte'; | ||
import {page} from '$app/stores'; | ||
export let origData; | ||
export let filteredData; | ||
export let expanded = false; | ||
export let selects; | ||
export let searchOptions; | ||
let hidden = 'hidden'; | ||
let ariaExpanded = false; | ||
let searchTerm; | ||
const values = {}; | ||
onMount(async () => { | ||
// when searchParams is set, set them in filter | ||
applyUrlSearchParams($page.url.searchParams, values, selects); | ||
// if value is set dont hide filter (if someone goes to page with defined url param) | ||
if (expanded === false) { | ||
if (Object.values(values).some((value) => value !== null)) { | ||
hidden = 'visible'; | ||
ariaExpanded = true; | ||
} | ||
} else { | ||
hidden = 'visible'; | ||
} | ||
}); | ||
$: selects = genDropdownLists(origData, selects); | ||
function handleHidden() { | ||
hidden = hidden === 'hidden' ? 'visible' : 'hidden'; | ||
ariaExpanded = ariaExpanded ? false : true; | ||
} | ||
function changeVal(values_) { | ||
for (const key in values_) { | ||
if (values_.hasOwnProperty(key)) { | ||
_.find(selects, {param: key}).value = values_[key]; | ||
} | ||
} | ||
} | ||
$: changeVal(values); | ||
$: filteredData = filter( | ||
origData, | ||
selects, | ||
searchTerm, | ||
searchOptions, | ||
values, | ||
); | ||
$: history.replaceState( | ||
history.state, | ||
'', | ||
setUrlParams($page.url, selects, values), | ||
); | ||
</script> | ||
|
||
<div class=""> | ||
<div class="border-neutral-25 border-b"> | ||
<button | ||
class="inline-flex items-center justify-center pb-1 text-xl font-semibold transition hover:text-secondary" | ||
aria-expanded={ariaExpanded} | ||
aria-controls="filter" | ||
on:click={handleHidden} | ||
> | ||
Filter | ||
<DropdownIcon height={27} width={27} /> | ||
</button> | ||
</div> | ||
<div | ||
class="text_width grid items-center gap-y-4 md:gap-x-6 {hidden}" | ||
id="filter" | ||
> | ||
<div class=""> | ||
<span class="mt-4 block pb-1 text-lg font-semibold">Search</span> | ||
<div class="flex"> | ||
<input | ||
bind:value={searchTerm} | ||
placeholder="Search..." | ||
class="border-neutral-25 h-full w-full rounded-md border p-2 pl-4" | ||
data-testid="filter-search" | ||
/> | ||
</div> | ||
</div> | ||
{#each selects as select} | ||
<div> | ||
<span class="mt-2 block pb-1 text-lg font-semibold">{select.title}</span | ||
> | ||
<div | ||
class={select.param !== 'language' && select.param !== 'langs' | ||
? 'capitalize' | ||
: ''} | ||
> | ||
<Select | ||
showChevron | ||
placeholder="Select" | ||
items={select.items} | ||
searchable={select.searchable} | ||
multiple={select.multiple} | ||
bind:value={values[select.param]} | ||
--list-z-index="30" | ||
> | ||
<div slot="empty" /></Select | ||
> | ||
</div> | ||
</div> | ||
{/each} | ||
</div> | ||
</div> | ||
|
||
<style> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<script> | ||
import ArrowLeft from '../svg/ArrowLeft.svelte'; | ||
import ArrowRight from '../svg/ArrowRight.svelte'; | ||
export let items; | ||
export let perPage; | ||
export let trimmedItems; | ||
$: totalItems = items.length; | ||
$: currentPage = 0; | ||
$: totalPages = Math.ceil(totalItems / perPage); | ||
$: start = currentPage * perPage; | ||
$: end = | ||
currentPage === totalPages - 1 ? totalItems - 1 : start + perPage - 1; | ||
$: trimmedItems = items.slice(start, end + 1); | ||
$: totalItems, (currentPage = 0); | ||
$: currentPage, start, end; | ||
</script> | ||
|
||
{#if totalItems && totalItems > perPage} | ||
<div | ||
class="pagination pointer-events-auto flex items-center justify-center" | ||
role="navigation" | ||
aria-label="Pagination" | ||
> | ||
<button | ||
on:click={() => (currentPage -= 1)} | ||
disabled={currentPage === 0 ? true : false} | ||
aria-label="previous" | ||
> | ||
<ArrowLeft width={30} height={30} /> | ||
</button> | ||
<p class="m-0 mx-2">{start + 1} - {end + 1} of {totalItems}</p> | ||
<button | ||
class="flex" | ||
on:click={() => (currentPage += 1)} | ||
disabled={currentPage === totalPages - 1 ? true : false} | ||
aria-label="next" | ||
> | ||
<ArrowRight width={30} height={30} /> | ||
</button> | ||
</div> | ||
{/if} |
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,6 +1,6 @@ | ||
{ | ||
"name": "&effect", | ||
"cause": [ | ||
"sdgs": [ | ||
16 | ||
], | ||
"url": "https://www.and-effect.com/", | ||
|
2 changes: 1 addition & 1 deletion
2
src/lib/data/organizations/de/CorrelAid.json → src/lib/data/organizations/de/correlaid.json
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "Welthungerhilfe", | ||
"cause": [ | ||
"sdgs": [ | ||
2 | ||
], | ||
"url": "https://www.welthungerhilfe.de/", | ||
|
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 |
---|---|---|
@@ -1,15 +1,16 @@ | ||
{ | ||
"name": "Amnesty Tech", | ||
"cause": [16], | ||
"url": "https://www.amnesty.org/en/tech/", | ||
"description": "At Amnesty Tech, we believe it's time technology puts people and human rights first. We're a movement of 10 million people, and we've plugged hackers, coders, data scientists and technologists into our team too." , | ||
"office_locations_country": ">3", | ||
"remote_possible": null, | ||
"initiative_application_possible": null, | ||
"type": { | ||
"framework": "Non-Profit", | ||
"emphasis": "Cause Focused" | ||
}, | ||
"working_languages": ">3" | ||
} | ||
|
||
"name": "Amnesty", | ||
"sdgs": [ | ||
16 | ||
], | ||
"url": "https://www.amnesty.org/en/tech/", | ||
"description": "The Amnesty Tech movement believes it's time technology puts people and human rights first. It's a movement of 10 million people, and we've plugged hackers, coders, data scientists and technologists into our team too.", | ||
"office_locations_country": ["int"], | ||
"remote_possible": null, | ||
"initiative_application_possible": null, | ||
"type": { | ||
"framework": "Non-Profit", | ||
"emphasis": "Cause Focused" | ||
}, | ||
"working_languages": ["int"] | ||
} |
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.