Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Back an Issue feature #310

Merged
merged 19 commits into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ jobs:
- name: 🙏 build
run: dotnet build -m:1

- name: ⚙ azurite
run: |
npm install azurite
npx azurite &

- name: 🧪 test
env:
GH_TOKEN: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ jobs:
- name: 🙏 build
run: dotnet build -m:1

- name: ⚙ azurite
run: |
npm install azurite
npx azurite &

- name: 🧪 test
run: dotnet test

Expand Down
10 changes: 10 additions & 0 deletions .netconfig
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,13 @@
sha = 2f8a7d3dffc4409dbda61afb43326ab9d871c1ec
etag = c8f63b95f4631df1e1bdc1e3fa592260f40c86e36032a979b572b880cf5a4fff
weak
[file "src/Tests/System/QuaranTime.cs"]
url = https://github.com/devlooped/catbag/blob/main/System/QuaranTime.cs
sha = 83ae670d5c69de16dd0d3a15448bdefa2ef6cdfe
etag = 2de43ea10bb6dca91326c303fd4daf1c6493d3bc63511f3fd906c7f75117f49e
weak
[file "src/Core/System/Collections/Generic/IAsyncEnumerableExtensions.cs"]
url = https://github.com/devlooped/catbag/blob/main/System/Collections/Generic/IAsyncEnumerableExtensions.cs
sha = fd4229d4b2ebcad93768ddb6afee652d4a476fe2
etag = 8710a896af867e690062b025b3f95de9f2e3f219555942ec91e1364ad8d9bfac
weak
9 changes: 6 additions & 3 deletions docs/Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
source 'https://rubygems.org'

gem 'github-pages', '~> 228', group: :jekyll_plugins
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
gem 'webrick', '~> 1.8'
gem 'github-pages', '~> 232', group: :jekyll_plugins
gem 'kramdown', '~> 2.4', group: :jekyll_plugins
gem "jekyll-include-cache", group: :jekyll_plugins
gem "html-proofer", "~> 5.0", :group => :development
gem "jekyll-github-metadata", ">= 2.15"
gem 'wdm', '>= 0.2.0' if Gem.win_platform?
54 changes: 52 additions & 2 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# add cert and key for ssl
ssl_cert: localhost.crt
ssl_key: localhost.key
baseurl: "/SponsorLink"
permalink: pretty

plugins:
- jekyll-remote-theme
- jekyll-seo-tag
- jekyll-github-metadata
- jekyll-include-cache

remote_theme: just-the-docs/[email protected]
exclude:
- app/
Expand Down Expand Up @@ -43,22 +49,66 @@ callouts:
warning:
title: Warning
color: red
issues-available:
title: Available one-time funds
color: green
issues-backed:
title: Backed issues
color: yellow

compress_html:
ignore:
envs: all

markdown: kramdown
kramdown:
parse_block_html: true
input: GFM
hard_wrap: false
syntax_highlighter_opts:
block:
line_numbers: true

footer_content: "Copyright © 2024 Daniel Cazzulino."

repository: devlooped/SponsorLink
gh_edit_link: true
gh_edit_link_text: "Edit on GitHub"
gh_edit_repository: "https://github.com/devlooped/SponsorLink"
gh_edit_branch: main
gh_edit_source: docs
gh_edit_view_mode: tree

issues_template: |
{{#if available}}
<p class="mt-6 issues-available">Your one-time sponsorships can be assigned to fund specific issues.</p>
<table class="borderless" style="border-collapse: collapse; padding: 4px; min-width: unset;">
{{#each available}}
<tr>
<td class="borderless">$ {{amount}}</td>
<td class="borderless" style="width: 100%;">
<input class="border" style="width: 100%;" type="text" value="{{url}}" placeholder="Issue URL" id="{{sponsorshipId}}">
</td>
<td class="borderless"><button class="btn btn-green" onclick="backIssue('{{sponsorshipId}}');">Assign</button></td>
</tr>
{{/each}}
</table>
<p class="fs-3">
<a href="https://github.com/sponsors/{{sponsorable}}?frequency=one-time"><button class="btn">➕ Add Funds</button></a>
</p>
{{else}}
Please consider making one-time sponsorship(s) to <a target="_blank" href="https://github.com/sponsors/{{sponsorable}}?frequency=one-time">{{sponsorable}}</a> to back your chosen issue(s) 🙏.
<p class="fs-3">
<a href="https://github.com/sponsors/{{sponsorable}}?frequency=one-time"><button class="btn">➕ Add Funds</button></a>
</p>
{{/if}}
{{#if backed}}
<p class="mt-6 issues-backed">Issues can be backed multiple times to increase their funding.</p>
<table class="borderless" style="border-collapse: collapse; padding: 4px; min-width: unset;">
{{#each backed}}
<tr>
<td class="borderless">$ {{amount}}</td>
<td class="borderless"><a href="{{url}}" target="_blank">{{issue}}</a></td>
</tr>
{{/each}}
</table>
{{/if}}
55 changes: 45 additions & 10 deletions docs/_includes/footer_custom.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,48 @@
<script>
const toggleDarkMode = document.querySelector('.js-toggle-dark-mode');

jtd.addEvent(toggleDarkMode, 'click', function(){
if (jtd.getTheme() === 'dark') {
jtd.setTheme('light');
toggleDarkMode.textContent = '🌙';
} else {
jtd.setTheme('dark');
toggleDarkMode.textContent = '💡';
}
document.addEventListener("DOMContentLoaded", function () {
if (!jtd) { return; }

// If the browser suggests a color scheme, and user hasn't saved/switch one yet..
if (window.matchMedia && !localStorage['jtd-theme']) {
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
jtd.setTheme('dark');
} else if (window.matchMedia('(prefers-color-scheme: light)').matches) {
jtd.setTheme('light');
}
} else if (localStorage['jtd-theme']) {
jtd.setTheme(localStorage['jtd-theme']);
}

setToggleText();

jtd.addEvent(document.querySelector('.js-toggle-theme-btn'), 'click', toggleTheme);
jtd.addEvent(document.querySelector('.js-toggle-theme-icn'), 'click', toggleTheme);
});

function toggleTheme() {
if (jtd.getTheme() === 'dark') {
localStorage['jtd-theme'] = 'light';
jtd.setTheme('light');
} else {
jtd.setTheme('dark');
localStorage['jtd-theme'] = 'dark';
}
setToggleText();
}

function setToggleText() {
const toggleThemeBtn = document.querySelector('.js-toggle-theme-btn');
const toggleThemeIcn = document.querySelector('.js-toggle-theme-icn');
if (jtd.getTheme() === 'dark') {
toggleThemeBtn.textContent = '🔆 Light Mode';
toggleThemeBtn.ariaLabel = 'Switch to Light Mode';
toggleThemeIcn.textContent = '🔆';
toggleThemeIcn.ariaLabel = 'Switch to Light Mode';
} else {
toggleThemeBtn.textContent = '🌙 Dark Mode';
toggleThemeBtn.ariaLabel = 'Switch to Dark Mode';
toggleThemeIcn.textContent = '🌙';
toggleThemeIcn.ariaLabel = 'Switch to Dark Mode';
}
}
</script>
3 changes: 2 additions & 1 deletion docs/_includes/header_custom.html
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
<button class="btn js-toggle-dark-mode">🌙</button>
<button class="btn js-toggle-theme-icn">🌙</button>
<script src="https://cdn.jsdelivr.net/npm/handlebars@latest/dist/handlebars.js"></script>
3 changes: 3 additions & 0 deletions docs/_includes/nav_footer_custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="site-footer m-1">
<button class="btn js-toggle-theme-btn">🌙 Dark Mode</button>
</div>
34 changes: 34 additions & 0 deletions docs/assets/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,38 @@
max-width: 200px;
padding-top: 16px;
padding-left: 24px;
}

main { position: relative; }
th, td { min-width: 5rem; }

.spinner {
/* Positioning */
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);

/* Spinner styling - example with border */
border: 4px solid transparent;
border-top: 4px solid currentColor;
border-radius: 50%;
width: 30px;
height: 30px;
animation: spin 1s linear infinite;
}

@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}

.borderless { border: none; }

.border {
border: 1px solid silver;
}

.no-before::before {
content: none !important;
}
11 changes: 6 additions & 5 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ of the [standard manifest format](spec.md) available in the
**YES.** Read the [privacy policy](privacy.md) for more details.

10. Does the sponsorable account have access to my sponsorship information?

**YES.** Accounts you are currently sponsoring already have this information as
part of their profile. SponsorLink itself does not use any information they
don't already have access to, and the SponsorLink developer (Devlooped) does
not have access to any of this information since it doesn't offer hosting for
the backend that signs manifests.

**YES.** Accounts you are currently sponsoring already have this information as
part of their profile. SponsorLink itself does not use any information they
don't already have access to, and the SponsorLink developer (Devlooped) does
not have access to any of this information since it doesn't offer hosting for
the backend that signs manifests.
2 changes: 2 additions & 0 deletions docs/github.md → docs/github/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: GitHub Sponsors
nav_order: 3
has_children: true
has_toc: false
---
# GitHub Sponsors Reference Implementation
<!-- #content -->
Expand Down
Loading