Skip to content

Instantly share code, notes, and snippets.

View r3trosteve's full-sized avatar

Steve Schofield r3trosteve

View GitHub Profile
@r3trosteve
r3trosteve / main.js
Created May 8, 2023 15:17
Shopify Hello World plugin
document.addEventListener('DOMContentLoaded', async () => {
const AppBridge = window['app-bridge'];
const { createApp } = AppBridge;
const { authenticatedFetch } = AppBridge.Utils;
const app = createApp({
apiKey: 'YOUR_SHOPIFY_API_KEY',
shopOrigin: 'YOUR_SHOPIFY_SHOP_ORIGIN',
});
@r3trosteve
r3trosteve / index.html
Created May 8, 2023 15:16
Shopify Hello World
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hello Shopify</title>
<script src="https://unpkg.com/@shopify/app-bridge"></script>
<script src="https://unpkg.com/@shopify/app-bridge-utils"></script>
<script src="main.js"></script>
</head>
@r3trosteve
r3trosteve / forge-site.vue
Created March 16, 2020 21:09
A vue component for showing a forge site
<template>
<v-card class="card">
<div class="imageWrapper"
@mouseover="hover = true"
@mouseleave="hover = false">
<v-img height="250"
:src="imageSrc">
</v-img>
<v-btn v-if="hover" class="imageButton" @click="updateImageWasPressed"><v-icon>mdi-camera-enhance</v-icon></v-btn>
</div>
updateAddOns(object, addOn) {
object.info.settings = {
addons: [
{
id: this.guid(),
type: addOn.type,
name: addOn.name,
vale: addOn.vaue
}
]
<template>
<v-layout>
<v-container fluid>
<v-card>
<v-card-title>
</v-card-title>
<v-card-actions>
<div class="criteriaContainer">
<div v-for="(criteria, index) in techDDCriteria" :key="index">
<v-layout row wrap>
<script>
module.exports = {
name: 'Spotify',
props: {
url: {
type: String,
default: "https://open.spotify.com/embed/album/1DFixLWuPkv3KT3TnV35m3"
}
},
data: function () {
<template>
<div>
<iframe src="https://open.spotify.com/embed/track/7Dj2wqPYXfSRFwa6qyOztr" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
</div>
</template>
<template>
<div>
<iframe :src="url" width="100%" height="auto" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
</div>
</template>
@r3trosteve
r3trosteve / aws-service-info.vue
Created February 7, 2020 15:59
Fetching AWS Services Information on Demand
<template>
<v-container fluid grid-list-xl>
<v-layout wrap align-center>
<v-flex xs12 sm12 d-flex>
<v-autocomplete
:items="services"
label="AWS Services"
v-model="selectedService"
item-text="name"
v-on:change="serviceSelected"
@r3trosteve
r3trosteve / identichip-template.vue
Last active December 31, 2019 23:05
Template section of Identichip
<template>
<div>
<div class="identicard">
<div class="identicard-shine">
<div class="innerBorder-left">
<div class="identity">
<div class="name">{{identified.name}}</div>
<div class="birth-year">{{identified.birth_year}}</div>
<div class="eye-color">{{identified.eye_color}}</div>
<div class="gender">{{identified.gender}}</div>