Multi-line Text Ellipsis

CSS can only add ellipsis to a single line of text. Here’s how to do it in Javascript using lodash:

// Update wrapping text to limit the number of lines.
var maxLines = 2;
var textEls = document.getElementsByClassName('text-els-class');
var textMaxH = Math.ceil(textEls[0].getBoundingClientRect().height) * maxLines;

_.forEach(textEls, function(el) {

    el.style.whiteSpace = 'normal';

    var elH = el.getBoundingClientRect().height;
    var isOverflow = elH > textMaxH;
    var text = el.innerHTML;

    // Remove the last word until the height is within bounds.
    while (elH > textMaxH) {

        text = (text
            .split(' ')
            .slice(0,-1)
            .join(' ')
        );
        el.innerHTML = text;
        elH = el.getBoundingClientRect().height;
    }

    if (isOverflow) {
        title.innerHTML += ' ...';
        title.style.maxHeight = titleMaxH + 'px';
    }
});

Seven Tenets

  • Strive to act with compassion and empathy toward all creatures in accordance with reason.
  • The struggle for justice is an ongoing and necessary pursuit that should prevail over laws and institutions.
  • One’s body is inviolable, subject to one’s own will alone.
  • The freedoms of others should be respected, including the freedom to offend. To willfully and unjustly encroach upon the freedoms of another is to forgo your own.
  • Beliefs should conform to our best scientific understanding of the world. We should take care never to distort scientific facts to fit our beliefs.
  • People are fallible. If we make a mistake, we should do our best to rectify it and resolve any harm that may have been caused.
  • Every tenet is a guiding principle designed to inspire nobility in action and thought. The spirit of compassion, wisdom, and justice should always prevail over the written or spoken word.

Vacation Drink

  • 2 parts mango nectar
  • 2 part Malibu rum
  • 1 parts light rum
  • 1 part half and half
  • 2 drop vanilla extract

Shake over ice until frothy. Derve in a rocks. Garnish with fruits and a tiny umbrella.

Redol Landing I

Dropping in, it looks abstract. But now that it’s closer, I can tell it’s Gweorlian; probably shoaniperag. Going lower down until it gets clearer. The shapes of the crop fields and forest lines become jagged with the texture of the life inside them. Down further until it’s almost like walking on the ground. There are burn marks in the shoaniper field from a landing party. There’s the shiny spot on the horizon near the treeline.

Dropping in, it looks abstract. But now that it’s closer, I can tell it’s Gweorlian; probably shoaniperag. Going lower, it gets clearer. The shapes of the crop fields and forest lines become jagged with the texture of the life inside them. Down further until it’s almost like walking on the ground. There are burn marks in the shoaniper field from a landing party. There’s the shiny spot on the horizon near the treeline. When I get closer, I know it’s the Gretchen class landing ship that I can never identify. Who makes a ship so shiny? Obviously not a tactical vessel. The shoaniper is short; looks like it was harvested recently. No flylikes, which is unusual for harvest. But there are some small mammalikes near the treeline. Probably investigating the absurd mirror ship for scavenge. Rolling across the field at triple. Once I’m past the ship, the harvest field is monotonous so I’m not taking precautions, just cutting triple. Up ahead at the edge of the field is the long low building. White. No windows. Simple geometry with flat walls and squared angles. It’s long like one of the history bunkers. It stretches from the treeline across the field: the length of three Gretchens, easy. There is a door. I’m going toward the door again. It’s like a human door with a doorknob. I put my hand on the knob and it turns easily.

“Oh shit.” The blood lights flood and I open my eyes. I’m back in the wake at the psyscient lab again. And there he is, as usual. Peering at me with his officer brand oversize scrubs and his curious face. He’s looking different today though. He looks… alarmed? Maybe because I cursed. He’s reviewed this sleep several times so I’m not sure what has changed. The sleep hasn’t changed for weeks. “Excuse me, Medicius Senior. The wake was abrupt today.”

“It’s OK, Kirik. That was good. Thank you.”

“OK, are we done or do you need more?”

“No, we’re done for today. You can go back to quarters. Just remember to keep the the monitor on for your sleep.”

I see his cosci through the window in the monitor room suddenly look up at me. Then the Medicius puts on his best stern face and locks eyes with me. “Kirik, it’s crucial that the monitor stays on for your sleep.” Short pause as his cosci turns back to the monitors, “I need you to tell me you understand.”

“Yes Medicius Senior, I understand.” How this guy is a Medicius Senior is what I do not understand. He’s at least ten seasons younger than me.

Prep Cook Human

I was slicing the hard-boiled eggs for the salad bar and the pantry station when Gabriela stopped crumbling the cheese and turned to me. She told me she wanted me to hear the new song she wrote last night. I stopped slicing the eggs. I opened my mouth as if to speak but in that instant realized I had no words, only anticipation. She smiled as though she understood. Then she started to sing.

I can tell you how
This world made your father blind

And you can tell me how
Your father made
Your mother lose her mind

Entelechy

  • the realization of potential.
  • the supposed vital principle that guides the development and functioning of an organism or other system or organization.
  • the soul.