Skip to content

Commit

Permalink
initial try
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedfahadpk committed Jan 20, 2020
1 parent 1714cc1 commit 37b32fc
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ body {
position: relative;
display: block;
width: 100%;
height: 120px;
height: 300px;
padding: 0px;
}
#event-list > li > time,
Expand Down
11 changes: 8 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
<div class="container">
<div class="row">
<div class="[ col-xs-12 col-sm-offset-2 col-sm-8 ]">
<ul id="eventList">
<ul id="event-list">
<li>
<time datetime="2014-07-20">
<span class="day">4</span>
<span class="day">5</span>
<span class="month">Jul</span>
<span class="year">2014</span>
<span class="time">ALL DAY</span>
Expand All @@ -46,7 +46,12 @@ <h2 class="title">Independence Day</h2>
<li class="google-plus" style="width:33%;"><a href="#google-plus"><span class="fa fa-google-plus"></span></a></li>
</ul>
</div>
</li>
</li>

<li>

</li>

</ul>
</div>
</div>
Expand Down
8 changes: 6 additions & 2 deletions js/loadData.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@
"created_time": "2019-12-16T09:16:37.486129Z",
"last_modified_time": "2019-12-16T09:16:37.670531Z",
"date_published": null,
"start_time": "2020-02-29",
"end_time": "2020-03-21",
"start_time": {
"fi": "2020-02-29"
},
"end_time": {
"fi": "2020-03-21"
},
"custom_data": null,
"audience_min_age": null,
"audience_max_age": null,
Expand Down
11 changes: 9 additions & 2 deletions js/scripts.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
window.dataLayer.array.forEach(function(event){
window.dataLayer.forEach(function(event){
var newEvent = document.createElement('li');
newEvent.innerHTML = '<div class="info"><h2 class="title">' event.short_description.fi '</h2></div>';
newEvent.innerHTML = '<div class="info"><h2 class="title">'
+ event.short_description.fi
+ '</h2><p class="desc">'
+ event.description.fi
+ '</p><p class="dates">'
+ event.start_time.fi + event.end_time.fi
+ '</p></div>';

document.getElementById('event-list').appendChild(newEvent);
});

0 comments on commit 37b32fc

Please sign in to comment.