This commit is contained in:
2026-04-07 14:50:23 +09:00
commit b4e485502b
4778 changed files with 2017091 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
.btn-toolbar{
margin: 0 auto;
}
.tool-top .tool-item:first-child, .tool-bottom .tool-item:first-child{
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
}
.tool-top .tool-item:last-child, .tool-bottom .tool-item:last-child{
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
}
.tool-left .tool-item:first-child, .tool-right .tool-item:first-child{
border-top-left-radius: 6px;
border-top-right-radius: 6px;
}
.tool-left .tool-item:last-child, .tool-right .tool-item:last-child{
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
}
.btn-toolbar i{
margin-right:0;
}

View File

@@ -0,0 +1,86 @@
'use strict';
$(document).ready(function() {
$('#light-toolbar').toolbar({
content: '#toolbar-options',
style: 'light'
});
$('#dark-toolbar').toolbar({
content: '#toolbar-options',
style: 'dark'
});
$('#primary-toolbar').toolbar({
content: '#toolbar-options',
style: 'primary'
});
$('#success-toolbar').toolbar({
content: '#toolbar-options',
style: 'success'
});
$('#info-toolbar').toolbar({
content: '#toolbar-options',
style: 'info'
});
$('#warning-toolbar').toolbar({
content: '#toolbar-options',
style: 'warning'
});
$('#danger-toolbar').toolbar({
content: '#toolbar-options',
style: 'danger'
});
$('#top-toolbar').toolbar({
content: '#toolbar-options',
position: 'top',
style: 'primary'
});
$('#left-toolbar').toolbar({
content: '#toolbar-options',
position: 'left',
style: 'success'
});
$('#bottom-toolbar').toolbar({
content: '#toolbar-options',
position: 'bottom',
style: 'info'
});
$('#right-toolbar').toolbar({
content: '#toolbar-options',
position: 'right',
style: 'warning'
});
$('#click-toolbar').toolbar({
content: '#toolbar-options',
style: 'danger',
event: 'click'
});
$('#standard-toolbar').toolbar({
content: '#toolbar-options',
style: 'primary',
animation: 'standard',
});
$('#flip-toolbar').toolbar({
content: '#toolbar-options',
style: 'success',
animation: 'flip',
});
$('#grow-toolbar').toolbar({
content: '#toolbar-options',
style: 'info',
animation: 'grow',
});
$('#flyin-toolbar').toolbar({
content: '#toolbar-options',
style: 'warning',
animation: 'flyin',
});
$('#bounce-toolbar').toolbar({
content: '#toolbar-options',
style: 'danger',
animation: 'bounce',
});
});

View File

@@ -0,0 +1,487 @@
.tool-container, .tool-item, .btn-toolbar {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.btn-toolbar {
background: #364347;
width: 20px;
height: 20px;
text-align: center;
padding: 10px;
border-radius: 6px;
display: block;
transition: none;
}
.btn-toolbar > i {
color: #02baf2;
font-size: 16px;
}
.btn-toolbar:hover {
background: #02baf2;
cursor: pointer;
}
.btn-toolbar:hover > i {
color: white;
}
.btn-toolbar-primary {
background-color: #009dcd;
}
.btn-toolbar-primary.pressed {
background-color: #02baf2;
}
.btn-toolbar-primary:hover {
background-color: #02baf2;
}
.btn-toolbar-primary > i {
color: white;
}
.btn-toolbar-danger {
background-color: #cc0000;
}
.btn-toolbar-danger.pressed {
background-color: #f84545;
}
.btn-toolbar-danger:hover {
background-color: #f84545;
}
.btn-toolbar-danger > i {
color: white;
}
.btn-toolbar-warning {
background-color: #f3bc65;
}
.btn-toolbar-warning.pressed {
background-color: #fad46b;
}
.btn-toolbar-warning:hover {
background-color: #fad46b;
}
.btn-toolbar-warning > i {
color: white;
}
.btn-toolbar-info {
background-color: #e96300;
}
.btn-toolbar-info.pressed {
background-color: #f58410;
}
.btn-toolbar-info:hover {
background-color: #f58410;
}
.btn-toolbar-info > i {
color: white;
}
.btn-toolbar-success {
background-color: #28948c;
}
.btn-toolbar-success.pressed {
background-color: #3eb5ac;
}
.btn-toolbar-success:hover {
background-color: #3eb5ac;
}
.btn-toolbar-success > i {
color: white;
}
.btn-toolbar-info-o {
background-color: #9175bd;
}
.btn-toolbar-info-o.pressed {
background-color: #a88cd5;
}
.btn-toolbar-info-o:hover {
background-color: #a88cd5;
}
.btn-toolbar-info-o > i {
color: white;
}
.btn-toolbar-light {
background-color: #b2c6cd;
}
.btn-toolbar-light.pressed {
background-color: #d6e1e5;
}
.btn-toolbar-light:hover {
background-color: #d6e1e5;
}
.btn-toolbar-light > i {
color: white;
}
.btn-toolbar-dark {
background-color: #364347;
}
.btn-toolbar-dark.pressed {
background-color: #5e696d;
}
.btn-toolbar-dark:hover {
background-color: #5e696d;
}
.btn-toolbar-dark > i {
color: white;
}
.tool-container {
background-color: #5e696d;
background-size: 100% 100%;
border-radius: 6px;
position: absolute;
}
.tool-container.tool-top,
.tool-container.tool-bottom {
height: 40px;
border-bottom: 0px solid #beb8b8;
}
.tool-container.tool-top .tool-item,
.tool-container.tool-bottom .tool-item {
float: left;
border-right: 0;
border-left: 0;
}
.tool-item {
height: 100%;
display: block;
width: 20px;
height: 20px;
text-align: center;
padding: 10px;
transition: none;
}
.tool-item > .fa {
color: #b2c6cd;
}
.tool-item.selected,
.tool-item:hover {
background: #02baf2;
}
.tool-item.selected > .fa,
.tool-item:hover > .fa {
color: white;
}
.tool-top .tool-item:first-child:hover,
.tool-bottom .tool-item:first-child:hover {
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
}
.tool-top .tool-item:last-child:hover,
.tool-bottom .tool-item:last-child:hover {
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
}
.tool-vertical-top .tool-item:first-child:hover,
.tool-vertical-bottom .tool-item:first-child:hover,
.tool-right .tool-item:first-child:hover,
.tool-left .tool-item:first-child:hover {
border-top-left-radius: 6px;
border-top-right-radius: 6px;
}
.tool-vertical-top .tool-item:last-child:hover,
.tool-vertical-bottom .tool-item:last-child:hover,
.tool-right .tool-item:last-child:hover,
.tool-left .tool-item:last-child:hover {
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
}
.tool-container .arrow {
width: 0;
height: 0;
position: absolute;
border-width: 7px;
border-style: solid;
}
.tool-container.tool-top .arrow {
border-color: #5e696d transparent transparent;
left: 50%;
bottom: -14px;
margin-left: -7px;
}
.tool-container.tool-bottom .arrow {
border-color: transparent transparent #5e696d;
left: 50%;
top: -14px;
margin-left: -7px;
}
.tool-container.tool-left .arrow {
border-color: transparent transparent transparent #5e696d;
top: 50%;
right: -14px;
margin-top: -7px;
}
.tool-container.tool-right .arrow {
border-color: transparent #5e696d transparent transparent;
top: 50%;
left: -14px;
margin-top: -7px;
}
.toolbar-primary {
background-color: #02baf2;
}
.toolbar-primary.tool-top .arrow {
border-color: #02baf2 transparent transparent;
}
.toolbar-primary.tool-bottom .arrow {
border-color: transparent transparent #02baf2;
}
.toolbar-primary.tool-left .arrow {
border-color: transparent transparent transparent #02baf2;
}
.toolbar-primary.tool-right .arrow {
border-color: transparent #02baf2 transparent transparent;
}
.toolbar-primary .tool-item > .fa {
color: white;
}
.toolbar-primary .tool-item.selected,
.toolbar-primary .tool-item:hover {
background: #009dcd;
color: white;
}
.toolbar-danger {
background-color: #f84545;
}
.toolbar-danger.tool-top .arrow {
border-color: #f84545 transparent transparent;
}
.toolbar-danger.tool-bottom .arrow {
border-color: transparent transparent #f84545;
}
.toolbar-danger.tool-left .arrow {
border-color: transparent transparent transparent #f84545;
}
.toolbar-danger.tool-right .arrow {
border-color: transparent #f84545 transparent transparent;
}
.toolbar-danger .tool-item > .fa {
color: white;
}
.toolbar-danger .tool-item.selected,
.toolbar-danger .tool-item:hover {
background: #cc0000;
color: white;
}
.toolbar-warning {
background-color: #f3bc65;
}
.toolbar-warning.tool-top .arrow {
border-color: #f3bc65 transparent transparent;
}
.toolbar-warning.tool-bottom .arrow {
border-color: transparent transparent #f3bc65;
}
.toolbar-warning.tool-left .arrow {
border-color: transparent transparent transparent #f3bc65;
}
.toolbar-warning.tool-right .arrow {
border-color: transparent #f3bc65 transparent transparent;
}
.toolbar-warning .tool-item > .fa {
color: white;
}
.toolbar-warning .tool-item.selected,
.toolbar-warning .tool-item:hover {
background: #fad46b;
color: white;
}
.toolbar-info {
background-color: #e96300;
}
.toolbar-info.tool-top .arrow {
border-color: #e96300 transparent transparent;
}
.toolbar-info.tool-bottom .arrow {
border-color: transparent transparent #e96300;
}
.toolbar-info.tool-left .arrow {
border-color: transparent transparent transparent #e96300;
}
.toolbar-info.tool-right .arrow {
border-color: transparent #e96300 transparent transparent;
}
.toolbar-info .tool-item > .fa {
color: white;
}
.toolbar-info .tool-item.selected,
.toolbar-info .tool-item:hover {
background: #f58410;
color: white;
}
.toolbar-success {
background-color: #28948c;
}
.toolbar-success.tool-top .arrow {
border-color: #28948c transparent transparent;
}
.toolbar-success.tool-bottom .arrow {
border-color: transparent transparent #28948c;
}
.toolbar-success.tool-left .arrow {
border-color: transparent transparent transparent #28948c;
}
.toolbar-success.tool-right .arrow {
border-color: transparent #28948c transparent transparent;
}
.toolbar-success .tool-item > .fa {
color: white;
}
.toolbar-success .tool-item.selected,
.toolbar-success .tool-item:hover {
background: #3eb5ac;
color: white;
}
.toolbar-info-o {
background-color: #9175bd;
}
.toolbar-info-o.tool-top .arrow {
border-color: #9175bd transparent transparent;
}
.toolbar-info-o.tool-bottom .arrow {
border-color: transparent transparent #9175bd;
}
.toolbar-info-o.tool-left .arrow {
border-color: transparent transparent transparent #9175bd;
}
.toolbar-info-o.tool-right .arrow {
border-color: transparent #9175bd transparent transparent;
}
.toolbar-info-o .tool-item > .fa {
color: white;
}
.toolbar-info-o .tool-item.selected,
.toolbar-info-o .tool-item:hover {
background: #a88cd5;
color: white;
}
.toolbar-light {
background-color: #b2c6cd;
}
.toolbar-light.tool-top .arrow {
border-color: #b2c6cd transparent transparent;
}
.toolbar-light.tool-bottom .arrow {
border-color: transparent transparent #b2c6cd;
}
.toolbar-light.tool-left .arrow {
border-color: transparent transparent transparent #b2c6cd;
}
.toolbar-light.tool-right .arrow {
border-color: transparent #b2c6cd transparent transparent;
}
.toolbar-light .tool-item > .fa {
color: white;
}
.toolbar-light .tool-item.selected,
.toolbar-light .tool-item:hover {
background: #d6e1e5;
color: white;
}
.toolbar-dark {
background-color: #364347;
}
.toolbar-dark.tool-top .arrow {
border-color: #364347 transparent transparent;
}
.toolbar-dark.tool-bottom .arrow {
border-color: transparent transparent #364347;
}
.toolbar-dark.tool-left .arrow {
border-color: transparent transparent transparent #364347;
}
.toolbar-dark.tool-right .arrow {
border-color: transparent #364347 transparent transparent;
}
.toolbar-dark .tool-item > .fa {
color: white;
}
.toolbar-dark .tool-item.selected,
.toolbar-dark .tool-item:hover {
background: #5e696d;
color: white;
}
.animate-standard {
-webkit-animation: standardAnimate 0.3s 1 ease;
}
.animate-flyin {
-webkit-animation: rotateAnimate 0.5s 1 ease;
}
.animate-grow {
-webkit-animation: growAnimate 0.4s 1 ease;
}
.animate-flip {
-webkit-animation: flipAnimate 0.4s 1 ease;
}
.animate-bounce {
-webkit-animation: bounceAnimate 0.4s 1 ease-out;
}
@-webkit-keyframes rotateAnimate {
from {
transform: rotate(180deg) translate(-120px);
opacity: 0;
}
to {
transform: rotate(0deg) translate(0px);
opacity: 1;
}
}
@-webkit-keyframes standardAnimate {
from {
transform: translateY(20px);
opacity: 0;
}
to {
transform: translateY(0px);
opacity: 1;
}
}
@-webkit-keyframes growAnimate {
0% {
transform: scale(0) translateY(40px);
opacity: 0;
}
70% {
transform: scale(1.5) translate(0px);
}
100% {
transform: scale(1) translate(0px);
opacity: 1;
}
}
@-webkit-keyframes rotate2Animate {
from {
transform: rotate(-90deg);
transform-origin: 0% 100%;
opacity: 0;
}
to {
transform: rotate(0deg);
opacity: 1;
}
}
@-webkit-keyframes flipAnimate {
from {
transform: rotate3d(2, 2, 2, 180deg);
opacity: 0;
}
to {
transform: rotate3d(0, 0, 0, 0deg);
opacity: 1;
}
}
@-webkit-keyframes bounceAnimate {
0% {
transform: translateY(40px);
opacity: 0;
}
30% {
transform: translateY(-40px);
}
70% {
transform: translateY(20px);
}
100% {
transform: translateY(0px);
opacity: 1;
}
}
.hidden {
display: none;
}

View File

@@ -0,0 +1,2 @@
/*! toolbar.js 2015-05-17 */
"function"!=typeof Object.create&&(Object.create=function(a){function b(){}return b.prototype=a,new b}),function(a,b,c,d){var e={init:function(b,c){var d=this;d.elem=c,d.$elem=a(c),d.options=a.extend({},a.fn.toolbar.options,b),d.metadata=d.$elem.data(),d.overrideOptions(),d.toolbar=a('<div class="tool-container" />').addClass("tool-"+d.options.position).addClass("toolbar-"+d.options.style).append('<div class="tool-items" />').append('<div class="arrow" />').appendTo("body").css("opacity",0).hide(),d.toolbar_arrow=d.toolbar.find(".arrow"),d.initializeToolbar()},overrideOptions:function(){var b=this;a.each(b.options,function(a){"undefined"!=typeof b.$elem.data("toolbar-"+a)&&(b.options[a]=b.$elem.data("toolbar-"+a))})},initializeToolbar:function(){var a=this;a.populateContent(),a.setTrigger(),a.toolbarWidth=a.toolbar.width()},setTrigger:function(){function c(){d.$elem.hasClass("pressed")?e=setTimeout(function(){d.hide()},150):clearTimeout(e)}var d=this;if("click"!=d.options.event){var e;d.$elem.on({mouseenter:function(a){d.$elem.hasClass("pressed")?clearTimeout(e):d.show()}}),d.$elem.parent().on({mouseleave:function(a){c()}}),a(".tool-container").on({mouseenter:function(a){clearTimeout(e)},mouseleave:function(a){c()}})}"click"==d.options.event&&(d.$elem.on("click",function(a){a.preventDefault(),d.$elem.hasClass("pressed")?d.hide():d.show()}),d.options.hideOnClick&&a("html").on("click.toolbar",function(a){a.target!=d.elem&&0===d.$elem.has(a.target).length&&0===d.toolbar.has(a.target).length&&d.toolbar.is(":visible")&&d.hide()})),a(b).resize(function(a){a.stopPropagation(),d.toolbar.is(":visible")&&(d.toolbarCss=d.getCoordinates(d.options.position,20),d.collisionDetection(),d.toolbar.css(d.toolbarCss),d.toolbar_arrow.css(d.arrowCss))})},populateContent:function(){var b=this,c=b.toolbar.find(".tool-items"),d=a(b.options.content).clone(!0).find("a").addClass("tool-item");c.html(d),c.find(".tool-item").on("click",function(a){a.preventDefault(),b.$elem.trigger("toolbarItemClick",this)})},calculatePosition:function(){var a=this;a.arrowCss={},a.toolbarCss=a.getCoordinates(a.options.position,a.options.adjustment),a.toolbarCss.position="absolute",a.toolbarCss.zIndex=a.options.zIndex,a.collisionDetection(),a.toolbar.css(a.toolbarCss),a.toolbar_arrow.css(a.arrowCss)},getCoordinates:function(a,b){var c=this;switch(c.coordinates=c.$elem.offset(),c.options.adjustment&&c.options.adjustment[c.options.position]&&(b=c.options.adjustment[c.options.position]+b),c.options.position){case"top":return{left:c.coordinates.left-c.toolbar.width()/2+c.$elem.outerWidth()/2,top:c.coordinates.top-c.$elem.outerHeight()-b,right:"auto"};case"left":return{left:c.coordinates.left-c.toolbar.width()/2-c.$elem.outerWidth()/2-b,top:c.coordinates.top-c.toolbar.height()/2+c.$elem.outerHeight()/2,right:"auto"};case"right":return{left:c.coordinates.left+c.toolbar.width()/2+c.$elem.outerWidth()/2+b,top:c.coordinates.top-c.toolbar.height()/2+c.$elem.outerHeight()/2,right:"auto"};case"bottom":return{left:c.coordinates.left-c.toolbar.width()/2+c.$elem.outerWidth()/2,top:c.coordinates.top+c.$elem.outerHeight()+b,right:"auto"}}},collisionDetection:function(){var c=this,d=20;("top"==c.options.position||"bottom"==c.options.position)&&(c.arrowCss={left:"50%",right:"50%"},c.toolbarCss.left<d?(c.toolbarCss.left=d,c.arrowCss.left=c.$elem.offset().left+c.$elem.width()/2-d):a(b).width()-(c.toolbarCss.left+c.toolbarWidth)<d&&(c.toolbarCss.right=d,c.toolbarCss.left="auto",c.arrowCss.left="auto",c.arrowCss.right=a(b).width()-c.$elem.offset().left-c.$elem.width()/2-d-5))},show:function(){var a=this;a.$elem.addClass("pressed"),a.calculatePosition(),a.toolbar.show().css({opacity:1}).addClass("animate-"+a.options.animation),a.$elem.trigger("toolbarShown")},hide:function(){var a=this,b={opacity:0};switch(a.$elem.removeClass("pressed"),a.options.position){case"top":b.top="+=20";break;case"left":b.left="+=20";break;case"right":b.left="-=20";break;case"bottom":b.top="-=20"}a.toolbar.animate(b,200,function(){a.toolbar.hide()}),a.$elem.trigger("toolbarHidden")},getToolbarElement:function(){return this.toolbar.find(".tool-items")}};a.fn.toolbar=function(b){if(a.isPlainObject(b))return this.each(function(){var c=Object.create(e);c.init(b,this),a(this).data("toolbarObj",c)});if("string"==typeof b&&0!==b.indexOf("_")){var c=a(this).data("toolbarObj"),d=c[b];return d.apply(c,a.makeArray(arguments).slice(1))}},a.fn.toolbar.options={content:"#myContent",position:"top",hideOnClick:!1,zIndex:120,hover:!1,style:"default",animation:"standard",adjustment:10}}(jQuery,window,document);