ui: optimize bundle
parent
9c02ed4dd8
commit
5ae8258b8a
@ -1,32 +0,0 @@
|
||||
@import './var.inc.styl'
|
||||
|
||||
.button
|
||||
box-sizing: border-box
|
||||
border: none
|
||||
background: #c0c0c0
|
||||
border-radius: 0
|
||||
min-width: 75px;
|
||||
min-height: 23px;
|
||||
padding: 0 12px;
|
||||
|
||||
&:not(:disabled)
|
||||
&:active
|
||||
box-shadow: --border-sunken-outer, --border-sunken-inner
|
||||
padding: 2px 11px 0 13px;
|
||||
|
||||
.button.inverse
|
||||
line-height: rem($form-control-height - 4)
|
||||
border: 2px solid #FFF
|
||||
background: none
|
||||
|
||||
&, &:visited
|
||||
&, .typo &
|
||||
color: #FFF
|
||||
|
||||
&:not(.disabled)
|
||||
&:hover, &:focus
|
||||
border-color: $immersive-primary-color
|
||||
background: none
|
||||
box-shadow: none
|
||||
&, .typo &
|
||||
color: $immersive-primary-color
|
@ -1,10 +0,0 @@
|
||||
@css {
|
||||
span.cm-comment { color: #008000; }
|
||||
span.cm-keyword, span.cm-variable-3 { line-height: 1em; color: #00f; }
|
||||
span.cm-string { color: #a31515; }
|
||||
span.cm-builtin { line-height: 1em; font-weight: bold; color: #077; }
|
||||
span.cm-special { line-height: 1em; font-weight: bold; color: #0aa; }
|
||||
span.cm-variable { color: black; }
|
||||
span.cm-meta { color: #2b91af; }
|
||||
span.cm-link { color: #3a3; }
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
import $ from 'jquery';
|
||||
import { AutoloadPage } from 'vj/misc/Page';
|
||||
|
||||
const katexPage = new AutoloadPage('katexPage', () => {
|
||||
import('katex/contrib/auto-render/auto-render').then(({ default: katex }) => {
|
||||
function runKatex($containers) {
|
||||
$containers.get().forEach((container) => katex(container, {
|
||||
delimiters: [
|
||||
{ left: '$$', right: '$$', display: true },
|
||||
{ left: '$', right: '$', display: false },
|
||||
{ left: '\\(', right: '\\)', display: false },
|
||||
{ left: '\\[', right: '\\]', display: true },
|
||||
{ left: '\\begin{equation}', right: '\\end{equation}', display: true },
|
||||
{ left: '\\begin{align}', right: '\\end{align}', display: true },
|
||||
{ left: '\\begin{alignat}', right: '\\end{alignat}', display: true },
|
||||
{ left: '\\begin{gather}', right: '\\end{gather}', display: true },
|
||||
{ left: '\\begin{CD}', right: '\\end{CD}', display: true },
|
||||
],
|
||||
}));
|
||||
}
|
||||
runKatex($('.typo'));
|
||||
$(document).on('vjContentNew', (e) => runKatex($(e.target).find('.typo')));
|
||||
});
|
||||
});
|
||||
|
||||
export default katexPage;
|
@ -1,3 +0,0 @@
|
||||
import NProgress from 'nprogress';
|
||||
|
||||
export default NProgress;
|
@ -1,18 +0,0 @@
|
||||
import attachObjectMeta from './util/objectMeta';
|
||||
|
||||
export const USER_GENDER_MALE = 0;
|
||||
export const USER_GENDER_FEMALE = 1;
|
||||
export const USER_GENDER_OTHER = 2;
|
||||
export const USER_GENDERS = [USER_GENDER_MALE, USER_GENDER_FEMALE, USER_GENDER_OTHER];
|
||||
export const USER_GENDER_RANGE = {
|
||||
[USER_GENDER_MALE]: 'Boy ♂',
|
||||
[USER_GENDER_FEMALE]: 'Girl ♀',
|
||||
[USER_GENDER_OTHER]: 'Other',
|
||||
};
|
||||
attachObjectMeta(USER_GENDER_RANGE, 'intKey', true);
|
||||
export const USER_GENDER_ICONS = {
|
||||
[USER_GENDER_MALE]: '♂',
|
||||
[USER_GENDER_FEMALE]: '♀',
|
||||
[USER_GENDER_OTHER]: '?',
|
||||
};
|
||||
attachObjectMeta(USER_GENDER_ICONS, 'intKey', true);
|
@ -1,17 +0,0 @@
|
||||
import attachObjectMeta from './util/objectMeta';
|
||||
|
||||
export const PRIVACY_PUBLIC = 0;
|
||||
export const PRIVACY_REGISTERED_ONLY = 1;
|
||||
export const PRIVACY_SECRET = 2;
|
||||
export const PRIVACY_RANGE = {
|
||||
[PRIVACY_PUBLIC]: 'Public',
|
||||
[PRIVACY_REGISTERED_ONLY]: 'Visible to registered users',
|
||||
[PRIVACY_SECRET]: 'Secret',
|
||||
};
|
||||
attachObjectMeta(PRIVACY_RANGE, 'intKey', true);
|
||||
|
||||
export const FUNCTION_RANGE = {
|
||||
0: 'Disabled',
|
||||
1: 'Enabled',
|
||||
};
|
||||
attachObjectMeta(FUNCTION_RANGE, 'intKey', true);
|
@ -1,8 +0,0 @@
|
||||
export default function attachObjectMeta(obj, key, value) {
|
||||
Object.defineProperty(obj, `__${key}`, {
|
||||
value,
|
||||
enumerable: false,
|
||||
configurable: false,
|
||||
writable: false,
|
||||
});
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
export default function cloneAttributes(from, to) {
|
||||
const attributes = from.prop('attributes');
|
||||
$.each(attributes, function () {
|
||||
to.attr(this.name, this.value);
|
||||
});
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
export default function parseQueryString(str) {
|
||||
const obj = {};
|
||||
(str || document.location.search)
|
||||
.replace(/(^\?)/, '')
|
||||
.split('&')
|
||||
.forEach((n) => {
|
||||
const [key, value] = n.split('=').map((v) => decodeURIComponent(v));
|
||||
obj[key] = value;
|
||||
});
|
||||
return obj;
|
||||
}
|
||||
|
||||
window.Hydro.utils.parseQueryString = parseQueryString;
|
Loading…
Reference in New Issue