JSFiddle - React, Tailwind, and code Playground

by kinduff

HTML

<div class="wrapper">
  <div class="bg"></div>
  <div class="flex">
    <div class="avatar">
      <img src="https://pbs.twimg.com/profile_images/1370133126970802187/04vZxhb4_400x400.jpg" alt="" />
    </div>
    <br />
    <div class="info">
      <h1>20 consejos para el futuro tech lead</h1>
      <p>Hace poco ayudé a un compañero a convertirse en tech lead, estos fueron los consejos que le di.</p>
    </div>
  </div>
</div>

<div class="wrapper">
  <div class="bg"></div>
  <div class="flex">
    <div class="avatar">
      <img src="https://pbs.twimg.com/profile_images/1370133126970802187/04vZxhb4_400x400.jpg" alt="" />
    </div>
    <br />
    <div class="info">
      <h1>The story of the 20 million queries per hour</h1>
      <p>Here is a fun, weird, and curious performance issue I caused, and how I fixed it.</p>
    </div>
  </div>
</div>

SCSS

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

html {
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
}

.wrapper {
  width: 1200px;
  height: 600px;
  background-color: rgba(0,0,0,0.5);
  border: 1px solid red;
  padding: 80px 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.bg {
  width: 100%;
  height: 100%;
  position: absolute;
  background-image: url('https://source.unsplash.com/collection/573009/1200x628');
  z-index: -1;
  filter: blur(5px);
}

.flex {
  text-align: center;
}

.info {
  text-align: center;
  display: inline-block;
}

h1, p {
  color: #F3F3F3;
}

h1 {
  font-size: 3.2em;
  font-weight: 700;
  padding-bottom: 16px;
}

p {
  font-size: 1.2rem;
}

.avatar {
  display: inline-block;
  width: 150px;
  height: 150px;
  border-radius: 25px;
  overflow: hidden;
  margin-bottom: 24px;

  img {
    width: 100%;
    height: 100%;
  }
}