Skip to content

Commit

Permalink
Adding cart button and top menu icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Michel Moraes committed Sep 20, 2018
1 parent 179fdc2 commit cc1a7ca
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 22 deletions.
1 change: 1 addition & 0 deletions app/config/timber.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ function add_to_context($data)
$data['menu'] = new TimberMenu($menu_locations['main_menu']);

$data['lang_menu'] = new TimberMenu($menu_locations['lang_menu']);
$data['icons_menu'] = new TimberMenu($menu_locations['shop_icons_menu']);

// Add main-sidebar to Timber context object
$data['main_sidebar'] = Timber::get_widgets('main-sidebar');
Expand Down
1 change: 1 addition & 0 deletions app/config/wp/menus.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ function base_camp_register_menus()
{
register_nav_menu('main_menu', __('Main menu', 'base-camp'));
register_nav_menu('lang_menu', __('Lang menu', 'base-camp'));
register_nav_menu('shop_icons_menu', __('Shop icons menu', 'base-camp'));
}

add_action('after_setup_theme', 'base_camp_register_menus');
11 changes: 6 additions & 5 deletions resources/assets/js/components/Purchase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<div class="purchase__items">
<label :for="`sector-${index}`" class="purchase__item button sector"
v-for="(ticket, index) in productsFilter" :key="index" @click="nextStep(5, index)">
<input :id="`sector-${index}`" type="radio" v-model="selected.sector" :value="ticket.name" class="is-hidden">
<input :id="`sector-${index}`" type="radio" v-model="selected.product" :value="ticket" class="is-hidden">
{{ ticket.name }} <br>
<span class="purchase__item-price">$ {{ ticket.price }}</span>
</label>
Expand Down Expand Up @@ -88,11 +88,12 @@
<span class="number">6</span> Add to cart
</div>
<div class="purchase__item-total">
<span>{{ quantity }}x $18.40</span>
<span>{{ quantity }}x ${{ selected.product.price }}</span>

<button class="purchase__add-to-cart-btn button">
<a class="purchase__add-to-cart-btn button"
:href="`?add-to-cart=${selected.product.id}&quantity=${ quantity }`">
Add to cart
</button>
</a>
</div>
</div>
</transition>
Expand All @@ -109,10 +110,10 @@
currentStep: 1,
quantity: 1,
selected: {
product: Object,
parade: String,
date: Object,
seat: Object,
sector: String,
quantity: Number
},
productsList: Array,
Expand Down
8 changes: 4 additions & 4 deletions resources/views/components/navbar/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
</div>

<div class="account-menu">
<a class="navbar-item" href="#">
<img src="{{ theme.link }}/resources/assets/images/icon-user-solid.png" alt="User icon">
<a class="navbar-item" href="{{ icons_menu.get_items[0].link }}">
<img src="{{ theme.link }}/resources/assets/images/icon-user-solid.png" alt="My Account">
</a>
<a class="navbar-item" href="#">
<img src="{{ theme.link }}/resources/assets/images/icon-cart-gray.png" alt="Cart icon">
<a class="navbar-item" href="{{ icons_menu.get_items[1].link }}">
<img src="{{ theme.link }}/resources/assets/images/icon-cart-gray.png" alt="Cart">
</a>
</div>

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
19 changes: 8 additions & 11 deletions static/manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{
"admin.css": "css/admin.b35303f0c0b727d089ff.css",
"admin.js": "js/admin.b35303f0c0b727d089ff.js",
"app.css": "css/app.b35303f0c0b727d089ff.css",
"app.js": "js/app.b35303f0c0b727d089ff.js",
"login.css": "css/login.b35303f0c0b727d089ff.css",
"login.js": "js/login.b35303f0c0b727d089ff.js",
"vendor.js": "js/vendor.b35303f0c0b727d089ff.js",
"images/logo.png": "images/logo.png",
"images/texture-blue-carnival.jpg": "images/texture-blue-carnival.jpg",
"images/base-camp-logo.png": "images/base-camp-logo.png",
"images/icon-cart-white.png": "images/icon-cart-white.png"
"admin.css": "css/admin.8d4eb6c5c80423d5b099.css",
"admin.js": "js/admin.8d4eb6c5c80423d5b099.js",
"app.css": "css/app.8d4eb6c5c80423d5b099.css",
"app.js": "js/app.8d4eb6c5c80423d5b099.js",
"login.css": "css/login.8d4eb6c5c80423d5b099.css",
"login.js": "js/login.8d4eb6c5c80423d5b099.js",
"vendor.js": "js/vendor.8d4eb6c5c80423d5b099.js",
"images/base-camp-logo.png": "images/base-camp-logo.png"
}

0 comments on commit cc1a7ca

Please sign in to comment.