Public
Edited
Jan 9, 2024
Insert cell
Insert cell
<div class="space">
<div class="card-container">
<div class="card">
<div class="card-front bgi txt">
<div class="container">
<div class="row justify-content-end">
<div id="svg-lock" class="col-auto">
${html`${feather.icons.lock.toSvg()}`}
</div>
</div>
<div class="row">
<div class="col-4 d-flex align-items-center justify-content-end">
<img class="mb-3" style="width: 55px" src="https://www.svgrepo.com/show/233513/solar-system-orbit.svg"></img>
</div>
<div class="col-8">
<h5 class="mb-0">Success Network</h5>
<h1 class="mb-3">Passport</h1>
</div>
</div>
<div class="row">
<div class="col">
<img style="filter: blur(0px);" src="${await FileAttachment("linds-pxl.png").url()}" class="portrait"></img>
</div>
<div class="col">
<p class="mb-0"><b>Name:</b></p>
<p>Lindsay</p>
<p class="mb-0"><b>Zodiac:</b></p>
<p>☉ Aquarius </p>
</div>
<div class="col">
<p class="mb-0"><b>Key Word:</b></p>
<p>Love</p>
<p class="mb-0"><b>Origin:</b></p>
<p>Genesis</p>
</div>
<div class="col">
<p class="mb-0"><b>Satellite:</b></p>
<p>S.1.1</p>
<p class="mb-0"><b>Route:</b></p>
<p class="mb-0">B.1n.M.3a</p>
</div>
<div class="row">
<h4 class="text-center"> &gt&gt&gt&gt <b style="color: teal">LEVEL 1 </b> &lt&lt&lt&lt </h4>
</div>
<div class="row">
<p class="text-center"> ${demoHash}</p>
</div>
</div>
</div>
</div>
<div class="card-back">
<div class="container">
<div class="row thirds align-items-start justify-content-between">
<div id="svg-flip" class="col-auto">
${html`${feather.icons.repeat.toSvg()}`}
</div>
<div id="svg-lock" class="col-auto">
${html`${feather.icons.lock.toSvg()}`}
</div>
</div>
<div class="row thirds align-items-center justify-content-center">
<div class="col-auto">
<input type="text" class="form-control" placeholder="Unlock with Secret">
</div>
</div>
<div class="row thirds align-items-end justify-content-end">
</div>
</div>
</div>
</div>
</div>
</div>

<style>

.debug{
border: 1px solid red;
}

.thirds{
height: 33.3%
}

.txt {
font-family: 'Roboto', Monospace;
}

.crop {
clip-path: inset(0 0 40px 0); // for bottom side
}

.portrait {
width: 100%;
max-width: 111px; /* Adjust to your preference */
height: 111px;
object-fit: cover;
border-radius: 10px;
}

.bgi {
background-image: url('${bgImg}');
background-size: cover; /* Adjust to your preference */
background-position: center; /* Adjust to your preference */
}
.vis {
background-color: #f0f0f0;
}

.space {
display: flex;
justify-content: center;
align-items: center;
min-height: 600px;
margin: 0;
background-color: white; //#f0f0f0;
}

.card-container {
perspective: 1100px;
}

.card {
width: 600px;
height: 400px;
position: relative;
transform-style: preserve-3d;
transition: transform 2s;
cursor: pointer;
}

.card:hover {
transform: rotateY(180deg);
}

.card-front,
.card-back {
display: flex;
width: 100%;
height: 100%;
position: absolute;
/* justify-content: center;
align-items: center; */
backface-visibility: hidden;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
background-color: #ffffff;
border-radius: 10px;
padding: 20px;
}


.card-front {
transform: rotateY(0deg);
}

.card-back {
transform: rotateY(180deg) translateZ(1px);;
}

.feather {
width: 24px;
height: 24px;
stroke: currentColor;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
fill: none;
}


</style>
Insert cell
encodingPeople = {

let peoplePaste = `Lindsay = (L)
Bob = (B)
Jorgen = (Jg)
Jeremy = (Jer) = (Jr)
Jamie = (Ja)
Laura = (La)
Jess = (Js)
Camila = (Cm)`

let peopleArray = peoplePaste.split('\n').filter(line => line != "");

let parsed = peopleArray.map(p => {
let array = p.split('=')
let list = array.map(i => i.trim())
let ref = list[0]
let names = list.filter(n => !n.includes('(') && !n.includes('🔑'))
let shorts = list.filter(n => n.includes('('))
let key = list.filter(n => n.includes('🔑'))
//if(key){var keyText = key[0]; var keyWord = keyText.split(' ')}
let jrnl = shorts[0]
// let id = nanoid()
return {ref, jrnl, names, shorts, key, list}
})

return parsed

}
Insert cell
Insert cell
Insert cell
decrypted = cryptojs.AES.decrypt(encrypted, "Secret Passphrase");
Insert cell
encrypted = cryptojs.AES.encrypt("{magic: 'Really great data'}", "Secret Passphrase");
Insert cell
encrypted.toString()
Insert cell
demoHash = {
let hash = cryptojs.SHA256("anemail@someemail.com").toString();
let gapHash = '';

for (let i = 0; i < hash.length; i += 4) {
gapHash += hash.substr(i, 4) + ' ';
}

gapHash = gapHash.trim(); // Remove the trailing space

return gapHash
}
Insert cell
nanoid()
Insert cell
nanoid = import('nanoid/nanoid.js').then(module => module.nanoid)
Insert cell
Insert cell
feather = require('feather-icons@4.29.1/dist/feather.min.js')
Insert cell
Insert cell
Insert cell
'🔑 Love'.split(' ')
Insert cell
Insert cell
playStuff = {

let someText = '2600:1012:a008:34d3:6597:3869:59a5:90f9' // '203.0.113.154' // '2600:1012:a008:34d3:6597:3869:59a5:90f9'

let bytesToBase64 = (bytes) => {
let binString = Array.from(bytes, (x) => String.fromCodePoint(x)).join("");
return btoa(binString);
}

let base64ToBytes = (base64) => {
const binString = atob(base64);
return Uint8Array.from(binString, (m) => m.codePointAt(0));
}

// Usage
let b64txt = bytesToBase64(new TextEncoder().encode(someText)); // "YSDEgCDwkICAIOaWhyDwn6aE"
let reTxt = new TextDecoder().decode(base64ToBytes(b64txt)); // "a Ā 𐀀 文 🦄"
let length = b64txt.length
let parts = length/4

return {b64txt, length, parts, reTxt}
}
Insert cell
secp = import("https://unpkg.com/@noble/secp256k1")
Insert cell
secp256k1 = import('https://cdn.skypack.dev/secp256k1@5.0.0?min')
Insert cell
uuid = self.crypto.randomUUID();
Insert cell
keyDataTest = {
let privKey = secp.utils.randomPrivateKey();
let pubKey = secp.getPublicKey(privKey);
let decoder = new TextDecoder();
let txt = decoder.decode(privKey);
return {privKey, pubKey}
}
Insert cell
Insert cell
<div class="new-card mx-auto">
<div class="container debug" style="min-height: 100%;">
<div class="row debug align-items-start justify-content-end" style="height: 33.3%">
<div class="col-auto debug">
One of three columns
</div>
</div>
<div class="row debug align-items-center justify-content-center" style="height: 33.3%">
<div class="col-auto debug">
One of three columns
</div>
</div>
<div class="row align-items-end justify-content-end" style="height: 33.3%">
<div class="col-auto debug">
One of three columns
</div>
</div>
</div>
</div>

<style>

.new-card {
max-width: 600px;
min-height: 400px;
display: flex;
}

</style>
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more