Skip to content

Instantly share code, notes, and snippets.

View smut-ny's full-sized avatar

Vojtech Smutny smut-ny

View GitHub Profile
@smut-ny
smut-ny / ie-section.liquid
Last active March 25, 2024 08:59
Shopify IE section schema snippet
<!-- INFO
- Smazat komentáře
- Smazat co se nehodí
- {{ section.id }} je volitelné, když bude více sekcí na stránce, většinou to nemusí být at máme hezké url /pages#rename_sectionname
- Označit RENAME_... a přepsat podle potřeby
-->
<!-- Liquid inputs / logic -->
<!-- JS Inputs -->
@smut-ny
smut-ny / fetch.js
Created February 22, 2022 08:44
Simple fetch function
async fetch_data(url) {
const request = await fetch(url)
return await request.json()
}
@smut-ny
smut-ny / vue-cdn-app.html
Last active April 22, 2022 06:14
Basic Vue cdn setting with shopify delimiter
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14"></script>
<script>
Vue.config.devtools = true
var appName = new Vue({
el: '#products-menu',
name: 'ProductsMenu',
data: function() {
return {
"collection_data": "test"
@smut-ny
smut-ny / regex.txt
Created October 4, 2021 13:02
Jednoznakovky na konci řádku regex
(\s+)([aeiouzskv])(\s+)
$1$2&nbsp;
@smut-ny
smut-ny / BackgroundPicture.vue
Created September 29, 2021 12:12
Vue js background picture
:style="{'background-image': 'url(' + require('../assets/images/' + 'hero__sample.png') + ')'}"
@smut-ny
smut-ny / breakpoints.scss
Created September 29, 2021 08:39
Breakpoints with scss vars
//Breakpoints
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }
$mobile-small: 320px;
$mobile: 480px;