-
Notifications
You must be signed in to change notification settings - Fork 236
/
press.html
executable file
·91 lines (85 loc) · 3.32 KB
/
press.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
layout: default
title: Press Information - Sugar Labs
permalink: /press/index.html
---
<!-- Title section -->
<div class="section-title1" >
<span class="tag tag-regular">NEWS AND PRESS</span>
</div>
<section id="call-to-action">
<div class="container">
<div class="row justify-content-center">
<div class="col-md-12" >
<span>To be added to our press list, email us at <a href="mailto:[email protected]">[email protected]</a></span>
</div>
</div>
</div>
</section>
<!-- "Press information" section -->
<section id="intro">
<div class="justify-content-center">
<h2 class="text-center">PRESS RELEASE</h2>
</div>
<div class="container mt-5 my-2">
<div class="border-bottom pb-3 mb-3">
<ol id="postList">
{% for post in site.categories.press limit:2 %}
<li class="listFont">
<a href="{{ post.url }}">{{ post.title }}</a>
<i style="display: block;">{{ post.date | date: "%b %-d %Y" }}</i>
<hr>
</li>
{% endfor %}
</ol>
<button style="
display: block;
margin: 0 auto;
cursor: pointer;
" id="toggleButton" onclick="togglePost()">Show More
</button>
<script>
const postListEl = document.getElementById("postList");
const toggleBtn = document.getElementById("toggleButton");
let isShowingAll = false;
function togglePost() {
if (!isShowingAll) {
postListEl.innerHTML = `
{% for post in site.categories.press %}
<li class="listFont">
<a href="{{ post.url }}">{{ post.title }}</a>
<i style="display: block;">{{ post.date | date: "%b %-d %Y" }}</i>
<hr>
</li>
{% endfor %}
`;
toggleBtn.textContent = "Show Less";
isShowingAll = true;
} else {
postListEl.innerHTML = `
{% for post in site.categories.press limit:2 %}
<li class="listFont">
<a href="{{ post.url }}">{{ post.title }}</a>
<i style="display: block;">{{ post.date | date: "%b %-d %Y" }}</i>
<hr>
</li>
{% endfor %}
`;
toggleBtn.textContent = "Show More";
isShowingAll = false;
}
}
</script>
</div>
</div>
</section>
<!-- Useful materials and "Back to main page" section -->
<section id="call-to-action">
<div class="container">
<div class="row justify-content-center">
<div class="col-md-12" >
<a href="{{ site.baseurl }}/" ><button type="button" class="btn bt-raised btn-custom bt lastButtonMargin" >Return to main page</button></a>
</div>
</div>
</div>
</section>