From 21b1a1e2e73bd182d4f6b1064ab02a808ded8c8b Mon Sep 17 00:00:00 2001 From: Silas Peters Date: Sun, 12 Nov 2023 19:34:31 +0100 Subject: [PATCH 1/6] New workflow for adding newly opened issues to the CommITCrowd project Perhaps the title says it all. This is a really simple workflow, and it's open for any changes or adjustments --- .github/workflows/projects.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/projects.yml diff --git a/.github/workflows/projects.yml b/.github/workflows/projects.yml new file mode 100644 index 0000000..a47fbc7 --- /dev/null +++ b/.github/workflows/projects.yml @@ -0,0 +1,25 @@ +name: projects + +on: + issues: + types: + - opened + pull_requests: + types: + - opened + +jobs: + add-to-project: + name: Add opened issue or PR to CommITCrowd project + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@v0.5.0 + with: + # URL of the project to add issues to + project-url: https://github.com/orgs/svsticky/projects/7 + # A GitHub personal access token with write access to the project + github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} + # A comma-separated list of labels to use as a filter for issue to be added + # labeled: # optional + # The behavior of the labels filter, AND to match all labels, OR to match any label, NOT to exclude any listed label (default is OR) + # label-operator: # optional From 80218c0ed6c300a1d5f3b69a7c2d61a7f06c2599 Mon Sep 17 00:00:00 2001 From: Sem van Nieuwenhuizen Date: Tue, 14 Nov 2023 12:56:19 +0100 Subject: [PATCH 2/6] feat: Hide phone number if not filled in in Contentful --- src/templates/JobTemplate.jsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/templates/JobTemplate.jsx b/src/templates/JobTemplate.jsx index 25c8b7a..6612289 100755 --- a/src/templates/JobTemplate.jsx +++ b/src/templates/JobTemplate.jsx @@ -31,14 +31,16 @@ const JobView = ({ data }) => { - + {job.contactPerson.phone && ( + + )} )} From c2afc73d70dbb3bbbe9f68b7bc96c6e2d765df32 Mon Sep 17 00:00:00 2001 From: Tobias de Bruijn Date: Mon, 8 Apr 2024 17:27:14 +0200 Subject: [PATCH 3/6] Add introduction information to the website (#376) --- .gitignore | 3 ++ src/components/IntroInformation.jsx | 65 ++++++++++++++++++++++++ src/components/layout/GridDryQueries.jsx | 6 +++ src/static-pages/index.jsx | 4 ++ 4 files changed, 78 insertions(+) create mode 100644 src/components/IntroInformation.jsx diff --git a/.gitignore b/.gitignore index 9de8acb..e539b64 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,6 @@ pnpm-lock.yaml .yarn-integrity # semantic dist src/semantic/dist + +# IDEA +.idea/ diff --git a/src/components/IntroInformation.jsx b/src/components/IntroInformation.jsx new file mode 100644 index 0000000..8499f04 --- /dev/null +++ b/src/components/IntroInformation.jsx @@ -0,0 +1,65 @@ +import React from 'react'; +import { Button, Card } from 'semantic-ui-react'; +import { graphql, StaticQuery } from 'gatsby'; +import { getLanguage, getTranslation, metadata } from '../data/i18n'; + +class IntroInformation extends React.Component { + render() { + const language = + typeof window !== 'undefined' + ? getLanguage(window) + : metadata.defaultLocale; + let intro_information = this.props.data.allContentfulIntroInformation.nodes.filter( + d => d.node_locale === language + )[0]; //get only the first element + + let color = this.props.data.contentfulBoard.color; + console.log(color); + + return ( + <> +
+

{intro_information.title}

+ +
{intro_information.description.description}
+ +
+
+ + ); + } +} + +const introInformationQuery = graphql` + query introInformationQuery { + allContentfulIntroInformation { + nodes { + node_locale + title + linkToWebsiteButtonText + description { + description + } + introWebsiteUrl + } + } + contentfulBoard(current: { eq: true }) { + color + } + } +`; + +export default props => ( + } + /> +); diff --git a/src/components/layout/GridDryQueries.jsx b/src/components/layout/GridDryQueries.jsx index c8cb801..eb756b7 100644 --- a/src/components/layout/GridDryQueries.jsx +++ b/src/components/layout/GridDryQueries.jsx @@ -23,6 +23,9 @@ const IndexWrapper = styled.div` .mainPartner { grid-area: mainPartner; } + .introInformation { + grid-area: introInformation; + } .banner { display: grid; @@ -38,6 +41,7 @@ const IndexWrapper = styled.div` grid-template-areas: 'logo' 'banner' + 'introInformation' 'news' 'news' 'drinks' @@ -64,6 +68,7 @@ const IndexWrapper = styled.div` grid-template-columns: 1fr 1fr; grid-template-areas: 'banner banner' + 'introInformation introInformation' 'news news' 'drinks mainPartner' 'jobs activity'; @@ -80,6 +85,7 @@ const IndexWrapper = styled.div` grid-template-columns: 3fr 1fr; grid-template-areas: 'banner banner' + 'news introInformation' 'news drinks' 'news mainPartner' 'news jobs' diff --git a/src/static-pages/index.jsx b/src/static-pages/index.jsx index f0b8852..fc4d8c7 100644 --- a/src/static-pages/index.jsx +++ b/src/static-pages/index.jsx @@ -11,6 +11,7 @@ import MainPartnerBanner from '$/components/mainpartner/Banner'; import IndexWrapper from '$/components/layout/GridDryQueries'; import FeaturedJobWidget from '$/components/jobs/FeaturedJobWidget'; import ActivityWidget from '$/components/activities/ActivityWidget'; +import IntroInformation from '$/components/IntroInformation'; import logo from '$/images/sticky-logo-text.svg'; @@ -34,6 +35,9 @@ const Index = ({ data }) => {
+
+ +
From e15003227d5cdac2a6646c7f1e23776404815866 Mon Sep 17 00:00:00 2001 From: sam32123 <15876627+sam32123@users.noreply.github.com> Date: Wed, 18 Sep 2024 16:15:08 +0200 Subject: [PATCH 4/6] make default image with based on size of parent (#383) --- src/semantic/src/themes/default/globals/reset.overrides | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/semantic/src/themes/default/globals/reset.overrides b/src/semantic/src/themes/default/globals/reset.overrides index 192eb9c..40057e5 100644 --- a/src/semantic/src/themes/default/globals/reset.overrides +++ b/src/semantic/src/themes/default/globals/reset.overrides @@ -147,6 +147,8 @@ sup { img { border-style: none; + max-width: 100%; + height: auto; } /* Forms From b1fc1447e881d7724847e07fdb4bba111164ddf1 Mon Sep 17 00:00:00 2001 From: Tobias de Bruijn Date: Sat, 21 Sep 2024 12:31:57 +0200 Subject: [PATCH 5/6] Be beautiful again (#382) --- src/semantic/src/site/globals/site.variables | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/semantic/src/site/globals/site.variables b/src/semantic/src/site/globals/site.variables index b29f6ad..4bba56b 100644 --- a/src/semantic/src/site/globals/site.variables +++ b/src/semantic/src/site/globals/site.variables @@ -2,4 +2,4 @@ User Global Variables *******************************/ -@primaryColor: #61518f; +@primaryColor: #197052; From 89aae6822c65cf4ab15855fda4d32a6e4917f9c5 Mon Sep 17 00:00:00 2001 From: Tobias de Bruijn Date: Sat, 21 Sep 2024 22:28:35 +0200 Subject: [PATCH 6/6] Automatically compute CYMK, RGB color from HEX (#385) --- src/static-pages/vereniging/huisstijl.jsx | 54 ++++++++++++++++++++++- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/src/static-pages/vereniging/huisstijl.jsx b/src/static-pages/vereniging/huisstijl.jsx index 168a906..e76aba2 100644 --- a/src/static-pages/vereniging/huisstijl.jsx +++ b/src/static-pages/vereniging/huisstijl.jsx @@ -71,6 +71,52 @@ const tdStyle = { padding: '10px', }; +function rgbToCymk(rgb) { + let computedC = 1 - rgb.r / 255; + let computedM = 1 - rgb.g / 255; + let computedY = 1 - rgb.b / 255; + + let minCMY = Math.min(computedC, Math.min(computedM, computedY)); + computedC = Math.round(((computedC - minCMY) / (1 - minCMY)) * 100); + computedY = Math.round(((computedY - minCMY) / (1 - minCMY)) * 100); + computedM = Math.round(((computedM - minCMY) / (1 - minCMY)) * 100); + let computedK = Math.round(minCMY * 100); + + return { + c: computedC, + y: computedY, + m: computedM, + k: computedK, + }; +} + +function hexToRgb(hex) { + // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF") + let shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; + hex = hex.replace(shorthandRegex, function(m, r, g, b) { + return r + r + g + g + b + b; + }); + + let result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); + return result + ? { + r: parseInt(result[1], 16), + g: parseInt(result[2], 16), + b: parseInt(result[3], 16), + } + : null; +} + +function cymkColor(hex) { + const cymk = rgbToCymk(hexToRgb(hex)); + return `${cymk.c}%, ${cymk.y}%, ${cymk.m}%, ${cymk.k}%`; +} + +function rgbColor(hex) { + const rgb = hexToRgb(hex); + return `${rgb.r}, ${rgb.g}, ${rgb.b}`; +} + const Huisstijl = props => { const language = typeof window !== 'undefined' @@ -116,11 +162,15 @@ const Huisstijl = props => { CYMK - 0%, 94%, 83%, 50% + + {cymkColor(props.data.contentfulBoard.color)} + RGB - 128, 8, 22 + + {rgbColor(props.data.contentfulBoard.color)} + HEX