latin: unistrokes circles matched separately
[sheet.git] / word / edit.plp
index 9af73cdb3737e3cfbb6bed374f447f0ddf4809d0..e4428519f3c09afb06fb372ed211f0bd094fdd5f 100644 (file)
@@ -111,7 +111,7 @@ my %wordcol = (
        convert => {-label => 'Convert options', -json => 'image', -multiple => 1, -src => sub {
                return "data/word/32/$_[0]->{id}.jpg";
        }},
-       crop32  => {-label => 'Crop 3:2', -json => 'image'},
+       crop32  => {-json => 'image', type => 'hidden'}, # set by javascript interface
        story   => {-label => 'Story', type => 'textarea', hidden => 'hidden'},
 );
 
@@ -260,9 +260,12 @@ for my $col (@wordcols) {
                printf '<span class=inline>';
                print $row->input($col => $attr);
                if (my $imgsrc = $attr->{-src}) {
-                       printf('<img id="%spreview" src="/%s" alt="%s"%s />',
-                               $col, $_, $row->{form}, $col eq 'source' && ' hidden'
+                       my $hide = $col eq 'source';
+                       printf '<span id="%spreview">', $col unless $hide;
+                       printf('<img src="/%s" alt="%s"%s />',
+                               $_, $row->{form}, $hide && qq( id="${col}preview" hidden)
                        ) for grep { -e } $imgsrc->($row);
+                       printf '</span>' unless $hide;
                }
                print $row->input($_ => delete $wordcol{$_}) for @span;
                print '</span>';
@@ -326,6 +329,10 @@ while (my $ref = $children->hash) {
        <input type="submit" value="Add" />
 </form></li>
 </ul>
+
+<form id="search">
+       <input type="search" name="q" value="" placeholder="search" /><button type="submit">🔍</button>
+</form>
 </section>
 <:
 }