Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gurusabarish/hugo-profile.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgurusabarish <gurusabarisha@gmail.com>2020-09-23 10:59:44 +0300
committergurusabarish <gurusabarisha@gmail.com>2020-09-23 10:59:44 +0300
commitb4681b58569ff871c18a88d285766d8b8f06e87e (patch)
tree533768dbb1ae7d3c7ac25f5031f9dd617463d672
parentb4294b0cc9cdc40372af3d332ac6121637b09c1e (diff)
google analytics and disqus
-rw-r--r--config.yaml3
-rw-r--r--examplesite/config.yaml5
-rw-r--r--layouts/_default/single.html22
-rw-r--r--layouts/partials/head.html15
-rw-r--r--layouts/partials/sections/contact.html28
-rw-r--r--static/css/index.css8
6 files changed, 77 insertions, 4 deletions
diff --git a/config.yaml b/config.yaml
index 0c28655..85a73a9 100644
--- a/config.yaml
+++ b/config.yaml
@@ -6,6 +6,9 @@ title: "Hugo-profile"
params:
favicon: "/images/hugo.png"
description: "Portfolio and personal blog of gurusabarish"
+ googleanalytics: ""
+ disqus: ""
+ contact: "false"
# Navbar Menus
customMenus:
diff --git a/examplesite/config.yaml b/examplesite/config.yaml
index e80822d..f672089 100644
--- a/examplesite/config.yaml
+++ b/examplesite/config.yaml
@@ -1,11 +1,16 @@
baseURL: "https://example.com"
languageCode: "en-us"
title: "Hugo-profile"
+theme: "hugo-profile"
params:
favicon: "/images/hugo.png"
description: "Portfolio and personal blog of gurusabarish"
+ googleanalytics: ""
+ disqus: ""
+ contact: "false"
+
# Navbar Menus
customMenus:
- name: "Blog"
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 9ca63b9..976f618 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -71,7 +71,27 @@
{{ end }}
</div>
<br>
-
+ <div id="disqus_thread"></div>
+ <script>
+ /**
+ * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
+ * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/
+ /*
+ var disqus_config = function () {
+ this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
+ this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
+ };
+ */
+ (function () { // DON'T EDIT BELOW THIS LINE
+ var d = document,
+ s = d.createElement('script');
+ s.src = '{{ .Site.Params.disqus }}';
+ s.setAttribute('data-timestamp', +new Date());
+ (d.head || d.body).appendChild(s);
+ })();
+ </script>
+ <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by
+ Disqus.</a></noscript>
</div>
</div>
</div>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 4eff5fa..7ec70fc 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -9,4 +9,17 @@
<link rel="stylesheet" href="/css/head_foot.css">
<!-- Fonts -->
-<link href="https://fonts.googleapis.com/css2?family=Alata&display=swap" rel="stylesheet"> \ No newline at end of file
+<link href="https://fonts.googleapis.com/css2?family=Alata&display=swap" rel="stylesheet">
+
+<!-- Global site tag (gtag.js) - Google Analytics -->
+<script async src="https://www.googletagmanager.com/gtag/js?id=UA-167646412-7"></script>
+<script>
+ window.dataLayer = window.dataLayer || [];
+
+ function gtag() {
+ dataLayer.push(arguments);
+ }
+ gtag('js', new Date());
+
+ gtag('config', '{{ .Site.Params.googleanalytics }}');
+</script> \ No newline at end of file
diff --git a/layouts/partials/sections/contact.html b/layouts/partials/sections/contact.html
index 8d20f0c..e621030 100644
--- a/layouts/partials/sections/contact.html
+++ b/layouts/partials/sections/contact.html
@@ -1,3 +1,29 @@
+{{ if eq .Site.Params.contact "true"}}
<section>
+ <div class="contact bg-danger text-white">
+ <div class="text-center p-3 font-weight-bold contact-head">Get In Tough</div>
+ <div class="p-3 container">
+ <div class="row justify-content-center">
+ <div class="col-lg-7">
+ <form action="https://formspree.io/xzbkbvgg" method="POST">
+ <div class="form-group">
+ <label for="exampleFormControlInput1">Email</label>
+ <input type="email" class="form-control" id="exampleFormControlInput1"
+ placeholder="example@gmail.com" name="Gmail">
+ </div>
-</section> \ No newline at end of file
+ <div class="form-group">
+ <label for="exampleFormControlTextarea1">Message</label>
+ <textarea class="form-control" id="exampleFormControlTextarea1" rows="3" name="message"
+ placeholder="Type something"></textarea>
+ </div>
+ <div class="text-center">
+ <button type="submit" class="btn btn-primary">Submit</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+</section>
+{{ end }} \ No newline at end of file
diff --git a/static/css/index.css b/static/css/index.css
index a338a67..6cdc56e 100644
--- a/static/css/index.css
+++ b/static/css/index.css
@@ -17,7 +17,7 @@
.name-intro {
font-size: 20PX;
padding-top: 10%;
- padding-left: 20%;
+ padding-left: 17%;
}
.profile {
@@ -184,4 +184,10 @@
.post-hover :hover {
background-color: #17a2b8;
+}
+
+/* contact */
+.contact-head {
+ font-family: 'Alata', sans-serif;
+ font-size: 25px;
} \ No newline at end of file