Skip to content

Instantly share code, notes, and snippets.

View khoipro's full-sized avatar
💭
#devops #wordpress #vuejs #docker

Nguyễn Minh Khôi khoipro

💭
#devops #wordpress #vuejs #docker
View GitHub Profile
@khoipro
khoipro / blog-grid.liquid
Created May 15, 2018 01:11
Shopify - Page Landing Grid
{%- capture blog_handles -%}
{%- for link in linklists.blog-navigation.links -%}
{%- if link.type == 'blog_link' -%}{{ link.object.handle }}|{%- endif -%}
{%- endfor -%}
{%- endcapture -%}
{%- assign customArticleList = false -%}
{%- assign blog_handles_array = blog_handles | split:'|' -%}
{%- for blog_handle in blog_handles_array -%}
{% if customArticleList == blank %}
{% assign customArticleList = blogs[blog_handle].articles %}
@khoipro
khoipro / page-pagination.liquid
Created May 15, 2018 01:08
Shopify - Custom Page Pagination
<ul class="pagination__inner relative align-l mv1 pl0 f fw aic">
{% if current_page > 1 %}
{% assign previous_page = current_page | minus:1 %}
<li class="pagination__arrow pagination__arrow--previous mr05 inline-block">
<a href="{{ page.url }}?page={{ previous_page }}" class="inline-block relative" title="Previous">Previous</a>
</li>
{% endif %}
{% for i in (1..total_pages) %}
<li class="pagination__page mh025 inline-block{% if current_page == i %} is-active{% endif %}">
<a href="{{ page.url }}{% if i != 1 %}?page={{ i }}{% endif %}" class="medium inline-block align-c" title="">{{ i }}</a>
/*-- Tweezer --*/
class Tweezer {
constructor (opts = {}) {
this.duration = opts.duration || 1000
this.ease = opts.easing || this._defaultEase
this.start = opts.start
this.end = opts.end
this.frame = null
this.next = null
this.isRunning = false
<section class="intro">
<!-- Header from module section-header.html -->
<div class="section-header">
<h2 class="section-header__headline">Headline example</h2>
<div class="section-header__description">This is a description.</div>
</div>
<!-- CTA Block from cta-blocks.html -->
<div class="cta-blocks">
<div class="cta-blocks__list">
<!-- CTA Block single item from cta-block.html -->
<section class="post-list">
<div class="post-list-header">
<h2>Latest Blog Posts</h2>
</div>
<div class="post-list-grid">
<article class="post-item">
<h3 class="post-title"><a href="/demo-1.html">CELERIAC AND APPLE SOUP</a></h3>
<div class="post-intro"></div>
</article>
<article class="post-item">
<section class="intro-grid">
<!-- Header -->
<header class="intro-header">
<h2 class="headline">PROGRAMS</h2>
<div class="description">We offer a wide variety of public programs throughout the year.</div>
</header>
<div class="intro-grid-list"></div>
</section>
<section class="intro">
<h2 class="headline">OUR TOURS</h2>
<div class="list">
<div class="card">
<h3 class="title">WINTER FARM TOUR</h3>
<div class="card-description">We will share with you our favorite places on the property while discussing the ways.</div>
</div>
<div class="card">
<h3 class="title">COLD-WEATHER WEEKENDS</h3>
<div class="card-description">We're a four-season farm! During the cold-weather months there is still much to see.</div>
@khoipro
khoipro / section.html
Created March 5, 2018 07:56
The Section Default Markup
<section class="example">
<h2 class="heading">Heading</h2>
<p class="description">This is a description.</p>
</section>
@khoipro
khoipro / webfont.html
Created December 17, 2017 03:25
Typekit web font events
<script src="https://use.typekit.net/xxxxxxx.js"></script>
<script>
try {
Typekit.load({
loading: function() {
// JavaScript to execute when fonts start loading
},
active: function() {
// JavaScript to execute when fonts become active
},
@khoipro
khoipro / Web Font Loader CSS
Created December 17, 2017 03:18
Web font load smooth with Typekit
.wf-loading {
body > .loader {
visibility: visible;
opacity:1;
}
}
.wf-active, .wf-inactive {
body > .loader {
visibility: hidden;
opacity:0;