Skip to content

Commit a0401ff

Browse files
committed
moved fonts into frontend dir and now bundling with vite using the @ alias
1 parent fe2809e commit a0401ff

File tree

7 files changed

+10
-22
lines changed

7 files changed

+10
-22
lines changed

frontend/css/global.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
body {
22
--im-not-tree-shaken: 1;
3+
}
4+
5+
@font-face {
6+
font-family: 'Open Sans';
7+
src: url(@/fonts/OpenSans-Regular.woff2) format('woff2'),
8+
url(@/fonts/OpenSans-Regular.woff) format('woff');
9+
font-weight: normal;
10+
font-style: normal;
11+
font-display: swap;
312
}
File renamed without changes.
File renamed without changes.

frontend/images/.gitkeep

Whitespace-only changes.

frontend/js/prodify.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ class Prodify {
44
...settings
55
}
66

7-
console.log('prodify init')
8-
97
this.el = document.querySelector('[data-prodify]')
108
this.pickerType = this.el.dataset.prodify
119

@@ -125,7 +123,6 @@ class Prodify {
125123
}
126124

127125
onVariantChange = (event) => {
128-
console.log('onVariantChange called')
129126

130127
this.updateCurrentOptions()
131128
this.updateCurrentVariant()
@@ -188,7 +185,6 @@ class Prodify {
188185
}
189186

190187
setInputAvailability(optionInputs, availableOptionInputValues, existingOptionInputsValues) {
191-
console.log('setInputAvailability called')
192188
optionInputs.forEach((input) => {
193189
if (availableOptionInputValues.includes(input.getAttribute('value'))) {
194190
if (this.pickerType == 'select') {
@@ -197,9 +193,7 @@ class Prodify {
197193
}
198194
input.classList.remove('disabled')
199195
} else {
200-
console.log('not available', input.getAttribute('value'))
201196
if (existingOptionInputsValues.includes(input.getAttribute('value'))) {
202-
console.log('not exist', input.getAttribute('value'))
203197
if (this.pickerType == 'select') {
204198
input.innerText = this.textStrings.soldOutVariantValueLabel.replace(
205199
'[value]',
@@ -209,7 +203,6 @@ class Prodify {
209203
}
210204
input.classList.add('disabled')
211205
} else {
212-
console.log('unavailable', input.getAttribute('value'))
213206
if (this.pickerType == 'select') {
214207
input.innerText = this.textStrings.unavailableVariantValueLabel.replace(
215208
'[value]',
@@ -260,8 +253,4 @@ class Prodify {
260253
}
261254
}
262255

263-
document.addEventListener('DOMContentLoaded', () => {
264-
window.prodify = new Prodify({
265-
showSoldOutLabels: false
266-
})
267-
})
256+
window.prodify = new Prodify()

snippets/head-css.liquid

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@
66
[x-cloak] {
77
display: none !important;
88
}
9-
10-
@font-face {
11-
font-family: 'Open Sans';
12-
src: url('{{ 'OpenSans-Regular.woff2' | asset_url }}') format('woff2'),
13-
url('{{ 'OpenSans-Regular.woff' | asset_url }}') format('woff');
14-
font-weight: normal;
15-
font-style: normal;
16-
font-display: swap;
17-
}
189
</style>
1910

2011

vite.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import shopify from 'vite-plugin-shopify'
33
import pageReload from 'vite-plugin-page-reload'
44
import basicSsl from '@vitejs/plugin-basic-ssl'
55
import fs from 'fs'
6-
import { viteStaticCopy } from 'vite-plugin-static-copy'
76

87
export default {
98

0 commit comments

Comments
 (0)