forked from sugarlabs/www
-
Notifications
You must be signed in to change notification settings - Fork 0
/
press.html
executable file
·99 lines (93 loc) · 3.74 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
91
92
93
94
95
96
97
98
---
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" >
<h2 >NEWSLETTER</h2>
<p>Subscribe to our newsletter to get the most up-to-date Sugar Labs news in your inbox.</p>
<form action="https://buttondown.com/api/emails/embed-subscribe/sugarlabs" method="post" class="embeddable-buttondown-form">
<p>Sign up for our mailing list to receive regular news and updates from Sugar Labs.</p>
<label for="email">Email</label>
<input type="email" name="email" placeholder="you@example.com" />
<input type="hidden" value="1" name="embed" />
<input type="submit" value="Subscribe" />
</form><br>
</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.posts limit:10 %}
<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.posts %}
<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.posts limit:10 %}
<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>