Browse Source

Fixed section landing position on navigation #154 (#436)

* Fixed alignment issue in tables under education(#233)

* Fixed section landing position on navigation

Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
Reyhan 3 years ago
parent
commit
6e41689c06

+ 3 - 2
layouts/partials/sections/accomplishments.html

@@ -3,9 +3,10 @@
   {{ $sectionID = .section.id }}
 {{ end }}
 
-<div class="container-fluid anchor pb-5 accomplishments-section" id="{{ $sectionID }}">
+<div class="container-fluid anchor pb-5 accomplishments-section">
   {{ if not (.section.hideTitle) }}
-    <h1 class="text-center">{{ .section.name }}</h1>
+    <h1 class="text-center">
+      <span id="{{ $sectionID }}"></span>{{ .section.name }}</h1>
   {{ end }}
 
   <div class="container">

+ 3 - 2
layouts/partials/sections/achievements.html

@@ -3,9 +3,10 @@
   {{ $sectionID = .section.id }}
 {{ end }}
 
-<div class="container-fluid anchor pb-5 achievements-section" id="{{ $sectionID }}">
+<div class="container-fluid anchor pb-5 achievements-section">
   {{ if not (.section.hideTitle) }}
-    <h1 class="text-center">{{ .section.name }}</h1>
+    <h1 class="text-center">
+      <span id="{{ $sectionID }}"></span>{{ .section.name }}</h1>
   {{ end }}
   <div class="container">
     <div class="row" id="gallery">

+ 3 - 2
layouts/partials/sections/education.html

@@ -3,9 +3,10 @@
 {{ $sectionID = .section.id }}
 {{ end }}
 
-<div class="container-fluid anchor pb-5 education-section" id="{{ $sectionID }}">
+<div class="container-fluid anchor pb-5 education-section">
     {{ if not (.section.hideTitle) }}
-    <h1 class="text-center">{{ .section.name }}</h1>
+    <h1 class="text-center">
+        <span id="{{ $sectionID }}"></span>{{ .section.name }}</h1>
     {{ end }}
 
     <div class="container">

+ 5 - 3
layouts/partials/sections/experiences.html

@@ -3,9 +3,11 @@
   {{ $sectionID = .section.id }}
 {{ end }}
 
-<div class="container-fluid anchor pb-5 experiences-section" id="{{ $sectionID }}">
+<div class="container-fluid anchor pb-5 experiences-section">
   {{ if not (.section.hideTitle) }}
-    <h1 class="text-center">{{ .section.name }}</h1>
+    <h1 class="text-center">
+      <span id="{{ $sectionID }}"></span>{{ .section.name }}
+    </h1>
   {{ end }}
 
   <div class="container timeline text-justify">
@@ -27,4 +29,4 @@
      {{ end }}
    {{ end }}
   </div>
-</div>
+</div>

+ 3 - 2
layouts/partials/sections/recent-posts.html

@@ -9,9 +9,10 @@
 {{ end }}
 
 
-<div class="container-fluid anchor pb-5 recent-posts-section" id="{{ $sectionID }}">
+<div class="container-fluid anchor pb-5 recent-posts-section">
   {{ if not (.section.hideTitle) }}
-    <h1 class="text-center">{{ .section.name }}</h1>
+    <h1 class="text-center">
+      <span id="{{ $sectionID }}"></span>{{ .section.name }}</h1>
   {{ end }}
   <div class="container">
     <div class="row" id="recent-post-cards">

+ 3 - 2
layouts/partials/sections/skills.html

@@ -3,9 +3,10 @@
   {{ $sectionID = .section.id }}
 {{ end }}
 
-<div class="container-fluid anchor pb-5 skills-section" id="{{ $sectionID }}">
+<div class="container-fluid anchor pb-5 skills-section">
   {{ if not (.section.hideTitle) }}
-    <h1 class="text-center">{{ .section.name }}</h1>
+    <h1 class="text-center">
+      <span id="{{ $sectionID }}"></span>{{ .section.name }}</h1>
   {{ end }}
   <div class="container d-flex-block">
     <div class="row" id="primary-skills">

+ 6 - 0
static/css/sections/accomplishments.css

@@ -1,3 +1,9 @@
+.accomplishments-section h1 > span{
+  margin-top: -55px;  /* Size of fixed header */
+  padding-bottom:55px; 
+  display: block; 
+}
+
 .accomplishments-section .card {
   background: #fff;
   border-top: 2px solid #248aaa;

+ 6 - 0
static/css/sections/achievements.css

@@ -2,6 +2,12 @@
   padding-top: 0.5rem;
 }
 
+.achievements-section h1 > span{
+  margin-top: -55px;  /* Size of fixed header */
+  padding-bottom:55px; 
+  display: block; 
+}
+
 #gallery .achievement-entry {
   cursor: pointer;
   margin-top: 5px;

+ 6 - 0
static/css/sections/education.css

@@ -19,6 +19,12 @@
   text-align: right;
 }
 
+.education-section h1 > span{
+  margin-top: -55px;  /* Size of fixed header */
+  padding-bottom:55px; 
+  display: block; 
+}
+
 .education-section .icon {
   width: 2rem;
   padding-left: 0;

+ 6 - 0
static/css/sections/experiences.css

@@ -6,6 +6,12 @@
   margin-top: 1.5rem !important;
 }
 
+.experiences-section h1 > span{
+  margin-top: -55px;  /* Size of fixed header */
+  padding-bottom:55px; 
+  display: block; 
+}
+
 .experiences-section ul {
   padding-left: 1rem;
 }

+ 6 - 0
static/css/sections/recent-posts.css

@@ -2,6 +2,12 @@
   padding-top: 1rem;
 }
 
+.recent-posts-section h1 > span{
+  margin-top: -55px;  /* Size of fixed header */
+  padding-bottom:55px; 
+  display: block; 
+}
+
 .recent-posts-section .card .card-footer span {
   font-size: 10pt;
   color: #6c757d !important;

+ 6 - 0
static/css/sections/skills.css

@@ -8,6 +8,12 @@
   border-bottom: 0.0625rem solid rgba(0, 0, 0, 0.125);
 }
 
+.skills-section h1 > span{
+  margin-top: -55px;  /* Size of fixed header */
+  padding-bottom:55px; 
+  display: block; 
+}
+
 .skills-section .skill-card-link {
   text-decoration: none;
 }