Merge branch 'main' of github.com:JannexNet/SHX-Theme

main
Jan Umbach 2024-06-22 13:10:26 +02:00
commit 8f2f5d116a
7 changed files with 148 additions and 104 deletions

View File

@ -1642,6 +1642,10 @@ details[open] > .share-button__fallback {
border: 0;
}
select {
border-right: 16px solid transparent !important;
}
.field:before,
.select:before,
.customer .field:before,

View File

@ -9,9 +9,12 @@
*/
{
"current": {
"logo": "shopify:\/\/shop_images\/Shinnex.webp",
"logo": "shopify:\/\/shop_images\/Shinnex_1.webp",
"logo_width": 150,
"favicon": "shopify:\/\/shop_images\/Favicon.svg",
"shx_logo_figuren": "shopify:\/\/shop_images\/ShinnexFiguren_1.webp",
"shx_logo_figuren_width": 150,
"shx_logo_texte": "shopify:\/\/shop_images\/ShinnexTexte.webp",
"type_header_font": "assistant_n4",
"heading_scale": 100,
"type_body_font": "assistant_n4",

View File

@ -33,6 +33,58 @@
}
]
},
{
"name": "shx-Logo-Figuren",
"settings": [
{
"type": "image_picker",
"id": "shx_logo_figuren",
"label": "t:settings_schema.logo.settings.logo_image.label"
},
{
"type": "range",
"id": "shx_logo_figuren_width",
"min": 50,
"max": 300,
"step": 10,
"default": 100,
"unit": "px",
"label": "t:settings_schema.logo.settings.logo_width.label"
},
{
"type": "image_picker",
"id": "shx_favicon_figuren",
"label": "t:settings_schema.logo.settings.favicon.label",
"info": "t:settings_schema.logo.settings.favicon.info"
}
]
},
{
"name": "shx-Logo-Texte",
"settings": [
{
"type": "image_picker",
"id": "shx_logo_texte",
"label": "t:settings_schema.logo.settings.logo_image.label"
},
{
"type": "range",
"id": "shx_logo_texte_width",
"min": 50,
"max": 300,
"step": 10,
"default": 100,
"unit": "px",
"label": "t:settings_schema.logo.settings.logo_width.label"
},
{
"type": "image_picker",
"id": "shx_favicon_texte",
"label": "t:settings_schema.logo.settings.favicon.label",
"info": "t:settings_schema.logo.settings.favicon.info"
}
]
},
{
"name": "t:settings_schema.colors.name",
"settings": [

View File

@ -330,22 +330,6 @@
font-size: 1.6rem;
}
}
{% comment %}
{% assign background_color = "" %}
{% if page.url == "/pages/texte" or product.tags contains "shx-texte" %}
{% assign background_color = settings.color_schemes["scheme-shx-texte-navbar"]["settings"]["background"] %}
{% elsif page.url == "/pages/figuren" or product.tags contains "shx-figuren" %}
{% assign background_color = settings.color_schemes["scheme-shx-figuren-navbar"]["settings"]["background"] %}
{% endif %}
{% if background_color != "" %}
.header-wrapper {
background-color: {{ background_color }} !important;
}
{% endif %}
{% endcomment %}
{% endstyle %}
{{ 'base.css' | asset_url | stylesheet_tag }}
@ -395,49 +379,9 @@
})(window, document, "clarity", "script", "lvd5xzm4d8");
</script>
<!--
<script>
// custom code
var pageInfo = {
url: "upl {{ page.url }}",
title: "{{ page.title }}",
handle: "{{ page.handle }}"
// Add more properties as needed
};
console.log(pageInfo);
{% comment %} const tags = {{ product.tags | json }} {% endcomment %}
var pageInfo2 = {
template: "{{ template }}",
productTitle: "{{ product.title }}",
productHandle: "{{ product.handle }}"
{% comment %} tags: tags {% endcomment %}
// Add more properties as needed
};
console.log(pageInfo2)
var productInfo = {
tags: {{ product.tags | json }}
};
for (var key in productInfo) {
if (productInfo.hasOwnProperty(key)) {
console.log(key + ": " + productInfo[key]);
}
}
const colorScheme = {
scheme: {{ settings.color_schemes["scheme-shx-namenschild"]["settings"]["background"] | json }}
}
console.log("4", colorScheme)
</script> -->
<!-- Render CSS content -->
{% render 'shx-loading-screen'
, content_type: 'head' %}
{% render 'shx-feedback-banner'
, content_type: 'head' %}
{% render 'shx-StarRatingForm'
@ -464,7 +408,9 @@
</head>
<body class="gradient{% if settings.animations_hover_elements != 'none' %} animate--hover-{{ settings.animations_hover_elements }}{% endif %}">
<!-- Render HTML content -->
{% render 'shx-loading-screen'
, content_type: 'body' %}
{% render 'shx-feedback-banner'
, content_type: 'body' %}

View File

@ -177,7 +177,6 @@
{% capture sizes %}(max-width: {{ settings.logo_width | times: 2 }}px) 50vw, {{ settings.logo_width }}px{% endcapture %}
{% capture widths %}{{ settings.logo_width }}, {{ settings.logo_width | times: 1.5 | round }}, {{ settings.logo_width | times: 2 }}{% endcapture %}
{% comment %}
{% liquid
capture shx_current_page
render "shx-get-current-page"
@ -186,19 +185,13 @@
assign shx_header_logo = settings.logo
if shx_current_page contains "texte"
assign shx_header_logo = settings.shx_logo_texte | image_url
assign shx_header_logo = settings.shx_logo_texte
elsif shx_current_page contains "figuren"
assign shx_header_logo = settings.shx_logo_figuren | image_url
assign shx_header_logo = settings.shx_logo_figuren
endif
%}
<h1>curr {{ shx_current_page }} {{ shx_current_page contains "texte" }}</h1>
<h1>{{ shx_header_logo }}</h1>
<h1>{{ settings.logo }}</h1>
<h1>{{ settings.shx_logo_texte }}</h1>
{% endcomment %}
{{ settings.logo | image_url: width: 600 | image_tag:
{{ shx_header_logo | image_url: width: 600 | image_tag:
class: 'header__heading-logo motion-reduce',
widths: widths,
height: logo_height,

View File

@ -166,8 +166,8 @@
position: relative;
display: flex;
justify-content: center;
align-items: center;
justify-content: center;
align-items: center;
}
#SHX-feedback-modal-content-banner::after {
@ -178,8 +178,6 @@
width: 100%;
height: 100%;
background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
}
#SHX-feedback-modal-form {
@ -194,7 +192,6 @@
font-weight: 600;
margin: 0;
padding: 20px;
position: relative;
z-index: 10002;
}
@ -203,7 +200,6 @@
font-size: 1.25em;
font-weight: 600;
margin: 0 0 10px;
line-height: 1.5em;
}
@ -211,34 +207,27 @@
width: 100%;
padding: 10px;
margin: 10px 0;
border: 1px rgb(var(--color-button)) solid;
border-radius: 5px;
}
#SHX-feedback-modal-container button {
width: 100%;
font-size: 1.5rem;
letter-spacing: 0.1rem;
background-color: rgb(var(--color-button));
color: white;
padding: 15px;
border: none;
border-radius: 5px;
cursor: pointer;
font-family: var(--font-body-family);
transition: opacity 0.3s ease-in-out;
}
.SHX-feedback-modal-buttonDisable {
cursor: not-allowed !important;
opacity: 0.5;
}
.SHX-FEEDBACK-CODE {
@ -345,13 +334,8 @@
modal.style.display = 'none';
}
});
}
function SHX_FeedbackModal_enableSubmitButton() {
document.getElementById('SHX-feedback-modal-submit').classList.remove('SHX-feedback-modal-buttonDisable');
}
@ -367,7 +351,6 @@
modalContainer.style.display = 'none';
let ele_container_submit1 = document.getElementById('SHX-feedback-modal-container-submit1');
let ele_container_submit2 = document.getElementById('SHX-feedback-modal-container-submit2');
@ -384,22 +367,18 @@
}, 4000);
}
// Calculate the height of the content
let height = SHX_getHTMLObjectHeight(modalContent);
let height = SHX_getHTMLObjectHeight(modalContent);
anime({
targets: modalContent,
height: height , // Use the calculated height
duration: 1500,
easing: 'cubicBezier(0.590, 0.190, 0.050, 0.990)',
complete: function(anim) {
modalContent.style.height = 'auto';
}
});
anime({
targets: modalContent,
height: height , // Use the calculated height
duration: 1500,
easing: 'cubicBezier(0.590, 0.190, 0.050, 0.990)',
complete: function(anim) {
modalContent.style.height = 'auto';
}
});
}
// dom ready
@ -430,7 +409,6 @@
}, 5000);
}
let disableButtonForRequest = false;
setTimeout(function () {

View File

@ -0,0 +1,68 @@
{% assign content_type = content_type | default: 'body' %}
{% if content_type == 'body' %}
<div id="shx-loading-screen">
<div class="loader"></div>
</div>
{% elsif content_type == 'head' %}
<style>
#shx-loading-screen {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: white;
z-index: 99999;
transition: opacity 0.3s ease;
opacity: 1;
display: flex;
align-items: center;
justify-content: center;
pointer-events: none;
}
#shx-loading-screen.shx-loading-screen-hidden {
opacity: 0;
pointer-events: none;
}
/* CSS für den Ladeindikator */
.loader {
display: block !important;
border: 16px solid #f3f3f3;
border-top: 16px solid #3498db;
border-radius: 50%;
width: 120px;
height: 120px;
animation: spin 2s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
<script>
document.addEventListener("DOMContentLoaded", function() {
const loadingScreen = document.getElementById('shx-loading-screen');
function showLoadingScreen() {
loadingScreen.classList.remove('shx-loading-screen-hidden');
}
function hideLoadingScreen() {
loadingScreen.classList.add('shx-loading-screen-hidden');
}
window.addEventListener('beforeunload', function() {
showLoadingScreen();
});
window.addEventListener('load', function() {
hideLoadingScreen();
});
});
</script>
{% endif %}