Skip to content

Commit

Permalink
Merge pull request #1 from hossainemruz/bug-fix
Browse files Browse the repository at this point in the history
Make header linkable + fix bug
  • Loading branch information
hossainemruz authored Jun 17, 2020
2 parents 6cc935d + 29bea9e commit c536d14
Show file tree
Hide file tree
Showing 14 changed files with 146 additions and 175 deletions.
9 changes: 4 additions & 5 deletions exampleSite/data/about.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ company:
name: Example Co.
url: "https://www.example.com"

# your resume
# your resume. this file path should be relative to you "static" directory
resume: "files/resume.pdf"

# a summary about you
summary: 'I am a passionate software engineer with x years of working
experience. I built OSS tools for [Kubernetes](https://kubernetes.io/) using GO. My tools helps people to
deploy their workloads in Kuberenetes. Sometimes, I work on some fun projects such as writing a theme etc.'
summary: 'I am a passionate software engineer with x years of working experience. I built OSS tools for [Kubernetes](https://kubernetes.io/) using GO. My tools help people to deploy their workloads in Kubernetes. Sometimes, I work on some fun projects such as writing a theme, etc.'

# your social links
# give as many as you want. use font-awesome for the icons.
Expand All @@ -38,9 +36,10 @@ socialLinks:

- name: Facebook
icon: "fab fa-facebook"
url: "#"

# your soft skills
# give the percentage between 50 to 100 with 5 interval.
# give the percentage between 50 to 100 with 5 intervals.
# currently supported color: blue, yellow, pink, green
softSkills:
- name: Leadership
Expand Down
1 change: 1 addition & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ <h1>{{ .Page.Title }}</h1>

{{ define "scripts" }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script>
<script src="/assets/js/single.js"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
Expand Down
62 changes: 32 additions & 30 deletions layouts/partials/about.html
Original file line number Diff line number Diff line change
@@ -1,39 +1,41 @@
<div class="container-fluid about bg-white anchor p-md-5 d-flex" id="about">
<div class="container">
<div class="row pt-sm-2 pt-md-4 align-self-center">
<!-- summery -->
<div class="col-md-6">
<h3 class="p-1">{{ .Site.Data.home.author.name }}</h3>
<h5 class="p-1">
{{ .Site.Data.about.designation }} at
<a href="{{ .Site.Data.about.company.url }}"
>{{ .Site.Data.about.company.name }}</a
{{ if .Site.Data.about }}
<!-- summery -->
<div class="col-md-6">
<h3 class="p-1">{{ .Site.Data.home.author.name }}</h3>
<h5 class="p-1">
{{ .Site.Data.about.designation }} at
<a href="{{ .Site.Data.about.company.url }}"
>{{ .Site.Data.about.company.name }}</a
>
</h5>
<p class="p-1 text-justify">
{{ .Site.Data.about.summary | markdownify }}
</p>
<div class="text-container ml-auto">
<ul class="social-link d-flex">
{{ range .Site.Data.about.socialLinks }}
<li>
<a href="{{ .url }}" target="/"><i class="{{ .icon }}"></i></a>
</li>
{{ end }}
</ul>
</div>
<a href="{{ .Site.Data.about.resume }}" target="#"
><button class="btn btn-dark">My Resume</button></a
>
</h5>
<p class="p-1 text-justify">
{{ .Site.Data.about.summary | markdownify }}
</p>
<div class="text-container ml-auto">
<ul class="social-link d-flex">
{{ range .Site.Data.about.socialLinks }}
<li>
<a href="{{ .url }}" target="/"><i class="{{ .icon }}"></i></a>
</li>
{{ end }}
</ul>
</div>
<a href="{{ .Site.Data.about.resume }}" target="#"
><button class="btn btn-dark">My Resume</button></a
>
</div>
<!-- soft skills circular-progressbar -->
<div class="col-md-6 pt-5 pl-md-4 pl-sm-3 pt-md-0">
<div class="row">
{{ range .Site.Data.about.softSkills }}
{{ partial "progress/soft-skills" . }}
{{ end }}
<!-- soft skills circular-progressbar -->
<div class="col-md-6 pt-5 pl-md-4 pl-sm-3 pt-md-0">
<div class="row">
{{ range .Site.Data.about.softSkills }}
{{ partial "progress/soft-skills" . }}
{{ end }}
</div>
</div>
</div>
{{ end }}
</div>
</div>
</div>
22 changes: 12 additions & 10 deletions layouts/partials/achievements.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<div class="container-fluid achievements bg-dimmed anchor pb-5" id="achievements">
<h1 class="text-center">Achievements</h1>
{{ if .Site.Data.achievements }}
<h1 class="text-center">Achievements</h1>

<div class="container">
<div class="row" id="gallery">
<div class="container">
<div class="row" id="gallery">
</div>
</div>
</div>
<!-- achievements-holder holds achievement-entry -->
<div class="d-none" id="achievements-holder">
{{ range .Site.Data.achievements.achievements }}
{{ partial "misc/achievement.html" . }}
{{ end }}
</div>
<!-- achievements-holder holds achievement-entry -->
<div class="d-none" id="achievements-holder">
{{ range .Site.Data.achievements.achievements }}
{{ partial "misc/achievement.html" . }}
{{ end }}
</div>
{{ end }}
</div>
2 changes: 1 addition & 1 deletion layouts/partials/cards/recent-post.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<a href="{{ .RelPermalink }}" class="post-card-link">
<div class="card">
<div class="card-head">
<img class="card-img-top" src='{{ partial "helpers/get-hero.html" .Params }}'
<img class="card-img-top" src='{{ partial "helpers/get-hero.html" . }}'
alt="Card image cap"
/>
</div>
Expand Down
11 changes: 6 additions & 5 deletions layouts/partials/experiences.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<div class="container-fluid experiences bg-white anchor" id="experiences">
<h1 class="text-center">Experiences</h1>
<div class="container timeline text-justify">
{{ if .Site.Data }}
{{ if .Site.Data.experiences }}
<h1 class="text-center">Experiences</h1>

<div class="container timeline text-justify">
{{ $total:= len .Site.Data.experiences.experiences }}
{{ range $idx,$val:= .Site.Data.experiences.experiences }}
{{ if eq (mod $idx 2) 0 }}
Expand All @@ -22,6 +23,6 @@ <h1 class="text-center">Experiences</h1>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
</div>
</div>
{{ end }}
</div>
16 changes: 9 additions & 7 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
<div class="row text-left">
<div class="col-md-4 col-sm-12">
<h5>Navigation</h5>
<ul>
{{ range .Site.Data.site.menus }}
<li class="nav-item">
<a class="smooth-scroll" href="{{ .url }}">{{ .name }}</a>
</li>
{{ end }}
</ul>
{{ if .Site.Data.site }}
<ul>
{{ range .Site.Data.site.menus }}
<li class="nav-item">
<a class="smooth-scroll" href="{{ .url }}">{{ .name }}</a>
</li>
{{ end }}
</ul>
{{ end }}
</div>
<div class="col-md-4 col-sm-12">
<h5>Contact Me</h5>
Expand Down
8 changes: 4 additions & 4 deletions layouts/partials/home.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<div class="container-fluid home" id="home">
<div
class="background container-fluid"
style="background-image: url('{{ .Site.Data.site.background }}');"
style="background-image: url('{{ if .Site.Data.site.background }}{{ .Site.Data.site.background }}{{ else }}/assets/images/default-background.jpg{{ end }}');"
></div>
<div class="container content text-center">
<img
src="{{ .Site.Data.site.author.image }}"
<img src="{{ if .Site.Data.site.author.image }}{{ .Site.Data.site.author.image }}{{ else }}/assets/images/default-avatar.png{{ end }}"
class="rounded-circle mx-auto d-block img-fluid"
/>
<h1 class="greeting">Hi, I am {{ .Site.Data.site.author.name -}}</h1>
<h1 class="greeting">Hi, I am {{ if .Site.Data.author.name }}{{ .Site.Data.site.author.name }}{{ else }}Jane Doe{{ end }}
</h1>
<div class="typing-carousel">
<span id="ityped" class="ityped"></span>
<span class="ityped-cursor"></span>
Expand Down
32 changes: 17 additions & 15 deletions layouts/partials/projects.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<div class="container-fluid projects bg-dimmed anchor pb-5" id="projects">
<h1 class="text-center">Projects</h1>
<div class="container ml-auto text-center">
<div class="btn-group flex-wrap" role="group" id="project-filter-buttons">
{{ range .Site.Data.projects.buttons }}
<button type="button" class="btn btn-dark" data-filter="{{ .filter }}">
{{ .name }}
</button>
{{ end }}
{{ if .Site.Data.projects }}
<h1 class="text-center">Projects</h1>
<div class="container ml-auto text-center">
<div class="btn-group flex-wrap" role="group" id="project-filter-buttons">
{{ range .Site.Data.projects.buttons }}
<button type="button" class="btn btn-dark" data-filter="{{ .filter }}">
{{ .name }}
</button>
{{ end }}
</div>
</div>
</div>
<div class="container filtr-projects">
<div class="row" id="project-card-holder">
{{ range .Site.Data.projects.projects }}
{{ partial "cards/project" . }}
{{ end }}
<div class="container filtr-projects">
<div class="row" id="project-card-holder">
{{ range .Site.Data.projects.projects }}
{{ partial "cards/project" . }}
{{ end }}
</div>
</div>
</div>
{{ end }}
</div>
2 changes: 1 addition & 1 deletion layouts/partials/recent-posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<h1 class="text-center">Recent Posts</h1>
<div class="container">
<div class="row" id="recent-post-cards">
{{ range first 3 (where .Site.RegularPages.ByDate.Reverse "Type" "!=" "section" )}}
{{ range first 3 (where .Site.RegularPages.ByDate.Reverse "Type" "in" site.Params.mainSections )}}
{{ partial "cards/recent-post.html" . }}
{{ end }}
</div>
Expand Down
16 changes: 9 additions & 7 deletions layouts/partials/skills.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<div class="container-fluid skills bg-dimmed anchor pb-5" id="skills">
<h1 class="text-center">Skills</h1>
{{ if .Site.Data.skills }}
<h1 class="text-center">Skills</h1>

<div class="container d-flex-block">
<div class="row" id="primary-skills">
{{ range .Site.Data.skills.skills }}
{{ partial "cards/skill.html" . }}
{{ end }}
<div class="container d-flex-block">
<div class="row" id="primary-skills">
{{ range .Site.Data.skills.skills }}
{{ partial "cards/skill.html" . }}
{{ end }}
</div>
</div>
</div>
{{ end }}
</div>
18 changes: 18 additions & 0 deletions static/assets/css/single.css
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,24 @@ pre>code {
padding: 10px !important;
}

a.header-anchor{
text-decoration: none;
color: #1c2d41;
}

a.header-anchor i{
font-size: 10pt;
color: #3c4858;
display: none;
margin-left: 0.5rem;
}
a.header-anchor:hover i{
display: inline-block;
}
a.header-anchor code{
color: #e83e8c;
}

.navbar-toggler {
display: none;
}
Expand Down
36 changes: 23 additions & 13 deletions static/assets/js/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,31 +91,38 @@ var projectCards;
function adjustSkillCardsHeight() {
if (!isMobile) { // no need to adjust height for mobile devices
// primary skills
var el = document.getElementById("primary-skills").children;
var maxHeight = 0;
for (let i = 0; i < el.length; i++) {
if (el[i].children[0].clientHeight > maxHeight) {
maxHeight = el[i].children[0].clientHeight;
var skillCards = document.getElementById("primary-skills");
if (skillCards != null) {
var el = skillCards.children;
var maxHeight = 0;
for (let i = 0; i < el.length; i++) {
if (el[i].children[0].clientHeight > maxHeight) {
maxHeight = el[i].children[0].clientHeight;
}
}
for (let i = 0; i < el.length; i++) {
el[i].children[0].setAttribute("style", "min-height: " + maxHeight + "px;")
}
}
for (let i = 0; i < el.length; i++) {
el[i].children[0].setAttribute("style", "min-height: " + maxHeight + "px;")
}
}
}
adjustSkillCardsHeight();

// ================== Project cards =====================
// Add click action on project category selector buttons
var btns = document.getElementById("project-filter-buttons").children;
var filterButtons = document.getElementById("project-filter-buttons");
if (filterButtons != null) {
var btns = filterButtons.children;

for (let i = 0; i < btns.length; i++) {
btns[i].onclick = function () {
showGithubStars(btns[i].id);
for (let i = 0; i < btns.length; i++) {
btns[i].onclick = function () {
showGithubStars(btns[i].id);
}
}
}

if (document.getElementById("project-card-holder").children.length != 0) {
var projectCardHolder = document.getElementById("project-card-holder");
if (projectCardHolder != null && projectCardHolder.children.length != 0) {
projectCards = $(".filtr-projects").filterizr({ layout: 'sameWidth' });
}

Expand Down Expand Up @@ -279,6 +286,9 @@ var projectCards;
function showAchievements() {
// show achievements from achievements-holder div
let gallery = document.getElementById("gallery");
if (gallery == null) {
return
}
gallery.innerHTML = "";
const entries = document.getElementById("achievements-holder").children;
let len = entries.length;
Expand Down
Loading

0 comments on commit c536d14

Please sign in to comment.