Jump to content

MelindaMellukas

Member
  • Posts

    16
  • Joined

  • Last visited

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

MelindaMellukas's Achievements

  1. If you go different menu items, it switches quickly from Kontakt to Contact: https://cinnamon-chameleon-6wa9.squarespace.com/en/home Thus, it needs some other code combination.
  2. Site URL: https://cinnamon-chameleon-6wa9.squarespace.com/ Hi, I managed to change in estonian version nicely but english version it changes all the time to "Kontakt" to "Contact" visbily: https://cinnamon-chameleon-6wa9.squarespace.com/en/home Code I used: /* ADD EXCLUSION NAV ITEMS */ $('.exclude-me,.exclude-me a').addClass('exclude'); $('.sqs-svg-icon--list a,.SocialLinks-link').addClass('exclude'); }); $(document).ready(function(){ $("body.body-en a.btn").html(function() { return $(this).html().replace("Kontakt", "Contact"); }); $("body.body-en a.btn").attr('href','/en/contact'); }); </script>
  3. Site URL: https://cinnamon-chameleon-6wa9.squarespace.com/ Hi, I used on footer this code and it worked well in the estonian version https://cinnamon-chameleon-6wa9.squarespace.com/et/blogi: </script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $('.blog-more-link:contains("Read More")').text('Loe rohkem'); </script> <style> However, how do I keep Read more in the English version? https://cinnamon-chameleon-6wa9.squarespace.com/en/blog
  4. I couldnt get it working like this or im missing smth from the code. Problem is its changing visbily Kontakt to Contact in sthe english menu if you navigate between menu items. https://cinnamon-chameleon-6wa9.squarespace.com/
  5. I couldnt get it working like this or im missing smth from the code. Problem is its changing visbily Kontakt to Contact in sthe english menu if you navigate between menu items. https://cinnamon-chameleon-6wa9.squarespace.com/
  6. Hi, Thank you! I got it working but when you click on english version menu, its a bit flashy, going quickly from Kontakt to Contact: https://cinnamon-chameleon-6wa9.squarespace.com My code: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $(function() { /* SETUP MULTI-LANGUAGE */ var defaultLanguage = 'et'; var lang = location.pathname.split("/")[1]; var defaultClass = 'lang-'+defaultLanguage+''; var itemParent = "nav [class*='collection'],nav [class*='folder'],nav [class*='index'],nav [class*='group']"; if (lang == "et" || lang.length > 2 ){ var lang = defaultLanguage; } /* ADD LANGUAGE CLASSES */ $('a[href="/"]').addClass('lang-'+defaultLanguage+'').parents(itemParent).addClass('lang-'+defaultLanguage+''); $('nav a:link:not([href^="http://"]):not([href^="https://"])').each(function () { var langType = $(this).attr('href').split("/")[1]; var multiLanguageClass = 'multilanguage lang-' + langType + ''; if (undefined !== langType && langType.length <= 2) $(this).addClass(multiLanguageClass).parents(itemParent).addClass(multiLanguageClass); }); $('nav button').each(function () { var langTypeFolder = $(this).attr('data-controller-folder-toggle').split("/")[0]; var multiLanguageClass = 'multilanguage lang-' + langTypeFolder + ''; if (undefined !== langTypeFolder && langTypeFolder.length <= 2) $(this).addClass(multiLanguageClass); }); /* HOMEPAGE-LOGO LINKS TO PROPER LANGUAGE HOMEPAGE */ if (lang == "en") { $('a[href="/"]').attr("href", "/en/home"); $('body').addClass("body-en"); } if (lang == "et") { $('a[href="/"]').attr("href", "/et/home"); $('body').addClass("body-et"); } /* ADD EXCLUSION NAV ITEMS */ $('.exclude-me,.exclude-me a').addClass('exclude'); $('.sqs-svg-icon--list a,.SocialLinks-link').addClass('exclude'); }); $(document).ready(function(){ $("body.body-en a.btn").html(function() { return $(this).html().replace("Kontakt", "Contact"); }); $("body.body-en a.btn").attr('href','/en/contact'); }); </script>
  7. I put this code to footer. It prevents going back to cover page BUT when clicking home button it doesnt stay at the language, it goes back to the default langeage. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $(function() { /* SETUP MULTI-LANGUAGE */ var defaultLanguage = 'et'; var lang = location.pathname.split("/")[1]; var defaultClass = 'lang-'+defaultLanguage+''; var itemParent = "nav [class*='collection'],nav [class*='folder'],nav [class*='index'],nav [class*='group']"; if (lang == "en" || lang.length > 2 ){ var lang = defaultLanguage; } /* ADD LANGUAGE CLASSES */ $('a[href="/"]').addClass('lang-'+defaultLanguage+'').parents(itemParent).addClass('lang-'+defaultLanguage+''); $('nav a:link:not([href^="http://"]):not([href^="https://"])').each(function () { var langType = $(this).attr('href').split("/")[1]; var multiLanguageClass = 'multilanguage lang-' + langType + ''; if (undefined !== langType && langType.length <= 2) $(this).addClass(multiLanguageClass).parents(itemParent).addClass(multiLanguageClass); }); $('nav button').each(function () { var langTypeFolder = $(this).attr('data-controller-folder-toggle').split("/")[0]; var multiLanguageClass = 'multilanguage lang-' + langTypeFolder + ''; if (undefined !== langTypeFolder && langTypeFolder.length <= 2) $(this).addClass(multiLanguageClass); }); /* HOMEPAGE-LOGO LINKS TO PROPER LANGUAGE HOMEPAGE */ if (lang == "et") { $('a[href="/"]').attr("href", "/et/home"); } if (lang == "en") { $('a[href="/"]').attr("href", "/en/home"); } /* ADD EXCLUSION NAV ITEMS */ $('.exclude-me,.exclude-me a').addClass('exclude'); $('.sqs-svg-icon--list a,.SocialLinks-link').addClass('exclude'); }); </script>
  8. Yes, I changed it to Kontakt right now. English could be then Contact and Estonian (EE) Kontakt.
  9. Hi, My URL is : https://cinnamon-chameleon-6wa9.squarespace.com/ I managed to direct home title ( or logo) to a content pages and not to a cover page when you click the logo. But I struggle to redirect English (EN) to home-title to en/home, it goes back to home EE which is an estonian version and the deafult langauge. PS. I havent added translation, just the footer is translated.
  10. Hi, what code did you eventually use to disbale logo link?
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.