From eaedbe8472d60b19e9bcac959b271587a505a10e Mon Sep 17 00:00:00 2001
From: ebremner <ebremner@uwaterloo.ca>
Date: Mon, 19 Apr 2021 12:12:22 -0400
Subject: [PATCH] ISTWCMS-4184: updating timeline to use granular
 year-month-day

---
 .../04-components/timeline/timeline.twig      |  22 ++-
 .../04-components/timeline/timeline.yml       | 173 ++++++++++--------
 2 files changed, 110 insertions(+), 85 deletions(-)

diff --git a/source/_patterns/04-components/timeline/timeline.twig b/source/_patterns/04-components/timeline/timeline.twig
index c6b2f86d..bae16a6a 100644
--- a/source/_patterns/04-components/timeline/timeline.twig
+++ b/source/_patterns/04-components/timeline/timeline.twig
@@ -9,7 +9,7 @@
             <span class="timeline-year">{{ year }}</span>
             <ol>
 
-                {% for month, entries in timeline_item %}
+                {% for month, days in timeline_item %}
 
                     {% if style == 'month' %}
                         <li>
@@ -19,15 +19,19 @@
                             <ol>
                     {% endif %}
 
-                    {% for entry in entries %}
+                    {% for day in days %}
 
-                        <li class="timeline-info">
-                            {% if entry.image %}
-                                <img src="{{ entry.image }}" alt=""  class="timeline-photo"/>
-                            {%  endif %}
-                            <div class="timeline-headline"><strong>{{ entry.headline }}</strong></div>
-                            <p>{{ entry.content }}</p>
-                        </li>
+                        {% for entry in day %}
+
+                            <li class="timeline-info">
+                                {% if entry.image %}
+                                    <img src="{{ entry.image }}" alt=""  class="timeline-photo"/>
+                                {%  endif %}
+                                <div class="timeline-headline"><strong>{{ entry.headline }}</strong></div>
+                                <p>{{ entry.content }}</p>
+                            </li>
+
+                        {% endfor %}
 
                     {% endfor %}
 
diff --git a/source/_patterns/04-components/timeline/timeline.yml b/source/_patterns/04-components/timeline/timeline.yml
index e4a59fd6..37545d5f 100644
--- a/source/_patterns/04-components/timeline/timeline.yml
+++ b/source/_patterns/04-components/timeline/timeline.yml
@@ -3,88 +3,109 @@ style: 'month'
 timeline_items:
   1966:
     6:
-      -
-        headline: 'June 8, 1966'
-        content: 'The Polyphemus moths have begun to emerge from their cocoons - 7 females and 2 males emerge in one day. I put the females into 3 separate mating boxes and leave them by an open window so that they can release their pheromones. By 1 am, they have called in a couple of male moths. I mate two of the females with wild males.'
-      -
-        headline: 'June 9, 1966'
-        content: 'I release all the moths except one of the pregnant Polyphemus moths which I keep in a paper bag to lay her eggs.'
-        image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_9.jpg?itok=9i7qSooF'
-      -
-        headline: 'June 10-11, 1966'
-        content: 'The female Polyphemus has laid a total of 103 eggs. Half of these eggs are now in the Ecology Lab under modified temperature and humidity conditions. As a control measure, the other half of the eggs have been placed in a natural area, their habitat was not modified in any way so that they are subject to natural conditions.'
-        image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_10.jpg?itok=rZoYiTP_'
-      -
-        headline: 'June 13, 1966'
-        content: 'A total of 10 males and 1 female Cecropia Moths have emerged, which is a stark contrast to the sex ratio of the Polyphemus moths. I will attempt to mate the female tonight using the same method as the Polyphemus moths. I will also be releasing the males tonight, but I have tagged them with small stickers to prevent inbreeding should they find their way back to the female through her pheromones.'
-        image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_13.jpg?itok=-TIDW7D8'
-      -
-        headline: 'June 16 - 18, 1966'
-        content: 'Successfully mated a Cecropia moth at 2:40 am on June16th, and over the next 2 days she laid 153 eggs into a paper bag.  However, she presented odd behaviour while laying eggs, and laid thick bundles of 10-20 eggs on her legs rather than on the bag. Usually a female will lay groups of 3 eggs randomly, and never on her own body. I removed them from her and pulled apart the eggs before the substrate used to stick eggs to leaves completely dried. However I do not know if I have accidentally damaged any eggs in the process, despite my carefulness. This will be interesting to observe once the caterpillars begin to hatch in 10-14 days. '
-        image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_16.jpg?itok=18idxfuY'
+      8:
+        -
+          headline: 'June 8, 1966'
+          content: 'The Polyphemus moths have begun to emerge from their cocoons - 7 females and 2 males emerge in one day. I put the females into 3 separate mating boxes and leave them by an open window so that they can release their pheromones. By 1 am, they have called in a couple of male moths. I mate two of the females with wild males.'
+      9:
+        -
+          headline: 'June 9, 1966'
+          content: 'I release all the moths except one of the pregnant Polyphemus moths which I keep in a paper bag to lay her eggs.'
+          image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_9.jpg?itok=9i7qSooF'
+      11:
+        -
+          headline: 'June 10-11, 1966'
+          content: 'The female Polyphemus has laid a total of 103 eggs. Half of these eggs are now in the Ecology Lab under modified temperature and humidity conditions. As a control measure, the other half of the eggs have been placed in a natural area, their habitat was not modified in any way so that they are subject to natural conditions.'
+          image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_10.jpg?itok=rZoYiTP_'
+      13:
+        -
+          headline: 'June 13, 1966'
+          content: 'A total of 10 males and 1 female Cecropia Moths have emerged, which is a stark contrast to the sex ratio of the Polyphemus moths. I will attempt to mate the female tonight using the same method as the Polyphemus moths. I will also be releasing the males tonight, but I have tagged them with small stickers to prevent inbreeding should they find their way back to the female through her pheromones.'
+          image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_13.jpg?itok=-TIDW7D8'
+      16:
+        -
+          headline: 'June 16 - 18, 1966'
+          content: 'Successfully mated a Cecropia moth at 2:40 am on June16th, and over the next 2 days she laid 153 eggs into a paper bag.  However, she presented odd behaviour while laying eggs, and laid thick bundles of 10-20 eggs on her legs rather than on the bag. Usually a female will lay groups of 3 eggs randomly, and never on her own body. I removed them from her and pulled apart the eggs before the substrate used to stick eggs to leaves completely dried. However I do not know if I have accidentally damaged any eggs in the process, despite my carefulness. This will be interesting to observe once the caterpillars begin to hatch in 10-14 days. '
+          image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_16.jpg?itok=18idxfuY'
 
     7:
-      -
-        headline: 'June 8, 1966'
-        content: 'The Polyphemus moths have begun to emerge from their cocoons - 7 females and 2 males emerge in one day. I put the females into 3 separate mating boxes and leave them by an open window so that they can release their pheromones. By 1 am, they have called in a couple of male moths. I mate two of the females with wild males.'
-      -
-        headline: 'June 9, 1966'
-        content: 'I release all the moths except one of the pregnant Polyphemus moths which I keep in a paper bag to lay her eggs.'
-        image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_9.jpg?itok=9i7qSooF'
-      -
-        headline: 'June 10-11, 1966'
-        content: 'The female Polyphemus has laid a total of 103 eggs. Half of these eggs are now in the Ecology Lab under modified temperature and humidity conditions. As a control measure, the other half of the eggs have been placed in a natural area, their habitat was not modified in any way so that they are subject to natural conditions.'
-        image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_10.jpg?itok=rZoYiTP_'
-      -
-        headline: 'June 13, 1966'
-        content: 'A total of 10 males and 1 female Cecropia Moths have emerged, which is a stark contrast to the sex ratio of the Polyphemus moths. I will attempt to mate the female tonight using the same method as the Polyphemus moths. I will also be releasing the males tonight, but I have tagged them with small stickers to prevent inbreeding should they find their way back to the female through her pheromones.'
-        image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_13.jpg?itok=-TIDW7D8'
-      -
-        headline: 'June 16 - 18, 1966'
-        content: 'Successfully mated a Cecropia moth at 2:40 am on June16th, and over the next 2 days she laid 153 eggs into a paper bag.  However, she presented odd behaviour while laying eggs, and laid thick bundles of 10-20 eggs on her legs rather than on the bag. Usually a female will lay groups of 3 eggs randomly, and never on her own body. I removed them from her and pulled apart the eggs before the substrate used to stick eggs to leaves completely dried. However I do not know if I have accidentally damaged any eggs in the process, despite my carefulness. This will be interesting to observe once the caterpillars begin to hatch in 10-14 days. '
-        image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_16.jpg?itok=18idxfuY'
+      8:
+        -
+          headline: 'June 8, 1966'
+          content: 'The Polyphemus moths have begun to emerge from their cocoons - 7 females and 2 males emerge in one day. I put the females into 3 separate mating boxes and leave them by an open window so that they can release their pheromones. By 1 am, they have called in a couple of male moths. I mate two of the females with wild males.'
+      9:
+        -
+          headline: 'June 9, 1966'
+          content: 'I release all the moths except one of the pregnant Polyphemus moths which I keep in a paper bag to lay her eggs.'
+          image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_9.jpg?itok=9i7qSooF'
+      10:
+        -
+          headline: 'June 10-11, 1966'
+          content: 'The female Polyphemus has laid a total of 103 eggs. Half of these eggs are now in the Ecology Lab under modified temperature and humidity conditions. As a control measure, the other half of the eggs have been placed in a natural area, their habitat was not modified in any way so that they are subject to natural conditions.'
+          image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_10.jpg?itok=rZoYiTP_'
+      13:
+        -
+          headline: 'June 13, 1966'
+          content: 'A total of 10 males and 1 female Cecropia Moths have emerged, which is a stark contrast to the sex ratio of the Polyphemus moths. I will attempt to mate the female tonight using the same method as the Polyphemus moths. I will also be releasing the males tonight, but I have tagged them with small stickers to prevent inbreeding should they find their way back to the female through her pheromones.'
+          image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_13.jpg?itok=-TIDW7D8'
+      16:
+        -
+          headline: 'June 16 - 18, 1966'
+          content: 'Successfully mated a Cecropia moth at 2:40 am on June16th, and over the next 2 days she laid 153 eggs into a paper bag.  However, she presented odd behaviour while laying eggs, and laid thick bundles of 10-20 eggs on her legs rather than on the bag. Usually a female will lay groups of 3 eggs randomly, and never on her own body. I removed them from her and pulled apart the eggs before the substrate used to stick eggs to leaves completely dried. However I do not know if I have accidentally damaged any eggs in the process, despite my carefulness. This will be interesting to observe once the caterpillars begin to hatch in 10-14 days. '
+          image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_16.jpg?itok=18idxfuY'
+
     8:
-      -
-        headline: 'aug 8, 1966'
-        content: 'The Polyphemus moths have begun to emerge from their cocoons - 7 females and 2 males emerge in one day. I put the females into 3 separate mating boxes and leave them by an open window so that they can release their pheromones. By 1 am, they have called in a couple of male moths. I mate two of the females with wild males.'
-      -
-        headline: 'aug 9, 1966'
-        content: 'I release all the moths except one of the pregnant Polyphemus moths which I keep in a paper bag to lay her eggs.'
-        image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_9.jpg?itok=9i7qSooF'
-      -
-        headline: 'aug 10-11, 1966'
-        content: 'The female Polyphemus has laid a total of 103 eggs. Half of these eggs are now in the Ecology Lab under modified temperature and humidity conditions. As a control measure, the other half of the eggs have been placed in a natural area, their habitat was not modified in any way so that they are subject to natural conditions.'
-        image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_10.jpg?itok=rZoYiTP_'
-      -
-        headline: 'aug 13, 1966'
-        content: 'A total of 10 males and 1 female Cecropia Moths have emerged, which is a stark contrast to the sex ratio of the Polyphemus moths. I will attempt to mate the female tonight using the same method as the Polyphemus moths. I will also be releasing the males tonight, but I have tagged them with small stickers to prevent inbreeding should they find their way back to the female through her pheromones.'
-        image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_13.jpg?itok=-TIDW7D8'
-      -
-        headline: 'aug 16 - 18, 1966'
-        content: 'Successfully mated a Cecropia moth at 2:40 am on June16th, and over the next 2 days she laid 153 eggs into a paper bag.  However, she presented odd behaviour while laying eggs, and laid thick bundles of 10-20 eggs on her legs rather than on the bag. Usually a female will lay groups of 3 eggs randomly, and never on her own body. I removed them from her and pulled apart the eggs before the substrate used to stick eggs to leaves completely dried. However I do not know if I have accidentally damaged any eggs in the process, despite my carefulness. This will be interesting to observe once the caterpillars begin to hatch in 10-14 days. '
-        image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_16.jpg?itok=18idxfuY'
+      8:
+        -
+          headline: 'aug 8, 1966'
+          content: 'The Polyphemus moths have begun to emerge from their cocoons - 7 females and 2 males emerge in one day. I put the females into 3 separate mating boxes and leave them by an open window so that they can release their pheromones. By 1 am, they have called in a couple of male moths. I mate two of the females with wild males.'
+      9:
+        -
+          headline: 'aug 9, 1966'
+          content: 'I release all the moths except one of the pregnant Polyphemus moths which I keep in a paper bag to lay her eggs.'
+          image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_9.jpg?itok=9i7qSooF'
+      10:
+        -
+          headline: 'aug 10-11, 1966'
+          content: 'The female Polyphemus has laid a total of 103 eggs. Half of these eggs are now in the Ecology Lab under modified temperature and humidity conditions. As a control measure, the other half of the eggs have been placed in a natural area, their habitat was not modified in any way so that they are subject to natural conditions.'
+          image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_10.jpg?itok=rZoYiTP_'
+      13:
+        -
+          headline: 'aug 13, 1966'
+          content: 'A total of 10 males and 1 female Cecropia Moths have emerged, which is a stark contrast to the sex ratio of the Polyphemus moths. I will attempt to mate the female tonight using the same method as the Polyphemus moths. I will also be releasing the males tonight, but I have tagged them with small stickers to prevent inbreeding should they find their way back to the female through her pheromones.'
+          image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_13.jpg?itok=-TIDW7D8'
+      16:
+        -
+          headline: 'aug 16 - 18, 1966'
+          content: 'Successfully mated a Cecropia moth at 2:40 am on June16th, and over the next 2 days she laid 153 eggs into a paper bag.  However, she presented odd behaviour while laying eggs, and laid thick bundles of 10-20 eggs on her legs rather than on the bag. Usually a female will lay groups of 3 eggs randomly, and never on her own body. I removed them from her and pulled apart the eggs before the substrate used to stick eggs to leaves completely dried. However I do not know if I have accidentally damaged any eggs in the process, despite my carefulness. This will be interesting to observe once the caterpillars begin to hatch in 10-14 days. '
+          image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_16.jpg?itok=18idxfuY'
 
   1967:
     1:
-      -
-        headline: 'Jan 8, 1967'
-        content: 'The Polyphemus moths have begun to emerge from their cocoons - 7 females and 2 males emerge in one day. I put the females into 3 separate mating boxes and leave them by an open window so that they can release their pheromones. By 1 am, they have called in a couple of male moths. I mate two of the females with wild males.'
-      -
-        headline: 'Jan 9, 1967'
-        content: 'I release all the moths except one of the pregnant Polyphemus moths which I keep in a paper bag to lay her eggs.'
-        image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_9.jpg?itok=9i7qSooF'
-      -
-        headline: 'Jan 10-11, 1967'
-        content: 'The female Polyphemus has laid a total of 103 eggs. Half of these eggs are now in the Ecology Lab under modified temperature and humidity conditions. As a control measure, the other half of the eggs have been placed in a natural area, their habitat was not modified in any way so that they are subject to natural conditions.'
-        image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_10.jpg?itok=rZoYiTP_'
-      -
-        headline: 'Jan 13, 1967'
-        content: 'A total of 10 males and 1 female Cecropia Moths have emerged, which is a stark contrast to the sex ratio of the Polyphemus moths. I will attempt to mate the female tonight using the same method as the Polyphemus moths. I will also be releasing the males tonight, but I have tagged them with small stickers to prevent inbreeding should they find their way back to the female through her pheromones.'
-        image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_13.jpg?itok=-TIDW7D8'
-      -
-        headline: 'Jan 16 - 18, 1967'
-        content: 'Successfully mated a Cecropia moth at 2:40 am on June16th, and over the next 2 days she laid 153 eggs into a paper bag.  However, she presented odd behaviour while laying eggs, and laid thick bundles of 10-20 eggs on her legs rather than on the bag. Usually a female will lay groups of 3 eggs randomly, and never on her own body. I removed them from her and pulled apart the eggs before the substrate used to stick eggs to leaves completely dried. However I do not know if I have accidentally damaged any eggs in the process, despite my carefulness. This will be interesting to observe once the caterpillars begin to hatch in 10-14 days. '
-        image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_16.jpg?itok=18idxfuY'
+      8:
+        -
+          headline: 'Jan 8, 1967'
+          content: 'The Polyphemus moths have begun to emerge from their cocoons - 7 females and 2 males emerge in one day. I put the females into 3 separate mating boxes and leave them by an open window so that they can release their pheromones. By 1 am, they have called in a couple of male moths. I mate two of the females with wild males.'
+      9:
+        -
+          headline: 'Jan 9, 1967'
+          content: 'I release all the moths except one of the pregnant Polyphemus moths which I keep in a paper bag to lay her eggs.'
+          image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_9.jpg?itok=9i7qSooF'
+      10:
+        -
+          headline: 'Jan 10-11, 1967'
+          content: 'The female Polyphemus has laid a total of 103 eggs. Half of these eggs are now in the Ecology Lab under modified temperature and humidity conditions. As a control measure, the other half of the eggs have been placed in a natural area, their habitat was not modified in any way so that they are subject to natural conditions.'
+          image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_10.jpg?itok=rZoYiTP_'
+      13:
+        -
+          headline: 'Jan 13, 1967'
+          content: 'A total of 10 males and 1 female Cecropia Moths have emerged, which is a stark contrast to the sex ratio of the Polyphemus moths. I will attempt to mate the female tonight using the same method as the Polyphemus moths. I will also be releasing the males tonight, but I have tagged them with small stickers to prevent inbreeding should they find their way back to the female through her pheromones.'
+          image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_13.jpg?itok=-TIDW7D8'
+      16:
+        -
+          headline: 'Jan 16 - 18, 1967'
+          content: 'Successfully mated a Cecropia moth at 2:40 am on June16th, and over the next 2 days she laid 153 eggs into a paper bag.  However, she presented odd behaviour while laying eggs, and laid thick bundles of 10-20 eggs on her legs rather than on the bag. Usually a female will lay groups of 3 eggs randomly, and never on her own body. I removed them from her and pulled apart the eggs before the substrate used to stick eggs to leaves completely dried. However I do not know if I have accidentally damaged any eggs in the process, despite my carefulness. This will be interesting to observe once the caterpillars begin to hatch in 10-14 days. '
+          image: 'https://uwaterloo.ca/ecology-lab/sites/ca.ecology-lab/files/styles/thumbnail/public/june_16.jpg?itok=18idxfuY'
 
 #  -
 #    year: '1966'
-- 
GitLab