fix incompatible for PHP 8.2
parent
3e21fb44bc
commit
1bab22e474
@ -1,66 +1,66 @@
|
||||
<?php
|
||||
namespace Isekai\Widgets;
|
||||
|
||||
use Title;
|
||||
use Html;
|
||||
|
||||
class ButtonLinkWidget {
|
||||
/**
|
||||
* @param string $text
|
||||
* @param array $params
|
||||
* @param \Parser $parser
|
||||
* @param \PPFrame $frame
|
||||
* @return string|string[]
|
||||
*/
|
||||
public static function create($text, $params, \Parser $parser, \PPFrame $frame) {
|
||||
$out = $parser->getOutput();
|
||||
$out->addModules([
|
||||
"ext.isekai.buttonLink"
|
||||
]);
|
||||
|
||||
if (isset($params['page'])) {
|
||||
$title = Title::newFromText($params['page']);
|
||||
if ($title) {
|
||||
$params['href'] = $title->getFullURL();
|
||||
}
|
||||
}
|
||||
|
||||
$framed = true;
|
||||
if (isset($params['frameless']) && $params['frameless']) {
|
||||
$framed = false;
|
||||
}
|
||||
|
||||
$flags = [];
|
||||
|
||||
$primary = true;
|
||||
$type = 'progressive';
|
||||
if (isset($params['default']) && $params['default']) {
|
||||
$primary = false;
|
||||
$type = null;
|
||||
}
|
||||
if (isset($params['secondary']) && $params['secondary']) {
|
||||
$primary = false;
|
||||
}
|
||||
if (isset($params['destructive']) && $params['destructive']) {
|
||||
$flags[] = 'destructive';
|
||||
}
|
||||
if ($primary) {
|
||||
$flags[] = 'primary';
|
||||
}
|
||||
if ($type) {
|
||||
$flags[] = $type;
|
||||
}
|
||||
|
||||
$flags = implode(' ', $flags);
|
||||
|
||||
$html = Html::element('a', [
|
||||
'class' => 'isekai-buttonlink',
|
||||
'href' => $params['href'] ?? '#',
|
||||
'target' => $params['target'] ?? '_self',
|
||||
'data-framed' => $framed ? 'true' : 'false',
|
||||
'data-flags' => $flags
|
||||
], $text);
|
||||
|
||||
return [$html, "markerType" => 'nowiki'];
|
||||
}
|
||||
<?php
|
||||
namespace Isekai\Widgets;
|
||||
|
||||
use Title;
|
||||
use Html;
|
||||
|
||||
class ButtonLinkWidget {
|
||||
/**
|
||||
* @param string $text
|
||||
* @param array $params
|
||||
* @param \Parser $parser
|
||||
* @param \PPFrame $frame
|
||||
* @return string|string[]
|
||||
*/
|
||||
public static function create($text, $params, \Parser $parser, \PPFrame $frame) {
|
||||
$out = $parser->getOutput();
|
||||
$out->addModules([
|
||||
"ext.isekai.buttonLink"
|
||||
]);
|
||||
|
||||
if (isset($params['page'])) {
|
||||
$title = Title::newFromText($params['page']);
|
||||
if ($title) {
|
||||
$params['href'] = $title->getFullURL();
|
||||
}
|
||||
}
|
||||
|
||||
$framed = true;
|
||||
if (isset($params['frameless']) && $params['frameless']) {
|
||||
$framed = false;
|
||||
}
|
||||
|
||||
$flags = [];
|
||||
|
||||
$primary = true;
|
||||
$type = 'progressive';
|
||||
if (isset($params['default']) && $params['default']) {
|
||||
$primary = false;
|
||||
$type = null;
|
||||
}
|
||||
if (isset($params['secondary']) && $params['secondary']) {
|
||||
$primary = false;
|
||||
}
|
||||
if (isset($params['destructive']) && $params['destructive']) {
|
||||
$flags[] = 'destructive';
|
||||
}
|
||||
if ($primary) {
|
||||
$flags[] = 'primary';
|
||||
}
|
||||
if ($type) {
|
||||
$flags[] = $type;
|
||||
}
|
||||
|
||||
$flags = implode(' ', $flags);
|
||||
|
||||
$html = Html::element('a', [
|
||||
'class' => 'isekai-buttonlink',
|
||||
'href' => $params['href'] ?? '#',
|
||||
'target' => $params['target'] ?? '_self',
|
||||
'data-framed' => $framed ? 'true' : 'false',
|
||||
'data-flags' => $flags
|
||||
], $text);
|
||||
|
||||
return [$html, "markerType" => 'nowiki'];
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
namespace Isekai\Widgets\Parsoid;
|
||||
|
||||
use Wikimedia\Parsoid\DOM\DocumentFragment;
|
||||
use Wikimedia\Parsoid\Ext\ExtensionTagHandler;
|
||||
use Wikimedia\Parsoid\Ext\ParsoidExtensionAPI;
|
||||
|
||||
class VEvalTagHandler extends ExtensionTagHandler {
|
||||
public function toArgs(array $extArgs): array {
|
||||
$ret = [];
|
||||
/** @var KV $extArg */
|
||||
foreach ($extArgs as $extArg) {
|
||||
$ret[$extArg->k] = $extArg->v;
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public function sourceToDom(ParsoidExtensionAPI $extApi, string $src, array $extArgs): DocumentFragment {
|
||||
$src = preg_replace('/^([ ]*)([#*]+)/', '${1}<nowiki>${2}</nowiki>', $src);
|
||||
$args = $this->toArgs($extArgs);
|
||||
|
||||
$type = 'block';
|
||||
if (isset($args['inline'])) {
|
||||
$type = 'inline';
|
||||
}
|
||||
|
||||
$wrapperTag = '';
|
||||
$contextType = '';
|
||||
switch ($type) {
|
||||
case 'inline':
|
||||
$wrapperTag = 'span';
|
||||
$contextType = 'inline';
|
||||
break;
|
||||
case 'block':
|
||||
$wrapperTag = 'div';
|
||||
$contextType = 'block';
|
||||
break;
|
||||
}
|
||||
|
||||
return $extApi->extTagToDOM(
|
||||
$extArgs,
|
||||
'',
|
||||
$src,
|
||||
[
|
||||
'wrapperTag' => $wrapperTag,
|
||||
'parseOpts' => [
|
||||
'extTag' => 'veval',
|
||||
'context' => $contextType
|
||||
],
|
||||
],
|
||||
);;
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Isekai\Widgets;
|
||||
|
||||
class VEvalWidget {
|
||||
public static function create($text, $params, \Parser $parser, \PPFrame $frame) {
|
||||
$content = $text = $parser->recursiveTagParse($text, $frame);
|
||||
return [$content, "markerType" => 'nowiki'];
|
||||
}
|
||||
}
|
@ -1,43 +1,45 @@
|
||||
<?php
|
||||
namespace Isekai\Widgets;
|
||||
|
||||
use MapCacheLRU;
|
||||
use Parser;
|
||||
|
||||
class Widgets {
|
||||
/**
|
||||
* @param \Parser $parser
|
||||
* @return bool
|
||||
* @throws \MWException
|
||||
*/
|
||||
public static function onParserSetup(&$parser){
|
||||
$parser->extIsekaiWidgetsCache = new MapCacheLRU( 100 ); // 100 is arbitrary
|
||||
|
||||
$parser->setHook('createpage', [CreatePageWidget::class, 'create']);
|
||||
$parser->setHook('discoverbox', [DiscoverWidget::class, 'create']);
|
||||
$parser->setHook('feedlist', [FeedListWidget::class, 'create']);
|
||||
$parser->setHook('previewcard', [PreviewCardWidget::class, 'create']);
|
||||
$parser->setHook('buttonlink', [ButtonLinkWidget::class, 'create']);
|
||||
|
||||
$parser->setHook('tile', [TileWidget::class, 'create']);
|
||||
$parser->setHook('tilegroup', [TileGroupWidget::class, 'create']);
|
||||
|
||||
$parser->setHook('fontface', [FontFaceWidget::class, 'create']);
|
||||
$parser->setHook('exfont', [ExtraFontWidget::class, 'create']);
|
||||
|
||||
$parser->setHook('details', [Html5Widget::class, 'createDetails']);
|
||||
$parser->setHook('summary', [Html5Widget::class, 'createSummary']);
|
||||
|
||||
$parser->setHook('information', [InformationWidget::class, 'create']);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function onLoad(\OutputPage $outputPage) {
|
||||
$outputPage->addModuleStyles([
|
||||
"ext.isekai.widgets.global",
|
||||
"ext.isekai.information.infobox",
|
||||
"ext.isekai.collapse"
|
||||
]);
|
||||
}
|
||||
<?php
|
||||
namespace Isekai\Widgets;
|
||||
|
||||
use MapCacheLRU;
|
||||
use Parser;
|
||||
|
||||
class Widgets {
|
||||
/**
|
||||
* @param \Parser $parser
|
||||
* @return bool
|
||||
* @throws \MWException
|
||||
*/
|
||||
public static function onParserSetup(&$parser) {
|
||||
$parser->extIsekaiWidgetsCache = new MapCacheLRU( 100 ); // 100 is arbitrary
|
||||
|
||||
$parser->setHook('createpage', [CreatePageWidget::class, 'create']);
|
||||
$parser->setHook('discoverbox', [DiscoverWidget::class, 'create']);
|
||||
$parser->setHook('feedlist', [FeedListWidget::class, 'create']);
|
||||
$parser->setHook('previewcard', [PreviewCardWidget::class, 'create']);
|
||||
$parser->setHook('buttonlink', [ButtonLinkWidget::class, 'create']);
|
||||
|
||||
$parser->setHook('tile', [TileWidget::class, 'create']);
|
||||
$parser->setHook('tilegroup', [TileGroupWidget::class, 'create']);
|
||||
|
||||
$parser->setHook('fontface', [FontFaceWidget::class, 'create']);
|
||||
$parser->setHook('exfont', [ExtraFontWidget::class, 'create']);
|
||||
|
||||
$parser->setHook('details', [Html5Widget::class, 'createDetails']);
|
||||
$parser->setHook('summary', [Html5Widget::class, 'createSummary']);
|
||||
|
||||
$parser->setHook('information', [InformationWidget::class, 'create']);
|
||||
|
||||
$parser->setHook('veval', [VEvalWidget::class, 'create']);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function onLoad(\OutputPage $outputPage) {
|
||||
$outputPage->addModuleStyles([
|
||||
"ext.isekai.widgets.global",
|
||||
"ext.isekai.information.infobox",
|
||||
"ext.isekai.collapse"
|
||||
]);
|
||||
}
|
||||
}
|
@ -1,25 +1,25 @@
|
||||
$(function() {
|
||||
$('.isekai-buttonlink').each(function() {
|
||||
var $this = $(this);
|
||||
|
||||
var opt = {
|
||||
label: $this.text(),
|
||||
href: $this.attr('href'),
|
||||
target: $this.attr('target'),
|
||||
}
|
||||
|
||||
if ($this.attr('data-framed') === 'true') {
|
||||
opt.framed = true;
|
||||
}
|
||||
if ($this.attr('data-flags')) {
|
||||
var flags = $this.attr('data-flags');
|
||||
if (flags) {
|
||||
opt.flags = flags.split(' ');
|
||||
}
|
||||
}
|
||||
|
||||
var $button = new OO.ui.ButtonWidget(opt);
|
||||
|
||||
$this.replaceWith($button.$element);
|
||||
});
|
||||
$(function() {
|
||||
$('.isekai-buttonlink').each(function() {
|
||||
var $this = $(this);
|
||||
|
||||
var opt = {
|
||||
label: $this.text(),
|
||||
href: $this.attr('href'),
|
||||
target: $this.attr('target'),
|
||||
}
|
||||
|
||||
if ($this.attr('data-framed') === 'true') {
|
||||
opt.framed = true;
|
||||
}
|
||||
if ($this.attr('data-flags')) {
|
||||
var flags = $this.attr('data-flags');
|
||||
if (flags) {
|
||||
opt.flags = flags.split(' ');
|
||||
}
|
||||
}
|
||||
|
||||
var $button = new OO.ui.ButtonWidget(opt);
|
||||
|
||||
$this.replaceWith($button.$element);
|
||||
});
|
||||
});
|
@ -1 +1 @@
|
||||
(()=>{var e={153:e=>{e.exports=function(e,t){var n=e.split(".");"isekai"in window||(window.isekai={});for(var i=window.isekai,r=0;r<n.length-1;r++){var o=n[r];o in i||(i[o]={}),i=i[o]}i[n[r]]=t}}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}(()=>{function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}n(153)("ui.DiscoverWidget",function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.baseDom=e,this.pageUrl=null,this.api=new mw.Api,this.initDom(),this.refreshPage()}var n,i;return n=t,(i=[{key:"initDom",value:function(){this.reloadButton=new OO.ui.ButtonWidget({icon:"reload",label:mw.message("isekai-discover-change-btn").parse()}),this.reloadButton.on("click",this.refreshPage.bind(this)),this.readMoreButton=new OO.ui.ButtonWidget({icon:"ellipsis",label:mw.message("isekai-discover-readmore-btn").parse(),flags:["primary","progressive"]}),this.readMoreButton.on("click",this.showMore.bind(this)),this.loadingBar=new OO.ui.ProgressBarWidget({progress:!1}),this.baseDom.find(".card-body .loading .spinner").append(this.loadingBar.$element),this.buttonGroup=new OO.ui.ButtonGroupWidget({items:[this.reloadButton,this.readMoreButton]}),this.baseDom.find(".card-header .card-header-buttons").append(this.buttonGroup.$element),this.loading=this.baseDom.find(".card-body .loading"),this.title=this.baseDom.find(".card-body .card-title"),this.contentContainer=this.baseDom.find(".card-body .card-content")}},{key:"showMore",value:function(){this.pageUrl&&window.open(this.pageUrl)}},{key:"refreshPage",value:function(){var e=this;this.pageUrl=null,this.clearContent(),this.showLoading(),this.getRandomPage().then((function(t){e.loadPage(t)}))}},{key:"setTitle",value:function(e){this.title.text(e)}},{key:"showLoading",value:function(){this.loading.show(),this.contentContainer.hide()}},{key:"hideLoading",value:function(){this.loading.hide(),this.contentContainer.show()}},{key:"clearContent",value:function(){this.contentContainer.children().remove()}},{key:"setContent",value:function(e){this.hideLoading(),this.clearContent(),this.contentContainer.append(e)}},{key:"showError",value:function(e){var t=new OO.ui.MessageWidget({type:"error",label:e});this.setContent(t.$element)}},{key:"getRandomPage",value:function(){var e=this;return new Promise((function(t,n){e.api.get({action:"query",list:"random",rnlimit:1,rnnamespace:0}).done((function(n){if(n.query&&n.query.random&&n.query.random.length>0){var i=n.query.random[0].title;e.setTitle(i),t(i)}else n.error?e.showError(n.error.info):e.showError(mw.message("isekai-discover-error-cannotload").parse())}))}))}},{key:"parseHTMLString",value:function(e){try{return(new DOMParser).parseFromString(e,"text/html")}catch(e){console.error(e.message)}return null}},{key:"loadPage",value:function(e){var t=this,n=mw.util.getUrl(e);this.pageUrl=n,n.indexOf("?")>=0?n+="&":n+="?",n+="action=render",$.get(n,(function(e){var n=$(t.parseHTMLString(e)).find(".mw-parser-output");n.length>0&&(n.find(".toc").remove(),t.setContent(n))}),"html")}}])&&e(n.prototype,i),t}())})()})();
|
||||
(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,o=function(t,n){if("object"!==e(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,"string");if("object"!==e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===e(o)?o:String(o)),r)}var o}!function(e,t){var n="ui.DiscoverWidget".split(".");"isekai"in window||(window.isekai={});for(var i=window.isekai,r=0;r<n.length-1;r++){var o=n[r];o in i||(i[o]={}),i=i[o]}i[n[r]]=t}(0,function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.baseDom=t,this.pageUrl=null,this.api=new mw.Api,this.initDom(),this.refreshPage()}var n,i;return n=e,(i=[{key:"initDom",value:function(){this.reloadButton=new OO.ui.ButtonWidget({icon:"reload",label:mw.message("isekai-discover-change-btn").parse()}),this.reloadButton.on("click",this.refreshPage.bind(this)),this.readMoreButton=new OO.ui.ButtonWidget({icon:"ellipsis",label:mw.message("isekai-discover-readmore-btn").parse(),flags:["primary","progressive"]}),this.readMoreButton.on("click",this.showMore.bind(this)),this.loadingBar=new OO.ui.ProgressBarWidget({progress:!1}),this.baseDom.find(".card-body .loading .spinner").append(this.loadingBar.$element),this.buttonGroup=new OO.ui.ButtonGroupWidget({items:[this.reloadButton,this.readMoreButton]}),this.baseDom.find(".card-header .card-header-buttons").append(this.buttonGroup.$element),this.loading=this.baseDom.find(".card-body .loading"),this.title=this.baseDom.find(".card-body .card-title"),this.contentContainer=this.baseDom.find(".card-body .card-content")}},{key:"showMore",value:function(){this.pageUrl&&window.open(this.pageUrl)}},{key:"refreshPage",value:function(){var e=this;this.pageUrl=null,this.clearContent(),this.showLoading(),this.getRandomPage().then((function(t){e.loadPage(t)}))}},{key:"setTitle",value:function(e){this.title.text(e)}},{key:"showLoading",value:function(){this.loading.show(),this.contentContainer.hide()}},{key:"hideLoading",value:function(){this.loading.hide(),this.contentContainer.show()}},{key:"clearContent",value:function(){this.contentContainer.children().remove()}},{key:"setContent",value:function(e){this.hideLoading(),this.clearContent(),this.contentContainer.append(e)}},{key:"showError",value:function(e){var t=new OO.ui.MessageWidget({type:"error",label:e});this.setContent(t.$element)}},{key:"getRandomPage",value:function(){var e=this;return new Promise((function(t,n){e.api.get({action:"query",list:"random",rnlimit:1,rnnamespace:0}).done((function(n){if(n.query&&n.query.random&&n.query.random.length>0){var i=n.query.random[0].title;e.setTitle(i),t(i)}else n.error?e.showError(n.error.info):e.showError(mw.message("isekai-discover-error-cannotload").parse())}))}))}},{key:"parseHTMLString",value:function(e){try{return(new DOMParser).parseFromString(e,"text/html")}catch(e){console.error(e.message)}return null}},{key:"loadPage",value:function(e){var t=this,n=mw.util.getUrl(e);this.pageUrl=n,n.indexOf("?")>=0?n+="&":n+="?",n+="action=render",$.get(n,(function(e){var n=$(t.parseHTMLString(e)).find(".mw-parser-output");n.length>0&&(n.find(".toc").remove(),t.setContent(n))}),"html")}}])&&t(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),e}())})();
|
@ -1,68 +1,68 @@
|
||||
.isekai-collapse {
|
||||
width: 50%;
|
||||
background: #fff;
|
||||
margin-bottom: .5rem;
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
-webkit-appearance: none;
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&.animate {
|
||||
overflow-y: hidden;
|
||||
will-change: height;
|
||||
transition: height 250ms ease-in-out;
|
||||
}
|
||||
|
||||
.isekai-collapse-title {
|
||||
padding: 1rem;
|
||||
display: block;
|
||||
background-color: #f7f7f7;
|
||||
padding-left: 2.2rem;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
color: black;
|
||||
font-size: 1rem;
|
||||
list-style: none;
|
||||
-webkit-appearance: none;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
border-width: 0.4rem;
|
||||
border-style: solid;
|
||||
border-color: transparent transparent transparent #000;
|
||||
position: absolute;
|
||||
top: 1.32rem;
|
||||
left: 1.2rem;
|
||||
transform: rotate(0);
|
||||
transform-origin: 0.2rem 50%;
|
||||
will-change: transform;
|
||||
transition: transform 250ms ease;
|
||||
}
|
||||
|
||||
&::marker,
|
||||
&::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.isekai-collapse-content {
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
&[open] > .isekai-collapse-title:before {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
&.closing[open] > .isekai-collapse-title:before {
|
||||
transform: rotate(0);
|
||||
}
|
||||
}
|
||||
|
||||
.isekai-indent > .isekai-collapse {
|
||||
padding-left: 0;
|
||||
margin-left: 8px;
|
||||
.isekai-collapse {
|
||||
width: 50%;
|
||||
background: #fff;
|
||||
margin-bottom: .5rem;
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
-webkit-appearance: none;
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&.animate {
|
||||
overflow-y: hidden;
|
||||
will-change: height;
|
||||
transition: height 250ms ease-in-out;
|
||||
}
|
||||
|
||||
.isekai-collapse-title {
|
||||
padding: 1rem;
|
||||
display: block;
|
||||
background-color: #f7f7f7;
|
||||
padding-left: 2.2rem;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
color: black;
|
||||
font-size: 1rem;
|
||||
list-style: none;
|
||||
-webkit-appearance: none;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
border-width: 0.4rem;
|
||||
border-style: solid;
|
||||
border-color: transparent transparent transparent #000;
|
||||
position: absolute;
|
||||
top: 1.32rem;
|
||||
left: 1.2rem;
|
||||
transform: rotate(0);
|
||||
transform-origin: 0.2rem 50%;
|
||||
will-change: transform;
|
||||
transition: transform 250ms ease;
|
||||
}
|
||||
|
||||
&::marker,
|
||||
&::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.isekai-collapse-content {
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
&[open] > .isekai-collapse-title:before {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
&.closing[open] > .isekai-collapse-title:before {
|
||||
transform: rotate(0);
|
||||
}
|
||||
}
|
||||
|
||||
.isekai-indent > .isekai-collapse {
|
||||
padding-left: 0;
|
||||
margin-left: 8px;
|
||||
}
|
@ -1,122 +1,122 @@
|
||||
@isekai-card-border-radius: 10px;
|
||||
|
||||
.isekai-thin-scrollbar {
|
||||
scrollbar-width: thin;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
border-radius: 0;
|
||||
background: #cdcdcd;
|
||||
|
||||
&:hover {
|
||||
background: #a6a6a6;
|
||||
}
|
||||
|
||||
&:active {
|
||||
background: #606060;
|
||||
}
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
|
||||
&:hover {
|
||||
background: #f0f0f0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.isekai-thin-scrollbar-overlap {
|
||||
|
||||
}
|
||||
|
||||
.isekai-card {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
word-wrap: break-word;
|
||||
background-color: #fff;
|
||||
background-clip: border-box;
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 -1px 4px -1px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(53,72,91,.07);
|
||||
border-radius: @isekai-card-border-radius;
|
||||
margin-bottom: .5rem;
|
||||
overflow: hidden;
|
||||
|
||||
.card-header {
|
||||
padding: 0.75rem 1.25rem;
|
||||
margin-bottom: 0;
|
||||
background-color: #f7f7f7;
|
||||
color: black;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
border-top-left-radius: @isekai-card-border-radius;
|
||||
border-top-right-radius: @isekai-card-border-radius;
|
||||
|
||||
box-shadow: 0 2px 4px 0px rgba(0,0,0,0.1);
|
||||
|
||||
.card-header-text {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
@media(max-width: 360px){
|
||||
.card-header-text {
|
||||
font-size: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
.card-header-extra {
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.card-title {
|
||||
margin: 0.75rem 0 0.75rem 1rem;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
flex: 1 1 auto;
|
||||
padding: 0.25rem;
|
||||
}
|
||||
|
||||
.card-body-fluid {
|
||||
flex: 1 1 auto;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@media(max-width: 360px) {
|
||||
.card-header-text {
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.isekai-well {
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 -1px 4px -1px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(53,72,91,.07);
|
||||
border-radius: 5px;
|
||||
margin-bottom: .5rem;
|
||||
background-color: #fcfcfc;
|
||||
padding: 0.5em 1em;
|
||||
}
|
||||
|
||||
.skin-citizen-dark, .skin-timeless-dark {
|
||||
.isekai-well {
|
||||
background-color: #090909;
|
||||
}
|
||||
|
||||
.isekai-card {
|
||||
background-color: #000;
|
||||
|
||||
.card-header {
|
||||
background-color: #090909;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
@isekai-card-border-radius: 10px;
|
||||
|
||||
.isekai-thin-scrollbar {
|
||||
scrollbar-width: thin;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
border-radius: 0;
|
||||
background: #cdcdcd;
|
||||
|
||||
&:hover {
|
||||
background: #a6a6a6;
|
||||
}
|
||||
|
||||
&:active {
|
||||
background: #606060;
|
||||
}
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
|
||||
&:hover {
|
||||
background: #f0f0f0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.isekai-thin-scrollbar-overlap {
|
||||
|
||||
}
|
||||
|
||||
.isekai-card {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
word-wrap: break-word;
|
||||
background-color: #fff;
|
||||
background-clip: border-box;
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 -1px 4px -1px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(53,72,91,.07);
|
||||
border-radius: @isekai-card-border-radius;
|
||||
margin-bottom: .5rem;
|
||||
overflow: hidden;
|
||||
|
||||
.card-header {
|
||||
padding: 0.75rem 1.25rem;
|
||||
margin-bottom: 0;
|
||||
background-color: #f7f7f7;
|
||||
color: black;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
border-top-left-radius: @isekai-card-border-radius;
|
||||
border-top-right-radius: @isekai-card-border-radius;
|
||||
|
||||
box-shadow: 0 2px 4px 0px rgba(0,0,0,0.1);
|
||||
|
||||
.card-header-text {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
@media(max-width: 360px){
|
||||
.card-header-text {
|
||||
font-size: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
.card-header-extra {
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.card-title {
|
||||
margin: 0.75rem 0 0.75rem 1rem;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
flex: 1 1 auto;
|
||||
padding: 0.25rem;
|
||||
}
|
||||
|
||||
.card-body-fluid {
|
||||
flex: 1 1 auto;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@media(max-width: 360px) {
|
||||
.card-header-text {
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.isekai-well {
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 -1px 4px -1px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(53,72,91,.07);
|
||||
border-radius: 5px;
|
||||
margin-bottom: .5rem;
|
||||
background-color: #fcfcfc;
|
||||
padding: 0.5em 1em;
|
||||
}
|
||||
|
||||
.skin-citizen-dark, .skin-timeless-dark {
|
||||
.isekai-well {
|
||||
background-color: #090909;
|
||||
}
|
||||
|
||||
.isekai-card {
|
||||
background-color: #000;
|
||||
|
||||
.card-header {
|
||||
background-color: #090909;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,151 +1,151 @@
|
||||
@feed-list-height: 23.8rem;
|
||||
@feed-list-height-mobile: 70vh;
|
||||
|
||||
.isekai-feed-list-card > .card-header {
|
||||
height: 2.2rem;
|
||||
}
|
||||
|
||||
.isekai-feed-list {
|
||||
margin: 0;
|
||||
height: @feed-list-height;
|
||||
overflow-y: overlay;
|
||||
display: none;
|
||||
|
||||
&.mounted {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.loading {
|
||||
width: 100%;
|
||||
height: 99.5%;
|
||||
height: calc(100% - 2px); // fix: overflow because of border
|
||||
margin-top: 1px;
|
||||
display: flex;
|
||||
|
||||
.spinner {
|
||||
margin: auto;
|
||||
padding: 2rem;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 850px) {
|
||||
height: @feed-list-height-mobile;
|
||||
}
|
||||
}
|
||||
|
||||
.isekai-list {
|
||||
margin: 0 !important;
|
||||
padding: 0 0 0.5rem 0 !important;
|
||||
list-style: none;
|
||||
background-color: transparent;
|
||||
|
||||
.isekai-list-item {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
min-height: 3rem;
|
||||
padding: 0 1rem;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
border-bottom: 1px solid rgba(0,0,0,.12);
|
||||
|
||||
&:hover {
|
||||
background-color: rgba(0,0,0,.08);
|
||||
}
|
||||
|
||||
&:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&:visited {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.isekai-list-item-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
min-height: 1.5rem;
|
||||
|
||||
.tag {
|
||||
opacity: 0.6;
|
||||
font-size: 0.8rem;
|
||||
padding: 2px 8px;
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.isekai-list-item-content {
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex-positive: 1;
|
||||
flex-grow: 1;
|
||||
padding-top: 0.625rem;
|
||||
padding-bottom: 0.625rem;
|
||||
font-weight: 400;
|
||||
font-size: 1rem;
|
||||
line-height: 1.25rem;
|
||||
}
|
||||
|
||||
.isekai-list-item-title~.isekai-list-item-text {
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
.isekai-list-item-text {
|
||||
font-size: 0.875rem;
|
||||
opacity: 0.54;
|
||||
-webkit-line-clamp: 1;
|
||||
height: 1.25rem;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
}
|
||||
|
||||
.skin-citizen-dark, .skin-timeless-dark {
|
||||
.isekai-list {
|
||||
a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&:visited {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@feed-list-height: 23.8rem;
|
||||
@feed-list-height-mobile: 70vh;
|
||||
|
||||
.isekai-feed-list-card > .card-header {
|
||||
height: 2.2rem;
|
||||
}
|
||||
|
||||
.isekai-feed-list {
|
||||
margin: 0;
|
||||
height: @feed-list-height;
|
||||
overflow-y: overlay;
|
||||
display: none;
|
||||
|
||||
&.mounted {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.loading {
|
||||
width: 100%;
|
||||
height: 99.5%;
|
||||
height: calc(100% - 2px); // fix: overflow because of border
|
||||
margin-top: 1px;
|
||||
display: flex;
|
||||
|
||||
.spinner {
|
||||
margin: auto;
|
||||
padding: 2rem;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 850px) {
|
||||
height: @feed-list-height-mobile;
|
||||
}
|
||||
}
|
||||
|
||||
.isekai-list {
|
||||
margin: 0 !important;
|
||||
padding: 0 0 0.5rem 0 !important;
|
||||
list-style: none;
|
||||
background-color: transparent;
|
||||
|
||||
.isekai-list-item {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
min-height: 3rem;
|
||||
padding: 0 1rem;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
border-bottom: 1px solid rgba(0,0,0,.12);
|
||||
|
||||
&:hover {
|
||||
background-color: rgba(0,0,0,.08);
|
||||
}
|
||||
|
||||
&:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&:visited {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.isekai-list-item-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
min-height: 1.5rem;
|
||||
|
||||
.tag {
|
||||
opacity: 0.6;
|
||||
font-size: 0.8rem;
|
||||
padding: 2px 8px;
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.isekai-list-item-content {
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex-positive: 1;
|
||||
flex-grow: 1;
|
||||
padding-top: 0.625rem;
|
||||
padding-bottom: 0.625rem;
|
||||
font-weight: 400;
|
||||
font-size: 1rem;
|
||||
line-height: 1.25rem;
|
||||
}
|
||||
|
||||
.isekai-list-item-title~.isekai-list-item-text {
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
.isekai-list-item-text {
|
||||
font-size: 0.875rem;
|
||||
opacity: 0.54;
|
||||
-webkit-line-clamp: 1;
|
||||
height: 1.25rem;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
}
|
||||
|
||||
.skin-citizen-dark, .skin-timeless-dark {
|
||||
.isekai-list {
|
||||
a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&:visited {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,30 +1,32 @@
|
||||
{
|
||||
"name": "isekai-widgets",
|
||||
"version": "1.0.0",
|
||||
"description": "Some custom widgets uses on Isekai Wiki",
|
||||
"scripts": {
|
||||
"build": "webpack --mode=production --node-env=production",
|
||||
"build:dev": "webpack --mode=development",
|
||||
"build:prod": "webpack --mode=production --node-env=production",
|
||||
"watch": "webpack --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.14.6",
|
||||
"@babel/preset-env": "^7.14.5",
|
||||
"autoprefixer": "^10.2.6",
|
||||
"babel-loader": "^8.2.2",
|
||||
"css-loader": "^5.2.6",
|
||||
"mini-css-extract-plugin": "^1.6.0",
|
||||
"postcss": "^8.3.5",
|
||||
"postcss-loader": "^6.1.0",
|
||||
"prettier": "^2.3.1",
|
||||
"sass": "^1.35.1",
|
||||
"sass-loader": "^12.1.0",
|
||||
"style-loader": "^2.0.0",
|
||||
"webpack": "^5.39.0",
|
||||
"webpack-cli": "^4.7.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"masonry-layout": "^4.2.2"
|
||||
}
|
||||
}
|
||||
{
|
||||
"name": "isekai-widgets",
|
||||
"version": "1.0.0",
|
||||
"description": "Some custom widgets uses on Isekai Wiki",
|
||||
"scripts": {
|
||||
"build": "webpack --mode=production --node-env=production",
|
||||
"build:dev": "webpack --mode=development",
|
||||
"build:prod": "webpack --mode=production --node-env=production",
|
||||
"watch": "webpack --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.21.8",
|
||||
"@babel/preset-env": "^7.21.5",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"babel-loader": "^9.1.2",
|
||||
"css-loader": "^6.7.3",
|
||||
"less": "^4.1.3",
|
||||
"less-loader": "^11.1.0",
|
||||
"mini-css-extract-plugin": "^2.7.5",
|
||||
"postcss": "^8.4.23",
|
||||
"postcss-loader": "^7.3.0",
|
||||
"prettier": "^2.8.8",
|
||||
"sass": "^1.62.1",
|
||||
"sass-loader": "^12.6.0",
|
||||
"style-loader": "^2.0.0",
|
||||
"webpack": "^5.82.0",
|
||||
"webpack-cli": "^5.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"masonry-layout": "^4.2.2"
|
||||
}
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
console.log("Hello World!");
|
File diff suppressed because it is too large
Load Diff
@ -1,63 +0,0 @@
|
||||
@playIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/play.svg');
|
||||
@loopIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/loop.svg');
|
||||
@stopIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/stop.svg');
|
||||
@pauseIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/pause.svg');
|
||||
@muteIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/volume-mute.svg');
|
||||
@volumeLowIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/volume-low.svg');
|
||||
@volumeMediumIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/volume-medium.svg');
|
||||
@volumeHighIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/volume-high.svg');
|
||||
@enlargeIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/enlarge.svg');
|
||||
@shrinkIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/shrink.svg');
|
||||
@playlistIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/list.svg');
|
||||
@nextIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/next.svg');
|
||||
@prevIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/prev.svg');
|
||||
@firstIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/first.svg');
|
||||
@lastIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/last.svg');
|
||||
@forwardIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/forward.svg');
|
||||
@backwardIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/backward.svg');
|
||||
@shareIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/share.svg');
|
||||
@equalizerIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/equalizer.svg');
|
||||
@ejectIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/eject.svg');
|
||||
@shuffleIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/shuffle.svg');
|
||||
@randomIconLight: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/light/dice.svg');
|
||||
|
||||
@playIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/play.svg');
|
||||
@loopIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/loop.svg');
|
||||
@stopIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/stop.svg');
|
||||
@pauseIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/pause.svg');
|
||||
@muteIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/volume-mute.svg');
|
||||
@volumeLowIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/volume-low.svg');
|
||||
@volumeMediumIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/volume-medium.svg');
|
||||
@volumeHighIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/volume-high.svg');
|
||||
@enlargeIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/enlarge.svg');
|
||||
@shrinkIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/shrink.svg');
|
||||
@playlistIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/list.svg');
|
||||
@nextIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/next.svg');
|
||||
@prevIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/prev.svg');
|
||||
@firstIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/first.svg');
|
||||
@lastIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/last.svg');
|
||||
@forwardIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/forward.svg');
|
||||
@backwardIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/backward.svg');
|
||||
@shareIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/share.svg');
|
||||
@equalizerIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/equalizer.svg');
|
||||
@ejectIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/eject.svg');
|
||||
@shuffleIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/shuffle.svg');
|
||||
@randomIconDark: data-uri('image/svg+xml;charset=UTF-8', 'source/images/media/dark/dice.svg');
|
||||
|
||||
@checkIcon: data-uri('image/svg+xml;charset=UTF-8', 'source/images/apps/checkmark.svg');
|
||||
@crossIcon: data-uri('image/svg+xml;charset=UTF-8', 'source/images/apps/cross.svg');
|
||||
@searchIcon: data-uri('image/svg+xml;charset=UTF-8', 'source/images/apps/search.svg');
|
||||
@eyeIcon: data-uri('image/svg+xml;charset=UTF-8', 'source/images/apps/eye.svg');
|
||||
@plusIcon: data-uri('image/svg+xml;charset=UTF-8', 'source/images/apps/plus.svg');
|
||||
@minusIcon: data-uri('image/svg+xml;charset=UTF-8', 'source/images/apps/minus.svg');
|
||||
@helpIcon: data-uri('image/svg+xml;charset=UTF-8', 'source/images/apps/help.svg');
|
||||
@leftArrowIcon: data-uri('image/svg+xml;charset=UTF-8', 'source/images/apps/arrow-left.svg');
|
||||
@rightArrowIcon: data-uri('image/svg+xml;charset=UTF-8', 'source/images/apps/arrow-right.svg');
|
||||
@calendarIcon: data-uri('image/svg+xml;charset=UTF-8', 'source/images/apps/calendar.svg');
|
||||
@clockIcon: data-uri('image/svg+xml;charset=UTF-8', 'source/images/apps/clock.svg');
|
||||
@menuIcon: data-uri('image/svg+xml;charset=UTF-8', 'source/images/apps/menu.svg');
|
||||
@uploadIcon: data-uri('image/svg+xml;charset=UTF-8', 'source/images/apps/upload.svg');
|
||||
@pencilIcon: data-uri('image/svg+xml;charset=UTF-8', 'source/images/apps/pencil.svg');
|
||||
@chevronLeftIcon: data-uri('image/svg+xml;charset=UTF-8', 'source/images/apps/chevron-left.svg');
|
||||
@chevronRightIcon: data-uri('image/svg+xml;charset=UTF-8', 'source/images/apps/chevron-right.svg');
|
||||
|
@ -1,54 +1,61 @@
|
||||
// Generated using webpack-cli https://github.com/webpack/webpack-cli
|
||||
|
||||
const path = require('path');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const isProduction = process.env.NODE_ENV == 'production';
|
||||
const stylesHandler = MiniCssExtractPlugin.loader;
|
||||
|
||||
const config = {
|
||||
entry: {
|
||||
'createPage': './src/createPage/ext.isekai.createPage.js',
|
||||
'discover': './src/discover/ext.isekai.discover.js'
|
||||
},
|
||||
output: {
|
||||
filename: '[name]/ext.isekai.[name].js',
|
||||
path: path.resolve(__dirname, 'modules')
|
||||
},
|
||||
plugins: [
|
||||
new MiniCssExtractPlugin(),
|
||||
// Add your plugins here
|
||||
// Learn more about plugins from https://webpack.js.org/configuration/plugins/
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.(js|jsx)$/i,
|
||||
loader: 'babel-loader',
|
||||
},
|
||||
{
|
||||
test: /\.s[ac]ss$/i,
|
||||
use: [stylesHandler, 'css-loader', 'postcss-loader', 'sass-loader'],
|
||||
},
|
||||
{
|
||||
test: /\.css$/i,
|
||||
use: [stylesHandler, 'css-loader', 'postcss-loader'],
|
||||
},
|
||||
{
|
||||
test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i,
|
||||
type: 'asset',
|
||||
},
|
||||
|
||||
// Add your rules for custom modules here
|
||||
// Learn more about loaders from https://webpack.js.org/loaders/
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = () => {
|
||||
if (isProduction) {
|
||||
config.mode = 'production';
|
||||
} else {
|
||||
config.mode = 'development';
|
||||
}
|
||||
return config;
|
||||
};
|
||||
// Generated using webpack-cli https://github.com/webpack/webpack-cli
|
||||
|
||||
const path = require('path');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const isProduction = process.env.NODE_ENV == 'production';
|
||||
const stylesHandler = MiniCssExtractPlugin.loader;
|
||||
|
||||
const config = {
|
||||
entry: {
|
||||
'createPage': './src/createPage/ext.isekai.createPage.js',
|
||||
'discover': './src/discover/ext.isekai.discover.js',
|
||||
'tile': './src/tile/ext.isekai.tile.js',
|
||||
},
|
||||
output: {
|
||||
filename: '[name]/ext.isekai.[name].js',
|
||||
path: path.resolve(__dirname, 'modules')
|
||||
},
|
||||
plugins: [
|
||||
new MiniCssExtractPlugin({
|
||||
filename: '[name]/ext.isekai.[name].css',
|
||||
}),
|
||||
// Add your plugins here
|
||||
// Learn more about plugins from https://webpack.js.org/configuration/plugins/
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.(js|jsx)$/i,
|
||||
loader: 'babel-loader',
|
||||
},
|
||||
{
|
||||
test: /\.s[ac]ss$/i,
|
||||
use: [stylesHandler, 'css-loader', 'postcss-loader', 'sass-loader'],
|
||||
},
|
||||
{
|
||||
test: /\.less$/i,
|
||||
use: [stylesHandler, 'css-loader', 'postcss-loader', 'less-loader'],
|
||||
},
|
||||
{
|
||||
test: /\.css$/i,
|
||||
use: [stylesHandler, 'css-loader', 'postcss-loader'],
|
||||
},
|
||||
{
|
||||
test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i,
|
||||
type: 'asset',
|
||||
},
|
||||
|
||||
// Add your rules for custom modules here
|
||||
// Learn more about loaders from https://webpack.js.org/loaders/
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = () => {
|
||||
if (isProduction) {
|
||||
config.mode = 'production';
|
||||
} else {
|
||||
config.mode = 'development';
|
||||
}
|
||||
return config;
|
||||
};
|
||||
|
Loading…
Reference in New Issue