Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@akashacms/theme-bootstrap

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@akashacms/theme-bootstrap - npm Package Compare versions

Comparing version
0.9.1
to
4.6.0
+61
-50
index.mjs
/**
*
* Copyright 2013-2015 David Herron
* Copyright 2013-2025 David Herron
*

@@ -21,3 +21,8 @@ * This file is part of AkashaCMS-tagged-content (http://akashacms.com/).

import path from 'node:path';
import akasha from 'akasharender';
import akasha, {
Configuration,
CustomElement,
Munger,
PageProcessor
} from 'akasharender';
const mahabhuta = akasha.mahabhuta;

@@ -29,5 +34,2 @@

const _plugin_config = Symbol('config');
const _plugin_options = Symbol('options');
export class ThemeBootstrapPlugin extends akasha.Plugin {

@@ -38,9 +40,13 @@ constructor() {

#config;
configure(config, options) {
this[_plugin_config] = config;
this[_plugin_options] = options;
options.config = config;
this.#config = config;
// this.config = config;
this.akasha = config.akasha;
this.options = options ? options : {};
this.options.config = config;
config.addPartialsDir(path.join(__dirname, 'partials'));
config.addLayoutsDir(path.join(__dirname, 'layout'));
config.addMahabhuta(mahabhutaArray(options));
config.addMahabhuta(mahabhutaArray(options, config, this.akasha, this));
}

@@ -50,22 +56,27 @@

export function mahabhutaArray(options) {
export function mahabhutaArray(
options,
config, // ?: Configuration,
akasha, // ?: any,
plugin // ?: Plugin
) {
let ret = new mahabhuta.MahafuncArray(pluginName, options);
ret.addMahafunc(new EmbedResponsiveIframe());
ret.addMahafunc(new FixBlockquote());
ret.addMahafunc(new DropdownMenu());
ret.addMahafunc(new DropdownMenuItem());
ret.addMahafunc(new DropdownMenuButton());
ret.addMahafunc(new DropdownMenuHeader());
ret.addMahafunc(new DropdownMenuDivider());
ret.addMahafunc(new CollapseContainer());
ret.addMahafunc(new CollapseItem());
ret.addMahafunc(new CarouselContainer());
ret.addMahafunc(new CarouselItem());
ret.addMahafunc(new ButtonModal());
ret.addMahafunc(new CardBlock());
ret.addMahafunc(new CardQuote());
ret.addMahafunc(new EmbedResponsiveIframe(config, akasha, plugin));
ret.addMahafunc(new FixBlockquote(config, akasha, plugin));
ret.addMahafunc(new DropdownMenu(config, akasha, plugin));
ret.addMahafunc(new DropdownMenuItem(config, akasha, plugin));
ret.addMahafunc(new DropdownMenuButton(config, akasha, plugin));
ret.addMahafunc(new DropdownMenuHeader(config, akasha, plugin));
ret.addMahafunc(new DropdownMenuDivider(config, akasha, plugin));
ret.addMahafunc(new CollapseContainer(config, akasha, plugin));
ret.addMahafunc(new CollapseItem(config, akasha, plugin));
ret.addMahafunc(new CarouselContainer(config, akasha, plugin));
ret.addMahafunc(new CarouselItem(config, akasha, plugin));
ret.addMahafunc(new ButtonModal(config, akasha, plugin));
ret.addMahafunc(new CardBlock(config, akasha, plugin));
ret.addMahafunc(new CardQuote(config, akasha, plugin));
return ret;
};
class EmbedResponsiveIframe extends mahabhuta.Munger {
class EmbedResponsiveIframe extends Munger {
get selector() { return '.embed-responsive iframe'; }

@@ -80,3 +91,3 @@

// <blockquote class="blockquote"></blockquote>
class FixBlockquote extends mahabhuta.Munger {
class FixBlockquote extends Munger {
get selector() { return 'blockquote'; }

@@ -91,3 +102,3 @@

class DropdownMenu extends mahabhuta.CustomElement {
class DropdownMenu extends CustomElement {
get elementName() { return "dropdown-menu"; }

@@ -112,3 +123,3 @@ async process($element, metadata, dirty) {

// dirty();
return akasha.partial(this.array.options.config, template, {
return this.akasha.partial(this.config, template, {
id, dropdownLabel: label,

@@ -128,3 +139,3 @@ buttonType: typeof buttonType !== 'undefined' && buttonType !== ''

class DropdownMenuItem extends mahabhuta.CustomElement {
class DropdownMenuItem extends CustomElement {
get elementName() { return "dropdown-menu-item"; }

@@ -152,7 +163,7 @@ async process($element, metadata, dirty) {

};
return akasha.partial(this.array.options.config, template, data);
return this.akasha.partial(this.config, template, data);
}
}
class DropdownMenuButton extends mahabhuta.CustomElement {
class DropdownMenuButton extends CustomElement {
get elementName() { return "dropdown-menu-button"; }

@@ -173,3 +184,3 @@ async process($element, metadata, dirty) {

const isDisabled = $element.attr('disabled');
return akasha.partial(this.array.options.config, template, {
return this.akasha.partial(this.config, template, {
href, label,

@@ -184,3 +195,3 @@ isActive: typeof isActive !== 'undefined' && isActive !== ''

class DropdownMenuHeader extends mahabhuta.CustomElement {
class DropdownMenuHeader extends CustomElement {
get elementName() { return "dropdown-menu-header"; }

@@ -195,3 +206,3 @@ async process($element, metadata, dirty) {

}
return akasha.partial(this.array.options.config, template, {
return this.akasha.partial(this.config, template, {
label

@@ -202,3 +213,3 @@ });

class DropdownMenuDivider extends mahabhuta.CustomElement {
class DropdownMenuDivider extends CustomElement {
get elementName() { return "dropdown-menu-divider"; }

@@ -209,3 +220,3 @@ async process($element, metadata, dirty) {

: "bootstrap-dropdown-divider.html.ejs";
return akasha.partial(this.array.options.config, template, {
return this.akasha.partial(this.config, template, {

@@ -216,3 +227,3 @@ });

class CollapseContainer extends mahabhuta.CustomElement {
class CollapseContainer extends CustomElement {
get elementName() { return "collapse-container"; }

@@ -226,3 +237,3 @@ async process($element, metadata, dirty) {

// dirty();
return akasha.partial(this.array.options.config, template, {
return this.akasha.partial(this.config, template, {
id: id,

@@ -234,3 +245,3 @@ content: $element.html()

class CollapseItem extends mahabhuta.CustomElement {
class CollapseItem extends CustomElement {
get elementName() { return "collapse-item"; }

@@ -253,7 +264,7 @@ async process($element, metadata, dirty) {

// console.log(`collapse-item data `, data);
return akasha.partial(this.array.options.config, template, data);
return this.akasha.partial(this.config, template, data);
}
}
class CarouselContainer extends mahabhuta.CustomElement {
class CarouselContainer extends CustomElement {
get elementName() { return "carousel-container"; }

@@ -271,3 +282,3 @@ async process($element, metadata, dirty) {

? `style="${$element.attr('style')}"` : "";
return akasha.partial(this.array.options.config, template, {
return this.akasha.partial(this.config, template, {
id: id,

@@ -280,3 +291,3 @@ width, style, optionalclasses,

class CarouselItem extends mahabhuta.CustomElement {
class CarouselItem extends CustomElement {
get elementName() { return "carousel-item"; }

@@ -320,7 +331,7 @@ async process($element, metadata, dirty) {

// console.log(`carousel-item sending data `, data);
return akasha.partial(this.array.options.config, template, data);
return this.akasha.partial(this.config, template, data);
}
}
class ButtonModal extends mahabhuta.CustomElement {
class ButtonModal extends CustomElement {
get elementName() { return "button-launched-modal"; }

@@ -351,7 +362,7 @@ async process($element, metadata, dirty) {

// console.log(`carousel-item sending data `, data);
return akasha.partial(this.array.options.config, template, data);
return this.akasha.partial(this.config, template, data);
}
}
class CardBlock extends mahabhuta.CustomElement {
class CardBlock extends CustomElement {
get elementName() { return "card-block"; }

@@ -388,7 +399,7 @@ async process($element, metadata, dirty) {

// console.log(`carousel-item sending data `, data);
return akasha.partial(this.array.options.config, template, data);
return this.akasha.partial(this.config, template, data);
}
}
class CardQuote extends mahabhuta.CustomElement {
class CardQuote extends CustomElement {
get elementName() { return "card-quote"; }

@@ -430,3 +441,3 @@ async process($element, metadata, dirty) {

// console.log(`carousel-item sending data `, data);
return akasha.partial(this.array.options.config, template, data);
return this.akasha.partial(this.config, template, data);
}

@@ -433,0 +444,0 @@ }

@@ -31,5 +31,5 @@ {

"type": "module",
"version": "0.9.1",
"version": "4.6.0",
"engines": {
"node": ">=20.x"
"node": ">=24.x"
},

@@ -36,0 +36,0 @@ "scripts": {

@@ -5,4 +5,8 @@ # Use Twitter Bootstrap on an AkashaCMS website

This release is tested to work with Bootstrap 4.3.x, jQuery 3.3.x and Popper.js 1.14.x.
Package name is `@akashacms/theme-bootstrap@4.6.0`.
The version number roughly corresponds to the Bootstrap version number. This release is tested to work with Bootstrap 4.6.x, jQuery 3.3.x and Popper.js 1.14.x.
A separate release will be developed for compatibility with Bootstrap 5.2.x.
For documentation see https://akashacms.com/plugins/theme-bootstrap/index.html