Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt product page for 13 inches screens #5937

Merged
merged 1 commit into from
Aug 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions admin-dev/themes/new-theme/js/product-page/product-header.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
import $ from 'jquery';

export default function() {
let tabWidth = 0;
$('.js-arrow').on('click', (e) => {
let navWidth = 40;

$('.js-nav-tabs li').each((index, item) => {
navWidth += $(item).width();
$('.js-nav-tabs').width(navWidth);
});

tabWidth = navWidth - $('.js-tabs').width();

if ($('.js-arrow').is(':visible')) {
$('.js-nav-tabs').animate({
left: $(e.currentTarget).hasClass('right-arrow') ? `-=${tabWidth}` : 0
}, 400, 'easeOutQuad', () => {
if ($(e.currentTarget).hasClass('right-arrow')) {
$('.left-arrow').addClass('visible');
$('.right-arrow').removeClass('visible');
} else {
$('.right-arrow').addClass('visible');
$('.left-arrow').removeClass('visible');
}
});
}
});
}
82 changes: 41 additions & 41 deletions admin-dev/themes/new-theme/public/bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions admin-dev/themes/new-theme/public/theme.css

Large diffs are not rendered by default.

170 changes: 169 additions & 1 deletion admin-dev/themes/new-theme/scss/pages/_product_page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -748,4 +748,172 @@

#product_reference_field {
margin-top: 7px;
}
}

/* 13 inches screens */
@media only screen and (min-width: 320px) and (max-width: 1450px) {
.product-page {
.product-header {
.edit {
background-size: 3%;
}
.big-input {
width: 100%;
margin-bottom: rem(15px);
input[type="text"] {
height: rem(50px);
}
}
.form_step1_type_product {
width: 20%;
}
.form_switch_language {
width: 20%;
}
.toolbar {
width: 60%;
}
}
.tabs {
overflow: hidden;
width: auto;
background: white;
.material-icons {
display: inline-block;
}
.arrow {
padding-top: rem(15px);
background: white;
position: relative;
height: rem(48px);
z-index: 2;
visibility: hidden;
&:hover {
background: $brand-primary;
}
&.visible {
visibility: visible;
}
}
.right-arrow {
margin-top: rem(-50px);
}
.left-arrow {

}
}
.nav-tabs {
height: rem(50px);
width: rem(2000px);
position: relative;
.nav-link.active {
border-top: transparent;
border-bottom: 3px solid $brand-primary;
}
}
.right-column {
width: 30%;
}
.left-column {
width: 70%;
}
.ui-helper-hidden-accessible {
margin-bottom: rem(15px);
display: inline-block;
}
.combination-form {
padding: 0 rem(20px);
.col-md-2 {
width: 30%;
}
.col-md-3 {
width: 50%;
}
}
#form-nav[style*="display:none"] {
~ .arrow {
display: none;
}
}
#features {
.col-md-4 {
width: 100%;
}
.col-md-3 {
width: 90%;
}
}
#accordion_combinations {
.attribute-finalprice,
.attribute-price {
display: none;
}
}
#combinations_thead {
th:nth-child(4),
th:nth-child(5) {
display: none;
}
}
#bulk-combinations-container {
width: 95%;
.col-md-2,
.col-md-4 {
width: 50%;
margin-bottom: rem(20px);
}
.col-md-3 {
clear: both;
width: 50%;
}
.col-md-offset-1,
.col-md-offset-4 {
margin-left: 0;
}
.col-md-offset-5 {
margin-left: 0;
width: 82%;
+ .col-md-2 {
width: 18%;
}
}
#delete-combinations {
float: right;
}
.btn-block {
width: auto;
float: right;
}
}
#step2 {
.col-md-2 {
width: 25%;
}
.col-md-4,
.col-md-8 {
width: 50%;
}
.col-md-offset-1 {
margin-left: 0;
}
}
.product-footer {
.hidden-xs,
input.save {
display: none;
}
button.save {
background: $brand-primary;
}
.col-lg-7 {
width: 50%;
}
.dropdown {
display: block;
.dropdown-menu {
top: rem(-120px);
}
}
}
}
}
41 changes: 14 additions & 27 deletions admin-dev/themes/new-theme/scss/theme.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
@import "~bourbon/app/assets/stylesheets/bourbon";
@import "../node_modules/PrestaKit/scss/custom/_variables.scss";
@import "config/settings";

// Mixins

@import "mixins/single_line_block";

// Components

@import "config/settings"; // Mixins
@import "mixins/single_line_block"; // Components
@import "components/layout/content_div";
@import "components/layout/header_toolbar";
@import "components/layout/kpi";
Expand All @@ -16,10 +10,8 @@
@import "components/category_tree";
@import "components/dropzone";
@import "components/notifications";

@import "pages/product_page";
@import "pages/products_catalog";
@import "pages/modules";

// Other

Expand All @@ -32,37 +24,37 @@

// Main Layout

@import "pages/modules";

// Other

@import "components/tinymce";

// Main Layout

body {
background: $background-grey;
}

// To put into the PrestaKit

$color-icons: #6c868e;

.breadcrumb {
padding: rem(5px);
background: none;
border-radius: 0;
font-size: rem(12px);

> li + li::before {
padding-right: rem(0px);
padding-left: rem(3px);
}

> li > a {
color: #363A41; // TODO: Place the text color
}
}


.toolbar-button {
color: $color-icons;
text-align: center;
display: inline-block;
margin: 0 rem(5px);

> .material-icons {
font-size: rem(24px);
}
Expand All @@ -71,28 +63,23 @@ $color-icons: #6c868e;
color: $color-icons;
display: block;
}

&:hover {
text-decoration: none;
}
}

.col-center {
float:none;
margin:0 auto;
float: none;
margin: 0 auto;
}

._fullspace {
width: 100%;
height: 100%;
}

.bordered {
>.panel {
> .panel {
border: 0;
}

>.nav-item > .nav-link {
> .nav-item > .nav-link {
&.active {
border-bottom: 1px solid #FFFFFF;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="alert alert-info" role="alert">
<i class="material-icons">help</i>
<p class="alert-text">
{{ 'To add combinations, enter the wanted attributes (like "size" or "color") and their respective values ("XS", "red", "all", etc.) in the field below; or select it in the right column. Then click on "Generate": it will automatically create all the combinations for you! <br> If you haven’t got any attributes yet, you should first create some in [1]Attributes & Features[/1].'|trans({}, 'Admin.Catalog.Help')|replace({'[1]': '<a class="alert-link" href=' ~ getAdminLink("AdminTaxes") ~ ' target="_blank">', '[/1]': '</a>'})|raw }}
{{ 'To add combinations, enter the wanted attributes (like "size" or "color") and their respective values ("XS", "red", "all", etc.) in the field below; or select it in the right column. Then click on "Generate": it will automatically create all the combinations for you! <br> If you haven’t got any attributes yet, you should first create some in [1]Attributes & Features[/1].'|trans({}, 'Admin.Catalog.Help')|replace({'[1]': '<a class="alert-link" href=' ~ getAdminLink("AdminAttributesGroups") ~ ' target="_blank">', '[/1]': '</a>'})|raw }}
</p>
</div>
<div class="row">
Expand Down
Loading