hexo-component-inferno 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/core/migrate.js +10 -28
- package/lib/core/migrate.test.js +10 -12
- package/lib/core/schema.js +33 -109
- package/lib/core/schema.test.js +2 -6
- package/lib/core/view.js +3 -10
- package/lib/core/view.test.js +0 -7
- package/lib/hexo/filter/locals.js +3 -18
- package/lib/hexo/filter/locals.test.js +2 -19
- package/lib/hexo/generator/assets.js +2 -8
- package/lib/hexo/generator/assets.test.js +0 -4
- package/lib/hexo/generator/categories.test.js +0 -3
- package/lib/hexo/generator/category.js +1 -6
- package/lib/hexo/generator/category.test.js +0 -5
- package/lib/hexo/generator/insight.js +1 -9
- package/lib/hexo/generator/insight.test.js +0 -3
- package/lib/hexo/generator/manifest.js +0 -3
- package/lib/hexo/generator/manifest.test.js +0 -3
- package/lib/hexo/generator/tags.test.js +0 -3
- package/lib/hexo/helper/cdn.js +6 -19
- package/lib/hexo/helper/cdn.test.js +0 -3
- package/lib/hexo/helper/page.test.js +0 -3
- package/lib/hexo/tag/message.js +0 -8
- package/lib/hexo/tag/message.test.js +0 -7
- package/lib/hexo/tag/tabs.js +3 -35
- package/lib/hexo/tag/tabs.test.js +0 -8
- package/lib/util/cache.js +0 -11
- package/lib/util/cache.test.js +0 -4
- package/lib/util/classname.js +0 -3
- package/lib/util/classname.test.js +0 -1
- package/lib/util/yaml.js +2 -7
- package/lib/util/yaml.test.js +0 -4
- package/lib/view/comment/changyan.js +12 -31
- package/lib/view/comment/disqus.js +11 -32
- package/lib/view/comment/disqusjs.js +22 -43
- package/lib/view/comment/facebook.js +9 -28
- package/lib/view/comment/gitalk.js +28 -49
- package/lib/view/comment/gitment.js +15 -37
- package/lib/view/comment/isso.js +6 -27
- package/lib/view/comment/livere.js +6 -27
- package/lib/view/comment/twikoo.js +14 -33
- package/lib/view/comment/utterances.js +17 -45
- package/lib/view/comment/valine.js +39 -60
- package/lib/view/comment/waline.js +45 -66
- package/lib/view/common/article_media.js +11 -28
- package/lib/view/donate/afdian.js +9 -30
- package/lib/view/donate/alipay.js +9 -30
- package/lib/view/donate/buymeacoffee.js +9 -30
- package/lib/view/donate/patreon.js +9 -30
- package/lib/view/donate/paypal.js +10 -31
- package/lib/view/donate/wechat.js +9 -30
- package/lib/view/misc/article_licensing.js +21 -43
- package/lib/view/misc/meta.js +7 -34
- package/lib/view/misc/open_graph.js +25 -67
- package/lib/view/misc/paginator.js +12 -36
- package/lib/view/misc/structured_data.js +16 -43
- package/lib/view/misc/web_app.js +16 -50
- package/lib/view/plugin/baidu_analytics.js +7 -28
- package/lib/view/plugin/bing_webmaster.js +7 -28
- package/lib/view/plugin/busuanzi.js +6 -26
- package/lib/view/plugin/cnzz.js +9 -30
- package/lib/view/plugin/cookie_consent.js +28 -49
- package/lib/view/plugin/gallery.js +10 -31
- package/lib/view/plugin/google_analytics.js +7 -28
- package/lib/view/plugin/hotjar.js +7 -28
- package/lib/view/plugin/katex.js +11 -32
- package/lib/view/plugin/mathjax.js +7 -28
- package/lib/view/plugin/outdated_browser.js +10 -31
- package/lib/view/plugin/progressbar.js +7 -28
- package/lib/view/plugin/statcounter.js +10 -31
- package/lib/view/plugin/twitter_conversion_tracking.js +7 -28
- package/lib/view/search/algolia.js +14 -35
- package/lib/view/search/baidu.js +9 -28
- package/lib/view/search/google_cse.js +10 -30
- package/lib/view/search/insight.js +9 -28
- package/lib/view/share/addthis.js +6 -27
- package/lib/view/share/addtoany.js +6 -25
- package/lib/view/share/bdshare.js +6 -25
- package/lib/view/share/sharejs.js +8 -27
- package/lib/view/share/sharethis.js +6 -27
- package/lib/view/widget/adsense.js +11 -32
- package/lib/view/widget/archives.js +26 -52
- package/lib/view/widget/categories.js +25 -57
- package/lib/view/widget/followit.js +12 -31
- package/lib/view/widget/links.js +27 -39
- package/lib/view/widget/recent_posts.js +15 -36
- package/lib/view/widget/subscribe_email.js +12 -31
- package/lib/view/widget/tags.js +16 -39
- package/lib/view/widget/toc.js +27 -67
- package/package.json +1 -1
|
@@ -1,38 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
4
|
var _inferno = require("inferno");
|
|
6
|
-
|
|
7
5
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
|
-
|
|
9
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
10
|
-
|
|
6
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
11
7
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
12
|
-
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
10
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
14
|
-
|
|
15
11
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
16
|
-
|
|
17
12
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
18
|
-
|
|
19
13
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
20
|
-
|
|
21
14
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
|
-
|
|
23
15
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
24
|
-
|
|
25
16
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
26
|
-
|
|
27
17
|
/**
|
|
28
18
|
* Waline comment JSX component.
|
|
29
19
|
* @module view/comment/waline
|
|
30
20
|
*/
|
|
31
21
|
var _require = require('inferno'),
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
Component = _require.Component;
|
|
34
23
|
var _require2 = require('../../util/cache'),
|
|
35
|
-
|
|
24
|
+
cacheComponent = _require2.cacheComponent;
|
|
25
|
+
|
|
36
26
|
/**
|
|
37
27
|
* Waline comment JSX component.
|
|
38
28
|
*
|
|
@@ -60,64 +50,56 @@ var _require2 = require('../../util/cache'),
|
|
|
60
50
|
* copyright={true}
|
|
61
51
|
* jsUrl="/path/to/Waline.js" />
|
|
62
52
|
*/
|
|
63
|
-
|
|
64
|
-
|
|
65
53
|
var Waline = /*#__PURE__*/function (_Component) {
|
|
66
54
|
_inherits(Waline, _Component);
|
|
67
|
-
|
|
68
55
|
var _super = _createSuper(Waline);
|
|
69
|
-
|
|
70
56
|
function Waline() {
|
|
71
57
|
_classCallCheck(this, Waline);
|
|
72
|
-
|
|
73
58
|
return _super.apply(this, arguments);
|
|
74
59
|
}
|
|
75
|
-
|
|
76
60
|
_createClass(Waline, [{
|
|
77
61
|
key: "render",
|
|
78
62
|
value: function render() {
|
|
79
63
|
var _this$props = this.props,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
64
|
+
serverURL = _this$props.serverURL,
|
|
65
|
+
_this$props$path = _this$props.path,
|
|
66
|
+
path = _this$props$path === void 0 ? 'window.location.pathname' : _this$props$path,
|
|
67
|
+
_this$props$lang = _this$props.lang,
|
|
68
|
+
lang = _this$props$lang === void 0 ? 'zh-CN' : _this$props$lang,
|
|
69
|
+
locale = _this$props.locale,
|
|
70
|
+
_this$props$emoji = _this$props.emoji,
|
|
71
|
+
emoji = _this$props$emoji === void 0 ? ['https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo'] : _this$props$emoji,
|
|
72
|
+
_this$props$dark = _this$props.dark,
|
|
73
|
+
dark = _this$props$dark === void 0 ? '' : _this$props$dark,
|
|
74
|
+
_this$props$meta = _this$props.meta,
|
|
75
|
+
meta = _this$props$meta === void 0 ? ['nick', 'mail', 'link'] : _this$props$meta,
|
|
76
|
+
_this$props$requiredM = _this$props.requiredMeta,
|
|
77
|
+
requiredMeta = _this$props$requiredM === void 0 ? [] : _this$props$requiredM,
|
|
78
|
+
_this$props$login = _this$props.login,
|
|
79
|
+
login = _this$props$login === void 0 ? 'enable' : _this$props$login,
|
|
80
|
+
_this$props$wordLimit = _this$props.wordLimit,
|
|
81
|
+
wordLimit = _this$props$wordLimit === void 0 ? 0 : _this$props$wordLimit,
|
|
82
|
+
_this$props$pageSize = _this$props.pageSize,
|
|
83
|
+
pageSize = _this$props$pageSize === void 0 ? 10 : _this$props$pageSize,
|
|
84
|
+
_this$props$imageUplo = _this$props.imageUploader,
|
|
85
|
+
imageUploader = _this$props$imageUplo === void 0 ? false : _this$props$imageUplo,
|
|
86
|
+
_this$props$highlight = _this$props.highlighter,
|
|
87
|
+
highlighter = _this$props$highlight === void 0 ? false : _this$props$highlight,
|
|
88
|
+
_this$props$texRender = _this$props.texRenderer,
|
|
89
|
+
texRenderer = _this$props$texRender === void 0 ? false : _this$props$texRender,
|
|
90
|
+
_this$props$search = _this$props.search,
|
|
91
|
+
search = _this$props$search === void 0 ? false : _this$props$search,
|
|
92
|
+
_this$props$pageview = _this$props.pageview,
|
|
93
|
+
pageview = _this$props$pageview === void 0 ? false : _this$props$pageview,
|
|
94
|
+
_this$props$comment = _this$props.comment,
|
|
95
|
+
comment = _this$props$comment === void 0 ? false : _this$props$comment,
|
|
96
|
+
_this$props$copyright = _this$props.copyright,
|
|
97
|
+
copyright = _this$props$copyright === void 0 ? true : _this$props$copyright,
|
|
98
|
+
jsUrl = _this$props.jsUrl,
|
|
99
|
+
cssUrl = _this$props.cssUrl;
|
|
117
100
|
if (!serverURL) {
|
|
118
101
|
return (0, _inferno.createVNode)(1, "div", "notification is-danger", [(0, _inferno.createTextVNode)("You forgot to set the "), (0, _inferno.createVNode)(1, "code", null, "server_url", 16), (0, _inferno.createTextVNode)(" for Waline. Please set it in"), (0, _inferno.createTextVNode)(' '), (0, _inferno.createVNode)(1, "code", null, "_config.yml", 16), (0, _inferno.createTextVNode)(".")], 0);
|
|
119
102
|
}
|
|
120
|
-
|
|
121
103
|
var js = "Waline.init({\n el: '#waline-thread',\n serverURL: ".concat(JSON.stringify(serverURL), ",\n path: ").concat(path, ",\n ").concat(lang ? "lang: ".concat(JSON.stringify(lang), ",") : '', "\n ").concat(locale ? "locale: ".concat(JSON.stringify(locale), ",") : '', "\n ").concat(emoji ? "emoji: ".concat(JSON.stringify(emoji), ",") : '', "\n ").concat(dark ? "dark: ".concat(JSON.stringify(dark), ",") : '', "\n ").concat(meta ? "meta: ".concat(JSON.stringify(meta), ",") : '', "\n ").concat(Array.isArray(requiredMeta) ? "requiredMeta: ".concat(JSON.stringify(requiredMeta), ",") : '', "\n ").concat(login ? "login: ".concat(JSON.stringify(login), ",") : '', "\n ").concat(wordLimit ? "wordLimit: ".concat(JSON.stringify(wordLimit), ",") : '', "\n ").concat(pageSize ? "pageSize: ".concat(JSON.stringify(pageSize), ",") : '', "\n ").concat(imageUploader === false ? "imageUploader: false," : '', "\n ").concat(highlighter === false ? "highlighter: false," : '', "\n ").concat(texRenderer === false ? "texRenderer: false," : '', "\n ").concat(search === false ? "search: false," : '', "\n ").concat(typeof pageview !== 'undefined' ? "pageview: ".concat(JSON.stringify(pageview), ",") : '', "\n ").concat(typeof comment !== 'undefined' ? "comment: ".concat(JSON.stringify(comment), ",") : '', "\n ", "copyright: ".concat(JSON.stringify(copyright), ","), "\n });");
|
|
122
104
|
return (0, _inferno.createFragment)([(0, _inferno.createVNode)(1, "div", "content", null, 1, {
|
|
123
105
|
"id": "waline-thread"
|
|
@@ -133,7 +115,6 @@ var Waline = /*#__PURE__*/function (_Component) {
|
|
|
133
115
|
})], 4);
|
|
134
116
|
}
|
|
135
117
|
}]);
|
|
136
|
-
|
|
137
118
|
return Waline;
|
|
138
119
|
}(Component);
|
|
139
120
|
/**
|
|
@@ -167,13 +148,11 @@ var Waline = /*#__PURE__*/function (_Component) {
|
|
|
167
148
|
* }}
|
|
168
149
|
* helper={{ cdn: function() {...} }} />
|
|
169
150
|
*/
|
|
170
|
-
|
|
171
|
-
|
|
172
151
|
Waline.Cacheable = cacheComponent(Waline, 'comment.waline', function (props) {
|
|
173
152
|
var comment = props.comment,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
153
|
+
helper = props.helper,
|
|
154
|
+
page = props.page,
|
|
155
|
+
config = props.config;
|
|
177
156
|
return {
|
|
178
157
|
serverURL: comment.server_url,
|
|
179
158
|
path: comment.path,
|
|
@@ -1,35 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
4
|
var _inferno = require("inferno");
|
|
6
|
-
|
|
7
5
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
|
-
|
|
9
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
10
|
-
|
|
6
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
11
7
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
12
|
-
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
10
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
14
|
-
|
|
15
11
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
16
|
-
|
|
17
12
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
18
|
-
|
|
19
13
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
20
|
-
|
|
21
14
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
|
-
|
|
23
15
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
24
|
-
|
|
25
16
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
26
|
-
|
|
27
17
|
/**
|
|
28
18
|
* A simple article overview JSX component.
|
|
29
19
|
* @module view/common/article_media
|
|
30
20
|
*/
|
|
31
21
|
var _require = require('inferno'),
|
|
32
|
-
|
|
22
|
+
Component = _require.Component;
|
|
23
|
+
|
|
33
24
|
/**
|
|
34
25
|
* A simple article overview JSX component.
|
|
35
26
|
*
|
|
@@ -45,35 +36,28 @@ var _require = require('inferno'),
|
|
|
45
36
|
* { url: '/path/to/category', name: 'Category name' }
|
|
46
37
|
* ]} />
|
|
47
38
|
*/
|
|
48
|
-
|
|
49
|
-
|
|
50
39
|
module.exports = /*#__PURE__*/function (_Component) {
|
|
51
40
|
_inherits(_class, _Component);
|
|
52
|
-
|
|
53
41
|
var _super = _createSuper(_class);
|
|
54
|
-
|
|
55
42
|
function _class() {
|
|
56
43
|
_classCallCheck(this, _class);
|
|
57
|
-
|
|
58
44
|
return _super.apply(this, arguments);
|
|
59
45
|
}
|
|
60
|
-
|
|
61
46
|
_createClass(_class, [{
|
|
62
47
|
key: "render",
|
|
63
48
|
value: function render() {
|
|
64
49
|
var _this$props = this.props,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
50
|
+
thumbnail = _this$props.thumbnail,
|
|
51
|
+
url = _this$props.url,
|
|
52
|
+
title = _this$props.title,
|
|
53
|
+
date = _this$props.date,
|
|
54
|
+
dateXml = _this$props.dateXml,
|
|
55
|
+
categories = _this$props.categories;
|
|
71
56
|
var categoryTags = [];
|
|
72
57
|
categories.forEach(function (category, i) {
|
|
73
58
|
categoryTags.push((0, _inferno.createVNode)(1, "a", null, category.name, 0, {
|
|
74
59
|
"href": category.url
|
|
75
60
|
}));
|
|
76
|
-
|
|
77
61
|
if (i < categories.length - 1) {
|
|
78
62
|
categoryTags.push(' / ');
|
|
79
63
|
}
|
|
@@ -90,6 +74,5 @@ module.exports = /*#__PURE__*/function (_Component) {
|
|
|
90
74
|
}), 2), categoryTags.length ? (0, _inferno.createVNode)(1, "p", "categories", categoryTags, 0) : null], 0)], 0);
|
|
91
75
|
}
|
|
92
76
|
}]);
|
|
93
|
-
|
|
94
77
|
return _class;
|
|
95
78
|
}(Component);
|
|
@@ -1,38 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
4
|
var _inferno = require("inferno");
|
|
6
|
-
|
|
7
5
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
|
-
|
|
9
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
10
|
-
|
|
6
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
11
7
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
12
|
-
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
10
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
14
|
-
|
|
15
11
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
16
|
-
|
|
17
12
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
18
|
-
|
|
19
13
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
20
|
-
|
|
21
14
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
|
-
|
|
23
15
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
24
|
-
|
|
25
16
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
26
|
-
|
|
27
17
|
/**
|
|
28
18
|
* Afdian.net donation JSX component.
|
|
29
19
|
* @module view/donate/afdian
|
|
30
20
|
*/
|
|
31
21
|
var _require = require('inferno'),
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
Component = _require.Component;
|
|
34
23
|
var _require2 = require('../../util/cache'),
|
|
35
|
-
|
|
24
|
+
cacheComponent = _require2.cacheComponent;
|
|
25
|
+
|
|
36
26
|
/**
|
|
37
27
|
* Afdian donation JSX component.
|
|
38
28
|
*
|
|
@@ -41,30 +31,22 @@ var _require2 = require('../../util/cache'),
|
|
|
41
31
|
* title="******"
|
|
42
32
|
* url="/path/to/url" />
|
|
43
33
|
*/
|
|
44
|
-
|
|
45
|
-
|
|
46
34
|
var Afdian = /*#__PURE__*/function (_Component) {
|
|
47
35
|
_inherits(Afdian, _Component);
|
|
48
|
-
|
|
49
36
|
var _super = _createSuper(Afdian);
|
|
50
|
-
|
|
51
37
|
function Afdian() {
|
|
52
38
|
_classCallCheck(this, Afdian);
|
|
53
|
-
|
|
54
39
|
return _super.apply(this, arguments);
|
|
55
40
|
}
|
|
56
|
-
|
|
57
41
|
_createClass(Afdian, [{
|
|
58
42
|
key: "render",
|
|
59
43
|
value: function render() {
|
|
60
44
|
var _this$props = this.props,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
45
|
+
title = _this$props.title,
|
|
46
|
+
url = _this$props.url;
|
|
64
47
|
if (!url) {
|
|
65
48
|
return (0, _inferno.createVNode)(1, "div", "notification is-danger", [(0, _inferno.createTextVNode)("You forgot to set the "), (0, _inferno.createVNode)(1, "code", null, "url", 16), (0, _inferno.createTextVNode)(" for Afdian. Please set it in"), (0, _inferno.createTextVNode)(' '), (0, _inferno.createVNode)(1, "code", null, "_config.yml", 16), (0, _inferno.createTextVNode)(".")], 0);
|
|
66
49
|
}
|
|
67
|
-
|
|
68
50
|
return (0, _inferno.createVNode)(1, "a", "button donate", [(0, _inferno.createVNode)(1, "span", "icon is-small", (0, _inferno.createVNode)(1, "i", "fas fa-charging-station"), 2), (0, _inferno.createVNode)(1, "span", null, title, 0)], 4, {
|
|
69
51
|
"href": url,
|
|
70
52
|
"target": "_blank",
|
|
@@ -73,7 +55,6 @@ var Afdian = /*#__PURE__*/function (_Component) {
|
|
|
73
55
|
});
|
|
74
56
|
}
|
|
75
57
|
}]);
|
|
76
|
-
|
|
77
58
|
return Afdian;
|
|
78
59
|
}(Component);
|
|
79
60
|
/**
|
|
@@ -91,11 +72,9 @@ var Afdian = /*#__PURE__*/function (_Component) {
|
|
|
91
72
|
* url_for: function() {...}
|
|
92
73
|
* }} />
|
|
93
74
|
*/
|
|
94
|
-
|
|
95
|
-
|
|
96
75
|
Afdian.Cacheable = cacheComponent(Afdian, 'donate.afdian', function (props) {
|
|
97
76
|
var donate = props.donate,
|
|
98
|
-
|
|
77
|
+
helper = props.helper;
|
|
99
78
|
return {
|
|
100
79
|
title: helper.__('donate.' + donate.type),
|
|
101
80
|
url: helper.url_for(donate.url)
|
|
@@ -1,38 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
4
|
var _inferno = require("inferno");
|
|
6
|
-
|
|
7
5
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
|
-
|
|
9
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
10
|
-
|
|
6
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
11
7
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
12
|
-
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
10
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
14
|
-
|
|
15
11
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
16
|
-
|
|
17
12
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
18
|
-
|
|
19
13
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
20
|
-
|
|
21
14
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
|
-
|
|
23
15
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
24
|
-
|
|
25
16
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
26
|
-
|
|
27
17
|
/**
|
|
28
18
|
* Alipay donation JSX component.
|
|
29
19
|
* @module view/donate/alipay
|
|
30
20
|
*/
|
|
31
21
|
var _require = require('inferno'),
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
Component = _require.Component;
|
|
34
23
|
var _require2 = require('../../util/cache'),
|
|
35
|
-
|
|
24
|
+
cacheComponent = _require2.cacheComponent;
|
|
25
|
+
|
|
36
26
|
/**
|
|
37
27
|
* Alipay donation JSX component.
|
|
38
28
|
*
|
|
@@ -41,30 +31,22 @@ var _require2 = require('../../util/cache'),
|
|
|
41
31
|
* title="******"
|
|
42
32
|
* qrcode="/path/to/qrcode" />
|
|
43
33
|
*/
|
|
44
|
-
|
|
45
|
-
|
|
46
34
|
var Alipay = /*#__PURE__*/function (_Component) {
|
|
47
35
|
_inherits(Alipay, _Component);
|
|
48
|
-
|
|
49
36
|
var _super = _createSuper(Alipay);
|
|
50
|
-
|
|
51
37
|
function Alipay() {
|
|
52
38
|
_classCallCheck(this, Alipay);
|
|
53
|
-
|
|
54
39
|
return _super.apply(this, arguments);
|
|
55
40
|
}
|
|
56
|
-
|
|
57
41
|
_createClass(Alipay, [{
|
|
58
42
|
key: "render",
|
|
59
43
|
value: function render() {
|
|
60
44
|
var _this$props = this.props,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
45
|
+
title = _this$props.title,
|
|
46
|
+
qrcode = _this$props.qrcode;
|
|
64
47
|
if (!qrcode) {
|
|
65
48
|
return (0, _inferno.createVNode)(1, "div", "notification is-danger", [(0, _inferno.createTextVNode)("You forgot to set the "), (0, _inferno.createVNode)(1, "code", null, "qrcode", 16), (0, _inferno.createTextVNode)(" for Alipay. Please set it in"), (0, _inferno.createTextVNode)(' '), (0, _inferno.createVNode)(1, "code", null, "_config.yml", 16), (0, _inferno.createTextVNode)(".")], 0);
|
|
66
49
|
}
|
|
67
|
-
|
|
68
50
|
return (0, _inferno.createVNode)(1, "a", "button donate", [(0, _inferno.createVNode)(1, "span", "icon is-small", (0, _inferno.createVNode)(1, "i", "fab fa-alipay"), 2), (0, _inferno.createVNode)(1, "span", null, title, 0), (0, _inferno.createVNode)(1, "span", "qrcode", (0, _inferno.createVNode)(1, "img", null, null, 1, {
|
|
69
51
|
"src": qrcode,
|
|
70
52
|
"alt": title
|
|
@@ -73,7 +55,6 @@ var Alipay = /*#__PURE__*/function (_Component) {
|
|
|
73
55
|
});
|
|
74
56
|
}
|
|
75
57
|
}]);
|
|
76
|
-
|
|
77
58
|
return Alipay;
|
|
78
59
|
}(Component);
|
|
79
60
|
/**
|
|
@@ -91,11 +72,9 @@ var Alipay = /*#__PURE__*/function (_Component) {
|
|
|
91
72
|
* url_for: function() {...}
|
|
92
73
|
* }} />
|
|
93
74
|
*/
|
|
94
|
-
|
|
95
|
-
|
|
96
75
|
Alipay.Cacheable = cacheComponent(Alipay, 'donate.alipay', function (props) {
|
|
97
76
|
var donate = props.donate,
|
|
98
|
-
|
|
77
|
+
helper = props.helper;
|
|
99
78
|
return {
|
|
100
79
|
title: helper.__('donate.' + donate.type),
|
|
101
80
|
qrcode: helper.url_for(donate.qrcode)
|
|
@@ -1,38 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
4
|
var _inferno = require("inferno");
|
|
6
|
-
|
|
7
5
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
|
-
|
|
9
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
10
|
-
|
|
6
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
11
7
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
12
|
-
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
13
10
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
14
|
-
|
|
15
11
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
16
|
-
|
|
17
12
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
18
|
-
|
|
19
13
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
20
|
-
|
|
21
14
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
|
-
|
|
23
15
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
24
|
-
|
|
25
16
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
26
|
-
|
|
27
17
|
/**
|
|
28
18
|
* "Buy me a coffee" donation JSX component.
|
|
29
19
|
* @module view/donate/buymeacoffee
|
|
30
20
|
*/
|
|
31
21
|
var _require = require('inferno'),
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
Component = _require.Component;
|
|
34
23
|
var _require2 = require('../../util/cache'),
|
|
35
|
-
|
|
24
|
+
cacheComponent = _require2.cacheComponent;
|
|
25
|
+
|
|
36
26
|
/**
|
|
37
27
|
* "Buy me a coffee" donation JSX component.
|
|
38
28
|
*
|
|
@@ -41,30 +31,22 @@ var _require2 = require('../../util/cache'),
|
|
|
41
31
|
* title="******"
|
|
42
32
|
* url="/path/to/buymeacoffee/page" />
|
|
43
33
|
*/
|
|
44
|
-
|
|
45
|
-
|
|
46
34
|
var BuyMeACoffee = /*#__PURE__*/function (_Component) {
|
|
47
35
|
_inherits(BuyMeACoffee, _Component);
|
|
48
|
-
|
|
49
36
|
var _super = _createSuper(BuyMeACoffee);
|
|
50
|
-
|
|
51
37
|
function BuyMeACoffee() {
|
|
52
38
|
_classCallCheck(this, BuyMeACoffee);
|
|
53
|
-
|
|
54
39
|
return _super.apply(this, arguments);
|
|
55
40
|
}
|
|
56
|
-
|
|
57
41
|
_createClass(BuyMeACoffee, [{
|
|
58
42
|
key: "render",
|
|
59
43
|
value: function render() {
|
|
60
44
|
var _this$props = this.props,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
45
|
+
title = _this$props.title,
|
|
46
|
+
url = _this$props.url;
|
|
64
47
|
if (!url) {
|
|
65
48
|
return (0, _inferno.createVNode)(1, "div", "notification is-danger", [(0, _inferno.createTextVNode)("You forgot to set the "), (0, _inferno.createVNode)(1, "code", null, "url", 16), (0, _inferno.createTextVNode)(" for \"Buy me a coffee\". Please set it in"), (0, _inferno.createTextVNode)(' '), (0, _inferno.createVNode)(1, "code", null, "_config.yml", 16), (0, _inferno.createTextVNode)(".")], 0);
|
|
66
49
|
}
|
|
67
|
-
|
|
68
50
|
return (0, _inferno.createVNode)(1, "a", "button donate", [(0, _inferno.createVNode)(1, "span", "icon is-small", (0, _inferno.createVNode)(1, "i", "fas fa-coffee"), 2), (0, _inferno.createVNode)(1, "span", null, title, 0)], 4, {
|
|
69
51
|
"href": url,
|
|
70
52
|
"target": "_blank",
|
|
@@ -73,7 +55,6 @@ var BuyMeACoffee = /*#__PURE__*/function (_Component) {
|
|
|
73
55
|
});
|
|
74
56
|
}
|
|
75
57
|
}]);
|
|
76
|
-
|
|
77
58
|
return BuyMeACoffee;
|
|
78
59
|
}(Component);
|
|
79
60
|
/**
|
|
@@ -91,11 +72,9 @@ var BuyMeACoffee = /*#__PURE__*/function (_Component) {
|
|
|
91
72
|
* url_for: function() {...}
|
|
92
73
|
* }} />
|
|
93
74
|
*/
|
|
94
|
-
|
|
95
|
-
|
|
96
75
|
BuyMeACoffee.Cacheable = cacheComponent(BuyMeACoffee, 'donate.buymeacoffee', function (props) {
|
|
97
76
|
var donate = props.donate,
|
|
98
|
-
|
|
77
|
+
helper = props.helper;
|
|
99
78
|
return {
|
|
100
79
|
url: helper.url_for(donate.url),
|
|
101
80
|
title: helper.__('donate.' + donate.type)
|