MDL-31989 theme: Global search styles

This commit is contained in:
David Monllao 2016-02-19 14:34:43 +08:00 committed by Dan Poltawski
parent eddea91dfd
commit 4040c8b35e
12 changed files with 88 additions and 2 deletions

View File

@ -51,7 +51,8 @@ $THEME->sheets = array(
'tabs',
'filemanager',
'templates',
'autocomplete'
'autocomplete',
'search'
);
$THEME->editor_sheets = array('editor');

View File

@ -0,0 +1,14 @@
.search-results .result {
margin-left: 0;
margin-right: 0;
}
.dir-rtl .search-results .result {
margin-right: 15px;
margin-left: 0;
}
.search-results .result .result-content {
margin: 7px 0;
}

View File

@ -43,6 +43,7 @@ echo $OUTPUT->doctype() ?>
?></a>
<?php echo $OUTPUT->navbar_button(); ?>
<?php echo $OUTPUT->user_menu(); ?>
<?php echo $OUTPUT->search_box(); ?>
<div class="nav-collapse collapse">
<?php echo $OUTPUT->custom_menu(); ?>
<ul class="nav pull-right">

View File

@ -52,6 +52,7 @@ echo $OUTPUT->doctype() ?>
?></a>
<?php echo $OUTPUT->navbar_button(); ?>
<?php echo $OUTPUT->user_menu(); ?>
<?php echo $OUTPUT->search_box(); ?>
<div class="nav-collapse collapse">
<?php echo $OUTPUT->custom_menu(); ?>
<ul class="nav pull-right">

View File

@ -57,6 +57,7 @@ echo $OUTPUT->doctype() ?>
?></a>
<?php echo $OUTPUT->navbar_button(); ?>
<?php echo $OUTPUT->user_menu(); ?>
<?php echo $OUTPUT->search_box(); ?>
<div class="nav-collapse collapse">
<?php echo $OUTPUT->custom_menu(); ?>
<ul class="nav pull-right">

View File

@ -11,6 +11,7 @@
@import "moodle/message";
@import "moodle/question";
@import "moodle/user";
@import "moodle/search";
// Upstream Bootstrap.

View File

@ -0,0 +1,58 @@
.search-results .result {
margin-left: 0;
margin-right: 0;
}
.dir-rtl .search-results .result {
margin-right: 15px;
margin-left: 0;
}
.search-results .result .result-content {
margin: 7px 0;
}
.search-input-wrapper {
margin: 0 5px 0 2px;
overflow: hidden;
float: right;
height: 100%;
width: 16px;
transition: width 0.5s ease, left 0.5s ease;
}
.search-input-wrapper > div {
float: left;
margin: 9px 0 10px 0;
}
.dir-rtl .search-input-wrapper {
margin: 0 2px 0 5px;
float: left;
}
.dir-rtl .search-input-wrapper > div {
float: right;
}
.dir-rtl .search-input-wrapper > form {
margin: 7px 25px 7px 0;
}
.search-input-wrapper > form {
opacity: 0;
margin: 7px 0 7px 25px;
transition: opacity 0.5s ease-in-out;
}
.search-input-wrapper > form > input {
margin: 0;
}
.search-input-wrapper form.expanded {
opacity: 1;
}
.search-input-wrapper.expanded {
width: 158px;
}

File diff suppressed because one or more lines are too long

View File

@ -44,6 +44,7 @@ echo $OUTPUT->doctype() ?>
<?php echo $OUTPUT->navbar_home(); ?>
<?php echo $OUTPUT->navbar_button(); ?>
<?php echo $OUTPUT->user_menu(); ?>
<?php echo $OUTPUT->search_box(); ?>
<div class="nav-collapse collapse">
<?php echo $OUTPUT->custom_menu(); ?>
<ul class="nav pull-right">

View File

@ -53,6 +53,7 @@ echo $OUTPUT->doctype() ?>
<?php echo $OUTPUT->navbar_home(); ?>
<?php echo $OUTPUT->navbar_button(); ?>
<?php echo $OUTPUT->user_menu(); ?>
<?php echo $OUTPUT->search_box(); ?>
<div class="nav-collapse collapse">
<?php echo $OUTPUT->custom_menu(); ?>
<ul class="nav pull-right">

View File

@ -63,6 +63,7 @@ echo $OUTPUT->doctype() ?>
<?php echo $OUTPUT->navbar_home(); ?>
<?php echo $OUTPUT->navbar_button(); ?>
<?php echo $OUTPUT->user_menu(); ?>
<?php echo $OUTPUT->search_box(); ?>
<div class="nav-collapse collapse">
<?php echo $OUTPUT->custom_menu(); ?>
<ul class="nav pull-right">

View File

@ -1,6 +1,12 @@
This files describes API changes in /theme/* themes,
information provided here is intended especially for theme designer.
=== 3.1 ===
* A new search box for global search has been added to bootstrap and clean layout files, if
your theme is overwriting columns1.php, columns2.php or columns3.php you will need to add a
call to core_renderer::search_box to display it.
=== 3.0 ===
* The renderer function core_availability_renderer::multiple_messages was changed to