JSFiddle - React, Tailwind, and code Playground

by tymothytym

HTML

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.3/css/foundation.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.3/js/foundation.min.js"></script>
<div class="row">
  <div class="small-12 medium-12 columns">
    <h4>more languages</h4>
    <p>over the years we've worked on audio and video transcription projects involving many other languages including:</p>
    <div class="medium-6 columns end">
      <div class="reducetop reducemargin">
        <ul class="noindent imagelist">
          <li>Albanian transcription and translation</li>
          <li>Amharic transcription and translation</li>
          <li>Arakanese transcription and translation</li>
          <li>Armenian transcription and translation</li>
          <li class="reducemargin noindent imagelist">Azerbaijani transcription and translation</li>
        </ul>
      </div>
      <div class="reducetop reducemargin">
        <ul class="comment-small reducemargin noindent imagelist">
          <li>Aymara transcription and translation</li>
          <li>Belarusan transcription and translation</li>
          <li>Bengali transcription and translation</li>
          <li>Bhilali transcription and translation</li>
          <li>Burmese transcription and translation</li>
          <li>Cambodian transcription and translation</li>
          <li>Caqchiquel transcription and translation</li>
          <li>Chechen transcription and translation</li>
          <li>Creole transcription and translation</li>
          <li>Dari transcription and translation</li>
          <li>Dinka transcription and translation</li>
          <li>Faroese transcription and translation</li>
          <li>Farsi transcription and translation</li>
          <li>Flemish transcription and translation</li>
          <li>Fujianese transcription and translation</li>
          <li>Fulani transcription and translation</li>
          <li>Georgian transcription and translation</li>
         ...

CSS

/*.reducetop {
  padding-top: 1.75rem;
  margin-top: 1.75rem;
}

.reducebottom {
  padding-bottom: 5.75rem;
  margin-bottom: 5.75rem;
}

.reducetop ul {
  padding-top: 1.75rem;
  margin-top: 1.75rem;
}

.reducebottom ul {
  padding-bottom: 5.75rem;
  margin-bottom: 5.75rem;
}

ul.reducetop {
  padding-top: 1.75rem;
  margin-top: 1.75rem;
}

ul.reducebottom {
  padding-bottom: 5.75rem;
  margin-bottom: 5.75rem;
} 

.reducetop ul li {
  padding-top: -1.75rem;
  margin-top: -1.75rem;
}

.reducebottom ul li {
  padding-bottom: -5.75rem;
  margin-bottom: -5.75rem;
}

li.reducemargin {
  margin: 0px;
}

ul.reducemargin {
  margin: -20px;
}

.reducemargin ul {
  margin: -20px;
}

.reducemargin ul li {
  margin: -20px;
}
*/
ul.noindent {
  margin-left: 5px;
  margin-right: 0px;
  padding-left: 10px;
  padding-right: 0px;
}

.imagelist {
  padding: 0;
  margin: 0;
}
.shortcontent,
.morelink {
  float: left;
}

JavaScript

//jQuery.Shorten
! function(e) {
  e.fn.shorten = function(s) {
    "use strict";
    var t = {
      showChars: 100,
      minHideChars: 10,
      ellipsesText: "...",
      moreText: "more",
      lessText: "less",
      onLess: function() {},
      onMore: function() {},
      errMsg: null,
      force: !1
    };
    return s && e.extend(t, s), e(this).data("jquery.shorten") && !t.force ? !1 : (e(this).data("jquery.shorten", !0), e(document).off("click", ".morelink"), e(document).on({
      click: function() {
        var s = e(this);
        return s.hasClass("less") ? (s.removeClass("less"), s.html(t.moreText), s.parent().prev().animate({
          height: "0%"
        }, function() {
          s.parent().prev().prev().show()
        }).hide("fast", function() {
          t.onLess()
        })) : (s.addClass("less"), s.html(t.lessText), s.parent().prev().animate({
          height: "100%"
        }, function() {
          s.parent().prev().prev().hide()
        }).show("fast", function() {
          t.onMore()
        })), !1
      }
    }, ".morelink"), this.each(function() {
      var s = e(this),
        n = s.html(),
        r = s.text().length;
      if (r > t.showChars + t.minHideChars) {
        var o = n.substr(0, t.showChars);
        if (o.indexOf("<") >= 0) {
          for (var a = !1, i = "", h = 0, l = [], c = null, f = 0, u = 0; u <= t.showChars; f++)
            if ("<" != n[f] || a || (a = !0, c = n.substring(f + 1, n.indexOf(">", f)), "/" == c[0] ? c != "/" + l[0] ? t.errMsg = "ERROR en HTML: the top of the stack should be the tag that closes" : l.shift() : "br" != c.toLowerCase() && l.unshift(c)), a && ">" == n[f] && (a = !1), a) i += n.charAt(f);
            else if (u++, h <= t.showChars) i += n.charAt(f), h++;
          else if (l.length > 0) {
            for (j = 0; j < l.length; j++) i += "</" + l[j] + ">";
            break
          }
          o = e("<div/>").html(i + '<span class="ellip">' + t.ellipsesText + "</span>").html()
    ...