Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aluminum-components

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aluminum-components - npm Package Compare versions

Comparing version 0.2.10 to 0.2.11

35

assets/js/drupal/ReadMoreContainer.js
(function ($) {
'use strict';
function getReadMoreContent(container) {
var content = container.children('.ReadMoreContainer-content');
if (content.length === 0) {
content = container.children('.Field-item');
}
return content;
}
function getReadMoreBottom(container) {
var readMoreContainer = container.find('.ReadMoreContainer-bottom');
if (readMoreContainer.length === 0) {
var link = $('<a href="#" class="ReadMoreContainer-button">')
.append($('<i class="fa fa-plus-circle">'))
.append('Read More');
readMoreContainer = $('<div class="ReadMoreContainer-bottom">').append(link);
container.append(readMoreContainer);
}
return readMoreContainer;
}
Drupal.behaviors.readMoreContainer = {

@@ -9,3 +37,4 @@ attach: function (context, settings) {

var height = item.data('height') || '20em';
var content = item.children('.ReadMoreContainer-content');
var content = getReadMoreContent(item);
var bottom = getReadMoreBottom(item);
var originalHeight = content.height();

@@ -21,3 +50,3 @@

item.data('originalHeight', originalHeight + 'px');
item.children('.ReadMoreContainer-bottom').css({display: 'block'});
bottom.css({display: 'block'});
item.toggleClass('is-closed', true);

@@ -33,3 +62,3 @@ }

var closed = container.hasClass('is-closed');
var content = container.children('.ReadMoreContainer-content');
var content = getReadMoreContent(container)
var html = closed ? '<i class="fa fa-minus-circle"></i> Read Less' : '<i class="fa fa-plus-circle"></i> Read More';

@@ -36,0 +65,0 @@ var newHeight = closed ? container.data('originalHeight') : container.data('height') || '20em';

2

package.json
{
"name": "aluminum-components",
"version": "0.2.10",
"version": "0.2.11",
"description": "A set of reusable web components (JS, SCSS mixins and styles, and template examples) for quickly building custom themes and web applications.",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc