forked from thuliteio/doks
-
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.
Merge branch 'h-enk:master' into master
- Loading branch information
Showing
92 changed files
with
4,538 additions
and
5,589 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,12 @@ | ||
# These are supported funding model platforms | ||
|
||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] | ||
patreon: # Replace with a single Patreon username | ||
open_collective: doks # Replace with a single Open Collective username | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
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,4 +1,3 @@ | ||
bin | ||
node_modules | ||
public | ||
resources | ||
|
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,7 @@ | ||
# Reporting Security Issues | ||
|
||
The Doks team and community take security issues in Doks seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions. | ||
|
||
To report a security issue, email [security@getdoks.org](mailto:security@getdoks.org) and include the word "SECURITY" in the subject line. | ||
|
||
We'll endeavor to respond quickly, and will keep you updated throughout the process. |
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,17 @@ | ||
var announcement = document.getElementById('announcement'); | ||
|
||
if (announcement !== null) { | ||
|
||
if (localStorage.getItem('announcement') === null ) { | ||
|
||
announcement.classList.remove('d-none'); | ||
|
||
} | ||
|
||
announcement.addEventListener('closed.bs.alert', () => { | ||
|
||
localStorage.setItem('announcement', 'closed'); | ||
|
||
}); | ||
|
||
} |
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,21 @@ | ||
const globalDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches; | ||
const localMode = localStorage.getItem('theme'); | ||
|
||
if (globalDark && (localMode === null)) { | ||
|
||
localStorage.setItem('theme', 'dark'); | ||
document.documentElement.setAttribute('data-dark-mode', ''); | ||
|
||
} | ||
|
||
if (globalDark && (localMode === 'dark')) { | ||
|
||
document.documentElement.setAttribute('data-dark-mode', ''); | ||
|
||
} | ||
|
||
if (localMode === 'dark') { | ||
|
||
document.documentElement.setAttribute('data-dark-mode', ''); | ||
|
||
} |
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,12 +1,38 @@ | ||
document.getElementById('mode').addEventListener('click', () => { | ||
const mode = document.getElementById('mode'); | ||
|
||
document.body.classList.toggle('dark'); | ||
localStorage.setItem('theme', document.body.classList.contains('dark') ? 'dark' : 'light'); | ||
if (mode !== null) { | ||
|
||
}); | ||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => { | ||
|
||
if (localStorage.getItem('theme') === 'dark') { | ||
if (event.matches) { | ||
|
||
document.body.classList.add('dark'); | ||
localStorage.setItem('theme', 'dark'); | ||
document.documentElement.setAttribute('data-dark-mode', ''); | ||
|
||
} else { | ||
|
||
localStorage.setItem('theme', 'light'); | ||
document.documentElement.removeAttribute('data-dark-mode'); | ||
|
||
} | ||
|
||
}) | ||
|
||
mode.addEventListener('click', () => { | ||
|
||
document.documentElement.toggleAttribute('data-dark-mode'); | ||
localStorage.setItem('theme', document.documentElement.hasAttribute('data-dark-mode') ? 'dark' : 'light'); | ||
|
||
}); | ||
|
||
if (localStorage.getItem('theme') === 'dark') { | ||
|
||
document.documentElement.setAttribute('data-dark-mode', ''); | ||
|
||
} else { | ||
|
||
document.documentElement.removeAttribute('data-dark-mode'); | ||
|
||
} | ||
|
||
} |
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.