Skip to content
This repository has been archived by the owner on Apr 22, 2022. It is now read-only.

Commit

Permalink
v1.6.0 (#145)
Browse files Browse the repository at this point in the history
* Switch publish-theme to master version

* Add ui-bootstrap 4 to bootstrap-migration layout

* Make all buttons text uppercase and fix their box-shadow property

* Migrate bulk-order-pad, categories dropdown and search-bar

* Remove 'x' in inputs with type 'search'

* Fix variables overriding

* Fix popover font-size

* Create separated scripts bundle for bootstrap v4

* Add ui-bootstrap4 to bower dependencies

* Start migrate index page. Carusel

* VDS-144: Migrate index page to bootstrap 4

* Remove blogs section

* Fix row width in navbar

* Fix navbar parts for logged user

* Use npm package of ui-bootstrap instead of bower

* Fix uppercase class for buttons

* Replace custom css for popover border-radius

* Remove unused font-size assigments

* Fix template for searchBar and remove custom css for dropdown

* Stretch searchBar in the header

* Fix custom popover sizes

* Add folders for custom styles, rename 'custom' to 'override'

* Fix nav snippets

* Fix categories popover font

* Remove redundant code

* VP-6270: Add status bages (#142)

* VP-6270: Add status badges

* VP-6270: Update status badges

* v1.6.0

Co-authored-by: Maksim Kopnov <[email protected]>
Co-authored-by: Ilia <[email protected]>
Co-authored-by: trueboroda <[email protected]>
Co-authored-by: Maksim Kopnov <[email protected]>
  • Loading branch information
5 people authored Dec 10, 2020
1 parent 2258485 commit 34d5ca3
Show file tree
Hide file tree
Showing 42 changed files with 506 additions and 377 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: warchant/setup-sonar-scanner@v3

- name: Get Image Version
uses: VirtoCommerce/vc-github-actions/get-image-version@VP-6093
uses: VirtoCommerce/vc-github-actions/get-image-version@master
id: image

- name: Set release variables
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Publish
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || (github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/master')}}
id: publish
uses: VirtoCommerce/vc-github-actions/publish-theme@VP-6093
uses: VirtoCommerce/vc-github-actions/publish-theme@master

- name: Create Release
if: ${{ github.ref == 'refs/heads/master' }}
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# B2B theme for VirtoCommerce Storefront
# B2B theme for VirtoCommerce Storefront

[![Share on Facebook](https://img.shields.io/badge/facebook--blue.svg?style=social&label=Share&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyNjYuODkzcHgiIGhlaWdodD0iMjY2Ljg5NXB4IiB2aWV3Qm94PSIwIDAgMjY2Ljg5MyAyNjYuODk1IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNjYuODkzIDI2Ni44OTUiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJCbHVlXzFfIiBmaWxsPSIjM0M1QTk5IiBkPSJNMjQ4LjA4MiwyNjIuMzA3YzcuODU0LDAsMTQuMjIzLTYuMzY5LDE0LjIyMy0xNC4yMjVWMTguODEyYzAtNy44NTctNi4zNjgtMTQuMjI0LTE0LjIyMy0xNC4yMjRIMTguODEyYy03Ljg1NywwLTE0LjIyNCw2LjM2Ny0xNC4yMjQsMTQuMjI0djIyOS4yN2MwLDcuODU1LDYuMzY2LDE0LjIyNSwxNC4yMjQsMTQuMjI1SDI0OC4wODJ6Ii8%2BPHBhdGggaWQ9ImYiIGZpbGw9IiNGRkZGRkYiIGQ9Ik0xODIuNDA5LDI2Mi4zMDd2LTk5LjgwM2gzMy40OTlsNS4wMTYtMzguODk1aC0zOC41MTVWOTguNzc3YzAtMTEuMjYxLDMuMTI3LTE4LjkzNSwxOS4yNzUtMTguOTM1bDIwLjU5Ni0wLjAwOVY0NS4wNDVjLTMuNTYyLTAuNDc0LTE1Ljc4OC0xLjUzMy0zMC4wMTItMS41MzNjLTI5LjY5NSwwLTUwLjAyNSwxOC4xMjYtNTAuMDI1LDUxLjQxM3YyOC42ODRoLTMzLjU4NXYzOC44OTVoMzMuNTg1djk5LjgwM0gxODIuNDA5eiIvPjwvc3ZnPg%3D%3D)](https://www.facebook.com/sharer.php?u=https://virtocommerce.com)&nbsp;[![Tweet](https://img.shields.io/twitter/url/https/virtocommerce.com.svg?style=social)](https://twitter.com/intent/tweet?text=%23VirtoCommerce%20puts%20the%20best%20of%20MS%20Azure%20Cloud%2C%20open%20source%20.Net%20code%20and%20agile%20development%20in%20a%20single%20enterprise%20%23ecommerce%20platform.) [![Latest release](https://img.shields.io/github/release/VirtoCommerce/vc-demo-theme-b2b.svg)](https://github.com/VirtoCommerce/vc-demo-theme-b2b/releases/latest) [![Total downloads](https://img.shields.io/github/downloads/VirtoCommerce/vc-demo-theme-b2b/total.svg?colorB=007ec6)](https://github.com/VirtoCommerce/vc-demo-theme-b2b/releases) [![License](https://img.shields.io/badge/license-VC%20OSL-blue.svg)](https://virtocommerce.com/open-source-license)

[![CI status](https://github.com/VirtoCommerce/vc-demo-theme-b2b/workflows/Theme%20CI/badge.svg?branch=dev)](https://github.com/VirtoCommerce/vc-demo-theme-b2b/actions?query=workflow%3A"Theme+CI") [![Deployment status](https://github.com/VirtoCommerce/vc-demo-theme-b2b/workflows/Theme%20deployment/badge.svg?branch=dev)](https://github.com/VirtoCommerce/vc-demo-theme-b2b/actions?query=workflow%3A"Theme+deployment") [![Quality gate](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-demo-theme-b2b&metric=alert_status&branch=dev)](https://sonarcloud.io/dashboard?id=VirtoCommerce_vc-demo-theme-b2b) [![Reliability rating](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-demo-theme-b2b&metric=reliability_rating&branch=dev)](https://sonarcloud.io/dashboard?id=VirtoCommerce_vc-demo-theme-b2b) [![Security rating](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-demo-theme-b2b&metric=security_rating&branch=dev)](https://sonarcloud.io/dashboard?id=VirtoCommerce_vc-demo-theme-b2b) [![Sqale rating](https://sonarcloud.io/api/project_badges/measure?project=VirtoCommerce_vc-demo-theme-b2b&metric=sqale_rating&branch=dev)](https://sonarcloud.io/dashboard?id=VirtoCommerce_vc-demo-theme-b2b)

[![Discourse topics](https://img.shields.io/discourse/topics?label=community&logo=community&server=http%3A%2F%2Fwww.virtocommerce.org)](https://www.virtocommerce.org) [![Contributors](https://img.shields.io/github/contributors/VirtoCommerce/vc-storefront.svg)](https://github.com/VirtoCommerce/vc-storefront/graphs/contributors)

_B2B theme_ for VirtoCommerce Storefront used by _B2B-Store_ sample store. It is a showcase for b2b features support of VirtoCommerce.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
<form method="get" action="{{ '/search' | absolute_url }}" role="search" autocomplete="off">
<div class="input-group" uib-dropdown is-open="$ctrl.hasHint" dropdown-append-to-body="true">
<input type="search" name="q" class="form-control border-top-0 border-left-0 border-right-0 border-gray-900 navbar-search-bar" ng-model="$ctrl.query" placeholder="{% raw %}{{ $ctrl.placeholder }}{% endraw %}"
<input type="search" name="q" class="form-control h-auto border-top-0 border-left-0 border-right-0 border-gray-900" ng-model="$ctrl.query" placeholder="{% raw %}{{ $ctrl.placeholder }}{% endraw %}"
uib-typeahead="suggestion as suggestion.name for suggestion in $ctrl.getSuggestions()" typeahead-is-open="$ctrl.isOpen" typeahead-wait-ms="100" typeahead-loading="$ctrl.isSearching" typeahead-no-results="$ctrl.hasNoResults"
typeahead-focus-first="false" typeahead-template-url="search-bar-match.tpl" typeahead-popup-template-url="search-bar-popup.tpl" typeahead-append-to-body="true">
<ul class="dropdown-menu" uib-dropdown-menu>
<li class="disabled" ng-show="$ctrl.isSearching"><a href="" ng-bind="$ctrl.searching"></a></li>
<li class="disabled" ng-show="$ctrl.hasNoResults"><a href="" ng-bind="$ctrl.noResults"></a></li>
</ul>
<div class="dropdown-menu" uib-dropdown-menu>
<a class="dropdown-item disabled" ng-show="$ctrl.isSearching" href="" ng-bind="$ctrl.searching" tabindex="-1" aria-disabled="true"></a>
<a class="dropdown-item disabled" ng-show="$ctrl.hasNoResults" href="" ng-bind="$ctrl.noResults" tabindex="-1" aria-disabled="true"></a>
</div>
<span class="input-group-append">
<button type="submit" class="btn btn-primary rounded-0 border-top-0 border-left-0 border-right-0 border-bottom border-gray-900 px-3 py-2" ng-bind="$ctrl.submitLabel"></button>
<button type="submit" class="btn btn-primary rounded-0 border-top-0 border-left-0 border-right-0 border-bottom border-gray-900 px-3 py-3" ng-bind="$ctrl.submitLabel"></button>
</span>
</div>
<script id="search-bar-match.tpl" type="text/ng-template">
<a ng-href="{% raw %}{{ match.model.url }}{% endraw %}"
tabindex="-1"
ng-bind-html="match.label | uibTypeaheadHighlight:query"
ng-attr-title="{{match.label}}"></a>
<span ng-bind-html="match.label | uibTypeaheadHighlight:query"></span>
</script>
<script id="search-bar-popup.tpl" type="text/ng-template">
<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+'px', left: position().left+'px'}" role="listbox" aria-hidden="{% raw %}{{!isOpen()}}{% endraw %}">
<li class="dropdown-header" ng-repeat-start="(group, groupMatches) in matches | groupBy: 'model.within'" ng-bind="$parent.$parent.$ctrl[group + 'Label']"></li>
<li class="uib-typeahead-match" ng-repeat="match in groupMatches track by $index" ng-repeat-end ng-class="{active: isActive(match.model.index) }" ng-mouseenter="selectActive(match.model.index)" ng-click="selectMatch(match.model.index, $event)" role="option" id="{% raw %}{{::match.id}}{% endraw %}">
<div uib-typeahead-match index="match.model.index" match="match" query="query" template-url="templateUrl"></div>
</li>
</ul>
<div class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+'px', left: position().left+'px'}" role="listbox" aria-hidden="{% raw %}{{!isOpen()}}{% endraw %}">
<h6 class="dropdown-header text-helvetica font-weight-normal" ng-repeat-start="(group, groupMatches) in matches | groupBy: 'model.within'" ng-bind="$parent.$parent.$ctrl[group + 'Label']"></h6>
<a ng-repeat="match in groupMatches track by $index"
id="{% raw %}{{::match.id}}{% endraw %}"
class="uib-typeahead-match dropdown-item font-weight-normal text-wrap"
ng-class="{active: isActive(match.model.index) }"
ng-href="{% raw %}{{ match.model.url }}{% endraw %}"
ng-mouseenter="selectActive(match.model.index)"
ng-click="selectMatch(match.model.index, $event)"
role="option"
tabindex="-1"
ng-repeat-end
ng-attr-title="{{match.label}}">
<span uib-typeahead-match index="match.model.index" match="match" query="query" template-url="templateUrl"></span>
</a>
</div>
</script>
</form>
2 changes: 1 addition & 1 deletion assets/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@
$dropdown-link-disabled-color: $text-muted; // $gray-light // Migrating_To_Bootstrap4: ?? (which gray color from bs4 we should use?)

//** Text color for headers within dropdown menus.
$dropdown-header-color: $gray-dark; // $gray-light // Migrating_To_Bootstrap4: ?? (which gray color from bs4 we should use?)
$dropdown-header-color: $gray-dark; // $gray-light // Migrating_To_Bootstrap4: DONE, set to $dropdown-header-color

//** Deprecated `$dropdown-caret-color` as of v3.1.0
// $dropdown-caret-color: #000
Expand Down
5 changes: 1 addition & 4 deletions assets/scss/bootstrap-migration/_custom.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
@import "custom/variables";
@import "custom/utilities/border";
@import "custom/popover";
@import "custom/navbar";
@import "custom/type";
@import "custom/scaffolding";
21 changes: 21 additions & 0 deletions assets/scss/bootstrap-migration/_default-variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
$theme-colors: ();

$grid-breakpoints: (
xs: 0,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px,
);

$container-max-widths: (
sm: 540px,
md: 720px,
lg: 960px,
xl: 1140px,
);

$font-weight-bold: 700;
$white: #fff;
$body-bg: $white;
$black: #000;
29 changes: 19 additions & 10 deletions assets/scss/bootstrap-migration/_maps.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
$theme-colors: (
"primary": $primary,
"secondary": $secondary,
"success": $success,
"info": $info,
"warning": $warning,
"danger": $danger,
"gray-900": $gray-900
$theme-colors: map-merge(
$theme-colors,
(
'gray-900': $gray-900,
'gray-200': $gray-200,
)
);

$grid-breakpoints: map-merge($grid-breakpoints, (xxl: 1335px));
$container-max-widths: map-merge($container-max-widths, (xxl: 1336px));
$grid-breakpoints: map-merge(
$grid-breakpoints,
(
xxl: 1335px,
)
);

$container-max-widths: map-merge(
$container-max-widths,
(
xxl: 1336px,
)
);
7 changes: 7 additions & 0 deletions assets/scss/bootstrap-migration/_override.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import "override/variables";
@import "override/utilities/border";
@import "override/type";
@import "override/scaffolding";
@import "override/forms";
@import "override/buttons";
@import "override/dropdowns";
13 changes: 13 additions & 0 deletions assets/scss/bootstrap-migration/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,16 @@ $line-height-base: 1.428571429;
$input-btn-border-width: 1px;
$btn-border-width: 2px;
$link-font-weight: 500;
$yiq-contrasted-threshold: 200;
$small-font-size: 85%;
$btn-box-shadow: false;
$dropdown-padding-y: 0.3125rem;
$dropdown-item-padding-x: 1.25rem;
$dropdown-header-color: $gray-700;
$dropdown-link-active-bg: $primary;
$popover-font-size: $font-size-base;
$card-cap-bg: $gray-100;
$card-border-color: $gray-300;
$card-cap-color: $black;
$card-spacer-x: 0.938rem;
$popover-header-padding-x: 1rem;
12 changes: 9 additions & 3 deletions assets/scss/bootstrap-migration/custom/_navbar.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
.navbar-search-bar {
min-height: 3.25rem;
font-size: $font-size-base;
.navbar-dark {
li.active > {
a,
a:focus,
a:hover {
color: $body-color !important;
background-color: $gray-200;
}
}
}
53 changes: 53 additions & 0 deletions assets/scss/bootstrap-migration/custom/_popover.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.popover {
&.hide-arrow {
.arrow {
display: none;
}
}

.bulk-order-popover {
li {
& > a {
color: $secondary;
&:hover,
&:focus {
color: $body-color;
}
}

&.active {
border-bottom: 3px solid $primary;
& > {
a,
a:hover,
a:focus {
color: $body-color;
background: none;
}
}
}
}
}

.all-products-popover {
li > a {
color: $body-color;
&:focus,
&:hover {
color: $primary;
}
}
}

.popover-category:nth-child(odd):not(:last-child) {
border-right: 1px solid $gray-300;
}
}

#all-products-popover + .popover {
max-width: 450px;
}

#bulk-order-popover + .popover {
max-width: 305px;
}
17 changes: 0 additions & 17 deletions assets/scss/bootstrap-migration/custom/_type.scss

This file was deleted.

3 changes: 2 additions & 1 deletion assets/scss/bootstrap-migration/main.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";
@import "default-variables";
@import "variables";
@import "maps";
@import "bootstrap/scss/bootstrap";
@import "override";
@import "custom";
3 changes: 3 additions & 0 deletions assets/scss/bootstrap-migration/override/_buttons.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.btn:not(.btn-link) {
text-transform: uppercase;
}
3 changes: 3 additions & 0 deletions assets/scss/bootstrap-migration/override/_dropdowns.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.dropdown-toggle::after {
display: none;
}
39 changes: 39 additions & 0 deletions assets/scss/bootstrap-migration/override/_forms.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.form-control {
box-shadow: none;

&:focus {
box-shadow: 0 0 0 1px $input-focus-border-color inset;
}
}

// Remove arrows/spinners from input with type="number"

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}

/* Firefox */
input[type='number'] {
-moz-appearance: textfield;
}

// Remove the 'X' in input with type="search

/* Chrome */
input[type='search']::-webkit-search-decoration,
input[type='search']::-webkit-search-cancel-button,
input[type='search']::-webkit-search-results-button,
input[type='search']::-webkit-search-results-decoration {
display: none;
}

// Remove button-border from input-group buttons, so they are aligned with inputs
// (because input height calculation doesn't take into account the width of the button border)
.input-group-append {
.btn {
border-width: 0;
}
}
26 changes: 26 additions & 0 deletions assets/scss/bootstrap-migration/override/_type.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.list-inline.list-divider {
> li:not(:last-child) {
margin-right: 0;
}
> li:not(:first-child)::before {
content: '\FF5C'; // 1px width full height vertical line
opacity: (1/3);
}
}

.text-condensed {
font-family: $font-family-condensed !important;
}

.text-helvetica {
font-family: $font-family-sans-serif !important;
}

.h2,
.h3,
.h4,
h2,
h3,
h4 {
text-transform: uppercase;
}
27 changes: 27 additions & 0 deletions bundleconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,33 @@
"bower_components/owl.carousel/dist/owl.carousel.js"
]
},
{
"outputFileName": "assets/static/bundle/dependencies-bootstrap-migration.js",
"inputFiles": [
"bower_components/polyfills/polyfill.js",
"bower_components/jquery/dist/jquery.js",
"bower_components/underscore/underscore.js",
"bower_components/angularjs/angular.js",
"bower_components/angular-filter/dist/angular-filter.js",
"bower_components/angular-resource/angular-resource.js",
"bower_components/ngstorage/ngStorage.js",
"bower_components/angular-credit-cards/release/angular-credit-cards.js",
"bower_components/angular-animate/angular-animate.js",
"node_modules/ui-bootstrap4/dist/ui-bootstrap.js",
"node_modules/ui-bootstrap4/dist/ui-bootstrap-tpls.js",
"bower_components/angular-recaptcha/release/angular-recaptcha.js",
"bower_components/angular-sanitize/angular-sanitize.js",
"bower_components/angular-translate/angular-translate.js",
"bower_components/angular-translate-loader-url/angular-translate-loader-url.js",
"bower_components/angular-wizard/dist/angular-wizard.js",
"bower_components/bootstrap-sass/assets/javascripts/bootstrap/affix.js",
"bower_components/bootstrap-sass/assets/javascripts/bootstrap/scrollspy.js",
"bower_components/prism/prism.js",
"bower_components/prism/plugins/normalize-whitespace/prism-normalize-whitespace.js",
"bower_components/angular-ui-router/release/angular-ui-router.js",
"bower_components/owl.carousel/dist/owl.carousel.js"
]
},
{
"outputFileName": "assets/static/fonts",
"inputFiles": [
Expand Down
Loading

0 comments on commit 34d5ca3

Please sign in to comment.