Jump to content

Custom coding affecting translation display

Recommended Posts

Site URL: https://www.aiesec.ca/

I have been trying to set up Weglot with my site, but whenever I translate to french, the scrolling banner on the home page gets muddled up or has weird spacing, unless you minimize then maximize the screen.

Squarespace said they can't help since it is a coding issue, but when I tested the CSS codes there weren't any changes.

Could someone please help me figure out how to fix the design issue with the translator?

Thank you

Weglot FR.png

Weglot EN.png

Link to comment
  • Replies 1
  • Views 194
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Hi. I have no idea to solve this with Scrolling Block.

You can try recreate Scrolling with a custom code block (not sure if WeGlot still cause problem with Code block or not, but you can try)

First, add this to Design > Custom CSS

/* Scroll text */
.m-scroll {
  display: flex;
  position: relative;
  width: 100%;
  height: 200px;
  margin: auto;
  overflow: hidden;
  z-index: 1;

    &__title {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 100%;
    white-space: nowrap;
    transform: scale(2);
    transition: all 1s ease;
    & > div {
      display: flex;
      animation: scrollText 20s infinite linear;
    }
    h1 {
      margin: 0;
      font-size: 40px;
      transition: all 2s ease;
      }
  }
}

/*div:hover {
  animation-play-state: paused;
}*/
@keyframes scrollText {
  from   { transform: translateX(0%); }
  to { transform: translateX(-50%); }
}

Next, edit Top section on homepage > Add a Code Block > Use this code

<div class="m-scroll">
  <div class="m-scroll__title">
    <div>
      <h1>
        <span>travel</span> 
        <span>intern</span> &amp; <span>volunteer </span>&nbsp;
      </h1>
      <h1>
      <span>learn</span> <span>lead</span> 
      </h1>
    </div>
  </div>
</div>

Demo: https://codepen.io/julianofreitas/pen/BayKper

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • 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.