add discus
This commit is contained in:
parent
6b7aaa6a77
commit
9e920eff93
|
@ -13,6 +13,10 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
body {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
@ -87,4 +91,9 @@
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
padding: 1px 5px;
|
padding: 1px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#disqus_thread {
|
||||||
|
border-top: 1px solid #919191;
|
||||||
|
padding: 0 30px;
|
||||||
}
|
}
|
|
@ -13,6 +13,10 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
body {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
@ -83,4 +87,9 @@
|
||||||
#dialogShare a {
|
#dialogShare a {
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
#disqus_thread {
|
||||||
|
border-top: 1px solid #919191;
|
||||||
|
padding: 0 30px;
|
||||||
}
|
}
|
|
@ -309,7 +309,6 @@
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
height: 19px;
|
height: 19px;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
z-index: 11;
|
z-index: 11;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -18,11 +18,14 @@ var playground = {
|
||||||
editor: undefined,
|
editor: undefined,
|
||||||
pid: undefined,
|
pid: undefined,
|
||||||
_resize: function () {
|
_resize: function () {
|
||||||
|
if (config.disqus) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (config.embed) {
|
if (config.embed) {
|
||||||
$("#editorDiv").parent().height($(window).height() - 35 - $(".footer").height());
|
$("#editorDiv").parent().height($(window).height() - 35 - $(".footer").height());
|
||||||
playground.editor.setSize("auto", ($("#editorDiv").parent().height() * 0.7) + "px");
|
playground.editor.setSize("auto", ($("#editorDiv").parent().height() * 0.7) + "px");
|
||||||
} else {
|
} else {
|
||||||
$("#editor, #output").height($(window).height() - 58 - $(".footer").height());
|
$("#editor, #output").height($(window).height() - 60 - $(".footer").height());
|
||||||
playground.editor.setSize("auto", $("#editor").height() + "px");
|
playground.editor.setSize("auto", $("#editor").height() + "px");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -70,12 +70,14 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var disqus_shortname = 'wide-playground';
|
var disqus_shortname = 'wide-playground';
|
||||||
var disqus_identifier = {{.fileName}};
|
var disqus_identifier = {{.fileName}};
|
||||||
var disqus_url = window.location.protocol + "//" + {{.conf.Server}} + {{.conf.Context}} + "/playground/" + {{.fileName}}
|
var disqus_url = window.location.protocol + "//" + {{.conf.Server}} + {{.conf.Context}} + "/playground/" + {{.fileName}};
|
||||||
(function() {
|
(function() {
|
||||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||||
})();</script>
|
})();
|
||||||
|
|
||||||
|
</script>
|
||||||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
@ -94,7 +96,8 @@
|
||||||
"channel": "{{.conf.Channel}}",
|
"channel": "{{.conf.Channel}}",
|
||||||
"wideSessionId": "{{.session.ID}}",
|
"wideSessionId": "{{.session.ID}}",
|
||||||
"label": {{.i18n}},
|
"label": {{.i18n}},
|
||||||
"embed": {{.embed}}
|
"embed": {{.embed}},
|
||||||
|
"disqus": {{.disqus}}
|
||||||
};
|
};
|
||||||
function newWideRequest() {
|
function newWideRequest() {
|
||||||
var ret = {
|
var ret = {
|
||||||
|
|
Loading…
Reference in New Issue