JSFiddle - React, Tailwind, and code Playground

by Aleksey Karagodnikov

HTML

<script src="https://fonts.googleapis.com/css?family=Roboto:300,400,700&amp;amp;subset=cyrillic"></script>
<div class="nc-demo-modal-wrapper">
  <div class="nc-demo-modal-overlay"></div>
  <div class="nc-demo-modal">
    <div class="nc-demo-modal-close"></div>
    <div class="nc-demo-modal-section -center">
      <img class="nc-demo-modal-attention" src="http://imgur.com/oDb6GHV.png">
    </div>
    <div class="nc-demo-modal-section -x2 -middle -center">
      <div class="nc-demo-modal-title">14-дневный пробный период закончился</div>
    </div>
    <div class="nc-demo-modal-section -x2 -middle -center">
      <div class="nc-demo-modal-text">Спасибо, что попробовали демо-версию Netcat Business. Купите Netcat Business, чтобы получить полнофукциональную версию и техническую поддержку на год.</div>
    </div>
    <div class="nc-demo-modal-section -middle -center">
      <div class="nc-demo-modal-activation">После приобретения <a class="nc-demo-modal-link" href="http://netcat.ru/products/" target="_blank">активируйте</a> вашу лицензию.</div>
    </div>
    <div class="nc-demo-modal-section -bottom -center">
      <a class="nc-demo-modal-buy-it" href="http://netcat.ru/products/editions/business/" target="_blank">Купить Netcat Business</a>
    </div>
    <div class="nc-demo-modal-section -middle -center">
      <a class="nc-demo-modal-link nc-demo-modal-choose-product" href="http://netcat.ru/products/" target="_blank">или выберите другую редакцию</a>
    </div>
  </div>
</div>
<div class="nc-demo-panel-wrapper">
  <div class="nc-demo-panel">
    <div class="nc-demo-panel-item time-left">
      Осталось <b>14 дней</b> до окончания пробного периода
    </div>
    <div class="nc-demo-panel-item delimiter">
      &rarr;
    </div>
    <div class="nc-demo-panel-item buy-it">
      <a href="http://netcat.ru/products/editions/business/">Купить Netcat Business</a>
    </div>
  </div>
</div>

CSS

* {
  box-sizing: border-box;
}

.nc-demo-modal-overlay {
  background-color: rgba(0, 0, 0, .4);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 30;
}

.nc-demo-modal {
  font-family: 'Roboto', sans-serif;
  background-color: #fff;
  padding-left: 30px;
  padding-right: 30px;
  max-width: 760px;
  position: absolute;
  top: 20%;
  left: 50%;
  z-index: 30;
  width: 100%;
}

.nc-demo-modal-close {
  background: url(http://imgur.com/9mJ2Sxp.png) 0 0/cover no-repeat transparent;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
}

.nc-demo-modal-close:hover {
  background-position: 0 -20px;
}

.nc-demo-modal-section {
  font-size: 0;
  line-height: 0;
  height: 60px;
}

.nc-demo-modal-section > *,
.nc-demo-modal-section:before {
  display: inline-block;
}

.nc-demo-modal-section > * {
  font-size: 17px;
  line-height: 1.428571429;
}

.nc-demo-modal-section.-x2 {
  height: 120px;
}

.nc-demo-modal-section.-center {
  text-align: center;
}

.nc-demo-modal-section.-middle:before,
.nc-demo-modal-section.-bottom:before {
  content: '';
  width: 0;
  height: 100%;
}

.nc-demo-modal-section.-middle:before,
.nc-demo-modal-section.-middle {
  vertical-align: middle;
}

.nc-demo-modal-section.-bottom:before,
.nc-demo-modal-section.-bottom > * {
  vertical-align: bottom;
}

.nc-demo-modal-attention {
  margin-bottom: -80px;
}

.nc-demo-modal-title {
  color: #e74c3c;
  font-size: 30px;
  font-weight: 300;
}

.nc-demo-modal-text {
  color: #212121;
  font-size: 17px;
  margin-left: auto;
  margin-right: auto;
  width: 510px;
}

.nc-demo-modal-buy-it {
  background-color: #27ae60;
  cursor: pointer;
  color: #fff;
  padding: 10px 25px;
  text-decoration: none;
  opacity: 1;
}

.nc-demo-modal-buy-it:hover {
  opacity: .6;
}

.nc-demo-modal-link {
  color: #1a87c2;
  cursor: pointer;
  opacity: .6;
}

.nc-demo-modal-link:hover {
  opacity: 1;
}

.nc-demo-modal-choose-product {
  font-size:...

JavaScript

var ncDemoModal = document.querySelector('.nc-demo-modal');
var ncDemoModalCloseButton = document.querySelector('.nc-demo-modal-close');

function removeModal() {
  var ncDemoModal = document.querySelector('.nc-demo-modal');
  var ncDemoModalOverlay = document.querySelector('.nc-demo-modal-overlay');

  ncDemoModal.parentElement.removeChild(ncDemoModal);
  ncDemoModalOverlay.parentElement.removeChild(ncDemoModalOverlay);
}

ncDemoModal.style.marginLeft = (-parseInt(ncDemoModal.offsetWidth, 10) / 2) + 'px';
ncDemoModalCloseButton.onclick = removeModal;