Skip to content

Commit a8df4c4

Browse files
cdxkerskeptrunedev
authored andcommitted
feature: add custom_css block in theme editor for components
1 parent 213da7f commit a8df4c4

3 files changed

Lines changed: 26 additions & 0 deletions

File tree

clients/trieve-shopify-extension/.env.dist

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@ TRIEVE_BASE_URL=http://localhost:8090
44
SHOPIFY_THEME_APP_EXTENSION_UUID=f76c64354373934b7e5b794c7070f51a
55
SHOPIFY_PRICING_URL="shopify://admin/charges/densumes-trieve-extension/pricing_plans?test=true"
66
SHOPIFY_SECRET_KEY=foobar
7+
8+
# For Judge.me authentication
9+
JUDGE_ME_CLIENT_ID=""
10+
JUDGE_ME_SECRET=""
11+
# REMIX server url + /auth/judgeme/callback (e.g. http://localhost:3000/auth/judgeme/callback)
12+
JUDGE_ME_REDIRECT_URI=""

clients/trieve-shopify-extension/extensions/global-search/blocks/global_component.liquid

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<style>
2+
{{ block.settings.custom_css }}
3+
</style>
4+
15
<script type="module">
26
import {renderToDiv} from 'https://cdn.trieve.ai/beta/search-component/vanilla/index.js';
37
import {addToCart, checkCartQuantity} from '{{'cart-manager.js' | asset_url}}';
@@ -165,6 +169,12 @@
165169
{ "label": "Right", "value": "right" }
166170
],
167171
"default": "left"
172+
},
173+
{
174+
"id": "custom_css",
175+
"type": "textarea",
176+
"label": "Custom CSS",
177+
"placeholder": "#trieve-modal-search { background-color: red; }"
168178
}
169179
]
170180
}

clients/trieve-shopify-extension/extensions/global-search/blocks/inline_component.liquid

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<style>
2+
{{ block.settings.custom_css }}
3+
</style>
4+
15
<div class="trieve-inline-root"></div>
26

37
<script type="module">
@@ -127,6 +131,12 @@
127131
"type": "textarea",
128132
"label": "Initial Questions (Separated by commas)",
129133
"placeholder": "What is this made of?"
134+
},
135+
{
136+
"id": "custom_css",
137+
"type": "textarea",
138+
"label": "Custom CSS",
139+
"placeholder": ".trieve-inline-root { background-color: red; }"
130140
}
131141
]
132142
}

0 commit comments

Comments
 (0)