Use Rust for the front-end too (#374)
Rust can compile to WASM, so let's use it for front-end code as well. To compile the front-end: ``` cargo install cargo-web cargo web deploy -p plume-front ```
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
const articleContent = document.querySelector('#plume-editor')
|
||||
const offset = articleContent.offsetHeight - articleContent.clientHeight
|
||||
|
||||
articleContent.addEventListener('keydown', () => {
|
||||
articleContent.style.height = 'auto'
|
||||
articleContent.style.height = `${articleContent.scrollHeight - offset}px`
|
||||
})
|
||||
@@ -1,13 +0,0 @@
|
||||
// It should normally be working fine even without this code
|
||||
// But :focus-within is not yet supported by Webkit/Blink
|
||||
|
||||
const button = document.getElementById('menu')
|
||||
const menu = document.getElementById('content')
|
||||
|
||||
button.addEventListener('click', () => {
|
||||
menu.classList.add('show')
|
||||
})
|
||||
|
||||
menu.addEventListener('click', () => {
|
||||
menu.classList.remove('show')
|
||||
})
|
||||
@@ -1,13 +0,0 @@
|
||||
window.onload = function(evt) {
|
||||
var form = document.getElementById('form');
|
||||
form.addEventListener('submit', function () {
|
||||
for (var input of form.getElementsByTagName('input')) {
|
||||
if (input.name === '') {
|
||||
input.name = input.id
|
||||
}
|
||||
if (input.name && !input.value) {
|
||||
input.name = '';
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user