elasticsearch rollback to simple search engine; css and js
This commit is contained in:
parent
ff9c3344c8
commit
576a0d6b1a
|
@ -16,7 +16,7 @@
|
|||
<link rel="stylesheet" href="{{ asset('bundles/deblanblog/css/cleanblog/bootstrap.css') }}" />
|
||||
<link rel="stylesheet" href="{{ asset('bundles/deblanblog/css/cleanblog/clean-blog.css') }}" />
|
||||
<link rel="stylesheet" href="{{ asset('bundles/deblanblog/syntaxhighlighter/styles/shThemeEclipse.css') }}" />
|
||||
<link rel="stylesheet" href="{{ asset('bundles/deblanblog/css/cleanblog/main.css') }}?v=14" />
|
||||
<link rel="stylesheet" href="{{ asset('bundles/deblanblog/css/cleanblog/main.css') }}?v=17" />
|
||||
{% endblock %}
|
||||
{{ get_var('CssBlock')|raw }}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
@ -101,7 +101,7 @@
|
|||
</div>
|
||||
</nav>
|
||||
|
||||
<header class="intro-header" style="background-image: url('{{ asset('bundles/deblanblog/img/home-bg.jpg') }}')">
|
||||
<header class="intro-header" style="background-image: url('{{ asset('bundles/deblanblog/img/home-bg2.jpg') }}')">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
|
|
|
@ -11,6 +11,9 @@ use Deblan\Bundle\BlogBundle\Model\Post;
|
|||
use Deblan\Bundle\BlogBundle\Model\PostFollower;
|
||||
use Deblan\Bundle\BlogBundle\Model\PostFollowerPeer;
|
||||
use Deblan\Component\Flash;
|
||||
use Elastica\Query\QueryString;
|
||||
use Elastica\Filter\Bool;
|
||||
use Elastica\Query\Match;
|
||||
|
||||
class DefaultController extends PageController
|
||||
{
|
||||
|
@ -49,13 +52,33 @@ class DefaultController extends PageController
|
|||
/**
|
||||
* @param $query
|
||||
*/
|
||||
public function searchEngineAction($query)
|
||||
public function searchEngineAction($page)
|
||||
{
|
||||
$query = $this->getRequest()->query->get('query');
|
||||
// $finder = $this->get('fos_elastica.finder.deblan.post');
|
||||
|
||||
// $boolQuery = new Bool();
|
||||
|
||||
// $fieldQuery = new QueryString();
|
||||
// $fieldQuery->setParam('query', $query);
|
||||
|
||||
// $fieldActive = new Match();
|
||||
// $fieldActive->setField('active', '1');
|
||||
|
||||
// $boolQuery->addShould($fieldQuery);
|
||||
// $boolQuery->addMust($fieldActive);
|
||||
|
||||
// $pager = $finder->findPaginated($fieldQuery);
|
||||
// $pager->setMaxPerPage(5);
|
||||
// $pager->setCurrentPage($page);
|
||||
|
||||
if (empty($query)) {
|
||||
$query = $this->getRequest()->query->get('query');
|
||||
}
|
||||
|
||||
$this->getPage()->setObject($query);
|
||||
$this->getPage()
|
||||
->setObject(explode(' ', $query));
|
||||
|
||||
$this->initPager();
|
||||
|
||||
if ($this->getRequest()->query->get('format') === 'rss') {
|
||||
|
|
|
@ -279,3 +279,7 @@ pre,
|
|||
label {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
|
BIN
src/Deblan/Bundle/BlogBundle/Resources/public/img/home-bg2.jpg
Normal file
BIN
src/Deblan/Bundle/BlogBundle/Resources/public/img/home-bg2.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 270 KiB |
|
@ -143,7 +143,7 @@ if (!readCookie('private_life')) {
|
|||
createCookie('private_life', '1', 365);
|
||||
|
||||
$('#cookie').removeClass('hide').css({
|
||||
top: 0,
|
||||
top: 57,
|
||||
position: 'absolute',
|
||||
width: '100%'
|
||||
});
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% block breadcrumb %}
|
||||
<li><a href="{{ cms_path('homepage') }}">Accueil</a></li>
|
||||
<li class="sep"> » </li>
|
||||
<li>Recherche « <a href="{{ cms_path('search', {query: page.object|join(' ')}) }}">{{ page.Words }}</a> »</li>
|
||||
<li>Recherche « <a href="{{ cms_path('search', {query: page.words}) }}">{{ page.words }}</a> »</li>
|
||||
|
||||
{% if page.pager.nbResults > 0 and page.pager.currentPage > 1 %}
|
||||
<li class="sep"> » </li>
|
||||
|
|
Loading…
Reference in a new issue