Skip to content

Commit 4dc384c

Browse files
committed
Add Hello World blog post
1 parent 7a4e8ad commit 4dc384c

File tree

241 files changed

+82102
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

241 files changed

+82102
-3
lines changed

content/blog/hello-world.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
+++
2+
title = "Hello, world!"
3+
description = ""
4+
date = 2022-03-08T18:14:00
5+
updated = 2022-03-08T18:14:00
6+
draft = false # Leave this as true so that it is not published
7+
template = "blog/page.html"
8+
9+
[taxonomies]
10+
authors = ["Public"]
11+
12+
[extra]
13+
lead = "The Haskell Cryptography Group is proud to publicly broadcast its existence to the wider community."
14+
+++
15+
16+
Affiliated with the Haskell Foundation, we are an organisation that provides a support structure for open-source maintainers producing projects wrapping or implementing cryptography.
17+
18+
Cryptography is a sensitive topic in a programming language ecosystem, and the historical model of letting the ecosystem self-regulate in the usual way isn’t appropriate.
19+
This is why, with the support of the Haskell Foundation, we are establishing a group with a clear governance structure and goals to make change for the better in our ecosystem.
20+
21+
We offer support to cryptography projects when we can, providing a space of mutual help and innovation for the projects that are given to us. We also nurture new approaches and designs in cryptography libraries, so that the ecosystem does not suffer from the risks associated with monoculture, whilst maintaining high standards of code quality and security.
22+
23+
If you are interested in our work and wish to get involved, you can see our [by-laws][bylaws] on GitHub.
24+
Our [projects][projects] include bindings to libsodium, blake3, OpenSSL, as well as implementations like Cacophony for the [Noise Protocol][Noise].
25+
26+
The official coordination space is on the Haskell Foundation Slack workspace, on the [#cryptography-group][slack] channel, and we maintain a presence on the [#haskell-cryptography][irc] IRC channel on LiberaChat, where general discussions on cryptography in Haskell are welcome.
27+
28+
[bylaws]: https://github.com/haskell-cryptography/governance
29+
[projects]: https://haskell-cryptography.github.io/projects/
30+
[Noise]: https://noiseprotocol.org/
31+
[slack]: https://join.slack.com/t/haskell-foundation/shared_invite/zt-z45o9x38-8L55P27r12YO0YeEufcO2w
32+
[irc]: https://kiwiirc.com/nextclient/irc.libera.chat/#haskell-cryptography

public/_headers

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/*
2+
Access-Control-Allow-Origin: *

public/android-chrome-192x192.png

5.63 KB
Loading

public/android-chrome-512x512.png

20.3 KB
Loading

public/apple-touch-icon.png

4.99 KB
Loading

public/bootstrap/scss/bootstrap-grid.css

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/bootstrap/scss/bootstrap-reboot.css

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/bootstrap/scss/bootstrap-utilities.css

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/bootstrap/scss/bootstrap.css

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/doks.png

8.02 KB
Loading

public/doks.svg

Lines changed: 1 addition & 0 deletions
Loading

public/elasticlunr.min.js

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/favicon-16x16.png

416 Bytes
Loading

public/favicon-32x32.png

773 Bytes
Loading

public/favicon.ico

15 KB
Binary file not shown.

public/favicon.svg

Lines changed: 1 addition & 0 deletions
Loading
12.6 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12.6 KB
Binary file not shown.
9.59 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

public/index.js

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
var suggestions = document.getElementById('suggestions');
2+
var userinput = document.getElementById('userinput');
3+
4+
document.addEventListener('keydown', inputFocus);
5+
6+
function inputFocus(e) {
7+
8+
if (e.keyCode === 191 ) {
9+
e.preventDefault();
10+
userinput.focus();
11+
}
12+
13+
if (e.keyCode === 27 ) {
14+
userinput.blur();
15+
suggestions.classList.add('d-none');
16+
}
17+
18+
}
19+
20+
document.addEventListener('click', function(event) {
21+
22+
var isClickInsideElement = suggestions.contains(event.target);
23+
24+
if (!isClickInsideElement) {
25+
suggestions.classList.add('d-none');
26+
}
27+
28+
});
29+
30+
/*
31+
Source:
32+
- https://dev.to/shubhamprakash/trap-focus-using-javascript-6a3
33+
*/
34+
35+
document.addEventListener('keydown',suggestionFocus);
36+
37+
function suggestionFocus(e){
38+
39+
const focusableSuggestions= suggestions.querySelectorAll('a');
40+
const focusable= [...focusableSuggestions];
41+
const index = focusable.indexOf(document.activeElement);
42+
43+
let nextIndex = 0;
44+
45+
if (e.keyCode === 38) {
46+
e.preventDefault();
47+
nextIndex= index > 0 ? index-1 : 0;
48+
focusableSuggestions[nextIndex].focus();
49+
}
50+
else if (e.keyCode === 40) {
51+
e.preventDefault();
52+
nextIndex= index+1 < focusable.length ? index+1 : index;
53+
focusableSuggestions[nextIndex].focus();
54+
}
55+
56+
}
57+
58+
59+
/*
60+
Source:
61+
- https://github.com/nextapps-de/flexsearch#index-documents-field-search
62+
- https://raw.githack.com/nextapps-de/flexsearch/master/demo/autocomplete.html
63+
*/
64+
65+
(function(){
66+
67+
var index = new FlexSearch({
68+
preset: 'score',
69+
cache: true,
70+
doc: {
71+
id: 'id',
72+
field: [
73+
'title',
74+
'description',
75+
'content',
76+
],
77+
store: [
78+
'href',
79+
'title',
80+
'description',
81+
],
82+
},
83+
});
84+
85+
var docs = [
86+
{{ range $index, $page := (where .Site.Pages "Section" "docs") -}}
87+
{
88+
id: {{ $index }},
89+
href: "{{ .RelPermalink | relURL }}",
90+
title: {{ .Title | jsonify }},
91+
description: {{ .Params.description | jsonify }},
92+
content: {{ .Content | jsonify }}
93+
},
94+
{{ end -}}
95+
];
96+
97+
index.add(docs);
98+
99+
userinput.addEventListener('input', show_results, true);
100+
suggestions.addEventListener('click', accept_suggestion, true);
101+
102+
function show_results(){
103+
104+
var value = this.value;
105+
var results = index.search(value, 5);
106+
var entry, childs = suggestions.childNodes;
107+
var i = 0, len = results.length;
108+
109+
suggestions.classList.remove('d-none');
110+
111+
results.forEach(function(page) {
112+
113+
entry = document.createElement('div');
114+
115+
entry.innerHTML = '<a href><span></span><span></span></a>';
116+
117+
a = entry.querySelector('a'),
118+
t = entry.querySelector('span:first-child'),
119+
d = entry.querySelector('span:nth-child(2)');
120+
121+
a.href = page.href;
122+
t.textContent = page.title;
123+
d.textContent = page.description;
124+
125+
suggestions.appendChild(entry);
126+
127+
});
128+
129+
while(childs.length > len){
130+
131+
suggestions.removeChild(childs[i])
132+
}
133+
134+
}
135+
136+
function accept_suggestion(){
137+
138+
while(suggestions.lastChild){
139+
140+
suggestions.removeChild(suggestions.lastChild);
141+
}
142+
143+
return false;
144+
}
145+
146+
}());

public/js/main.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Set darkmode
2+
document.getElementById('mode').addEventListener('click', () => {
3+
4+
document.body.classList.toggle('dark');
5+
localStorage.setItem('theme', document.body.classList.contains('dark') ? 'dark' : 'light');
6+
7+
});
8+
9+
// enforce local storage setting but also fallback to user-agent preferences
10+
if (localStorage.getItem('theme') === 'dark' || (!localStorage.getItem('theme') && window.matchMedia("(prefers-color-scheme: dark)").matches)) {
11+
12+
document.body.classList.add('dark');
13+
14+
}

0 commit comments

Comments
 (0)