Browse Source

show education either in main or sidebar

combined education-section.html and education.html into one.
Stefan Forstenlechner 7 years ago
parent
commit
ab20595977
4 changed files with 44 additions and 42 deletions
  1. 3 2
      _config.yml
  2. 0 29
      _includes/education-section.html
  3. 38 10
      _includes/education.html
  4. 3 1
      _includes/sidebar.html

+ 3 - 2
_config.yml

@@ -2,7 +2,7 @@
 title: My Resume
 title: My Resume
 url: 'http://webjeda.com'
 url: 'http://webjeda.com'
 baseurl: '/online-cv' #change it according to your repository name
 baseurl: '/online-cv' #change it according to your repository name
-about: true # set to false or comment line if you want to remove the "How to use?" in the sidebar
+about: True # set to False or comment line if you want to remove the "How to use?" in the sidebar
 
 
 # Enable one of these styles by removing #. Style will be applied only after restarting the build or serve.
 # Enable one of these styles by removing #. Style will be applied only after restarting the build or serve.
 #style: styles-2
 #style: styles-2
@@ -29,7 +29,8 @@ github: sharu725
 twitter: '@webjeda'
 twitter: '@webjeda'
 #Update all the sections by editing the files inside _data folder.
 #Update all the sections by editing the files inside _data folder.
 
 
-education_in_main: true # set to false or comment line if you do not want an education section in main
+# uncomment the next line, if you want the education section displayed in main instead of the sidebar
+#education_in_main: True
 
 
 # Tracker
 # Tracker
 analytics: UA-83979019-1
 analytics: UA-83979019-1

+ 0 - 29
_includes/education-section.html

@@ -1,29 +0,0 @@
-{% if site.data.educations %}
-<section class="section educations-section">
-  <h2 class="section-title"><i class="fa fa-graduation-cap"></i>Education</h2>
-
-{% for education in site.data.educations %}
-  <div class="item">
-
-    <div class="meta">
-
-      <div class="upper-row">
-        <h3 class="degree">{{ education.degree }}</h3>
-        <div class="time">{{ education.time }}</div>
-      </div><!--//upper-row-->
-
-      <div class="university">{{ education.university }}</div>
-
-    </div><!--//meta-->
-
-    {% if education.details %}
-    <div class="details">
-      <p>{{ education.details }}</p>
-    </div><!--//details-->
-    {% endif %}
-
-  </div><!--//item-->
-{% endfor %}
-
-</section><!--//section-->
-{% endif %}

+ 38 - 10
_includes/education.html

@@ -1,15 +1,43 @@
 {% if site.data.educations %}
 {% if site.data.educations %}
-<div class="education-container container-block">
+    {% if site.education_in_main %}
+    
+        <section class="section educations-section">
+        <h2 class="section-title"><i class="fa fa-graduation-cap"></i>Education</h2>
+        {% for education in site.data.educations %}
+          <div class="item">
+          
+            <div class="meta">
+            
+              <div class="upper-row">
+                <h3 class="degree">{{ education.degree }}</h3>
+                <div class="time">{{ education.time }}</div>
+              </div><!--//upper-row-->
+              
+              <div class="university">{{ education.university }}</div>
+            </div><!--//meta-->
+            
+            {% if education.details %}
+            <div class="details">
+              <p>{{ education.details }}</p>
+            </div><!--//details-->
+            {% endif %}
+          </div><!--//item-->
+        {% endfor %}
+        
+        </section><!--//section-->
+    {% else %}
+        <div class="education-container container-block">
 
 
-  <h2 class="container-block-title">Education</h2>
+        <h2 class="container-block-title">Education</h2>
 
 
-  {% for education in site.data.educations %}
-    <div class="item">
-      <h4 class="degree">{{ education.degree }}</h4>
-      <h5 class="meta">{{ education.university }}</h5>
-      <div class="time">{{ education.time }}</div>
-    </div><!--//item-->
-  {% endfor %}
+        {% for education in site.data.educations %}
+            <div class="item">
+            <h4 class="degree">{{ education.degree }}</h4>
+          <h5 class="meta">{{ education.university }}</h5>
+          <div class="time">{{ education.time }}</div>
+        </div><!--//item-->
+      {% endfor %}
 
 
-</div><!--//education-container-->
+    </div><!--//education-container-->
+    {% endif %}
 {% endif %}
 {% endif %}

+ 3 - 1
_includes/sidebar.html

@@ -45,7 +45,9 @@
        </ul>
        </ul>
    </div><!--//contact-container-->
    </div><!--//contact-container-->
 
 
-  {% include education.html %}
+  {% if site.education_in_main == null or site.education_in_main == false %}
+    {% include education.html %}
+  {% endif %}
   {% include language.html %}
   {% include language.html %}
   {% include interests.html %}
   {% include interests.html %}
   {% if site.about %}
   {% if site.about %}