Merge branch 'develop' into feature/custom-note-url-base

Signed-off-by: Raccoon <raccoon@hackmd.io>
This commit is contained in:
Raccoon 2021-07-24 01:05:56 +08:00
commit cc4cec1459
No known key found for this signature in database
GPG Key ID: 06770355DC9ECD38
17 changed files with 138 additions and 147 deletions

View File

@ -1,8 +1,10 @@
ARG RUNTIME
ARG BUILDPACK
FROM hackmdio/buildpack:node-10-0baafb79 as BUILD
FROM $BUILDPACK as BUILD
COPY --chown=hackmd:hackmd . .
ENV QT_QPA_PLATFORM=offscreen
RUN set -xe && \
git reset --hard && \
@ -18,6 +20,7 @@ RUN set -xe && \
FROM $RUNTIME
USER hackmd
ENV QT_QPA_PLATFORM=offscreen
WORKDIR /home/hackmd/app
COPY --chown=1500:1500 --from=BUILD /home/hackmd/app .
RUN npm install --production && npm cache clean --force && rm -rf /tmp/{core-js-banners,phantomjs}

View File

@ -1,8 +1,13 @@
#!/usr/bin/env bash
set -euo pipefail
set -eo pipefail
set -x
if [[ -z $1 || -z $2 ]];then
echo "build.sh [runtime image] [buildpack image]"
exit 1
fi
CURRENT_DIR=$(dirname "$BASH_SOURCE")
GIT_SHA1="$(git rev-parse HEAD)"
@ -11,6 +16,6 @@ GIT_TAG=$(git describe --exact-match --tags $(git log -n1 --pretty='%h') 2>/dev/
DOCKER_TAG="${GIT_TAG:-$GIT_SHORT_ID}"
docker build --build-arg RUNTIME=hackmdio/runtime:node-10-d27854ef -t "hackmdio/hackmd:$DOCKER_TAG" -f "$CURRENT_DIR/Dockerfile" "$CURRENT_DIR/.."
docker build --build-arg RUNTIME=$1 --build-arg BUILDPACK=$2 -t "hackmdio/hackmd:$DOCKER_TAG" -f "$CURRENT_DIR/Dockerfile" "$CURRENT_DIR/.."
docker build --build-arg RUNTIME=hackmdio/runtime:node-10-cjk-d27854ef -t "hackmdio/hackmd:$DOCKER_TAG-cjk" -f "$CURRENT_DIR/Dockerfile" "$CURRENT_DIR/.."
docker build --build-arg RUNTIME=$1 --build-arg BUILDPACK=$2 -t "hackmdio/hackmd:$DOCKER_TAG-cjk" -f "$CURRENT_DIR/Dockerfile" "$CURRENT_DIR/.."

View File

@ -27,6 +27,8 @@ import { renderFretBoard } from './lib/renderer/fretboard/fretboard'
import './lib/renderer/lightbox'
import { renderCSVPreview } from './lib/renderer/csvpreview'
import { escapeAttrValue } from './render'
import markdownit from 'markdown-it'
import markdownitContainer from 'markdown-it-container'
@ -202,18 +204,15 @@ export function parseMeta (md, edit, view, toc, tocAffix) {
dir = meta.dir
breaks = meta.breaks
}
if (!lang || typeof lang !== 'string') {
lang = 'en'
}
// text language
if (lang && typeof lang === 'string') {
view.attr('lang', lang)
toc.attr('lang', lang)
tocAffix.attr('lang', lang)
if (edit) { edit.attr('lang', lang) }
} else {
view.removeAttr('lang')
toc.removeAttr('lang')
tocAffix.removeAttr('lang')
if (edit) { edit.removeAttr('lang', lang) }
}
// text direction
if (dir && typeof dir === 'string') {
view.attr('dir', dir)
@ -817,8 +816,8 @@ export function exportToHTML (view) {
html: src[0].outerHTML,
'ui-toc': toc.html(),
'ui-toc-affix': tocAffix.html(),
lang: (md && md.meta && md.meta.lang) ? `lang="${md.meta.lang}"` : null,
dir: (md && md.meta && md.meta.dir) ? `dir="${md.meta.dir}"` : null
lang: (md && md.meta && md.meta.lang) ? `lang="${escapeAttrValue(md.meta.lang)}"` : null,
dir: (md && md.meta && md.meta.dir) ? `dir="${escapeAttrValue(md.meta.dir)}"` : null
}
const html = template(context)
// console.log(html);
@ -875,13 +874,16 @@ let tocExpand = false
function checkExpandToggle () {
const toc = $('.ui-toc-dropdown .toc')
const toggle = $('.expand-toggle')
const expand = $('.expand-toggle.expand-all')
const collapse = $('.expand-toggle.collapse-all')
if (!tocExpand) {
toc.removeClass('expand')
toggle.text('Expand all')
expand.show()
collapse.hide()
} else {
toc.addClass('expand')
toggle.text('Collapse all')
expand.hide()
collapse.show()
}
}
@ -904,11 +906,12 @@ export function generateToc (id) {
})
/* eslint-enable no-unused-vars */
if (target.text() === 'undefined') { target.html('') }
const tocMenu = $('<div class="toc-menu"></div')
const toggle = $('<a class="expand-toggle" href="#">Expand all</a>')
const backtotop = $('<a class="back-to-top" href="#">Back to top</a>')
const gotobottom = $('<a class="go-to-bottom" href="#">Go to bottom</a>')
checkExpandToggle()
const tocMenu = $('body').children('.toc-menu')
target.append(tocMenu.clone().show())
const toggle = $('.expand-toggle', target)
const backtotop = $('.back-to-top', target)
const gotobottom = $('.go-to-bottom', target)
toggle.click(e => {
e.preventDefault()
e.stopPropagation()
@ -927,8 +930,6 @@ export function generateToc (id) {
if (window.scrollToBottom) { window.scrollToBottom() }
removeHash()
})
tocMenu.append(toggle).append(backtotop).append(gotobottom)
target.append(tocMenu)
}
// smooth all hash trigger scrolling

View File

@ -239,21 +239,9 @@ const supportExtraTags = [
}
]
const statusType = {
connected: {
msg: 'CONNECTED',
label: 'label-warning',
fa: 'fa-wifi'
},
online: {
msg: 'ONLINE',
label: 'label-primary',
fa: 'fa-users'
},
offline: {
msg: 'OFFLINE',
label: 'label-danger',
fa: 'fa-plug'
}
connected: 1,
online: 2,
offline: 3
}
// global vars
@ -725,43 +713,23 @@ function checkTocStyle () {
function showStatus (type, num) {
currentStatus = type
var shortStatus = ui.toolbar.shortStatus
var status = ui.toolbar.status
var label = $('<span class="label"></span>')
var fa = $('<i class="fa"></i>')
var msg = ''
var shortMsg = ''
shortStatus.html('')
status.html('')
ui.toolbar.statusConnected.hide()
ui.toolbar.statusOnline.hide()
ui.toolbar.statusOffline.hide()
switch (currentStatus) {
case statusType.connected:
label.addClass(statusType.connected.label)
fa.addClass(statusType.connected.fa)
msg = statusType.connected.msg
ui.toolbar.statusConnected.show()
break
case statusType.online:
label.addClass(statusType.online.label)
fa.addClass(statusType.online.fa)
shortMsg = num
msg = num + ' ' + statusType.online.msg
ui.toolbar.statusShortMsg.text(num)
ui.toolbar.statusOnline.show()
break
case statusType.offline:
label.addClass(statusType.offline.label)
fa.addClass(statusType.offline.fa)
msg = statusType.offline.msg
ui.toolbar.statusOffline.show()
break
}
label.append(fa)
var shortLabel = label.clone()
shortLabel.append(' ' + shortMsg)
shortStatus.append(shortLabel)
label.append(' ' + msg)
status.append(label)
}
function toggleMode () {
@ -1707,41 +1675,34 @@ function updatePermission (newPermission) {
permission = newPermission
if (window.loaded) refreshView()
}
var label = null
var title = null
ui.infobar.permission.label.hide()
switch (permission) {
case 'freely':
label = '<i class="fa fa-leaf"></i> Freely'
title = 'Anyone can edit'
$('#permissionLabelFreely').show()
break
case 'editable':
label = '<i class="fa fa-shield"></i> Editable'
title = 'Signed people can edit'
$('#permissionLabelEditable').show()
break
case 'limited':
label = '<i class="fa fa-id-card"></i> Limited'
title = 'Signed people can edit (forbid guest)'
$('#permissionLabelLimited').show()
break
case 'locked':
label = '<i class="fa fa-lock"></i> Locked'
title = 'Only owner can edit'
$('#permissionLabelLocked').show()
break
case 'protected':
label = '<i class="fa fa-umbrella"></i> Protected'
title = 'Only owner can edit (forbid guest)'
$('#permissionLabelProtected').show()
break
case 'private':
label = '<i class="fa fa-hand-stop-o"></i> Private'
title = 'Only owner can view & edit'
$('#permissionLabelPrivate').show()
break
}
if (personalInfo.userid && window.owner && personalInfo.userid === window.owner) {
label += ' <i class="fa fa-caret-down"></i>'
ui.infobar.permission.labelCaretDown.show()
ui.infobar.permission.label.removeClass('disabled')
} else {
ui.infobar.permission.labelCaretDown.hide()
ui.infobar.permission.label.addClass('disabled')
}
ui.infobar.permission.label.html(label).attr('title', title)
}
function havePermission () {
@ -3204,7 +3165,7 @@ function checkInContainerSyntax () {
function matchInContainer (text) {
var match
match = text.match(/:{3,}/g)
match = text.match(/^:::/gm)
if (match && match.length % 2) {
return true
} else {

View File

@ -9,6 +9,10 @@ export const getUIElements = () => ({
toolbar: {
shortStatus: $('.ui-short-status'),
status: $('.ui-status'),
statusShortMsg: $('.ui-status-short-msg'),
statusConnected: $('.ui-status-connected'),
statusOnline: $('.ui-status-online'),
statusOffline: $('.ui-status-offline'),
new: $('.ui-new'),
publish: $('.ui-publish'),
extra: {
@ -46,6 +50,7 @@ export const getUIElements = () => ({
permission: {
permission: $('.ui-permission'),
label: $('.ui-permission-label'),
labelCaretDown: $('.ui-permission-caret-down'),
freely: $('.ui-permission-freely'),
editable: $('.ui-permission-editable'),
locked: $('.ui-permission-locked'),

View File

@ -1,15 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<html lang="<%= getLocale() %>">
<head>
<%- include codimd/head %>
<%- include('codimd/head') %>
</head>
<body>
<%- include codimd/header %>
<%- include codimd/body %>
<%- include codimd/footer %>
<%- include codimd/foot %>
<%- include('codimd/header') %>
<%- include('codimd/body') %>
<%- include('codimd/footer') %>
<%- include('codimd/foot') %>
</body>
</html>

View File

@ -12,23 +12,27 @@
<span class="ui-lastchange text-uppercase"></span>
</span>
<span class="ui-permission dropdown pull-right">
<a id="permissionLabel" class="ui-permission-label text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
</a>
<ul class="dropdown-menu" aria-labelledby="permissionLabel">
<li class="ui-permission-freely"<% if(!('freely' in permission)) { %> style="display: none;"<% } %>><a><i class="fa fa-leaf fa-fw"></i> Freely - Anyone can edit</a></li>
<li class="ui-permission-editable"<% if(!('editable' in permission)) { %> style="display: none;"<% } %>><a><i class="fa fa-shield fa-fw"></i> Editable - Signed-in people can edit</a></li>
<li class="ui-permission-limited"<% if(!('limited' in permission)) { %> style="display: none;"<% } %>><a><i class="fa fa-id-card fa-fw"></i> Limited - Signed-in people can edit (forbid guests)</a></li>
<li class="ui-permission-locked"<% if(!('locked' in permission)) { %> style="display: none;"<% } %>><a><i class="fa fa-lock fa-fw"></i> Locked - Only owner can edit</a></li>
<li class="ui-permission-protected"<% if(!('protected' in permission)) { %> style="display: none;"<% } %>><a><i class="fa fa-umbrella fa-fw"></i> Protected - Only owner can edit (forbid guests)</a></li>
<li class="ui-permission-private"<% if(!('private' in permission)) { %> style="display: none;"<% } %>><a><i class="fa fa-hand-stop-o fa-fw"></i> Private - Only owner can view &amp; edit</a></li>
<a id="permissionLabelFreely" class="ui-permission-label text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" style="display: none;" title="<%= __('Anyone can edit') %>"><i class="fa fa-leaf"></i> <%= __('Freely') %> <i class="ui-permission-caret-down fa fa-caret-down" style="display: none;"></i></a>
<a id="permissionLabelEditable" class="ui-permission-label text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" style="display: none;" title="<%= __('Signed-in people can edit') %>"><i class="fa fa-shield fa-fw"></i> <%= __('Editable') %> <i class="ui-permission-caret-down fa fa-caret-down" style="display: none;"></i></a>
<a id="permissionLabelLimited" class="ui-permission-label text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" style="display: none;" title="<%= __('Signed-in people can edit (forbid guests)') %>"><i class="fa fa-id-card fa-fw"></i> <%= __('Limited') %> <i class="ui-permission-caret-down fa fa-caret-down" style="display: none;"></i></a>
<a id="permissionLabelLocked" class="ui-permission-label text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" style="display: none;" title="<%= __('Only owner can edit') %>"><i class="fa fa-lock fa-fw"></i> <%= __('Locked') %> <i class="ui-permission-caret-down fa fa-caret-down" style="display: none;"></i></a>
<a id="permissionLabelProtected" class="ui-permission-label text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" style="display: none;" title="<%= __('Only owner can edit (forbid guests)') %>"><i class="fa fa-umbrella fa-fw"></i> <%= __('Protected') %> <i class="ui-permission-caret-down fa fa-caret-down" style="display: none;"></i></a>
<a id="permissionLabelPrivate" class="ui-permission-label text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" style="display: none;" title="<%= __('Only owner can view & edit') %>"><i class="fa fa-hand-stop-o fa-fw"></i> <%= __('Private') %> <i class="ui-permission-caret-down fa fa-caret-down" style="display: none;"></i></a>
<ul class="dropdown-menu" aria-labelledby="permissionLabelFreely permissionLabelEditable permissionLabelLimited permissionLabelLocked permissionLabelProtected permissionLabelPrivate">
<li class="ui-permission-freely"<% if(!('freely' in permission)) { %> style="display: none;"<% } %>><a><i class="fa fa-leaf fa-fw"></i> <%= __('Freely') %> - <%= __('Anyone can edit') %></a></li>
<li class="ui-permission-editable"<% if(!('editable' in permission)) { %> style="display: none;"<% } %>><a><i class="fa fa-shield fa-fw"></i> <%= __('Editable') %> - <%= __('Signed-in people can edit') %></a></li>
<li class="ui-permission-limited"<% if(!('limited' in permission)) { %> style="display: none;"<% } %>><a><i class="fa fa-id-card fa-fw"></i> <%= __('Limited') %> - <%= __('Signed-in people can edit (forbid guests)') %></a></li>
<li class="ui-permission-locked"<% if(!('locked' in permission)) { %> style="display: none;"<% } %>><a><i class="fa fa-lock fa-fw"></i> <%= __('Locked') %> - <%= __('Only owner can edit') %></a></li>
<li class="ui-permission-protected"<% if(!('protected' in permission)) { %> style="display: none;"<% } %>><a><i class="fa fa-umbrella fa-fw"></i> <%= __('Protected') %> - <%= __('Only owner can edit (forbid guests)') %></a></li>
<li class="ui-permission-private"<% if(!('private' in permission)) { %> style="display: none;"<% } %>><a><i class="fa fa-hand-stop-o fa-fw"></i> <%= __('Private') %> - <%= __('Only owner can view & edit') %></a></li>
<li class="divider"></li>
<li class="ui-delete-note"><a><i class="fa fa-trash-o fa-fw"></i> Delete this note</a></li>
<li class="ui-delete-note"><a><i class="fa fa-trash-o fa-fw"></i> <%= __('Delete this note') %></a></li>
</ul>
</span>
<br>
<span class="ui-owner" style="display: none;">
&thinsp;<i class="ui-user-icon small" data-toggle="tooltip" data-placement="right"></i>
&nbsp;<span class="text-uppercase">owned this note</span>
&nbsp;<span class="text-uppercase"><%= __('owned this note') %></span>
</span>
</small>
</div>
@ -45,6 +49,13 @@
<div id="ui-toc-affix" class="ui-affix-toc ui-toc-dropdown unselectable hidden-print" data-spy="affix" style="top:51px;display:none;"></div>
</div>
</div>
<!-- toc menu -->
<div class="toc-menu" style="display: none;">
<a class="expand-toggle expand-all" href="#"><%= __('Expand all') %></a>
<a class="expand-toggle collapse-all" href="#" style="display: none;"><%= __('Collapse all') %></a>
<a class="back-to-top" href="#"><%= __('Back to top') %></a>
<a class="go-to-bottom" href="#"><%= __('Go to bottom') %></a>
</div>
<!-- clipboard modal -->
<div class="modal fade" id="clipboardModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
@ -246,9 +257,9 @@
</div>
</div>
</div>
<%- include ../shared/refresh-modal %>
<%- include ../shared/signin-modal %>
<%- include ../shared/help-modal %>
<%- include ../shared/revision-modal %>
<%- include ../shared/pandoc-export-modal %>
<%- include ../shared/custom-note-url-modal %>
<%- include('../shared/refresh-modal') %>
<%- include('../shared/signin-modal') %>
<%- include('../shared/help-modal') %>
<%- include('../shared/revision-modal') %>
<%- include('../shared/pandoc-export-modal') %>
<%- include('../shared/custom-note-url-modal') %>

View File

@ -25,10 +25,10 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-lite/4.17.0/vega-lite.min.js" integrity="sha512-GUsnbKvdacPXIFZvHFFFnWEulYU74fanU2z9aie8g3/F/xcX9vxZuQFLwv9NjdV261fxj9SyAJ3Cf65jvYWMxw==" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-embed/6.14.2/vega-embed.min.js" integrity="sha512-Nhf4uoYFL/Mu9UESXLF9Mo22qmhuWEhAQWHAZOHpNntSvtzjsg5dWn8PBQN6l573WPNWgL6F7VwzTY9Y+l+RPg==" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.js" integrity="sha256-fNoRrwkP2GuYPbNSJmMJOCyfRB2DhPQe0rGTgzRsyso=" crossorigin="anonymous" defer></script>
<%- include ../build/index-scripts %>
<%- include('../build/index-scripts') %>
<% } else { %>
<script src="<%- serverURL %>/build/MathJax/MathJax.js" defer></script>
<script src="<%- serverURL %>/build/MathJax/config/TeX-AMS-MML_HTMLorMML.js" defer></script>
<script src="<%- serverURL %>/build/MathJax/config/Safe.js" defer></script>
<%- include ../build/index-pack-scripts %>
<%- include('../build/index-pack-scripts') %>
<% } %>

View File

@ -15,12 +15,12 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css" integrity="sha256-3iu9jgsy9TpTwXKb7bNQzqWekRX7pPK+2OLj3R922fo=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@hackmd/emojify.js@2.1.0/dist/css/basic/emojify.min.css" integrity="sha256-UOrvMOsSDSrW6szVLe8ZDZezBxh5IoIfgTwdNDgTjiU=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.css" integrity="sha256-SHMGCYmST46SoyGgo4YR/9AlK1vf3ff84Aq9yK4hdqM=" crossorigin="anonymous" />
<%- include ../build/index-header %>
<%- include ../shared/polyfill %>
<%- include('../build/index-header') %>
<%- include('../shared/polyfill') %>
<% } else { %>
<link rel="stylesheet" href='<%- serverURL %>/build/emojify.js/dist/css/basic/emojify.min.css'>
<link rel="stylesheet" href='<%- serverURL %>/css/font.css'>
<link rel="stylesheet" href='<%- serverURL %>/build/fork-awesome/css/fork-awesome.min.css'>
<%- include ../build/index-pack-header %>
<%- include('../build/index-pack-header') %>
<% } %>
<link rel="stylesheet" href='<%- serverURL %>/markdown-lint/css/lint.css'>

View File

@ -8,7 +8,10 @@
<div class="visible-lg">&nbsp;</div>
</div>
<div class="nav-mobile nav-status visible-xs" id="short-online-user-list">
<a class="ui-short-status" data-toggle="dropdown"><span class="label label-danger"><i class="fa fa-plug"></i> </span>
<a class="ui-short-status" data-toggle="dropdown">
<span class="label label-warning ui-status-connected" style="display: none;"><i class="fa fa-wifi"></i></span>
<span class="label label-primary ui-status-online" style="display: none;"><i class="fa fa-users"></i> <span class="ui-status-short-msg"></span></span>
<span class="label label-danger ui-status-offline"><i class="fa fa-plug"></i></span>
</a>
<ul class="dropdown-menu list" role="menu" aria-labelledby="menu">
</ul>
@ -111,7 +114,9 @@
<ul class="nav navbar-nav navbar-right">
<li id="online-user-list">
<a class="ui-status" data-toggle="dropdown">
<span class="label label-danger"><i class="fa fa-plug"></i> OFFLINE</span>
<span class="label label-warning ui-status-connected" style="display: none;"><i class="fa fa-wifi"></i> <%= __('CONNECTED') %></span>
<span class="label label-primary ui-status-online" style="display: none;"><i class="fa fa-users"></i> <span class="ui-status-short-msg"></span> <%= __('ONLINE') %></span>
<span class="label label-danger ui-status-offline"><i class="fa fa-plug"></i> <%= __('OFFLINE') %></span>
</a>
<ul class="dropdown-menu list" role="menu" aria-labelledby="menu" style="right: 15px;width: 200px;">
</ul>

View File

@ -1,19 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<html lang="<%= getLocale() %>">
<head>
<%- include codimd/head %>
<%- include('codimd/head') %>
<link rel="stylesheet" href="<%- serverURL %>/css/center.css">
</head>
<body>
<%- include codimd/header %>
<%- include('codimd/header') %>
<div class="container-fluid text-center">
<div class="vertical-center-row">
<h1><%- code %> <%- detail %> <small><%- msg %></small></h1>
</div>
</div>
<%- include codimd/footer %>
<%- include('codimd/footer') %>
</body>
</html>

View File

@ -1,15 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<html lang="<%= getLocale() %>">
<head>
<%- include index/head %>
<%- include('index/head') %>
</head>
<body>
<%- include index/header %>
<%- include index/body %>
<%- include index/footer %>
<%- include index/foot %>
<%- include('index/header') %>
<%- include('index/body') %>
<%- include('index/footer') %>
<%- include('index/foot') %>
</body>
</html>

View File

@ -202,4 +202,4 @@
</div>
</div>
</div>
<%- include ../shared/signin-modal %>
<%- include('../shared/signin-modal') %>

View File

@ -7,7 +7,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment-with-locales.min.js" integrity="sha256-AdQN98MVZs44Eq2yTwtoKufhnU+uZ7v2kXnD5vqzZVo=" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-url/2.3.0/url.min.js" integrity="sha256-HOZJz4x+1mn1Si84WT5XKXPtOlTytmZLnMb6n1v4+5Q=" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/1000hz-bootstrap-validator/0.11.8/validator.min.js" integrity="sha256-LHeY7YoYJ0SSXbCx7sR14Pqna+52moaH3bhv0Mjzd/M=" crossorigin="anonymous" defer></script>
<%- include ../build/cover-scripts %>
<%- include('../build/cover-scripts') %>
<% } else { %>
<%- include ../build/cover-pack-scripts %>
<%- include('../build/cover-pack-scripts') %>
<% } %>

View File

@ -15,10 +15,10 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-social/4.9.0/bootstrap-social.min.css" integrity="sha256-02JtFTurpwBjQJ6q13iJe82/NF0RbZlJroDegK5g87Y=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.2/select2.min.css" integrity="sha256-k5tPXFBQl+dOk8OmqCtptRa7bRYNRJuvs37bcqsmDB0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.2/select2-bootstrap.min.css" integrity="sha256-HbewCP50syA/2d3zPv+/CdQ4ufX6bI2ntjD3MwsA0UE=" crossorigin="anonymous" />
<%- include ../build/cover-header %>
<%- include ../shared/polyfill %>
<%- include('../build/cover-header') %>
<%- include('../shared/polyfill') %>
<% } else { %>
<link rel="stylesheet" href='<%- serverURL %>/css/font.css'>
<link rel="stylesheet" href='<%- serverURL %>/build/fork-awesome/css/fork-awesome.min.css'>
<%- include ../build/cover-pack-header %>
<%- include('../build/cover-pack-header') %>
<% } %>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="<%= getLocale() %>">
<head>
<meta charset="utf-8">
@ -26,13 +26,13 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css" integrity="sha256-3iu9jgsy9TpTwXKb7bNQzqWekRX7pPK+2OLj3R922fo=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@hackmd/emojify.js@2.1.0/dist/css/basic/emojify.min.css" integrity="sha256-UOrvMOsSDSrW6szVLe8ZDZezBxh5IoIfgTwdNDgTjiU=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.css" integrity="sha256-SHMGCYmST46SoyGgo4YR/9AlK1vf3ff84Aq9yK4hdqM=" crossorigin="anonymous" />
<%- include build/pretty-header %>
<%- include shared/polyfill %>
<%- include('build/pretty-header') %>
<%- include('shared/polyfill') %>
<% } else { %>
<link rel="stylesheet" href='<%- serverURL %>/build/emojify.js/dist/css/basic/emojify.min.css'>
<link rel="stylesheet" href='<%- serverURL %>/css/font.css'>
<link rel="stylesheet" href='<%- serverURL %>/build/fork-awesome/css/fork-awesome.min.css'>
<%- include build/pretty-pack-header %>
<%- include('build/pretty-pack-header') %>
<% } %>
</head>
@ -71,7 +71,7 @@
<div id="ui-toc-affix" class="ui-affix-toc ui-toc-dropdown unselectable hidden-print" data-spy="affix" style="display:none;"></div>
<% if(typeof disqus !== 'undefined' && disqus) { %>
<div class="container-fluid" style="max-width: 758px; margin-bottom: 40px;">
<%- include shared/disqus %>
<%- include('shared/disqus') %>
</div>
<% } %>
</body>
@ -100,11 +100,11 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-lite/4.17.0/vega-lite.min.js" integrity="sha512-GUsnbKvdacPXIFZvHFFFnWEulYU74fanU2z9aie8g3/F/xcX9vxZuQFLwv9NjdV261fxj9SyAJ3Cf65jvYWMxw==" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-embed/6.14.2/vega-embed.min.js" integrity="sha512-Nhf4uoYFL/Mu9UESXLF9Mo22qmhuWEhAQWHAZOHpNntSvtzjsg5dWn8PBQN6l573WPNWgL6F7VwzTY9Y+l+RPg==" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.js" integrity="sha256-fNoRrwkP2GuYPbNSJmMJOCyfRB2DhPQe0rGTgzRsyso=" crossorigin="anonymous" defer></script>
<%- include build/pretty-scripts %>
<%- include('build/pretty-scripts') %>
<% } else { %>
<script src="<%- serverURL %>/build/MathJax/MathJax.js" defer></script>
<script src="<%- serverURL %>/build/MathJax/config/TeX-AMS-MML_HTMLorMML.js" defer></script>
<script src="<%- serverURL %>/build/MathJax/config/Safe.js" defer></script>
<%- include build/pretty-pack-scripts %>
<%- include('build/pretty-pack-scripts') %>
<% } %>
<%- include shared/ga %>
<%- include('shared/ga') %>

View File

@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html lang="<%= getLocale() %>">
<head>
<meta charset="utf-8">
<meta name="apple-mobile-web-app-capable" content="yes">
@ -21,14 +21,14 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/reveal.js@3.9.2/css/reveal.min.css" integrity="sha256-h2NhWerL2k7KAzo6YqYMo1T5B6+QT2Bb/CprRV2aW20=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@hackmd/emojify.js@2.1.0/dist/css/basic/emojify.min.css" integrity="sha256-UOrvMOsSDSrW6szVLe8ZDZezBxh5IoIfgTwdNDgTjiU=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.css" integrity="sha256-SHMGCYmST46SoyGgo4YR/9AlK1vf3ff84Aq9yK4hdqM=" crossorigin="anonymous" />
<%- include build/slide-header %>
<%- include shared/polyfill %>
<%- include('build/slide-header') %>
<%- include('shared/polyfill') %>
<% } else { %>
<link rel="stylesheet" href="<%- serverURL %>/build/reveal.js/css/reveal.css">
<link rel="stylesheet" href='<%- serverURL %>/build/emojify.js/dist/css/basic/emojify.min.css'>
<link rel="stylesheet" href='<%- serverURL %>/css/font.css'>
<link rel="stylesheet" href='<%- serverURL %>/build/fork-awesome/css/fork-awesome.min.css'>
<%- include build/slide-pack-header %>
<%- include('build/slide-pack-header') %>
<% } %>
<!-- For reveal.js theme -->
@ -83,7 +83,7 @@
</div>
<% if(typeof disqus !== 'undefined' && disqus) { %>
<div class="slides-disqus">
<%- include shared/disqus %>
<%- include('shared/disqus') %>
</div>
<% } %>
</div>
@ -112,14 +112,14 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-lite/4.17.0/vega-lite.min.js" integrity="sha512-GUsnbKvdacPXIFZvHFFFnWEulYU74fanU2z9aie8g3/F/xcX9vxZuQFLwv9NjdV261fxj9SyAJ3Cf65jvYWMxw==" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-embed/6.14.2/vega-embed.min.js" integrity="sha512-Nhf4uoYFL/Mu9UESXLF9Mo22qmhuWEhAQWHAZOHpNntSvtzjsg5dWn8PBQN6l573WPNWgL6F7VwzTY9Y+l+RPg==" crossorigin="anonymous" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.js" integrity="sha256-fNoRrwkP2GuYPbNSJmMJOCyfRB2DhPQe0rGTgzRsyso=" crossorigin="anonymous" defer></script>
<%- include build/slide-scripts %>
<%- include('build/slide-scripts') %>
<% } else { %>
<script src="<%- serverURL %>/build/MathJax/MathJax.js" defer></script>
<script src="<%- serverURL %>/build/MathJax/config/TeX-AMS-MML_HTMLorMML.js" defer></script>
<script src="<%- serverURL %>/build/MathJax/config/Safe.js" defer></script>
<%- include build/slide-pack-scripts %>
<%- include('build/slide-pack-scripts') %>
<% } %>
</body>
</html>
<%- include shared/ga %>
<%- include('shared/ga') %>