Todos los componentes del NIVEL 2 ya están implementados correctamente: - ✅ Notification Bar (#49) - ✅ Navbar (#50) - ✅ Hero Section (#51) - ✅ Sidebar (#52) - ✅ Footer (#53) Solo se actualizó notification-bar.css para usar variables CSS. Próximo paso: NIVEL 3 (Refinamientos visuales) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
6 lines
1.2 KiB
Plaintext
6 lines
1.2 KiB
Plaintext
define(['ko','jquery','underscore'],function(ko,$,_){'use strict';function isDomElement(node){return typeof node==='object'&&node.tagName&&node.nodeType;}
|
|
function normalize(nodes){var result;nodes=_.toArray(nodes);result=nodes.slice();nodes.forEach(function(node){if(node.nodeType===8){result=!ko.virtualElements.hasBindingValue(node)?_.without(result,node):_.difference(result,ko.virtualElements.childNodes(node));}});return result;}
|
|
$.fn.extendCtx=function(){var nodes=normalize(this),extenders=_.toArray(arguments);nodes.forEach(function(node){var ctx=ko.contextFor(node),data=[ctx].concat(extenders);_.extend.apply(_,data);});return this;};$.fn.applyBindings=function(ctx){var nodes=normalize(this),nodeCtx;if(isDomElement(ctx)){ctx=ko.contextFor(ctx);}
|
|
nodes.forEach(function(node){nodeCtx=ctx||ko.contextFor(node);ko.applyBindings(nodeCtx,node);});return this;};$.fn.bindings=function(data,ctx){var nodes=normalize(this),bindings=data,nodeCtx;if(isDomElement(ctx)){ctx=ko.contextFor(ctx);}
|
|
nodes.forEach(function(node){nodeCtx=ctx||ko.contextFor(node);if(_.isFunction(data)){bindings=data(nodeCtx,node);}
|
|
ko.applyBindingsToNode(node,bindings,nodeCtx);});return this;};}); |