Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,734 changes: 973 additions & 761 deletions Cargo.lock

Large diffs are not rendered by default.

38 changes: 35 additions & 3 deletions css/hyperware.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,36 @@
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@700&display=swap');
@font-face {
font-family: 'chaneyextended';
src: url('/chaneyextended.woff2') format('woff2');
}

@font-face {
font-family: 'Clash Display';
src: url('/ClashDisplay-Variable.woff2') format('woff2');
}

@font-face {
font-family: 'Neue Haas Grotesk';
src: url('/NHaasGroteskTXPro-55Rg.woff') format('woff');
font-weight: 500;
}

@font-face {
font-family: 'Neue Haas Grotesk';
src: url('/NHaasGroteskTXPro-75Bd.woff') format('woff');
font-weight: 700;
}

.display {
font-family: 'chaneyextended', sans-serif;
}

.prose {
font-family: 'Neue Haas Grotesk', sans-serif;
}

.clash {
font-family: 'Clash Display', sans-serif;
}

/* Variables */
:root {
Expand Down Expand Up @@ -34,7 +66,7 @@

--link-color: light-dark(var(--secondary-color), var(--primary-color));

--font-family-main: 'Space Grotesk', monospace;
--font-family-main: 'Neue Haas Grotesk', monospace;

/* Add modern CSS variables */
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
Expand Down Expand Up @@ -89,7 +121,7 @@ html {
}

body {
font-family: 'Space Grotesk', sans-serif;
font-family: 'Neue Haas Grotesk', sans-serif;
margin: 0;
overflow-x: hidden;
padding: 0;
Expand Down
1 change: 1 addition & 0 deletions css/uno.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const config = {
white: '#f6f6f6',
neon: '#dcff71',
blue: '#004fff',
iris: '#004fff',
orange: '#dd6e42',
magenta: '#bf1363',
transparent: 'transparent',
Expand Down
2 changes: 1 addition & 1 deletion hyperdrive/packages/app-store/app-store/src/http_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ fn make_widget() -> String {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: 'Space Grotesk', monospace;
font-family: 'Neue Haas Grotesk', monospace;
}

body {
Expand Down
140 changes: 110 additions & 30 deletions hyperdrive/packages/contacts/pkg/ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,24 @@
document.title = "contacts - " + window.our.node;
</script>
<style>
body {
background-color: #004fff;
}

h1,
h2,
h3,
h4,
h5,
h6,
h6 {
font-family: 'Clash Display', sans-serif;
font-weight: 500;
}

p,
a,
li {
font-family: 'Space Grotesk', monospace;
font-family: 'Neue Haas Grotesk', sans-serif;
}

#title {
Expand All @@ -31,6 +39,7 @@
max-width: 720px;
min-width: 300px;
margin: 0 auto;
color: #fff;
}

#title h1 {
Expand All @@ -45,52 +54,44 @@

#edit {
max-width: 720px;
margin: 0 auto;
}

#contacts-article {
margin: 20px;
}

main {
position: relative;
margin: 0 auto;
padding: 20px;
max-width: 960px;
min-width: 300px;
}

form.add-contact {
max-width: 400px;
width: 100%;
max-width: 720px;
display: flex;
flex-direction: column;
gap: 20px;
z-index: 1;
}

#contacts {
display: flex;
flex-direction: column;
gap: 16px;
list-style: none;
}

.contact:first-of-type {
margin-top: 10px;
}

.contact {
padding: 10px;
border: 1px solid var(--tasteful-dark);
border: 1px solid var(--neon-green);
border-radius: 5px;
margin-bottom: 10px;
display: grid;
display: flex;
flex-direction: column;
gap: 10px;
grid-auto-flow: row;
grid-template-areas:
"name name delete"
"fields fields fields"
"add-field add-field add-field";
background-color: var(--white);
}

.contact h3 {
grid-area: name;
display: flex;
align-items: center;
justify-content: space-between;
}

.contact ul {
grid-area: fields;
list-style: none;
max-width: 100%;
min-width: 0;
Expand All @@ -101,23 +102,67 @@
}

form.delete-contact {
grid-area: delete;
margin-left: auto;
}

.delete-contact button {

background-color: transparent !important;
color: var(--magenta);
}

form.add-field {
grid-area: add-field;
max-width: 400px;
display: flex;
flex-direction: column;
gap: 10px;
}

.remove-field {
background-color: var(--tasteful-red);
font-size: 0.8em;
padding: 3px 10px;
}

input[type="text"] {
background-color: #0001;
border: 1px solid var(--neon-green);
color: #fff;
padding: 10px;
border-radius: 5px;
font-size: 1em;
font-family: 'Neue Haas Grotesk', sans-serif;
font-weight: 500;
font-style: normal;
}
</style>
</head>

<body>
<svg width="393" height="356" viewBox="0 0 393 356" fill="none" xmlns="http://www.w3.org/2000/svg"
style="position: absolute; bottom: 0; left: 0; width: 100%; background-position: center; background-size: cover; pointer-events: none; z-index: 0;">
<g clip-path="url(#clip0_1483_2725)">
<path
d="M339.268 685.316L339.268 535.649L454.813 461.579L454.813 396.535L512.8 359.361C533.086 346.359 559.152 346.359 579.438 359.361L658.066 409.776"
stroke="#DCFF71" stroke-width="2" stroke-miterlimit="10" />
<path d="M56.1093 299.808L-283.025 517.208" stroke="#DCFF71" stroke-width="2" stroke-miterlimit="10" />
<path
d="M56.1089 299.807L56.1089 117.788L106.584 85.4356C120.47 76.524 138.29 76.524 152.19 85.4356L202.652 117.788L202.652 299.807L152.19 267.455C138.303 258.543 120.483 258.543 106.584 267.455L56.1089 299.807Z"
stroke="#DCFF71" stroke-width="2" stroke-miterlimit="10" />
<path d="M454.811 461.492L454.811 279.422L202.652 117.789" stroke="#DCFF71" stroke-width="2"
stroke-miterlimit="10" />
<path
d="M339.267 535.636L322.661 546.29L289.197 524.844L221.775 481.649C209.874 474 202.665 460.847 202.665 446.735L202.665 299.794L305.259 365.584L404.16 428.987L454.824 461.478L454.824 461.567"
stroke="#DCFF71" stroke-width="2" stroke-miterlimit="10" />
<path
d="M56.109 299.808L56.109 446.748C56.109 460.861 48.9128 474.013 37.0118 481.663L-59.4357 543.489L-117.41 580.65C-137.722 593.651 -163.762 593.651 -184.074 580.65L-283.025 517.221L-283.025 335.189L56.0964 117.801L56.0964 299.82"
stroke="#DCFF71" stroke-width="2" stroke-miterlimit="10" />
</g>
<defs>
<clipPath id="clip0_1483_2725">
<rect width="393" height="356" fill="white" transform="translate(393 356) rotate(-180)" />
</clipPath>
</defs>
</svg>
<span id="title">
<button id="back-button"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 576 512"
height="1em" width="1em" xmlns="http://www.w3.org/2000/svg">
Expand All @@ -128,6 +173,41 @@
<h1>contacts</h1>
</span>
<main>
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Hyperware Logo" data-name="Hyperware Logo" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 622.27 595.09" style="width: 64px; margin: 0 auto;">
<defs>
<style>
.cls-1 {
fill: #dcff71;
}
</style>
</defs>
<g id="Capa_1" data-name="Capa 1">
<g>
<g>
<g>
<path class="cls-1"
d="M99.56,188.21L0,476.27l93.56.03c10.8,0,20.4-6.84,23.93-17.05l53.59-155.07c3.79-10.97,1.73-23.11-5.45-32.22l-66.06-83.76Z" />
<path class="cls-1"
d="M420.78,118.82l-30.14,87.1c-3.74,10.8-13.91,18.04-25.34,18.04h-70.48c-10.46,0-20.34-4.76-26.81-12.97l-72.67-92.17h225.44Z" />
</g>
<path class="cls-1"
d="M101.63,0l-42.74,123.61c-1.85,5.35-.99,11.28,2.3,15.93l38.37,48.67,17.69-51.16c3.77-10.91,14.05-18.23,25.59-18.23h52.5L101.63,0Z" />
</g>
<g>
<g>
<path class="cls-1"
d="M522.71,406.88l99.56-288.06-93.56-.03c-10.8,0-20.4,6.84-23.93,17.05l-53.59,155.07c-3.79,10.97-1.73,23.11,5.45,32.22l66.06,83.76Z" />
<path class="cls-1"
d="M201.49,476.27l30.14-87.1c3.74-10.8,13.91-18.04,25.34-18.04h70.48c10.46,0,20.34,4.76,26.81,12.97l72.67,92.17h-225.44Z" />
</g>
<path class="cls-1"
d="M520.64,595.09l42.74-123.61c1.85-5.35.99-11.28-2.3-15.93l-38.37-48.67-17.69,51.16c-3.77,10.91-14.05,18.23-25.59,18.23h-52.5l93.71,118.82Z" />
</g>
</g>
</g>
</svg>
<article id="edit">
<form id="add-contact">
<input type="text" name="node" placeholder="node name (e.g. my-friend.os)">
Expand Down
28 changes: 17 additions & 11 deletions hyperdrive/packages/contacts/pkg/ui/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ function populate_contacts(contacts) {
const li = document.createElement('li');
const div = document.createElement('div');
div.classList.add('contact');
div.innerHTML = `<h3>${node}</h3>
div.innerHTML = `<h3>
<span>${node}</span>
<form class="delete-contact" id="${node}">
<button type="submit">❌</button>
</form>
</h3>
<ul>
${Object.entries(contact).sort((a, b) => a[0].localeCompare(b[0])).map(([field, value]) => `
<li>
Expand All @@ -32,9 +37,6 @@ function populate_contacts(contacts) {
</li>
`).join('')}
</ul>
<form class="delete-contact" id="${node}">
<button type="submit">delete</button>
</form>
<form class="add-field" id="${node}">
<input type="text" name="field" placeholder="field (e.g. name)">
<input type="text" name="value" placeholder="value (e.g. John Doe)" title="Enter any valid JSON value (e.g. &quot;John Doe&quot;, 42, true, [1,2,3], {&quot;key&quot;:&quot;value&quot;})">
Expand All @@ -48,10 +50,12 @@ function populate_contacts(contacts) {
ul.querySelectorAll('.delete-contact').forEach(form => {
form.addEventListener('submit', function (e) {
e.preventDefault();
const node = this.getAttribute('id');
api_call({
"RemoveContact": node
});
if (confirm('Are you sure you want to remove this contact?')) {
const node = this.getAttribute('id');
api_call({
"RemoveContact": node
});
}
});
});

Expand Down Expand Up @@ -112,9 +116,11 @@ document.getElementById('add-contact').addEventListener('submit', (e) => {
})

function removeField(node, field) {
api_call({
"RemoveField": [node, field]
});
if (confirm('Are you sure you want to remove this field?')) {
api_call({
"RemoveField": [node, field]
});
}
}

// Setup WebSocket connection
Expand Down
Loading