fix(*): profile widget description overflow & add a gitalk option
parent
74a45e62b1
commit
58019ab0cd
|
@ -58,6 +58,12 @@ const GitmentGitalkSpec = {
|
||||||
[type]: 'string',
|
[type]: 'string',
|
||||||
[required]: true
|
[required]: true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
distraction_free_mode: {
|
||||||
|
[type]: 'boolean',
|
||||||
|
[doc]: 'Facebook-like distraction free mode',
|
||||||
|
[defaultValue]: false,
|
||||||
|
[requires]: comment => comment.type === 'gitalk'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,8 @@
|
||||||
id: '<%= md5(page.path) %>',
|
id: '<%= md5(page.path) %>',
|
||||||
repo: '<%= get_config('comment.repo') %>',
|
repo: '<%= get_config('comment.repo') %>',
|
||||||
owner: '<%= get_config('comment.owner') %>',
|
owner: '<%= get_config('comment.owner') %>',
|
||||||
admin: <%- JSON.stringify(get_config('comment.admin'))%>
|
admin: <%- JSON.stringify(get_config('comment.admin'))%>,
|
||||||
|
distractionFreeMode: <%= get_config('comment.distraction_free_mode', false) %>
|
||||||
})
|
})
|
||||||
gitalk.render('comment-container')
|
gitalk.render('comment-container')
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>
|
<script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var gitment = new Gitment({
|
var gitment = new Gitment({
|
||||||
id: '<%= page.path %>',
|
id: '<%= md5(page.path) %>',
|
||||||
owner: '<%= get_config('comment.owner') %>',
|
owner: '<%= get_config('comment.owner') %>',
|
||||||
repo: '<%= get_config('comment.repo') %>',
|
repo: '<%= get_config('comment.repo') %>',
|
||||||
oauth: {
|
oauth: {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<div class="card widget">
|
<div class="card widget">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<nav class="level">
|
<nav class="level">
|
||||||
<div class="level-item has-text-centered">
|
<div class="level-item has-text-centered" style="flex-shrink: 1">
|
||||||
<div>
|
<div>
|
||||||
<% if (get_config_from_obj(widget, 'avatar_rounded')) { %>
|
<% if (get_config_from_obj(widget, 'avatar_rounded')) { %>
|
||||||
<figure class="image is-128x128 has-mb-6">
|
<figure class="image is-128x128 has-mb-6">
|
||||||
|
|
Loading…
Reference in New Issue