-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
23 changed files
with
335 additions
and
70 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
name: 'Close stale issues and PRs' | ||
on: | ||
schedule: | ||
- cron: '30 1 * * *' | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v5 | ||
with: | ||
days-before-issue-stale: 30 | ||
days-before-pr-stale: -1 | ||
days-before-close: 7 | ||
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.' | ||
close-pr-message: 'This issue has not seen any activity since it was marked stale. Closing.' | ||
stale-issue-label: 'Stale' | ||
exempt-issue-labels: 'pinned,bug,enhancement,documentation,Plan' | ||
operations-per-run: 1000 |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
- const { server, site } = theme.artalk | ||
|
||
script. | ||
(() => { | ||
const getArtalkCount = () => { | ||
const runWidget = () => { | ||
Artalk.LoadCountWidget({ | ||
server: '!{server}', | ||
site: '!{site}', | ||
countEl: '.artalk-count' | ||
}) | ||
} | ||
|
||
if (typeof Artalk === 'function') runWidget() | ||
else getScript('!{theme.asset.artalk_js}').then(runWidget) | ||
} | ||
|
||
|
||
window.pjax ? getArtalkCount() : window.addEventListener('load', getArtalkCount) | ||
})() |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
- let { pageID, lang } = theme.messenger | ||
- lang = theme.comments.use && theme.comments.use.includes('Facebook Comments') ? theme.facebook_comments.lang : lang | ||
|
||
#fb-customer-chat.fb-customerchat(page_id=pageID attribution='biz_inbox') | ||
|
||
script. | ||
document.getElementById('fb-root') ? '' : document.body.insertAdjacentHTML('afterend', '<div id="fb-root"></div>') | ||
|
||
window.fbAsyncInit = function() { | ||
FB.init({ | ||
xfbml: true, | ||
version: 'v14.0' | ||
}); | ||
}; | ||
|
||
(function(d, s, id) { | ||
var js, fjs = d.getElementsByTagName(s)[0]; | ||
if (d.getElementById(id)) return; | ||
js = d.createElement(s); js.id = id; | ||
js.src = 'https://connect.facebook.net/!{lang}/sdk/xfbml.customerchat.js'; | ||
fjs.parentNode.insertBefore(js, fjs); | ||
}(document, 'script', 'facebook-jssdk')); | ||
|
||
if (!{theme.chat_btn}) { | ||
var chatBtnFn = () => { | ||
var chatBtn = document.getElementById("chat_btn") | ||
chatBtn.addEventListener("click", function(){ | ||
FB.CustomerChat.show(); | ||
}); | ||
} | ||
chatBtnFn() | ||
} else { | ||
if (!{theme.chat_hide_show}) { | ||
function chatBtnHide () { | ||
FB.CustomerChat.hide() | ||
} | ||
function chatBtnShow () { | ||
FB.CustomerChat.show(false) | ||
} | ||
} | ||
} | ||
|
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 @@ | ||
- const { server, site, option } = theme.artalk | ||
|
||
script. | ||
function addArtalkSource () { | ||
const ele = document.createElement('link') | ||
ele.rel = 'stylesheet' | ||
ele.href= '!{theme.asset.artalk_css}' | ||
document.getElementsByTagName('head')[0].appendChild(ele) | ||
} | ||
|
||
function loadArtalk () { | ||
function initArtalk () { | ||
window.artalkItem = new Artalk(Object.assign({ | ||
el: '#artalk-wrap', | ||
server: '!{server}', | ||
site: '!{site}', | ||
pageKey: location.pathname, | ||
darkMode: document.documentElement.getAttribute('data-theme') === 'dark', | ||
countEl: '.artalk-count' | ||
},!{JSON.stringify(option)})) | ||
} | ||
|
||
if (typeof window.artalkItem === 'object') setTimeout(()=>{initArtalk()},200) | ||
else { | ||
addArtalkSource() | ||
typeof Artalk !== 'function' ? getScript('!{theme.asset.artalk_js}').then(initArtalk) | ||
: setTimeout(()=>{initArtalk()},200) | ||
} | ||
} | ||
|
||
document.getElementById('darkmode').addEventListener('click',()=> { | ||
if (typeof window.artalkItem !== 'object') return | ||
let isDark = document.documentElement.getAttribute('data-theme') === 'dark' | ||
window.artalkItem.setDarkMode(!isDark) | ||
}) | ||
|
||
|
||
if ('!{theme.comments.use[0]}' === 'Artalk' || !!{theme.comments.lazyload}) { | ||
if (!{theme.comments.lazyload}) btf.loadComment(document.getElementById('artalk-wrap'), loadArtalk) | ||
else loadArtalk() | ||
} else { | ||
function loadOtherComment () { | ||
loadArtalk() | ||
} | ||
} |
20 changes: 15 additions & 5 deletions
20
layout/includes/third-party/comments/facebook_comments.pug
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 |
---|---|---|
|
@@ -42,3 +42,5 @@ hr | |
data-width="100%") | ||
when 'Remark42' | ||
#remark42 | ||
when 'Artalk' | ||
#artalk-wrap |
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.