diff options
author | Leon He <lhe868@gmail.com> | 2019-08-29 13:04:02 +0300 |
---|---|---|
committer | Leon He <lhe868@gmail.com> | 2019-08-29 13:04:02 +0300 |
commit | d484e37ced790c3c705d11695502784465c375bc (patch) | |
tree | 76c2c8a646c7e3024f57621e126e3569f51b5a19 | |
parent | 64574ddb7200be03f8bfe00ff7af8a56ce873e18 (diff) |
add graphcomment system
-rw-r--r-- | layouts/_default/baseof.html | 2 | ||||
-rw-r--r-- | layouts/_default/single.html | 28 | ||||
-rw-r--r-- | static/css/style.css | 11 |
3 files changed, 33 insertions, 8 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 35e07d2..1b10a60 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -21,10 +21,10 @@ <link rel="stylesheet" href="/css/bootstrap.min.css" media="all"> <link rel="stylesheet" href="/css/bootstrap-theme.min.css"> +<script src="/js/jquery.min.js"></script> <link rel="stylesheet" href="/css/style.css"> <link rel="stylesheet" href="/highlight/styles/{{ .Site.Params.hljsStyle }}.css"> <script src="/highlight/highlight.pack.js" type='text/javascript'></script> -<script src="/js/jquery.min.js"></script> <script src="/js/bootstrap.min.js"></script> <script src="/js/holder.min.js" type='text/javascript'></script> <script src="https://unpkg.com/ionicons@4.2.2/dist/ionicons.js"></script> diff --git a/layouts/_default/single.html b/layouts/_default/single.html index be336ca..8e37a35 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -38,8 +38,34 @@ {{ end }} </ul> </nav> +{{ if .Site.DisqusShortname }} {{ template "_internal/disqus.html" . }} - </div> +{{ end }} + +{{ if .Site.Params.graphcomment }} +<div id="graphcomment"></div> +<script type="text/javascript"> + + /* - - - CONFIGURATION VARIABLES - - - */ + + // make sure the id is yours + window.gc_params = { + graphcomment_id: {{ .Site.Params.graphcomment }}, + + // if your website has a fixed header, indicate it's height in pixels + fixed_header_height: 0, + }; + + /* - - - DON'T EDIT BELOW THIS LINE - - - */ + + (function() { + var gc = document.createElement('script'); gc.type = 'text/javascript'; gc.async = true; + gc.src = 'https://graphcomment.com/js/integration.js'; + (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(gc); + })(); +</script> +{{ end }} + </div> </div></article> {{ end }} diff --git a/static/css/style.css b/static/css/style.css index 4f80dd5..9bc936c 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -135,12 +135,11 @@ * * /\* your custom style here *\/ * } - * - * /\* for block of code *\/ - * pre td.hljs-ln-code { - * padding-left: 10px; - * } - */ +*/ + /\* for block of code *\/ + pre td.hljs-ln-code { + padding-left: 10px; + } blockquote { font-weight: bold; font-style: italic; |