Code Monkey home page Code Monkey logo

Comments (3)

JudiPuak avatar JudiPuak commented on May 26, 2024

Never mind. I have found the workaround to solve this issue.

from one-click-hugo-cms.

merwok avatar merwok commented on May 26, 2024

Do you mind sharing it?

from one-click-hugo-cms.

JudiPuak avatar JudiPuak commented on May 26, 2024

@merwok

yes sure
open src/js/cms-preview-templates/values.js

locate this snippet of code in or near line 37:

<div className="bg-off-white pv4">
        <div className="mw7 center ph3 pt4">
          {values.map(({text, heading, imageUrl}, i) =>
            <MediaBlock key={i} text={text} heading={heading} imageUrl={imageUrl} reverse={i % 2 === 0} />
          )}
        </div>
      </div>

change it into:

<div className="bg-off-white pv4">
        <div className="mw7 center ph3 pt4">
          {values.map(({text, heading, imageUrl}, i) =>            
            <div className="ph2-ns w-100-ns mb4" key={i}>
              <img src={imageUrl && getAsset(imageUrl)} alt="" className="center db mb3" style={{width: "480px"}}/>
              <h3 className="f2 b lh-title mb2">{heading}</h3>
              <p>{text}</p>
            </div>)}          
        </div>
      </div>

So basically, we don't use the MediaBlock anymore. You can now delete the MediaBlock const (line 6 - 19) or you can just leave it there.

Please let me know if it works for you too.

from one-click-hugo-cms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.