Author: sevein
Date: Fri Sep 2 16:37:58 2011
New Revision: 9657
Log:
Move search box and logo to second-level header
Added:
trunk/plugins/qtTrilliumPlugin/modules/default/
trunk/plugins/qtTrilliumPlugin/modules/default/templates/
trunk/plugins/qtTrilliumPlugin/modules/default/templates/_pager.php
Modified:
trunk/plugins/qtTrilliumPlugin/css/less/_header.less
trunk/plugins/qtTrilliumPlugin/css/less/_scaffolding.less
trunk/plugins/qtTrilliumPlugin/js/trillium.js
trunk/plugins/qtTrilliumPlugin/templates/_header.php
trunk/plugins/qtTrilliumPlugin/templates/layout.php
Modified: trunk/plugins/qtTrilliumPlugin/css/less/_header.less
==============================================================================
--- trunk/plugins/qtTrilliumPlugin/css/less/_header.less Fri Sep 2
10:27:05 2011 (r9656)
+++ trunk/plugins/qtTrilliumPlugin/css/less/_header.less Fri Sep 2
16:37:58 2011 (r9657)
@@ -17,12 +17,6 @@
@shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1);
.box-shadow(@shadow);
- > div {
-
- // .container();
-
- }
-
#name-and-slogan {
float: left;
@@ -53,6 +47,10 @@
}
+ /*
+ * qtTrilliumPlugin does not show the site description anywhere
+ */
+
#site-slogan {
display: none;
@@ -61,121 +59,114 @@
}
- #logo {
+ }
- display: none;
+ > #second-level {
- }
+ height: 72px;
+ #gradient > .vertical(#fff, #f4f4f4);
+ @shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1);
+ .box-shadow(@shadow);
+ border-bottom: 1px solid #666;
+
+ > div {
- .search {
+ .clearfix();
- form {
+ > #logo {
float: left;
- margin: 5px 0 0 10px;
- position: relative;
- .opacity(100);
+ margin: 12px 0 0 40px;
+
- input[type=submit] {
+ > img {
- display: none;
+ display: block;
+ height: 48px;
+ margin: 0 auto;
}
- input[name=query] {
+ }
- background-color: #444;
- background-color: rgba(255,255,255,.3);
- #font > .sans-serif(normal, 13px, 1);
- width: 320px;
- padding: 4px 9px;
- color: #fff;
- color: rgba(255,255,255,.75);
- border: 1px solid #111;
- .border-radius(4px);
- @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px
rgba(255,255,255,.25);
- .box-shadow(@shadow);
- .transition(none);
+ .search {
- &:hover {
+ float: left;
+ margin: 20px 0 0 40px;
- background-color: @grayLight;
- background-color: rgba(255,255,255,.5);
- color: #fff;
+ form {
- }
+ margin: 0;
- &:focus,
- &.focused {
+ input[name="query"] {
- outline: none;
background-color: #fff;
- color: @grayDark;
- text-shadow: 0 1px 0 #fff;
- border: 0;
- padding: 5px 10px;
- .box-shadow(0 0 3px rgba(0,0,0,.15));
+ #font > .sans-serif(normal, 14px, 1);
+ width: 525px;
+ padding: 6px 9px;
+ color: @gray;
+ border: 1px solid @grayLight;
+ .border-radius(4px);
+ @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px
rgba(255,255,255,.25);
+ .box-shadow(@shadow);
+ .transition(none);
- }
+ &:-moz-placeholder {
- }
+ color: @grayLighter;
- }
-
- }
-
- }
-
- > #second-level {
-
- height: 24px;
- background: #777;
- #gradient > .vertical(#fff, #eee);
- @shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1);
- .box-shadow(@shadow);
- border-bottom: 1px solid #666;
-
- > div {
-
- .container();
+ }
- ul {
+ &::-webkit-input-placeholder {
- li {
+ color: @grayLighter;
- > a {
+ }
- padding: 2px 10px 2px;
- color: @grayDark;
- text-shadow: 0 0 0;
- &.menu {
+ &:hover {
- padding-right: 16px;
+ background-color: #f0f0f0;
- &:hover {
+ }
- background-color: rgba(0,0,0,.10);
+ &:focus,
+ &.focused {
- }
+ outline: none;
+ background-color: #f0f0f0;
+ color: @grayDark;
}
- }
-
- &.open > a {
-
- background-color: rgba(0,0,0,.10);
+ display: block;
+ float: left;
}
- > ul {
+ input[type=submit] {
- top: 25px;
- background-color: @white;
+ margin: 0px 0 0 10px;
+ padding: 0 20px;
+ display: block;
+ float: left;
+ border: 1px solid #3079ed;
+ #gradient > .horizontal(#4d90fe, #4787ed);
+ background-image:
url(../../../sfCaribouPlugin/images/search.png);
+ background-repeat: no-repeat;
+ background-position: 50% 50%;
+ .border-radius(4px);
+ font-size: 0px;
+ height: 30px;
+ width: 26px;
+
+ &:hover {
+
+ #gradient > .horizontal(darken(#4d90fe, 5%), darken(#4787ed,
5%));
+ background-image:
url(../../../sfCaribouPlugin/images/search.png);
+ background-repeat: no-repeat;
+ background-position: 50% 50%;
- li > a:hover {
- background-color: #ddd;
}
}
@@ -190,6 +181,10 @@
}
+ /*
+ * Header menu
+ */
+
ul {
display: block;
Modified: trunk/plugins/qtTrilliumPlugin/css/less/_scaffolding.less
==============================================================================
--- trunk/plugins/qtTrilliumPlugin/css/less/_scaffolding.less Fri Sep 2
10:27:05 2011 (r9656)
+++ trunk/plugins/qtTrilliumPlugin/css/less/_scaffolding.less Fri Sep 2
16:37:58 2011 (r9657)
@@ -1,17 +1,19 @@
#page-wrapper {
- margin-top: 85px;
+ margin-top: 150px;
#page {
+ min-width: 960px;
+
#header {
+ min-width: 960px;
+
}
#main-wrapper {
- .container();
-
#main {
.row();
Modified: trunk/plugins/qtTrilliumPlugin/js/trillium.js
==============================================================================
--- trunk/plugins/qtTrilliumPlugin/js/trillium.js Fri Sep 2 10:27:05
2011 (r9656)
+++ trunk/plugins/qtTrilliumPlugin/js/trillium.js Fri Sep 2 16:37:58
2011 (r9657)
@@ -5,19 +5,13 @@
{
// Sidebar
+ /*
if (!$('.sidebar .section').has('*').length)
{
$('.sidebar').remove();
$('#content').width(940);
- /*
- $('#content').css(
- {
- 'margin': '0 auto',
- 'display': 'block',
- 'float': 'none'
- });
- */
}
+ */
// Menu
$(document.body).bind('click', function (e)
Added: trunk/plugins/qtTrilliumPlugin/modules/default/templates/_pager.php
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/plugins/qtTrilliumPlugin/modules/default/templates/_pager.php Fri Sep
2 16:37:58 2011 (r9657)
@@ -0,0 +1,63 @@
+<div class="result-count">
+ <?php if (0 < $pager->getNbResults()): ?>
+ <?php echo __('Results %1% to %2% of %3%', array('%1%' =>
$pager->getFirstIndice(), '%2%' => $pager->getLastIndice(), '%3%' =>
$pager->getNbResults())) ?>
+ <?php else: ?>
+ <?php echo __('No results') ?>
+ <?php endif; ?>
+</div>
+
+<?php if ($pager->haveToPaginate()): ?>
+ <div class="pager section">
+
+ <h2 class="element-invisible"><?php echo __('Pages') ?></h2>
+
+ <div class="content pagination">
+
+ <ul>
+
+ <?php if (1 < $pager->getPage()): ?>
+ <li class="prev"><?php echo link_to(__('« Previous'),
array('page' => $pager->getPage() - 1) +
$sf_request->getParameterHolder()->getAll(), array('rel' => 'prev', 'title' =>
__('Go to previous page'))) ?></li>
+ <?php else: ?>
+ <li class="prev disabled"><a href="#" onclick="return false;"><?php
echo __('« Previous') ?></a></li>
+ <?php endif; ?>
+
+ <?php foreach ($pager->getLinks(10) as $page): ?>
+ <?php if ($pager->getPage() == $page): ?>
+ <li class="active"><a href="#"><?php echo $page ?></a></li>
+ <?php else: ?>
+ <li><?php echo link_to($page, array('page' => $page) +
$sf_request->getParameterHolder()->getAll(), array('title' => __('Go to page
%1%', array('%1%' => $page)))) ?></li>
+ <?php endif; ?>
+ <?php endforeach ?>
+
+ <?php if ($pager->getLastPage() > $pager->getPage()): ?>
+ <li class="next"><?php echo link_to(__('Next »'), array('page'
=> $pager->getPage() + 1) + $sf_request->getParameterHolder()->getAll(),
array('rel' => 'next', 'title' => __('Go to next page'))) ?></li>
+ <?php else: ?>
+ <li class="next disabled"><a href="#" onclick="return false;"><?php
echo __('Next »') ?></a></li>
+ <?php endif; ?>
+
+ </ul>
+
+ </div>
+
+ </div>
+<?php endif; ?>
+
+<?php if (10 < $pager->getNbResults()): ?>
+ <div class="itemsPerPage section">
+ <?php ob_start() ?>
+ <ul>
+ <?php foreach (array(10, 50, 100, 500) as $limit): ?>
+
+ <?php if ($sf_request->limit == $limit): ?>
+ <li class="active"><?php echo $limit ?></li>
+ <?php else: ?>
+ <li><?php echo link_to($limit, array('limit' => $limit) +
$sf_request->getParameterHolder()->getAll(), array('title' => __('%1% results
per page', array('%1%' => $limit)))) ?></li>
+ <?php endif; ?>
+
+ <?php if ($pager->getNbResults() < $limit) break; ?>
+
+ <?php endforeach; ?>
+ </ul>
+ <?php echo __('%1% results per page', array('%1%' => ob_get_clean())) ?>
+ </div>
+<?php endif; ?>
Modified: trunk/plugins/qtTrilliumPlugin/templates/_header.php
==============================================================================
--- trunk/plugins/qtTrilliumPlugin/templates/_header.php Fri Sep 2
10:27:05 2011 (r9656)
+++ trunk/plugins/qtTrilliumPlugin/templates/_header.php Fri Sep 2
16:37:58 2011 (r9657)
@@ -6,10 +6,6 @@
<div>
- <?php if (sfConfig::get('app_toggleLogo')): ?>
- <?php echo link_to(image_tag('logo', array('alt' => __('Home'))),
'@homepage', array('id' => 'logo', 'rel' => 'home', 'title' => __('Home'))) ?>
- <?php endif; ?>
-
<?php if (sfConfig::get('app_toggleTitle') ||
sfConfig::get('app_toggleDescription')): ?>
<div id="name-and-slogan">
@@ -28,14 +24,18 @@
</div>
<?php endif; ?>
+ <?php if ($sf_user->isAuthenticated()): ?>
+ <ul>
+ <?php echo get_component('menu', 'mainMenu', array('sf_cache_key'
=> 'settings')) ?>
+ </ul>
+ <?php endif; ?>
+
<ul id="browse-menu">
<li class="menu">
<?php echo get_component('menu', 'browseMenu',
array('sf_cache_key' => 'settings')) ?>
</li>
</ul>
- <?php echo get_component('search', 'box') ?>
-
<?php echo get_component_slot('header') ?>
<ul id="options-menu">
@@ -70,15 +70,17 @@
</div> <!-- /#first-level -->
- <?php if ($sf_user->isAuthenticated()): ?>
- <div id="second-level">
- <div>
- <ul>
- <?php echo get_component('menu', 'mainMenu', array('sf_cache_key'
=> 'settings')) ?>
- </ul>
- </div>
- </div> <!-- /#second-level -->
- <?php endif; ?>
+ <div id="second-level">
+ <div>
+
+ <?php if (sfConfig::get('app_toggleLogo')): ?>
+ <?php echo link_to(image_tag('logo', array('alt' => __('Home'))),
'@homepage', array('id' => 'logo', 'rel' => 'home', 'title' => __('Home'))) ?>
+ <?php endif; ?>
+
+ <?php echo get_component('search', 'box') ?>
+
+ </div>
+ </div> <!-- /#second-level -->
<?php echo get_component('default', 'updateCheck') ?>
Modified: trunk/plugins/qtTrilliumPlugin/templates/layout.php
==============================================================================
--- trunk/plugins/qtTrilliumPlugin/templates/layout.php Fri Sep 2 10:27:05
2011 (r9656)
+++ trunk/plugins/qtTrilliumPlugin/templates/layout.php Fri Sep 2 16:37:58
2011 (r9657)
@@ -18,14 +18,14 @@
<div id="main-wrapper">
<div class="clearfix" id="main">
+ <?php echo get_partial('sidebar') ?>
+
<div class="column" id="content">
<div class="section">
<?php echo $sf_content ?>
</div> <!-- /.section -->
</div> <!-- /.column#content -->
- <?php echo get_partial('sidebar') ?>
-
</div> <!-- /#main -->
</div> <!-- /#main-wrapper -->
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.