A horizontal flip card (reusable block)

Hi! Here is a Flip card in Sitejet (my first reusable block)
CleanShot 2021-07-05 at 17.34.42

Block data - to import this in SiteJet

  1. Copy the Block data (from below) into Clipboard,
  2. Go to your project in the SiteJet CMS and press on the Import → SiteJet from th Bookmark Bar (Read more here)
  3. A modal will appear, Paste the data inside the input field and press OK
  4. Now, if everything went well the data will be decoded and placed in SiteJet Clipboard format
  5. Use the Paste option from SiteJet to place the block where you need
  6. Copy CSS (or additional code) by selecting the CSS below and then Paste the (S)CSS in SiteJet → CSS panel

Block data

eyJjb250ZW50cyI6W3sic291cmNlIjp7ImlkIjoiNjQ5MjEzNjMiLCJwYWdlIjoyMjQ0NjgzLCJ3ZWJjYXJkIjozMjk1MTUsImxhbmd1YWdlIjoiZW4ifSwidHlwZSI6ImNvbnRhaW5lciIsImNvbnRlbnQiOiI8ZGl2IGNsYXNzPVwiZWQtZWxlbWVudCBlZC1jb250YWluZXIgd3YtYm94ZWQgd3Ytc3BhY2VyIHByZXNldC1jb2x1bW5zLXRocmVlLXYyLWRlZmF1bHRcIiBzdHlsZT1cIlwiIGRhdGEtZnJvbS1wcmVzZXQ9XCJjb2x1bW5zLXRocmVlLXYyXCIgZGF0YS1taW4tY291bnQ9XCIxXCIgZGF0YS1tYXgtY291bnQ9XCIxXCIgZGF0YS1tYXBwYWJsZT1cIjFcIiBkYXRhLW9yaWdpbj1cIjY0OTIxMzYzXCIgPjxkaXYgY2xhc3M9XCJpbm5lclwiPjxkaXYgY2xhc3M9XCJlZC1lbGVtZW50IGVkLWNvbnRhaW5lciBjb2x1bW5zLWJveCB3di1vdmVyZmxvd192aXNpYmxlXCIgc3R5bGU9XCJcIiBkYXRhLWZyb20tcHJlc2V0PVwiXCIgZGF0YS1taW4tY291bnQ9XCIxXCIgZGF0YS1tYXgtY291bnQ9XCI5OVwiIGRhdGEtbWFwcGFibGU9XCIxXCIgPjxkaXYgY2xhc3M9XCJpbm5lclwiPjxkaXYgY2xhc3M9XCJlZC1lbGVtZ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wiaW5uZXJcIj48ZGl2IGNsYXNzPVwiZWQtZWxlbWVudCBlZC1oZWFkbGluZSBjdXN0b20tdGhlbWVcIiBkYXRhLW1heC1jb3VudD1cIjFcIiBkYXRhLW1pbi1jb3VudD1cIjFcIiBkYXRhLW1hcHBhYmxlPVwidHJ1ZVwiID48aDI+QmFjazwvaDI+PHN0eWxlPiNlZC1uZXctMjc5MiBoMiB7IHRleHQtYWxpZ246IGNlbnRlcjsgfTwvc3R5bGU+PC9kaXY+PGRpdiBjbGFzcz1cImVkLWVsZW1lbnQgZWQtdGV4dCBjdXN0b20tdGhlbWVcIiBkYXRhLW1heC1jb3VudD1cIjFcIiBkYXRhLW1pbi1jb3VudD1cIjFcIiBkYXRhLW1hcHBhYmxlPVwidHJ1ZVwiID48cCBzdHlsZT1cInRleHQtYWxpZ246IGNlbnRlcjtcIj5UaGlzIGlzIHRoZSBiYWNrPC9wPjwvZGl2PjwvZGl2PjxzdHlsZT4jZWQtbmV3LTI3OTEgPiAuaW5uZXIgeyBhbGlnbi1jb250ZW50OiBjZW50ZXI7IH0gI2VkLW5ldy0yNzkxIHsgbWluLWhlaWdodDogMzAwcHg7IH08L3N0eWxlPjwvZGl2PjwvZGl2PjwvZGl2PiIsInNvcnQiOjJ9XSwiaGFzUHJlc2V0Ijp0cnVlfQ==

Custom CSS

//Flip card
body:not(.edit) {
  .flip-card {
    background-color: transparent;
    width: 100%;
    height: 300px; // Same size as the side
    perspective: 1000px; // Remove this if you don't want the 3D effect
    overflow: visible;
    position: relative;
    // This container is needed to position the front and back side
    .inner {
      position: relative;
      transition: transform 0.8s;
      transform-style: preserve-3d;
    }

    &:hover {
      > .inner {
        // Do an horizontal flip when you move the mouse over the flip box container
        transform: rotateY(180deg);
      }
    }

    // Position the front and back side
    .flip-card-front,
    .flip-card-back {
      position: absolute;
      width: 100%;
      height: 100%;
      -webkit-backface-visibility: hidden; //Safari
      backface-visibility: hidden;
      > .inner {
        width: 100%;
        height: 100%;
        //Align inner content
        display: flex;
        align-items: center;
        justify-content: center;
      }
    }

    //Style the front side
    .flip-card-front {
    }
    //Style the back side
    .flip-card-back {
      transform: rotateY(180deg);
    }
  }
}
5 Likes

Hi @Lucian_Dinu great work! Just moved it to “share components” :slight_smile:

2 Likes