update for performance

This commit is contained in:
gurusabarish
2020-10-12 09:26:15 +05:30
parent a7a01c2788
commit 9255ec161a
14 changed files with 83 additions and 103 deletions
+11 -8
View File
@@ -14,9 +14,13 @@
<div class="mb-4">
<div class="card border-bottom-primary shadow pb-2">
{{ if .Params.tags }}
<h5 class="card-header">
{{ range .Params.tags }}
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}" class="btn btn-info btn-rounded mb-2">{{ . }}</a>
<h5 class="card-header m-0">
{{ if .Params.tags }}
{{ range $tags := .Params.tags }}
{{ with $.Site.GetPage (printf "/tags/%s" $tags) }}
<a href="{{ .RelPermalink }}" class="btn btn-info btn-rounded mb-2">{{ $tags }}</a>
{{ end }}
{{ end }}
{{ end }}
</h5>
{{ end }}
@@ -52,17 +56,16 @@
<div class="row justify-content-center pt-3">
<div class="col-lg-7 col-md-7">
<div class=" mb-4 pt-3">
<div class="card shadow ">
<h5 class="card-header bg-warning">Tags</h5>
<div class=" mb-4">
<div class="card shadow p-0">
<h5 class="card-header m-0 bg-warning">Tags</h5>
<div class=" card-body">
{{range $name, $taxonomy := .Site.Taxonomies.tags}} {{ $cnt := .Count }}
{{range $name, $taxonomy := .Site.Taxonomies.tags}}
{{ with $.Site.GetPage (printf "/tags/%s" $name) }}
<a href="{{ .RelPermalink }}" class="btn btn-warning rounded-pill mb-2">{{$name}}</a>
{{end}}
{{end}}
</div>
</a>
</div>
</div>
</div>
+9 -29
View File
@@ -83,42 +83,22 @@
<!-- Tags -->
<div class="mb-4 p-5">
<div class="card">
<h5 class="card-header">Tags</h5>
<h5 class="card-header m-0">Tags</h5>
<div class=" card-body">
{{ if .Params.tags }}
{{ range .Params.tags }}
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}"
class="btn btn-warning rounded-pill mb-2">{{ . }}</a>
{{end}}
{{end}}
{{ range $tags := .Params.tags }}
{{ with $.Site.GetPage (printf "/tags/%s" $tags) }}
<a href="{{ .RelPermalink }}" class="btn btn-info btn-rounded mb-2">{{ $tags }}</a>
{{ end }}
{{ end }}
{{ end }}
</div>
</a>
</div>
</div>
<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 }}/embed.js';
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>
{{ template "_internal/disqus.html" . }}
</div>
</div>
+3 -17
View File
@@ -2,29 +2,15 @@
<html lang="en">
<head>
{{- partial "head.html" . -}}
<title>{{- .Site.Title -}}</title>
<meta name="description" content="{{ .Site.Params.description }}" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.Params.googleanalytics }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', '{{ .Site.Params.googleanalytics }}');
</script>
<!-- stylesheets -->
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/index.css">
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css2?family=PT+Serif&display=swap" rel="stylesheet">
<meta name="description" content="{{ .Site.Params.description }}">
{{ template "_internal/google_analytics.html" . }}
{{- partial "head.html" . -}}
</head>
<body>
+4 -4
View File
@@ -3,23 +3,23 @@
<p>
<h5 class="text-uppercase pb-2 font-weight-bold"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h5>
<div class="footer-site text-uppercase pb-2 font-weight-bold"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></div>
&copy; {{ .Site.Params.copyright }} All Rights Reserved<br>
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a> made with
Made with
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-heart" fill="currentColor"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M8 2.748l-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.717 2.01L8 2.748zM8 15C-7.333 4.868 3.279-3.04 7.824 1.143c.06.055.119.112.176.171a3.12 3.12 0 0 1 .176-.17C12.72-3.042 23.333 4.867 8 15z" />
</svg>
and
<a href="https://gohugo.io" target="_blank">Hugo</a>
<a href="https://gohugo.io" aria-label="hugo">Hugo</a>
by
{{- if .Site.Author.name }}
{{- if .Site.Author.website }}
<a href="{{ .Site.Author.website }}" target="_blank">{{ .Site.Author.name }}</a>
<a href="{{ .Site.Author.website }}" aria-label="github handle">{{ .Site.Author.name }}</a>
{{- else }}
{{ .Site.Author.name }}
{{- end }}
+2 -4
View File
@@ -1,11 +1,9 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="icon" href="{{ .Site.Params.favicon | default "/images/favicon.png"}}" type="image/gif">
<!-- Header and Footer -->
<link rel="stylesheet" href="/css/head_foot.css">
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Alata&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Alata&display=swap" rel="stylesheet">
+4 -4
View File
@@ -11,7 +11,7 @@
<div class="about-me jop font-weight-bold text-secondary">{{ .Site.Params.job }}</div>
{{ if .Site.Params.linkedin }}
<a class="text-white" href="{{ .Site.Params.linkedin }}" target="_blank">
<a class="text-white" href="{{ .Site.Params.linkedin }}" aria-label="linkedin">
<svg class="text-primary" width="2em" height="2em" fill="currentColor"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
<path
@@ -34,7 +34,7 @@
</a>
{{ if .Site.Params.github }}
<a class="text-dark" href="{{ .Site.Params.github }}" target="_blank">
<a class="text-dark" href="{{ .Site.Params.github }}" aria-label="github">
<svg width="2em" height="2em" fill="currentColor" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 448 512">
<path
@@ -44,7 +44,7 @@
{{ end }}
{{ if .Site.Params.twitter }}
<a class="text-info" href="{{ .Site.Params.twitter }}" target="_blank">
<a class="text-info" href="{{ .Site.Params.twitter }}" aria-label="twitter">
<svg width="2em" height="2em" fill="currentColor" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 448 512">
<path
@@ -54,7 +54,7 @@
{{ end }}
{{ if .Site.Params.instagram }}
<a class="text-danger" href="{{ .Site.Params.instagram }}" target="_blank">
<a class="text-danger" href="{{ .Site.Params.instagram }}" aria-label="instagram">
<svg width="2em" height="2em" fill="currentColor" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 448 512">
<path
+1 -3
View File
@@ -2,11 +2,10 @@
<div class="p-3 blog-back">
<div class="container">
<div class="text-center pb-3">
<h4>Recent posts</h4>
<div class="recent-posts">Recent posts</div>
</div>
<div class="container">
<div class="row">
{{ range first 4 (where site.RegularPages.ByDate.Reverse "Type" "in" site.Params.mainSections )}}
<div class="col-lg-3 col-md-5 pb-3 post-card">
<a href="{{ .RelPermalink }}">
@@ -17,7 +16,6 @@
</a>
</div>
{{ end }}
</div>
</div>
</div>
+9 -11
View File
@@ -19,23 +19,23 @@
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav ml-auto">
<li class="nav-item navbar-text">
<a class="nav-link text-dark" href="{{ .Site.BaseURL }}#home">Home</a>
<a class="nav-link text-dark" href="{{ .Site.BaseURL }}#home" aria-label="home">Home</a>
</li>
<li class="nav-item navbar-text">
<a class="nav-link text-dark" href="{{ .Site.BaseURL }}#about">About</a>
<a class="nav-link text-dark" href="{{ .Site.BaseURL }}#about" aria-label="about">About</a>
</li>
<li class="nav-item navbar-text">
<a class="nav-link text-dark" href="{{ .Site.BaseURL }}#projects">Projects</a>
<a class="nav-link text-dark" href="{{ .Site.BaseURL }}#projects" aria-label="projects">Projects</a>
</li>
{{ if .Site.Params.contact }}
<li class="nav-item navbar-text">
<a class="nav-link text-dark" href="{{ .Site.BaseURL }}#contact">Contact</a>
<a class="nav-link text-dark" href="{{ .Site.BaseURL }}#contact" aria-label="contact">Contact</a>
</li>
{{ end }}
{{ range site.Params.customMenus }}
<li class="nav-item navbar-text">
<a class="nav-link text-dark" href="{{.Url}}">{{ .name }}</a>
<a class="nav-link text-dark" href="{{.Url}}" aria-label="{{ .name }}">{{ .name }}</a>
</li>
{{ end }}
</ul>
@@ -53,7 +53,7 @@
<!-- socialmedia -->
<div class="social">
{{ if .Site.Params.github }}
<a class="text-white" href="{{ .Site.Params.github }}" target="_blank">
<a class="text-white" href="{{ .Site.Params.github }}" aria-label="github">
<svg width="1.1em" height="1.1em" fill="currentColor" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 448 512">
<path
@@ -63,7 +63,7 @@
{{ end }}
{{ if .Site.Params.linkedin }}
<a class="text-white" href="{{ .Site.Params.linkedin }}" target="_blank">
<a class="text-white" href="{{ .Site.Params.linkedin }}" aria-label="linkedin">
<svg width="1.1em" height="1.1em" fill="currentColor" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 448 512">
<path
@@ -73,7 +73,7 @@
{{ end }}
{{ if .Site.Params.twitter }}
<a class="text-white" href="{{ .Site.Params.twitter }}" target="_blank">
<a class="text-white" href="{{ .Site.Params.twitter }}" aria-label="twitter">
<svg width="1.1em" height="1.1em" fill="currentColor" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 448 512">
<path
@@ -83,7 +83,7 @@
{{ end }}
{{ if .Site.Params.instagram }}
<a class="text-white" href="{{ .Site.Params.instagram }}" target="_blank">
<a class="text-white" href="{{ .Site.Params.instagram }}" aria-label="instagram">
<svg width="1.1em" height="1.1em" fill="currentColor" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 448 512">
<path
@@ -100,8 +100,6 @@
<img src="{{ .Site.Params.profile | default "/images/avatar-370-456322.webp"}}" width="150px"
class="rounded-circle img-fluid" alt="{{ .Site.Params.name }}">
</div>
</div>
<div class="col-lg-3 home-content d-none d-md-block" style="background-image: url('{{ $backimg | absURL }}');"></div>
+3 -3
View File
@@ -14,15 +14,15 @@
<div class="card">
<img class="img-fluid" src="{{ .image }}" alt="{{ .title }}">
<div class="card-body">
<h4 class="card-title">{{ .title }}</h4>
<div class="card-title">{{ .title }}</div>
<p class="card-text">{{ .description}}</p>
{{ if .secoundarylink}}
<a href="{{ .secoundaryurl }}" class="btn btn-info">{{ .secoundaryurlname }}</a>
<a href="{{ .secoundaryurl }}" class="btn btn-info" aria-label="{{ .secoundaryurlname }}">{{ .secoundaryurlname }}</a>
{{ end }}
{{ if .sourceurl }}
<a class="text-dark" href="{{ .sourceurl }}" target="_blank">
<a class="text-dark" href="{{ .sourceurl }}" aria-label="github">
<svg width="2em" height="2em" fill="currentColor"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
<path