-
-
Notifications
You must be signed in to change notification settings - Fork 560
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
27 changed files
with
434 additions
and
143 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 |
---|---|---|
@@ -0,0 +1,80 @@ | ||
filters: | ||
- label: 'goal: new-feature' | ||
regexs: | ||
- /\bfeat\b/ | ||
- /feature/i | ||
events: [pull_request] | ||
targets: [title] | ||
|
||
- label: 'documentation' | ||
regexs: | ||
- /docs/i | ||
events: [pull_request] | ||
targets: [title] | ||
|
||
- label: 'bug' | ||
regexs: | ||
- /bug/i | ||
events: [pull_request] | ||
targets: [title] | ||
- label: 'bug' | ||
regexs: | ||
- /fix/i | ||
events: [pull_request] | ||
targets: [title] | ||
|
||
- label: 'chore' | ||
regexs: | ||
- /category/i | ||
events: [pull_request] | ||
targets: [title] | ||
- label: 'goal: new-category' | ||
regexs: | ||
- /category/i | ||
events: [pull_request] | ||
targets: [title] | ||
|
||
- label: 'chore' | ||
regexs: | ||
- /\blink\b/ | ||
- /link/i | ||
events: [pull_request] | ||
targets: [title] | ||
- label: 'goal: new-link' | ||
regexs: | ||
- /\blink\b/ | ||
- /link/i | ||
events: [pull_request] | ||
targets: [title] | ||
|
||
- label: 'chore' | ||
regexs: | ||
- /description/i | ||
events: [pull_request] | ||
targets: [title] | ||
|
||
- label: 'chore' | ||
regexs: | ||
- /chore/i | ||
events: [pull_request] | ||
targets: [title] | ||
|
||
- label: 'goal: build' | ||
regexs: | ||
- /build/i | ||
events: [pull_request] | ||
targets: [title] | ||
|
||
- label: 'goal: refactor' | ||
regexs: | ||
- /\brefactor\b/ | ||
- /refactor/i | ||
events: [pull_request] | ||
targets: [title] | ||
|
||
- label: 'accessibility' | ||
regexs: | ||
- /\baccessibility\b/ | ||
- /accessibility/i | ||
events: [issues, pull_request] # default | ||
targets: [title, comment] # default |
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,24 @@ | ||
# reference: https://github.com/hoho4190/issue-pr-labeler | ||
name: PR Labeler | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- reopened | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read # to read configuration yml file | ||
pull-requests: write # to add labels to pull requests | ||
|
||
steps: | ||
- name: Run PR Labeler | ||
uses: hoho4190/issue-pr-labeler@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
config-file-name: labeler-config.yml | ||
# disable-bot: true # this will prevent issues, PRs created by bots |
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
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,43 +1,65 @@ | ||
import React from 'react'; | ||
import { FaShareAlt } from 'react-icons/fa'; | ||
import React, { useState } from 'react' | ||
import { FaShareAlt } from 'react-icons/fa' | ||
|
||
type ShareProps = { | ||
url: string; | ||
title: string; | ||
}; | ||
url: string | ||
title: string | ||
} | ||
|
||
export const Share: React.FC<ShareProps> = ({ url, title }) => { | ||
const [showShareOptions, setShowShareOptions] = useState(false) | ||
|
||
async function handleShare() { | ||
if (navigator.share) { | ||
try { | ||
await navigator.share({ | ||
title: title, | ||
url: url, | ||
}); | ||
console.log('Share was successful.'); | ||
}) | ||
console.log('Share was successful.') | ||
} catch (error) { | ||
console.error('Error sharing:', error); | ||
console.error('Error sharing:', error) | ||
} | ||
} else { | ||
console.log('Web Share API not supported on this browser.'); | ||
// Fallback behavior when Web Share API is not supported (e.g., open a new tab with the URL) | ||
window.open(url, '_blank'); | ||
console.log('Web Share API not supported on this browser.') | ||
// Fallback behavior when Web Share API is not supported (e.g., open a new tab with the URL) | ||
window.open(url, '_blank') | ||
} | ||
} | ||
|
||
return ( | ||
<div className="dropdown dropdown-left dropdown-hover"> | ||
<div | ||
style={{ | ||
position: 'relative', | ||
display: 'inline-block', | ||
}} | ||
onMouseEnter={() => setShowShareOptions(true)} | ||
onMouseLeave={() => setShowShareOptions(false)} | ||
> | ||
<FaShareAlt | ||
size={'1.2rem'} | ||
className="text-theme-primary cursor-pointer" | ||
title="Share link" | ||
onClick={handleShare} | ||
/> | ||
<p className="dropdown-content bg-theme-secondary text-white text-sm rounded-lg px-3 py-1 cursor-default"> | ||
Share | ||
</p> | ||
{showShareOptions && ( | ||
<p | ||
className="bg-theme-secondary text-white text-sm rounded-lg px-3 py-1" | ||
style={{ | ||
position: 'absolute', | ||
top: '100%', | ||
left: '50%', | ||
transform: 'translateX(-50%)', | ||
zIndex: 1, | ||
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)', | ||
cursor: 'default', | ||
}} | ||
> | ||
Share | ||
</p> | ||
)} | ||
</div> | ||
); | ||
}; | ||
) | ||
} | ||
|
||
export default Share; | ||
export default Share |
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,9 @@ | ||
[ | ||
{ | ||
"name": "An Introduction to Raspberry Pi microcontroller", | ||
"description": "The Raspberry Pi is a low-cost, credit-card-sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. It also enables people of all ages to explore computing and learn programming languages like Scratch and Python.", | ||
"url": "https://www.raspberrypi.org/", | ||
"category": "internet of things", | ||
"subcategory": "raspberrypi" | ||
} | ||
] |
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,9 @@ | ||
[ | ||
{ | ||
"name": "Amazon Web Services", | ||
"description": "Gain free, hands-on experience with the AWS platform, products, and services. AWS Activate provides eligible startups with a host of resources, including free AWS credits to spend on AWS services, and AWS Support. ", | ||
"url": "https://docs.aws.amazon.com/index.html", | ||
"category": "cloud computing", | ||
"subcategory": "aws" | ||
} | ||
] |
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,9 @@ | ||
[ | ||
{ | ||
"name": "Microsoft Azure", | ||
"description": "Learn how to build and manage powerful applications using Microsoft Azure cloud services. Get documentation, example code, tutorials, and more.", | ||
"url": "https://learn.microsoft.com/en-us/azure/?product=popular", | ||
"category": "cloud computing", | ||
"subcategory": "azure" | ||
} | ||
] |
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,9 @@ | ||
[ | ||
{ | ||
"name": "Google Cloud Platform", | ||
"description": "Find guides, code samples, architectural diagrams, best practices, tutorials, API references, and more to learn how to build on Google Cloud.", | ||
"url": "https://cloud.google.com/docs/", | ||
"category": "cloud computing", | ||
"subcategory": "gcp" | ||
} | ||
] |
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,9 @@ | ||
[ | ||
{ | ||
"name": "IBM Cloud", | ||
"description": "The IBM Cloud platform is composed of multiple components that work together to provide a consistent and dependable cloud experience.", | ||
"url": "https://cloud.ibm.com/docs", | ||
"category": "cloud computing", | ||
"subcategory": "ibm" | ||
} | ||
] |
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,9 @@ | ||
[ | ||
{ | ||
"name": "Oracle Cloud", | ||
"description": "Looking for comprehensive documentation, tutorials, or videos so you can learn about Oracle Cloud Services? You can find all of these resources here in the Oracle Help Center.", | ||
"url": "https://docs.oracle.com/en/cloud/get-started/index.html", | ||
"category": "cloud computing", | ||
"subcategory": "oracle" | ||
} | ||
] |
Oops, something went wrong.