Project edit tweaks

This commit is contained in:
Ben Visness 2024-07-05 13:40:13 -05:00
parent b6ed35902d
commit e1ee5c6635
4 changed files with 20 additions and 18 deletions

View File

@ -8013,7 +8013,7 @@ video {
}
/* src/rawdata/scss/form.css */
.hmn-form input,
.hmn-form input:not([type=submit]),
.hmn-form textarea,
.hmn-form select {
color: var(--color);
@ -8022,24 +8022,24 @@ video {
padding: 0.75rem;
outline: none;
}
.hmn-form input:not(.no-border),
.hmn-form input:not([type=submit]):not(.no-border),
.hmn-form textarea:not(.no-border),
.hmn-form select:not(.no-border) {
border: 1px solid var(--border-color);
}
.hmn-form input:focus,
.hmn-form input:not([type=submit]):focus,
.hmn-form textarea:focus,
.hmn-form select:focus {
border-color: var(--border-color-focused);
}
.hmn-form input:focus ~ .also-focus,
.hmn-form input:not([type=submit]):focus ~ .also-focus,
.hmn-form textarea:focus ~ .also-focus,
.hmn-form select:focus ~ .also-focus {
border-color: var(--border-color-focused);
}
.error :is(.hmn-form input),
.hmn-form input.error,
.hmn-form input:user-invalid,
.error :is(.hmn-form input:not([type=submit])),
.hmn-form input:not([type=submit]).error,
.hmn-form input:not([type=submit]):user-invalid,
.error :is(.hmn-form textarea),
.hmn-form textarea.error,
.hmn-form textarea:user-invalid,
@ -8048,7 +8048,7 @@ video {
.hmn-form select:user-invalid {
border-color: var(--border-color-error);
}
.hmn-form input:disabled,
.hmn-form input:not([type=submit]):disabled,
.hmn-form textarea:disabled,
.hmn-form select:disabled {
background-color: var(--c5);
@ -8094,7 +8094,7 @@ input[type=submit],
cursor: pointer;
font-weight: 500;
line-height: 1.5rem;
border: none;
border-style: none;
}
button.btn-primary,
input[type=submit].btn-primary,

View File

@ -1,6 +1,6 @@
.hmn-form {
input,
input:not([type="submit"]),
textarea,
select {
color: var(--color);
@ -81,7 +81,7 @@ input[type=submit],
cursor: pointer;
font-weight: 500;
line-height: 1.5rem;
border: none;
border-style: none;
&.btn-primary {
background-color: var(--button-color-primary);

View File

@ -9,11 +9,13 @@
<div class="b drop_slot secondary_links">Secondary Links</div>
</div>
<template id="link_row">
<div class="link_row drop_slot w-100 flex flex-row items-center" data-tmpl="root">
<span class="link_handle svgicon pr3 pointer grab" onmousedown="startLinkDrag(event)">{{ svg "draggable" }}</span>
<input data-tmpl="nameInput" class="link_name mr3 w5" type="text" placeholder="Name" oninput="linkInput(event)" />
<input data-tmpl="urlInput" class="link_url flex-grow-1" type="url" placeholder="Link" oninput="linkInput(event)" />
<a class="delete_link svgicon link-normal pl3 f3" href="javascript:;" onclick="deleteLink(event)">{{ svg "delete" }}</a>
<div class="link_row drop_slot w-100 flex items-center" data-tmpl="root">
<span class="link_handle svgicon pr2 pointer grab" onmousedown="startLinkDrag(event)">{{ svg "draggable" }}</span>
<div class="flex-grow-1 flex flex-column flex-row-ns g2">
<input data-tmpl="nameInput" class="link_name w5-ns" type="text" placeholder="Name" oninput="linkInput(event)" />
<input data-tmpl="urlInput" class="link_url flex-grow-1" type="url" placeholder="Link" oninput="linkInput(event)" />
</div>
<a class="delete_link svgicon link-normal pl2 pl3-ns f3" href="javascript:;" onclick="deleteLink(event)">{{ svg "delete" }}</a>
</div>
</template>
<template id="link_row_dummy">

View File

@ -33,7 +33,7 @@
{{ define "content" }}
<div class="flex bb">
<form id="project_form" class="hmn-form bg1 pa4 flex-fair" method="POST" enctype="multipart/form-data">
<form id="project_form" class="hmn-form bg1 pa3 pa4-ns flex-fair" method="POST" enctype="multipart/form-data">
{{ csrftoken .Session }}
<h1 class="f3">
@ -228,7 +228,7 @@
</div>
</div>
</form>
<div class="flex-fair bl pa4">
<div class="dn db-l flex-fair bl pa4">
<!-- Link / card templates -->
<template id="primary_link">
<!-- need href -->