Skip to content

Instantly share code, notes, and snippets.

View thanhkma1996's full-sized avatar
💪
Working

ThanhDO thanhkma1996

💪
Working
  • Digital Outlook
  • Viet Nam
View GitHub Profile
@thanhkma1996
thanhkma1996 / mini-cart.md
Created January 6, 2024 17:07 — forked from NigelDorning/mini-cart.md
Mini Cart example with Shopify

HTML

<button class="mini-cart__trigger">
    <img src="{{ 'icon-cart.svg' | asset_url }}" alt="Cart icon">
</button>

<div class="header__mobile-menu header__mobile-menu--hidden">
    <ul>
        {% for link in section.settings.main_menu.links %}
            <li><a href="{{ link.url }}">{{ link.title }}</a></li>
@thanhkma1996
thanhkma1996 / ajax-cart.js
Created January 6, 2024 17:08 — forked from marioloncarek/ajax-cart.js
complete shopify ajax cart solution with drawer and modal, adding and removing products - ugly AF
const defaults = {
cartModal: '.js-ajax-cart-modal', // classname
cartModalContent: '.js-ajax-cart-modal-content', // classname
cartModalClose: '.js-ajax-cart-modal-close', // classname
cartDrawer: '.js-ajax-cart-drawer', // classname
cartDrawerContent: '.js-ajax-cart-drawer-content', // classname
cartDrawerClose: '.js-ajax-cart-drawer-close', // classname
cartDrawerTrigger: '.js-ajax-cart-drawer-trigger', // classname
cartOverlay: '.js-ajax-cart-overlay', // classname
cartCounter: '.js-ajax-cart-counter', // classname
@thanhkma1996
thanhkma1996 / reactjs-learning-path-2020.md
Created March 23, 2024 09:54 — forked from paulnguyen-mn/reactjs-learning-path-2020.md
Lộ trình học ReactJS cơ bản cho người mới bắt đầu 2020 🚀

Lộ trình học ReactJS cơ bản cho người mới bắt đầu 2020 🎉

  • Đôi tượng: mới bắt đầu học ReactJS mà không biết học những gì.
  • Yêu cầu kiến thức:
@thanhkma1996
thanhkma1996 / certification-notes.md
Last active May 28, 2024 10:46 — forked from iamskok/shopify-theme-certification-notes.md
Notes on Shopify "Theme Development Certification"

Shopify Certification

  • aria-live="polite" is used for content which might get updated. Polite won't interupt.
  • a11y.js comes with Slate. Has trapFocus and removeTrapFocus methods.
  • URL mapping
  • The {{ content_for_header }} variable must be placed between the opening and closing <head> tag. It inserts the necessary Shopify scripts into the <head> which includes scripts for Google Analytics, Shopify analytics, for Shopify apps, and more.
  • The {{ content_for_layout }} variable must be placed between the opening and closing <body> tag. It outputs dynamic content generated by all of the other templates (index.liquid, product.liquid, and so on).
  • t filter is used to pull translation from locales/ru.json
  • In tags with more than one and or or operator, operators are checked in order from right to left. You cannot change the order of operations using parentheses — parentheses are invalid characters in Liquid and will preven