2018-07-08 23:31:21 +02:00
|
|
|
<title eo>Kriptopter</title>
|
|
|
|
<title en>Cryptopter</title>
|
|
|
|
<title fr>Cryptoptère</title>
|
|
|
|
<style lang="eo,en,fr">
|
|
|
|
[_lang_] { display: none; }
|
|
|
|
:root[lang=_lang_] [_lang_] { display: inherit; }
|
|
|
|
|
|
|
|
:root[lang=_lang_] [_lang_\:title]:hover::after { display: inherit }
|
|
|
|
|
|
|
|
/* [_lang_\:title]:after {
|
|
|
|
display: none;
|
|
|
|
position: absolute;
|
|
|
|
background: grey;
|
|
|
|
border: 1px solid black;
|
|
|
|
color: white;
|
|
|
|
padding: .1em .3em;
|
|
|
|
margin-left: -5%;
|
|
|
|
}
|
|
|
|
:root[lang=_lang_] [_lang_\:title]:after { content: attr(_lang_\:title) } */
|
|
|
|
</style>
|
2018-07-01 17:49:54 +02:00
|
|
|
<style>
|
2018-07-01 19:26:53 +02:00
|
|
|
body{
|
|
|
|
display: grid;
|
|
|
|
grid-template: "menu menu menu" 2em
|
|
|
|
"main main main" auto
|
2018-07-08 23:31:21 +02:00
|
|
|
"left middle right" 3em
|
|
|
|
/ 7em auto 7em;
|
2018-07-01 19:26:53 +02:00
|
|
|
height: 100%;
|
|
|
|
grid-gap: 1em;
|
|
|
|
margin: 0;
|
|
|
|
background: lightgrey;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 1em;
|
|
|
|
}
|
|
|
|
|
|
|
|
menu { grid-area: menu }
|
|
|
|
input[type=file] { display: none; }
|
|
|
|
|
|
|
|
ui-data {
|
|
|
|
grid-area: main;
|
|
|
|
margin-top: -1.05em;
|
|
|
|
height: calc(100% + 1.05em);
|
|
|
|
}
|
|
|
|
|
|
|
|
button[encrypt] { grid-area: left }
|
|
|
|
pass { grid-area: middle }
|
|
|
|
button[decrypt] { grid-area: right }
|
|
|
|
|
|
|
|
button[encrypt],
|
|
|
|
button[decrypt] {
|
|
|
|
font-weight: bolder;
|
|
|
|
text-transform: uppercase;
|
|
|
|
}
|
|
|
|
menu {
|
|
|
|
display: flex;
|
|
|
|
height: 2em;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
2018-07-08 23:31:21 +02:00
|
|
|
padding-left: 1px;
|
2018-07-01 19:26:53 +02:00
|
|
|
}
|
2018-07-08 23:31:21 +02:00
|
|
|
menu > * {
|
|
|
|
margin-left: -1px;
|
|
|
|
}
|
2018-07-01 19:26:53 +02:00
|
|
|
|
2018-07-08 23:31:21 +02:00
|
|
|
menu > button {
|
|
|
|
font-size: 1em;
|
|
|
|
height: 2em;
|
|
|
|
width: 2em;
|
|
|
|
}
|
|
|
|
menu > button > i {
|
|
|
|
width: 1em;
|
|
|
|
}
|
|
|
|
menu > button > .fa-caret-up {
|
|
|
|
position: absolute;
|
|
|
|
top: 0.75em;
|
|
|
|
}
|
|
|
|
menu > button > .fa-caret-down {
|
|
|
|
position: absolute;
|
|
|
|
top: 2.2em;
|
|
|
|
}
|
|
|
|
|
|
|
|
[select-get], [select-set], [point], [page] { display: none; }
|
|
|
|
.parented [select-get], .parented [select-set], .parented [point], .parented [page] { display: inherit; }
|
2018-07-01 19:26:53 +02:00
|
|
|
|
|
|
|
input[filename] { flex: 1; padding: 0 .5em; }
|
|
|
|
|
|
|
|
pass {
|
|
|
|
position: relative;
|
|
|
|
height: 2em;
|
|
|
|
border: 1px solid darkgrey;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
pass input { filter: blur(5px); width: 100%; border: none;
|
|
|
|
height: 100%;
|
|
|
|
padding: 0 .5em; }
|
|
|
|
pass i { position: absolute; top: .5em; right: .5em;}
|
|
|
|
pass input.clear { filter: blur(0) }
|
|
|
|
|
2018-07-08 23:31:21 +02:00
|
|
|
i.fa-file {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
i.fa-file.crypted {
|
|
|
|
font-size: 1.5em;
|
|
|
|
color: rebeccapurple;
|
|
|
|
}
|
|
|
|
i.fa-file i.fa-key {
|
|
|
|
position: absolute;
|
|
|
|
font-size: 0.6em;
|
|
|
|
top: .5em;
|
|
|
|
left: -.5em;
|
|
|
|
text-shadow: 0 0 1px black, 0 0 1px black, 0 0 1px black, 0 0 1px black, 0 0 1px black, 0 0 1px black, 0 0 1px black, 0 0 1px black, 0 0 1px black, 0 0 1px black, 0 0 1px black, 0 0 1px black, 0 0 1px black;
|
|
|
|
transform: rotate(-50deg) scaleX(-1);
|
|
|
|
font-size: 0.7em;
|
|
|
|
}
|
|
|
|
|
|
|
|
i.fa-key {
|
|
|
|
color: lightseagreen
|
|
|
|
}
|
|
|
|
i.fa-key.pub {
|
|
|
|
color: lawngreen
|
|
|
|
}
|
|
|
|
i.fa-key.priv {
|
|
|
|
color: orangered
|
|
|
|
}
|
|
|
|
|
2018-07-01 19:26:53 +02:00
|
|
|
ui-toast {
|
|
|
|
position: fixed;
|
|
|
|
text-align: center;
|
2018-07-08 23:31:21 +02:00
|
|
|
background: white;
|
2018-07-01 19:26:53 +02:00
|
|
|
top: 50%;
|
|
|
|
left: 50%;
|
2018-07-08 23:31:21 +02:00
|
|
|
width: 60em;
|
|
|
|
margin: -1em -30em;
|
2018-07-01 19:26:53 +02:00
|
|
|
height: 2em;
|
2018-07-08 23:31:21 +02:00
|
|
|
box-shadow: 0 0.1em 1em darkgrey;
|
|
|
|
border: 1px solid darkgrey;
|
|
|
|
line-height: 2em;
|
2018-07-01 19:26:53 +02:00
|
|
|
}
|
2018-07-08 23:31:21 +02:00
|
|
|
ui-toast[error] {
|
|
|
|
color: red;
|
|
|
|
border-color: red;
|
|
|
|
}
|
2018-07-01 17:49:54 +02:00
|
|
|
</style>
|
2018-07-01 19:26:53 +02:00
|
|
|
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/solid.css" integrity="sha384-TbilV5Lbhlwdyc4RuIV/JhD8NR+BfMrvz4BL5QFa2we1hQu6wvREr3v6XSRfCTRp" crossorigin="anonymous">
|
|
|
|
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/regular.css" integrity="sha384-avJt9MoJH2rB4PKRsJRHZv7yiFZn8LrnXuzvmZoD3fh1aL6aM6s0BBcnCvBe6XSD" crossorigin="anonymous">
|
|
|
|
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/fontawesome.css" integrity="sha384-ozJwkrqb90Oa3ZNb+yKFW2lToAWYdTiF1vt8JiH5ptTGHTGcN7qdoR1F95e0kYyG" crossorigin="anonymous">
|
|
|
|
|
|
|
|
|
|
|
|
<menu>
|
2018-07-08 23:31:21 +02:00
|
|
|
<button select-get title="Get selected text on the page"
|
|
|
|
onclick="$text.value = getParentSelection()">
|
|
|
|
<i class="fas fa-align-left"></i>
|
|
|
|
<i class="fas fa-caret-down"></i>
|
2018-07-01 19:26:53 +02:00
|
|
|
</button>
|
2018-07-08 23:31:21 +02:00
|
|
|
<!-- <button point title="Point the element in the page (not available yet)"
|
|
|
|
disabled onclick="">
|
2018-07-01 19:26:53 +02:00
|
|
|
<i class="fas fa-mouse-pointer"></i>
|
2018-07-08 23:31:21 +02:00
|
|
|
</button> -->
|
2018-07-01 19:26:53 +02:00
|
|
|
<button page title="Load the whole page content"
|
|
|
|
onclick="$text.value = opener.document.body.textContent">
|
|
|
|
<i class="far fa-file"></i>
|
2018-07-08 23:31:21 +02:00
|
|
|
<i class="fas fa-caret-down"></i>
|
2018-07-01 19:26:53 +02:00
|
|
|
</button>
|
|
|
|
<button open title="Load a file from disk"
|
|
|
|
onclick="$`[type=file]`.click()">
|
|
|
|
<i class="far fa-folder-open"></i>
|
|
|
|
<input type="file" onchange="read(this.files[0]).then( s=> $text.value = s ); $filename.value = this.files[0].name"/>
|
|
|
|
</button>
|
2018-07-08 23:31:21 +02:00
|
|
|
|
|
|
|
<input filename type="text" eo:placeHolder="Filo nami" en:placeHolder="File name" fr:placeHolder="Nom du fichier"/>
|
|
|
|
|
|
|
|
<button save en:title="Save to disk" fr:title="Enregistrer sur le disque" eo:title="Sovargi al disko"
|
|
|
|
onclick="save($text.value,$filename.value||'krypta.krr').catch(bubbleOn(this))">
|
2018-07-01 19:26:53 +02:00
|
|
|
<i class="far fa-save"></i>
|
|
|
|
</button>
|
2018-07-08 23:31:21 +02:00
|
|
|
<button select-set en:title="Replace selected text on the page" fr:title="Remplacer la séléction" eo:title="Sovargi al disko"
|
|
|
|
onclick="setParentSelection( $text.value )">
|
|
|
|
<i class="fas fa-align-left"></i>
|
|
|
|
<i class="fas fa-caret-up"></i>
|
|
|
|
</button>
|
2018-07-01 19:26:53 +02:00
|
|
|
</menu>
|
2018-07-08 23:31:21 +02:00
|
|
|
<ui-data bin></ui-data>
|
|
|
|
|
|
|
|
|
|
|
|
<button encrypt onclick="encrypt3($text.value).then(res=>$text.value=res,bubbleOn(this))">
|
|
|
|
<i class="far fa-file crypted" style="font-size: 1.5em">
|
|
|
|
<i class="fas fa-key" style=""></i>
|
|
|
|
</i>
|
|
|
|
<lang eo>cifri</lang>
|
|
|
|
<lang en>encrypt</lang>
|
|
|
|
<lang fr>chiffrer</lang>
|
|
|
|
</button>
|
|
|
|
<!-- <button sign onclick="sign($text.value).then(res=>$text.value=res,bubbleOn(this))"> -->
|
|
|
|
<!-- <i class="fas fa-file-contract"></i></button> -->
|
2018-07-01 19:26:53 +02:00
|
|
|
<pass>
|
|
|
|
<input type="text" placeholder="Enter a password"/>
|
|
|
|
<i class="far fa-eye-slash" onmouseover="$pass.classList.add('clear');this.classList.remove('fa-eye-slash');this.classList.add('fa-eye')"
|
|
|
|
onmouseout="$pass.classList.remove('clear');this.classList.add('fa-eye-slash');this.classList.remove('fa-eye')"></i>
|
|
|
|
</pass>
|
2018-07-08 23:31:21 +02:00
|
|
|
<button decrypt onclick="decrypt3($text.value).then(res=>$text.value=res,bubbleOn(this))">
|
|
|
|
<i class="fas fa-file crypted" style="font-size: 1.5em">
|
|
|
|
<i class="fas fa-key" style=""></i>
|
|
|
|
</i>
|
|
|
|
<lang eo>decifri</lang>
|
|
|
|
<lang en>decrypt</lang>
|
|
|
|
<lang fr>déchiffrer</lang>
|
|
|
|
</button>
|
2018-07-01 19:26:53 +02:00
|
|
|
|
|
|
|
<template ui-data>
|
|
|
|
<style>
|
|
|
|
textarea {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
resize: none;
|
|
|
|
padding-bottom: 2em;
|
|
|
|
}
|
|
|
|
button {
|
|
|
|
position: relative;
|
|
|
|
top: -1.6em;
|
|
|
|
margin-right: -1px;
|
|
|
|
}
|
|
|
|
|
|
|
|
:host-context([bin]) [bin] { color: rebeccapurple }
|
|
|
|
:host-context([uint]) [uint] { color: rebeccapurple }
|
|
|
|
:host-context([utf8]) [utf8] { color: rebeccapurple }
|
|
|
|
:host-context([base64]) [base64] { color: rebeccapurple }
|
|
|
|
:host-context([frame]) [frame] { color: rebeccapurple }
|
|
|
|
</style>
|
|
|
|
<textarea></textarea>
|
|
|
|
</template>
|
|
|
|
|
2018-07-08 23:44:37 +02:00
|
|
|
<script ui src="./ui.js"></script>
|
|
|
|
<script lang src="./lang.js" lang="eo,en,fr"></script>
|
|
|
|
<script app src="./app.js"></script>
|