added image search button, added image loader to webpack

This commit is contained in:
Bachir Soussi Chiadmi 2019-06-17 14:07:27 +02:00
parent 5d57f0e32a
commit 88dc7b7ea4
10 changed files with 117 additions and 18 deletions

View File

@ -29,6 +29,16 @@ module.exports = merge(baseConfig, {
'css-loader', 'css-loader',
'sass-loader' 'sass-loader'
] ]
}, {
test: /\.(png|jpg|gif)$/,
use: [
{
loader: 'url-loader',
options: {
limit: 5000
}
}
]
} }
] ]
}, },

View File

@ -48,6 +48,16 @@ module.exports = merge(baseConfig, {
'css-loader', 'css-loader',
'sass-loader' 'sass-loader'
] ]
}, {
test: /\.(png|jpg|gif)$/,
use: [
{
loader: 'url-loader',
options: {
limit: 5000
}
}
]
} }
] ]
}, },

View File

@ -45,14 +45,24 @@ class MaterioSapiSearchForm extends FormBase {
"v-model" => "autocomplete" "v-model" => "autocomplete"
], ],
]; ];
$form['submit'] = [ // $form['submit'] = [
'#type' => 'submit', // '#type' => 'submit',
'#value' => $this->t('Search'), // '#value' => $this->t('Search'),
// '#attributes' => [
// '@click.prevent' => "submit",
// ]
// ];
$form['submit'] = array(
'#type' => 'button',
// '#src' => '',//drupal_get_path('module', 'materio_search_api') . '/images/search.png',
'#value' => t('Search'),
// '#prefix' => '<div class="search-btn-wrapper">',
// '#suffix'=> '</div>',
'#attributes' => [ '#attributes' => [
'title' => t('Search'),
'@click.prevent' => "submit", '@click.prevent' => "submit",
] ]
]; );
return $form; return $form;
} }

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 B

View File

@ -11,8 +11,13 @@ $large-bp:1900px;
// font-size: 0; // font-size: 0;
// white-space: nowrap; // white-space: nowrap;
position: relative; position: relative;
>*{ // >*{
font-size: 16px; // font-size: 16px;
// }
&:after{
content:"";
clear:both;
display: block;
} }
} }

View File

@ -22,7 +22,7 @@ header[role="banner"]{
background-color: #fff; background-color: #fff;
overflow: visible; overflow: visible;
position: fixed; position: fixed;
z-index: 10; z-index: 20;
width:100vw; width:100vw;
// outline: 1px solid blue; // outline: 1px solid blue;
height: $header_height; height: $header_height;
@ -50,5 +50,5 @@ header[role="banner"]{
// |_| |_\__,_|_|_||_| // |_| |_\__,_|_|_||_|
main[role="main"]{ main[role="main"]{
padding-top: $header_height; padding-top: $header_height+8px;
} }

View File

@ -1,3 +1,3 @@
$base_font_size:16px; $base_font_size:16px;
$header_height: 80px; $header_height: 60px;

View File

@ -175,12 +175,51 @@ aside.messages{
} }
// content top // content top
#content-top{
&:after{
content:"";
clear:both;
display: block;
}
}
#block-materiosapisearchblock{
float:right;
display:inline-block;
// box-shadow: 0 0 5px rgba(0,0,0,0.2);
padding:0;
#materio-sapi-search-form{ #materio-sapi-search-form{
.form-item, input.button{ .form-item, input.button{
display: inline-block; display: inline-block;
} }
#edit-search{
border:1px #BBB solid;
border-radius: 14px;
padding:0.3em;
color:#666;
} }
#edit-submit{
border:0;
text-indent: 50px;
overflow: hidden;
width:20px; height:20px;
// border-radius: 7px;
background-image: url('../img/search.png');
background-position: center;
background-repeat: no-repeat;
background-size: contain;
}
}
}
h1.page-title{
margin:0;
}
// front // front
article.node--type-frontpage{ article.node--type-frontpage{
@ -227,6 +266,9 @@ article.node--type-frontpage{
.cards-list{ .cards-list{
.search-info{
margin:0 0 1em 0;
}
&>ul{ &>ul{
margin:0; padding:0; margin:0; padding:0;
&>li{ &>li{

View File

@ -96,5 +96,4 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
</style> </style>