Jelajahi Sumber

fixed template bug and data files

many empty div's were generated
Stefan Forstenlechner 7 tahun lalu
induk
melakukan
2dd2b4eec6
4 mengubah file dengan 44 tambahan dan 46 penghapusan
  1. 22 23
      _data/projects.yml
  2. 14 15
      _data/publications.yml
  3. 4 4
      _includes/projects.html
  4. 4 4
      _includes/publications.html

+ 22 - 23
_data/projects.yml

@@ -1,24 +1,23 @@
-- intro:
-  description: "You can list your side projects or open source libraries in this section. Lorem ipsum dolor
+intro: "You can list your side projects or open source libraries in this section. Lorem ipsum dolor
   sit amet, consectetur adipiscing elit. Vestibulum et ligula in nunc bibendum fringilla a eu lectus."
-
-- project:
-  title: Velocity
-  link: "#hook"
-  tagline: "A responsive website template designed to help startups promote, market and sell their products."
-- project:
-  title: DevStudio
-  link: "#"
-  tagline: "A responsive website template designed to help web developers/designers market their services."
-- project:
-  title: Tempo
-  link: "#"
-  tagline: "A responsive website template designed to help startups promote their products or services and to attract users & investors"
-- project:
-  title: Atom
-  link: "#"
-  tagline: "A comprehensive website template solution for startups/developers to market their mobile apps."
-- project:
-  title: Delta
-  link: "#"
-  tagline: "A responsive Bootstrap one page theme designed to help app developers promote their mobile apps"
+projects:
+  - project:
+    title: Velocity
+    link: "#hook"
+    tagline: "A responsive website template designed to help startups promote, market and sell their products."
+  - project:
+    title: DevStudio
+    link: "#"
+    tagline: "A responsive website template designed to help web developers/designers market their services."
+  - project:
+    title: Tempo
+    link: "#"
+    tagline: "A responsive website template designed to help startups promote their products or services and to attract users & investors"
+  - project:
+    title: Atom
+    link: "#"
+    tagline: "A comprehensive website template solution for startups/developers to market their mobile apps."
+  - project:
+    title: Delta
+    link: "#"
+    tagline: "A responsive Bootstrap one page theme designed to help app developers promote their mobile apps"

+ 14 - 15
_data/publications.yml

@@ -1,16 +1,15 @@
-- intro:
-  description: "You can list your publications in this section. Lorem ipsum dolor
+intro: "You can list your publications in this section. Lorem ipsum dolor
   sit amet, consectetur adipiscing elit. Vestibulum et ligula in nunc bibendum fringilla a eu lectus."
-
-- paper:
-  title: The Art of Computer Programming
-  authors: Donald E. Knuth
-  conference: Addison-Wesley, 1968
-- paper:
-  title: "Genetic Programming III: Darwinian Invention & Problem Solving"
-  authors: Koza, J.R., Andre, D., Bennett, F.H., Keane, M.A.
-  conference: "Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1st edn. (1999)"
-- paper:
-  title: A syntax directed compiler for Algol 60
-  authors: Edgar T. Irons
-  conference: "Comm. ACM 4 (1961), 51–55"
+publications:
+  - paper:
+    title: The Art of Computer Programming
+    authors: Donald E. Knuth
+    conference: Addison-Wesley, 1968
+  - paper:
+    title: "Genetic Programming III: Darwinian Invention & Problem Solving"
+    authors: Koza, J.R., Andre, D., Bennett, F.H., Keane, M.A.
+    conference: "Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1st edn. (1999)"
+  - paper:
+    title: A syntax directed compiler for Algol 60
+    authors: Edgar T. Irons
+    conference: "Comm. ACM 4 (1961), 51–55"

+ 4 - 4
_includes/projects.html

@@ -3,13 +3,13 @@
 
   <h2 class="section-title"><i class="fa fa-archive"></i>Projects</h2>
 
-  {% for intro in site.data.projects %}
+  {% if site.data.projects.intro %}
   <div class="intro">
-      <p>{{ intro.description }}</p>
+      <p>{{ site.data.projects.intro }}</p>
   </div><!--//intro-->
-  {% endfor%}
+  {% endif %}
 
-  {% for project in site.data.projects %}
+  {% for project in site.data.projects.projects %}
     <div class="item">
 
       <span class="project-title"><a href="{{ project.link }}">{{ project.title }}</a></span>

+ 4 - 4
_includes/publications.html

@@ -3,13 +3,13 @@
 
   <h2 class="section-title"><i class="fa fa-file-text"></i>Publications</h2>
 
-  {% for intro in site.data.publications %}
+  {% if site.data.publications.intro %}
   <div class="intro">
-      <p>{{ intro.description }}</p>
+      <p>{{ site.data.publications.intro }}</p>
   </div><!--//intro-->
-  {% endfor%}
+  {% endif %}
 
-  {% for publication in site.data.publications %}
+  {% for publication in site.data.publications.publications %}
     <div class="item">
       <div class="publication-title">{{ publication.title }}</div>
       <div class="publication-authors">{{ publication.authors }}</div>