Merge pull request #39 from jeromelachaud/patch-1

feat: add Disqus
main
Jerome Lachaud 9 years ago
commit 5ad5cf8fd0

@ -12,9 +12,16 @@ google_verify:
# https://ssl.bing.com/webmaster/configure/verify/ownership Option 2 content= goes here # https://ssl.bing.com/webmaster/configure/verify/ownership Option 2 content= goes here
bing_verify: bing_verify:
# Contact form: comment the line below if you want to stick with the default PHP contact form # Contact form:
# - static : pass through formspree.io to validate email sending
# - disqus : replace contact form by disqus thread
# - comment the line below if you want to stick with the default PHP contact form
contact: static contact: static
# If you use disqus you need disqus shortname
# https://help.disqus.com/customer/portal/articles/466208
disqus_shortname: myshortname
# Color settings (hex-codes without the leading hash-tag) # Color settings (hex-codes without the leading hash-tag)
color: color:
primary: 18bc9c #80B3FF primary: 18bc9c #80B3FF

@ -0,0 +1,16 @@
<!-- Contact Section -->
<section id="contact">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2>Contact me</h2>
<hr class="star-primary">
</div>
</div>
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<div id="disqus_thread"></div><!-- /#disqus_thread -->
</div>
</div>
</div>
</section>

@ -19,3 +19,8 @@
<!-- Custom Theme JavaScript --> <!-- Custom Theme JavaScript -->
<script src="{{ "/js/freelancer.js" }}"></script> <script src="{{ "/js/freelancer.js" }}"></script>
{% if site.contact == "disqus" %}
<!-- Disqus Stuff -->
{% include js_disqus.html %}
{% endif %}

@ -0,0 +1,21 @@
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '{{ site.disqus_shortname }}'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
document.getElementById('disqus_thread').appendChild(dsq);
})();
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
document.getElementById('disqus_thread').appendChild(s);
}());
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>

@ -9,6 +9,8 @@
{% if site.contact == "static" %} {% if site.contact == "static" %}
{% include contact_static.html %} {% include contact_static.html %}
{% elsif site.contact == "disqus" %}
{% include contact_disqus.html %}
{% else %} {% else %}
{% include contact.html %} {% include contact.html %}
{% endif %} {% endif %}

Loading…
Cancel
Save