Skip to content

Commit

Permalink
Site app v.2.4.4
Browse files Browse the repository at this point in the history
  * Design theme “Default”: improved main menu.
  • Loading branch information
Leonix committed Aug 15, 2018
1 parent 5789a2a commit 0123e23
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 125 deletions.
4 changes: 2 additions & 2 deletions wa-apps/site/lib/config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
),
'sash_color' => '#49a2e0',
'frontend' => true,
'version'=>'2.4.2',
'critical'=>'2.4.2',
'version'=>'2.4.4',
'critical'=>'2.4.4',
'vendor' => 'webasyst',
'system' => true,
'rights' => true,
Expand Down
35 changes: 22 additions & 13 deletions wa-apps/site/themes/default/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@ input:-ms-input-placeholder { color: #bbb; }

.staff { background: #eeb; padding: 1px 4px !important; color: #345; font-size: 0.9em; border: 1px solid rgba(0,0,0,0.1); border-radius: 3px; white-space: nowrap; }

.wa-flex-box { display: -webkit-box; display: -moz-box; display: -webkit-flex; display: -ms-flexbox; display: flex; }
.wa-flex-box.middle { -webkit-box-align: center; -moz-box-align: center; -o-box-align: center; -ms-flex-align: center; -webkit-align-items: center; align-items: center; }
.wa-flex-box.full-line { -webkit-box-pack: justify; -moz-box-pack: justify; -o-box-pack: justify; -ms-flex-pack: justify; -webkit-justify-content: space-between; justify-content: space-between; }
.wa-flex-box.fixed { -webkit-box-pack: justify; -moz-box-pack: justify; -o-box-pack: justify; -ms-flex-pack: justify; -webkit-justify-content: space-between; justify-content: space-between; }
.wa-flex-box.fixed.fixed > * { -webkit-flex-basis: 100%; flex-basis: 100%; -webkit-box-flex: 0; -moz-box-flex: 0; -o-box-flex: 0; -ms-box-flex: 0; box-flex: 0; -webkit-flex-grow: 0; flex-grow: 0; }
.wa-flex-box > *.middle { -webkit-align-self: center; align-self: center; -ms-flex-item-align: center; }
@media screen and (max-width: 760px) {
.wa-flex-box.adaptive { -webkit-box-orient: vertical; -moz-box-orient: vertical; -o-box-orient: vertical; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; }
}

/* Buttons
---------- */

Expand Down Expand Up @@ -275,24 +285,24 @@ header.globalheader { background: #c22; position: relative; }
header a { text-decoration: none; }

header #globalnav { background: #000; }
header h2 { float: left; padding: 11px 15px 9px; margin: 0 20px 0 -15px; font-size: 1.3em; }
header h2 { padding: 10px 15px; margin: 0 20px 0 -15px; font-size: 1.3em; }
header h2 a { color: #eee !important; }
header h2 a span { display: none; }
header h2 a:hover { color: #eea !important; }

header .apps { padding: 0; margin: 0 0 0 -15px; }
header .apps li { float: left; list-style: none; }
header .apps li a { display: block; padding: 13px 14px 11px; margin-right: 0px; color: #999; font-size: 1.1em; }
header .apps { padding: 6px 0; margin: 0; }
header .apps li { display: inline-block; vertical-align: top; margin: 1px 21px 1px 0; list-style: none; transform: translate(0,1px); }
header .apps li a { display: block; padding: 12px; margin: -12px; color: #999; font-size: 1.1em; }
header .apps li a:hover { color: #eea; }
header .apps li.selected a { color: #fff; background: #000; }

header .auth { float: right; margin-bottom: 0; margin-top: 12px; padding-left: 10px; }
header .auth li { list-style: none; float: left; }
header .auth { display: inline-block; vertical-align: top; margin: 1px 0 0; padding: 0 0 0 10px; }
header .auth li { display: inline-block; vertical-align: top; list-style: none; }
header .auth li a { font-size: 0.9em; padding: 5px 6px; color: #777; }
header .auth li a:hover { color: #eea !important; }
header .auth li a:visited { color: #777; }

header .cart { float: right; }
header .cart { display: inline-block; vertical-align: top; }
header .cart a { padding: 12px 16px 11px 13px; display: block; background: rgba(255,255,255,0.3); color: #fff; font-size: 1.5em; }
header .cart a strong { color: #ff7; }
header .cart a:hover { background: rgba(255,255,255,0.4) !important; }
Expand Down Expand Up @@ -556,13 +566,13 @@ html.font_size_16 body { font-size: 16px; }
.font_family_google_fira strong,
.font_family_google_fira .bold { font-weight: 500; }
.font_family_google_fira header .pages li a { font-weight: 500; padding-top: 9px; }
.font_family_google_fira header h2 { padding-top: 12px; }
/*.font_family_google_fira header h2 { padding-top: 12px; }*/
.font_family_google_fira ul.thumbs li { font-size: 1.05em; }
.font_family_google_fira ul.thumbs li h5 { font-weight: 500; }
.font_family_google_fira input[type="button"],
.font_family_google_fira input[type="submit"] { padding-bottom: 3px; }
.font_family_google_fira .search input { padding-top: 3px; }
.font_family_google_fira header .auth { margin-top: 13px; }
/*.font_family_google_fira header .auth { margin-top: 13px; }*/
.font_family_google_fira header .auth i.userpic20 { margin-top: 1px; }
.font_family_google_fira header .cart a strong { display: inline-block; margin-top: 1px;}
.font_family_google_fira .staff { position: relative; top: -2px; padding-bottom: 0 !important; }
Expand Down Expand Up @@ -610,8 +620,7 @@ html.font_size_16 body { font-size: 16px; }
.content.with-sidebar { margin-right: 220px; }

header h2 { margin-right: 10px; }
header .apps { margin-left: -10px; }
header .apps li a { padding: 12px 10px; }
header .apps li { margin: 2px 10px 2px 0; }
.search-wrapper { max-width: 150px; }

.color_scheme_white header.globalheader .appnav { padding-left: 0; padding-right: 0; margin-left: 25px; margin-right: 25px; }
Expand Down Expand Up @@ -658,12 +667,12 @@ html.font_size_16 body { font-size: 16px; }
header #mobile-nav-toggle { display: block; float: right; margin-right: 10px; margin-top: 13px; outline: 0; margin-bottom: 9px; }
header .apps { display: none; }
header .pages { margin: 0; padding: 20px 0; }
header .auth { float: left; padding-left: 0; display: none; }
header .auth { display: none; }
header .auth li a { font-size: 1em; }
header .auth li a i.icon16 { margin-top: 0; }
header .apps.unfolded { display: block; }
header .cart,
header .cart.fixed { position: absolute; right: 58px !important; min-width: 0 !important; max-width: 64px; }
header .cart.fixed { position: absolute; top: 0; right: 58px !important; min-width: 0 !important; max-width: 64px; }
header .cart a { height: 1em; padding: 16px 9px 15px 17px; background: #ffba00; }
header .cart.fixed a { background: #ffba00; }
header .cart a strong { display: none !important; }
Expand Down
61 changes: 26 additions & 35 deletions wa-apps/site/themes/default/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,20 +156,6 @@ var MatchMedia = function( media_query ) {

$(document).ready(function() {

// custom LOGO position adjustment
if ($('#logo').length)
{
$(window).load(function(){

var _logo_height = $('#logo').height();
var _logo_vertical_shift = Math.round((_logo_height-25)/2);

$('#globalnav').css('padding-top', _logo_vertical_shift+'px');
$('#logo').css('margin-top', '-'+_logo_vertical_shift+'px');

});
}

// MOBILE nav slide-out menu
$('#mobile-nav-toggle').click( function(){
if (!$('.nav-negative').length) {
Expand All @@ -186,27 +172,32 @@ $(document).ready(function() {
});

// STICKY CART for non-mobile
if ( !(MatchMedia("only screen and (max-width: 760px)")) ) {
$(window).scroll(function(){
if ( $(this).scrollTop() >= 55 && !$("#cart").hasClass( "fixed" ) && !$("#cart").hasClass( "empty" ) && !($(".cart-summary-page")).length ) {
$("#cart").hide();

$("#cart").addClass( "fixed" );
if ($('#cart-flyer').length)
{
var _width = $('#cart-flyer').width()+52;
var _offset_right = $(window).width() - $('#cart-flyer').offset().left - _width + 1;

$("#cart").css({ "right": _offset_right+"px", "width": _width+"px" });
}

$("#cart").slideToggle(200);
} else if ( $(this).scrollTop() < 50 && $("#cart").hasClass( "fixed" ) ) {
$("#cart").removeClass( "fixed" );
$("#cart").css({ "width": "auto" });
}
});
}
$(window).scroll(function(){
var is_mobile_case = MatchMedia("only screen and (max-width: 760px)");
if (!is_mobile_case) {
var scroll_top = $(this).scrollTop();
var $card = $("#cart"),
$flyer = $('#cart-flyer');

if ( scroll_top >= 55 && !$card.hasClass( "fixed" ) && !$card.hasClass( "empty" ) && !($(".cart-summary-page")).length ) {
$card.hide();

$card.addClass( "fixed" );
if ($flyer.length) {
var _width = $flyer.width()+52;
var _offset_right = $(window).width() - $flyer.offset().left - _width + 1;

$("#cart").css({ "right": _offset_right+"px", "width": _width+"px" });
}

$card.show();
// $card.slideToggle(200);
} else if ( scroll_top < 50 && $("#cart").hasClass( "fixed" ) ) {
$card.removeClass( "fixed" );
$card.css({ "width": "auto" });
}
}
});
});

// MAILER app email subscribe form
Expand Down
155 changes: 81 additions & 74 deletions wa-apps/site/themes/default/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,87 +119,94 @@
<div id="globalnav" class="{if $theme_settings.header_scheme|strstr:'white'}light{if $theme_settings.header_scheme|strstr:'andgray'} andgray{/if}{/if}"{if $theme_settings.header_customcolor} style="background-color: {$theme_settings.header_customcolor};"{/if}>
<div class="container">

{if $theme_settings.header_sitename || $theme_settings.logo}
<h2>
<a href="{$wa_url}">
{if $theme_settings.logo}
<img src="{$wa_theme_url}{$theme_settings.logo}?v{$wa_theme_version}" alt="{$wa->accountName()}" id="logo" />
<span>{$wa->accountName()}</span>
{else}
{$wa->accountName()}
<div class="wa-flex-box full-line">
<nav class="column wa-flex-box middle" style="flex: 1;">
{if $theme_settings.header_sitename || $theme_settings.logo}
<h2>
<a href="{$wa_url}">
{if $theme_settings.logo}
<img src="{$wa_theme_url}{$theme_settings.logo}?v{$wa_theme_version}" alt="{$wa->accountName()}" id="logo" />
<span>{$wa->accountName()}</span>
{else}
{$wa->accountName()}
{/if}
</a>
</h2>
{/if}
</a>
</h2>
{/if}

<button id="mobile-nav-toggle"><!-- nav toggle for mobile devices --></button>

<nav>

{if $wa->isAuthEnabled()}
<!-- user auth -->
<ul class="auth">
{strip}
<ul class="apps">
{$_links = []}
{if $theme_settings.header_links == 'site-pages'}
{if $wa->site}{$_links = $wa->site->pages()}{/if}
{elseif $theme_settings.header_links == 'shop-pages'}
{if $wa->shop}{$_links = $wa->shop->pages()}{/if}
{elseif $theme_settings.header_links == 'blog-pages'}
{if $wa->blog}{$_links = $wa->blog->pages()}{/if}
{elseif $theme_settings.header_links == 'photos-pages'}
{if $wa->photos}{$_links = $wa->photos->pages()}{/if}
{elseif $theme_settings.header_links == 'hub-pages'}
{if $wa->hub}{$_links = $wa->hub->pages()}{/if}
{elseif $theme_settings.header_links != 'none'}
{$_links = $wa->apps()}
{/if}
{foreach $_links as $a}
{if !($a.url == $wa_url && $a.name == $wa->accountName())}
<li{if $a.url==$wa_app_url && !$wa->globals('isMyAccount') || strlen($a.url)>1 && $wa->currentUrl()|strstr:$a.url} class="selected"{/if}><a href="{$a.url}">{$a.name}</a></li>
{/if}
{/foreach}
</ul>
{/strip}

<div class="clear-both"></div>
</nav>

<div class="column wa-flex-box middle">
{if $wa->shop}
<!-- cart -->
{$cart_total = $wa->shop->cart->total()}
<div id="cart" class="cart{if !$cart_total} empty{/if}">
<a href="{$wa->getUrl('shop/frontend/cart')}" class="cart-summary">
<i class="cart-icon"></i>
<strong class="cart-total">{wa_currency_html($cart_total, $wa->shop->currency())}</strong>
</a>
<div id="cart-content">
{* <div class="cart-just-added">
%s is now in your shopping cart
</div> *}
</div>
<a href="{$wa->getUrl('shop/frontend/cart')}" class="cart-to-checkout" style="display: none;">
[s`View cart`]
</a>
</div>
{/if}

{if $wa->user()->isAuth()}
{if $wa->myUrl()}
<li{if $wa->globals('isMyAccount')} class="bold"{/if}>
<a href="{$wa->myUrl()}" class="not-visited"><i class="icon16 userpic20 float-left" style="background-image: url('{$wa->user()->getPhoto2x(20)}');"></i> <strong>{$wa->user('firstname')|default:'[`My account`]'}</strong></a>
</li>
{if $wa->isAuthEnabled()}
<!-- user auth -->
{strip}
<ul class="auth">
{if $wa->user()->isAuth()}
{if $wa->myUrl()}
<li{if $wa->globals('isMyAccount')} class="bold"{/if}>
<a href="{$wa->myUrl()}" class="not-visited"><i class="icon16 userpic20 float-left" style="background-image: url('{$wa->user()->getPhoto2x(20)}');"></i> <strong>{$wa->user('firstname')|default:'[`My account`]'}</strong></a>
</li>
{else}
<li><strong>{$wa->user('firstname')|default:'[`My account`]'}</strong></li>
{/if}
<li><a href="?logout" class="not-visited">[s`Log out`]</a></li>
{else}
<li><strong>{$wa->user('firstname')|default:'[`My account`]'}</strong></li>
<li><a href="{$wa->loginUrl()}" class="not-visited">[s`Log in`]</a></li>
<li><a href="{$wa->signupUrl()}" class="not-visited">[s`Sign up`]</a></li>
{/if}
<li><a href="?logout" class="not-visited">[s`Log out`]</a></li>
{else}
<li><a href="{$wa->loginUrl()}" class="not-visited">[s`Log in`]</a></li>
<li><a href="{$wa->signupUrl()}" class="not-visited">[s`Sign up`]</a></li>
{/if}
</ul>
{/if}

{if $wa->shop}
<!-- cart -->
{$cart_total = $wa->shop->cart->total()}
<div id="cart" class="cart{if !$cart_total} empty{/if}">
<a href="{$wa->getUrl('shop/frontend/cart')}" class="cart-summary">
<i class="cart-icon"></i>
<strong class="cart-total">{wa_currency_html($cart_total, $wa->shop->currency())}</strong>
</a>
<div id="cart-content">
{* <div class="cart-just-added">
%s is now in your shopping cart
</div> *}
</div>
<a href="{$wa->getUrl('shop/frontend/cart')}" class="cart-to-checkout" style="display: none;">
[s`View cart`]
</a>
</div>
{/if}

<!-- core site sections (apps) -->
<ul class="apps">
{$_links = []}
{if $theme_settings.header_links == 'site-pages'}
{if $wa->site}{$_links = $wa->site->pages()}{/if}
{elseif $theme_settings.header_links == 'shop-pages'}
{if $wa->shop}{$_links = $wa->shop->pages()}{/if}
{elseif $theme_settings.header_links == 'blog-pages'}
{if $wa->blog}{$_links = $wa->blog->pages()}{/if}
{elseif $theme_settings.header_links == 'photos-pages'}
{if $wa->photos}{$_links = $wa->photos->pages()}{/if}
{elseif $theme_settings.header_links == 'hub-pages'}
{if $wa->hub}{$_links = $wa->hub->pages()}{/if}
{elseif $theme_settings.header_links != 'none'}
{$_links = $wa->apps()}
</ul>
{/strip}
{/if}
{foreach $_links as $a}
{if !($a.url == $wa_url && $a.name == $wa->accountName())}
<li{if $a.url==$wa_app_url && !$wa->globals('isMyAccount') || strlen($a.url)>1 && $wa->currentUrl()|strstr:$a.url} class="selected"{/if}><a href="{$a.url}">{$a.name}</a></li>
{/if}
{/foreach}
</ul>

</nav>
<div class="clear-both"></div>
<button id="mobile-nav-toggle"></button>

<div class="clear-both"></div>
</div>
</div>

</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion wa-apps/site/themes/default/theme.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE theme PUBLIC "wa-app-theme" "http://www.webasyst.com/wa-content/xml/wa-app-theme.dtd">
<theme id="default" system="0" vendor="webasyst" author="Webasyst" app="site" version="3.3.5">
<theme id="default" system="0" vendor="webasyst" author="Webasyst" app="site" version="3.3.6">
<name locale="en_US">Default 3.0</name>
<name locale="ru_RU">Дефолт 3.0</name>
<description locale="en_US">Adaptive design theme for all base Webasyst apps</description>
Expand Down

0 comments on commit 0123e23

Please sign in to comment.