Merge branch 'gurusabarish:master' into master
This commit is contained in:
+36
-38
@@ -11,10 +11,10 @@ outputs:
|
||||
page:
|
||||
- "HTML"
|
||||
- "RSS"
|
||||
|
||||
|
||||
Paginate: 3
|
||||
disqusShortname: gurusabarish
|
||||
googleAnalytics: G-DWJJVE27WD
|
||||
enableRobotsTXT: true
|
||||
|
||||
markup:
|
||||
goldmark:
|
||||
@@ -28,13 +28,11 @@ Menus:
|
||||
title: Blog posts
|
||||
url: /blogs
|
||||
weight: 1
|
||||
|
||||
- identifier: gallery
|
||||
name: Gallery
|
||||
title: Blog posts
|
||||
url: /gallery
|
||||
weight: 2
|
||||
|
||||
#Dropdown menu
|
||||
# - identifier: dropdown
|
||||
# title: Example dropdown menu
|
||||
@@ -74,13 +72,13 @@ params:
|
||||
|
||||
theme:
|
||||
disableThemeToggle: false
|
||||
# defaultTheme: "light" # dark
|
||||
defaultTheme: "light" # dark
|
||||
|
||||
# font:
|
||||
# fontSize: 1.5rem # default: 1rem
|
||||
# fontWeight: 500 # default: 400
|
||||
# lineHeight: 1 # default: 1.5
|
||||
# textAlign: right # default: left
|
||||
font:
|
||||
fontSize: 1rem # default: 1rem
|
||||
fontWeight: 400 # default: 400
|
||||
lineHeight: 1.5 # default: 1.5
|
||||
textAlign: left # default: left
|
||||
|
||||
# color preference
|
||||
# color:
|
||||
@@ -100,19 +98,18 @@ params:
|
||||
# secondaryColor:
|
||||
|
||||
# If you want to customize the menu, you can change it here
|
||||
# navbar:
|
||||
# align: mx-auto # Left: ms-auto | center: mx-auto | right: me-auto | Default: ms-auto
|
||||
# brandLogo: "/logo.png" # Logo for the brand | default is the favicon variable
|
||||
# brandName: "Profile" # Brand name for the brand | default is the title variable
|
||||
# disableSearch: true
|
||||
|
||||
# menus:
|
||||
# disableAbout: true
|
||||
# disableExperience: true
|
||||
# disableEducation: true
|
||||
# disableProjects: true
|
||||
# disableAchievements: true
|
||||
# disableContact: true
|
||||
navbar:
|
||||
align: ms-auto # Left: ms-auto | center: mx-auto | right: me-auto | Default: ms-auto
|
||||
# brandLogo: "/logo.png" # Logo for the brand | default is the favicon variable
|
||||
brandName: "Hugo Profile" # Brand name for the brand | default is the title variable
|
||||
disableSearch: false
|
||||
menus:
|
||||
disableAbout: false
|
||||
disableExperience: false
|
||||
disableEducation: false
|
||||
disableProjects: false
|
||||
disableAchievements: false
|
||||
disableContact: false
|
||||
|
||||
# Hero
|
||||
hero:
|
||||
@@ -127,7 +124,7 @@ params:
|
||||
name: "Resume"
|
||||
url: "#"
|
||||
download: true
|
||||
newPage: true
|
||||
newPage: false
|
||||
socialLinks:
|
||||
fontAwesomeIcons:
|
||||
- icon: fab fa-github
|
||||
@@ -227,7 +224,7 @@ params:
|
||||
education:
|
||||
enable: true
|
||||
# title: "Custom Name"
|
||||
# index: true
|
||||
index: false
|
||||
items:
|
||||
- title: "Master of Business Administration"
|
||||
school:
|
||||
@@ -296,10 +293,10 @@ params:
|
||||
featured:
|
||||
name: Demo
|
||||
link: https://hugo-profile.netlify.app
|
||||
# badges:
|
||||
# - "Hugo"
|
||||
# - "Bootstrap"
|
||||
# - "Javascript"
|
||||
badges:
|
||||
- "Hugo"
|
||||
- "Bootstrap"
|
||||
- "Javascript"
|
||||
links:
|
||||
- icon: fa fa-envelope
|
||||
url: mailto:?subject=Hugo%20Profile%20Template&body=Check%20it%20out:%20https%3a%2f%2fhugo-profile.netlify.app%2fblog%2fmarkdown-syntax%2f
|
||||
@@ -314,9 +311,9 @@ params:
|
||||
featured:
|
||||
name: Demo
|
||||
link: https://django-converter.herokuapp.com
|
||||
# badges:
|
||||
# - "Django"
|
||||
# - "Bootstrap"
|
||||
badges:
|
||||
- "Django"
|
||||
- "Bootstrap"
|
||||
links:
|
||||
- icon: fab fa-github
|
||||
url: https://github.com/gurusabarish/converter
|
||||
@@ -327,10 +324,10 @@ params:
|
||||
featured:
|
||||
name: Demo V2
|
||||
link: https://hugo-profile-2.netlify.app
|
||||
# badges:
|
||||
# - "Hugo"
|
||||
# - "Bootstrap"
|
||||
# - "Javascript"
|
||||
badges:
|
||||
- "Hugo"
|
||||
- "Bootstrap"
|
||||
- "Javascript"
|
||||
links:
|
||||
- icon: fab fa-github
|
||||
url: https://github.com/gurusabarish/HugoProfileV2
|
||||
@@ -338,17 +335,18 @@ params:
|
||||
#Contact
|
||||
contact:
|
||||
enable: true
|
||||
#title: "Custom name"
|
||||
# title: "Custom Name"
|
||||
content: My inbox is always open. Whether you have a question or just want to say hi, I’ll try my best to get back to you!
|
||||
email: [email protected]
|
||||
btnName: Mail me
|
||||
|
||||
footer:
|
||||
recentPosts:
|
||||
path: "blogs"
|
||||
count: 3
|
||||
title: Recent Posts
|
||||
enable: true
|
||||
disableFeaturedImage: false
|
||||
|
||||
socialNetworks:
|
||||
github: https://github.com
|
||||
linkedin: https://linkedin.com
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<link rel="stylesheet" href="{{ .Site.Params.staticPath }}/css/font.css" media="all">
|
||||
|
||||
<!-- Internal templates -->
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
<div class="container py-3" id="recent-posts">
|
||||
{{ if .Site.Params.footer.recentPosts.enable | default false }}
|
||||
{{ $recentPostsPath := .Site.Params.footer.recentPosts.path | default "blogs" }}
|
||||
{{ $recentPostsCount := .Site.Params.footer.recentPosts.count | default 3 }}
|
||||
{{ $recentPosts := where .Site.RegularPages "Section" $recentPostsPath | first $recentPostsCount }}
|
||||
<div class="h3 text-center text-secondary py-3">
|
||||
{{ .Site.Params.footer.recentPosts.title | default "Recent Posts" }}
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
{{ range ( where .Site.RegularPages "Type" "blogs" | first 3 ) }}
|
||||
{{ range $recentPosts }}
|
||||
<div class="col-lg-4 col-md-6 pt-2">
|
||||
<div class="card h-100">
|
||||
{{ if and (not (.Site.Params.footer.recentPosts.disableFeaturedImage | default false)) (.Params.image) }}
|
||||
|
||||
@@ -65,42 +65,54 @@
|
||||
|
||||
{{ if and (.Site.Params.about.enable | default false) (not (.Site.Params.navbar.menus.disableAbout | default false)) }}
|
||||
<li class="nav-item navbar-text">
|
||||
<a class="nav-link" href="{{ .Site.BaseURL | relURL }}#about" aria-label="about">About</a>
|
||||
<a class="nav-link" href="{{ .Site.BaseURL | relURL }}#about" aria-label="about">
|
||||
{{ .Site.Params.about.title | default "About" }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ if and (.Site.Params.experience.enable | default false) (not (.Site.Params.navbar.menus.disableExperience | default false)) }}
|
||||
<li class="nav-item navbar-text">
|
||||
<a class="nav-link" href="{{ .Site.BaseURL | relURL }}#experience"
|
||||
aria-label="experience">Experience</a>
|
||||
aria-label="experience">
|
||||
{{ .Site.Params.experience.title | default "Experience" }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ if and (.Site.Params.education.enable | default false) (not (.Site.Params.navbar.menus.disableEducation | default false)) }}
|
||||
<li class="nav-item navbar-text">
|
||||
<a class="nav-link" href="{{ .Site.BaseURL | relURL }}#education"
|
||||
aria-label="education">Education</a>
|
||||
aria-label="education">
|
||||
{{ .Site.Params.education.title | default "Education" }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ if and (.Site.Params.projects.enable | default false) (not (.Site.Params.navbar.menus.disableEducation | default false)) }}
|
||||
<li class="nav-item navbar-text">
|
||||
<a class="nav-link" href="{{ .Site.BaseURL | relURL }}#projects"
|
||||
aria-label="projects">Projects</a>
|
||||
aria-label="projects">
|
||||
{{ .Site.Params.projects.title | default "Projects" }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ if and (.Site.Params.achievements.enable | default false) (not (.Site.Params.navbar.menus.disableAchievements | default false)) }}
|
||||
<li class="nav-item navbar-text">
|
||||
<a class="nav-link" href="{{ .Site.BaseURL | relURL }}#achievements"
|
||||
aria-label="achievements">Achievements</a>
|
||||
aria-label="achievements">
|
||||
{{ .Site.Params.achievements.title | default "Achievements" }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ if and (.Site.Params.contact.enable | default false) (not (.Site.Params.navbar.menus.disableContact | default false)) }}
|
||||
<li class="nav-item navbar-text">
|
||||
<a class="nav-link" href="{{ .Site.BaseURL | relURL }}#contact"
|
||||
aria-label="contact">Contact</a>
|
||||
aria-label="contact">
|
||||
{{ .Site.Params.contact.title | default "Contact" }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[build]
|
||||
publish = "exampleSite/public"
|
||||
command = "cd exampleSite && hugo --gc --minify --themesDir ../.."
|
||||
command = 'cd exampleSite && echo -e "\ngoogleAnalytics: $GOOGLE_ANALYTICS \n" >> config.yaml && hugo --gc --minify --themesDir ../..'
|
||||
|
||||
[context.production.environment]
|
||||
HUGO_VERSION = "0.92.0"
|
||||
|
||||
@@ -70,6 +70,8 @@ li > .dropdown-toggle:focus{
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
#search-content {
|
||||
-ms-scroll-chaining: none;
|
||||
scrollbar-width: none;
|
||||
display: none;
|
||||
border-radius: 1rem;
|
||||
box-shadow: 0 0 10px rgba(0,0,0,0.2);
|
||||
@@ -81,6 +83,10 @@ li > .dropdown-toggle:focus{
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
#search-content::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#search-results > .card {
|
||||
background-color: transparent !important;
|
||||
border: none;
|
||||
|
||||
+28
-5
@@ -19,11 +19,34 @@ async function searchOnChange(evt) {
|
||||
|
||||
let searchJson = await fetch("/index.json").then((res) => res.json());
|
||||
let searchResults = searchJson.filter((item) => {
|
||||
return (
|
||||
item.title.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
||||
item.description.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
||||
item.content.toLowerCase().includes(searchQuery.toLowerCase())
|
||||
);
|
||||
let res = false;
|
||||
if (item.title && item.description && item.content) {
|
||||
res =
|
||||
item.title.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
||||
item.description.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
||||
item.content.toLowerCase().includes(searchQuery.toLowerCase());
|
||||
} else if (item.title && item.description) {
|
||||
res =
|
||||
item.title.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
||||
item.description.toLowerCase().includes(searchQuery.toLowerCase());
|
||||
} else if (item.title && item.content) {
|
||||
res =
|
||||
item.title.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
||||
item.content.toLowerCase().includes(searchQuery.toLowerCase());
|
||||
} else if (item.description && item.content) {
|
||||
res =
|
||||
item.description.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
||||
item.content.toLowerCase().includes(searchQuery.toLowerCase());
|
||||
} else if (item.title) {
|
||||
res = item.title.toLowerCase().includes(searchQuery.toLowerCase());
|
||||
} else if (item.description) {
|
||||
res = item.description
|
||||
.toLowerCase()
|
||||
.includes(searchQuery.toLowerCase());
|
||||
} else if (item.content) {
|
||||
res = item.content.toLowerCase().includes(searchQuery.toLowerCase());
|
||||
}
|
||||
return res;
|
||||
});
|
||||
if (searchResults.length > 0) {
|
||||
let searchResultsHtml = "";
|
||||
|
||||
Reference in New Issue
Block a user