-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
36c5c60
commit 2b6b779
Showing
18 changed files
with
338 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.search-container { | ||
background: var(--kbin-input-bg); | ||
border: var(--kbin-input-border); | ||
border-radius: var(--kbin-rounded-edges-radius) !important; | ||
|
||
input.form-control { | ||
border-radius: 0 !important; | ||
border: none; | ||
background: transparent; | ||
margin: 0 .5em; | ||
padding: .5rem .25rem; | ||
} | ||
|
||
button { | ||
border-radius: 0 var(--kbin-rounded-edges-radius) var(--kbin-rounded-edges-radius) 0 !important; | ||
border: 0; | ||
padding: 1rem 0.5rem; | ||
|
||
&:not(:hover) { | ||
background: var(--kbin-input-bg); | ||
color: var(--kbin-input-text-color) !important; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Form; | ||
|
||
use App\Form\Type\MagazineAutocompleteType; | ||
use App\Form\Type\UserAutocompleteType; | ||
use Symfony\Component\Form\AbstractType; | ||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | ||
use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
use Symfony\Component\Form\FormBuilderInterface; | ||
|
||
class SearchType extends AbstractType | ||
{ | ||
public function buildForm(FormBuilderInterface $builder, array $options): void | ||
{ | ||
$builder | ||
->setMethod('GET') | ||
->add('q', TextType::class, [ | ||
'required' => true, | ||
'attr' => [ | ||
'placeholder' => 'type_search_term', | ||
], | ||
]) | ||
->add('magazine', MagazineAutocompleteType::class, ['required' => false]) | ||
->add('user', UserAutocompleteType::class, ['required' => false]) | ||
->add('type', ChoiceType::class, [ | ||
'choices' => [ | ||
'search_type_all' => null, | ||
'search_type_entry' => 'entry', | ||
'search_type_post' => 'post', | ||
], | ||
]); | ||
} | ||
} |
Oops, something went wrong.