Update for 3.0

This commit is contained in:
nanxiaobei committed 2019-03-31 20:32:06 +08:00
1 parent 55dc991f4c
commit 8088299ecb
9 files changed
+394 -445

No files matched your search

+24 -22
View File
@@ -1,44 +1,46 @@
{{ partial "header.html" . }}
{{ if not .IsHome }}
<header class="list-header">
{{ if eq .Data.Singular "tag" }}<span>Tagged in</span>
<h1 class="list-title">{{ .Data.Term }}</h1>
{{ else }}<h1 class="list-title">Posts</h1>
<header class="page-header">
{{ if eq .Data.Singular "tag" }}
<div class="tagged">Tagged in</div>
<h1>{{ .Data.Term }}</h1>
{{ else }}
<h1>Posts</h1>
{{ end }}
</header>
{{ end }}
{{ $paginator := .Paginate (where .Pages ".Params.type" "!=" "page") (index .Site.Params "paginate" | default 10) }}
{{ $paginator := .Paginate (where .Pages ".Params.type" "!=" "page") }}
{{ if gt $paginator.TotalPages 0 }}
{{ range $index, $page := $paginator.Pages }}
{{ if and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) }}
{{ .Scratch.Set "postClass" "first-entry" }}
{{ .Scratch.Set "firstEmoji" "<span class=\"welcome-emoji\">👉</span>" }}
{{ else }}
{{ .Scratch.Set "postClass" "post-entry" }}
{{ end }}
<article class="post {{ .Scratch.Get `postClass` }}">
<header class="post-header">
{{ safeHTML (.Scratch.Get `firstEmoji`) }}
<h2 class="post-title">{{ .Title }}</h2>
<article class="post-entry">
<header class="entry-header">
<h2>{{ .Title }}</h2>
</header>
<p class="post-summary">{{ .Summary | plainify | htmlUnescape }}...</p>
<footer class="post-footer">
<p class="post-meta">{{ .Date.Format "2006.1.2" }}</p>
<section class="entry-content">
<p>{{ .Summary | plainify | htmlUnescape }}...</p>
</section>
<footer class="entry-footer">
<time >{{ .Date.Format "2006.1.2" }}</time>
</footer>
<a class="post-link" href="{{ .Permalink }}"></a>
<a class="entry-link" href="{{ .Permalink }}"></a>
</article>
{{ end }}
{{ end }}
{{ if gt $paginator.TotalPages 1 }}
<footer class="list-footer">
<footer class="page-footer">
<nav class="pagination">
{{ if $paginator.HasPrev }}
<a class="pagination-prev" href="{{ $paginator.Prev.URL }}">← {{ i18n "prevPage" }}</a>
<a class="prev" href="{{ $paginator.Prev.URL }}">← {{ i18n "prevPage" }}</a>
{{ end }}
{{ if $paginator.HasNext }}
<a class="pagination-next" href="{{ $paginator.Next.URL }}">{{ i18n "nextPage" }} →</a>
<a class="next" href="{{ $paginator.Next.URL }}">{{ i18n "nextPage" }} →</a>
{{ end }}
</nav>
</footer>
{{ end }}
{{ partial "footer.html" . }}
+3 -3
View File
@@ -1,12 +1,12 @@
{{ partial "header.html" . }}
<article class="post post-view">
<article class="post-single">
<header class="post-header">
<h1 class="post-title">{{ .Title }}</h1>
<p class="post-meta">
<div class="post-meta">
{{- if or .Params.author .Site.Params.author -}}
{{ .Params.author | default .Site.Params.author }} · {{ end }}
{{- .Date.Format "2006.1.2" -}}
</p>
</div>
</header>
<div class="post-content">{{ .Content }}</div>
<footer class="post-footer">
+14 -7
View File
@@ -10,15 +10,22 @@
<script data-no-instant>InstantClick.init();</script>
<script src="{{.Site.BaseURL}}js/highlight.min.js" data-no-instant></script>
<script data-no-instant>
addMenuListener();
hljs.initHighlightingOnLoad();
setMenuListener();
InstantClick.on('change', function() {
addMenuListener();
document.querySelectorAll('pre code').forEach((block) => {
hljs.highlightBlock(block);
});
setMenuListener();
});
function addMenuListener() {
var $toggle = document.querySelector('.menu-toggle');
var $body = document.querySelector('body');
$toggle.addEventListener('click', function() {
$body.classList.toggle('noscroll');
function setMenuListener() {
var menuToggle = document.querySelector('.menu-toggle');
var body = document.querySelector('body');
menuToggle.addEventListener('click', function() {
body.classList.toggle('no-scroll');
}, false);
}
</script>
+54 -54
View File
@@ -1,60 +1,60 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Title -->
<title>
{{- if not .IsHome }}
{{- if eq .Kind "page" }}{{ .Title }}
{{- else if eq .Data.Singular "tag" }}{{ .Data.Term }}
{{- else }}Posts
{{- end }} - {{ end }}
{{- .Site.Title -}}
</title>
<!-- Meta -->
{{- if eq .Kind "page" }}
<meta name="description" content="{{ .Summary }}">
<meta name="author" content="{{ .Params.author | default .Site.Params.author }}">
{{ else }}
<meta name="description" content="{{ .Site.Params.description }}">
<meta name="author" content="{{ .Site.Params.author }}">
{{ end -}}
<!-- Styles -->
<link href="{{.Site.BaseURL}}css/font.css" rel="stylesheet">
<link href="{{.Site.BaseURL}}css/atom-one-dark.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,700,700i" rel="stylesheet">
<link href="{{.Site.BaseURL}}css/style.css" rel="stylesheet">
<!-- Favicons -->
<link rel="apple-touch-icon" href="{{.Site.BaseURL}}img/apple-touch-icon.png">
<link rel="icon" href="{{.Site.BaseURL}}img/favicon.ico">
<!-- Generator -->
{{ .Hugo.Generator }}
<!-- RSS -->
<link rel="alternate" type="application/atom+xml" href="{{.Site.BaseURL}}index.xml" title="{{ .Site.Title }}">
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
{{ partial "header-include.html" . }}
</head>
<body class="{{if eq .Kind `page` }}single{{else}}list{{ if .IsHome }} home{{ end }}{{end}}">
<header class="header">
{{ if .IsHome }}
<h1 class="title"><a href="{{.Site.BaseURL}}">{{ .Site.Title }}</a></h1>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Title -->
<title>
{{- if not .IsHome }}
{{- if eq .Kind "page" }}{{ .Title }}
{{- else if eq .Data.Singular "tag" }}{{ .Data.Term }}
{{- else }}Posts
{{- end }} - {{ end }}
{{- .Site.Title -}}
</title>
<!-- Meta -->
{{- if eq .Kind "page" }}
<meta name="description" content="{{ .Summary }}">
<meta name="author" content="{{ .Params.author | default .Site.Params.author }}">
{{ else }}
<p class="title"><a href="{{.Site.BaseURL}}">{{ .Site.Title }}</a></p>
<meta name="description" content="{{ .Site.Params.description }}">
<meta name="author" content="{{ .Site.Params.author }}">
{{ end -}}
<!-- Styles -->
<link href="{{.Site.BaseURL}}css/github-gist.min.css" rel="stylesheet">
<link href="{{.Site.BaseURL}}css/style.css" rel="stylesheet">
<!-- Favicons -->
<link rel="apple-touch-icon" href="{{.Site.BaseURL}}img/apple-touch-icon.png">
<link rel="icon" href="{{.Site.BaseURL}}img/favicon.ico">
<!-- Generator -->
{{ .Hugo.Generator }}
<!-- RSS -->
<link rel="alternate" type="application/atom+xml" href="{{.Site.BaseURL}}index.xml" title="{{ .Site.Title }}">
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
<button class="menu-toggle" type="button"></button>
<nav class="menu">
<ul>
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<li class="{{ if $currentPage.IsMenuCurrent `main` . }}active{{ end }}">
<a href="{{ .URL }}">{{ .Name }}</a>
</li>
{{ partial "header-include.html" . }}
</head>
<body class="{{if eq .Kind `page` }}single{{else}}list{{ if .IsHome }} home{{ end }}{{end}}">
<header class="header">
<div class="wrap">
{{ if .IsHome }}
<h1 class="logo"><a href="{{.Site.BaseURL}}">{{ .Site.Title }} </a></h1>
{{ else }}
<p class="logo"><a href="{{.Site.BaseURL}}">{{ .Site.Title }} </a></p>
{{ end }}
</ul>
<button class="menu-toggle" type="button"></button>
</div>
</header>
<nav class="nav">
<ul class="menu">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<li class="{{ if $currentPage.IsMenuCurrent `main` . }}active{{ end }}">
<a href="{{ .URL }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
</nav>
</header>
<main class="main">
<main class="main">
-1
View File
@@ -1 +0,0 @@
.hljs{display:block;overflow-x:auto;padding:0.5em;color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-keyword,.hljs-formula{color:#c678dd}.hljs-section,.hljs-name,.hljs-selector-tag,.hljs-deletion,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-string,.hljs-regexp,.hljs-addition,.hljs-attribute,.hljs-meta-string{color:#98c379}.hljs-built_in,.hljs-class .hljs-title{color:#e6c07b}.hljs-attr,.hljs-variable,.hljs-template-variable,.hljs-type,.hljs-selector-class,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-number{color:#d19a66}.hljs-symbol,.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-title{color:#61aeee}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}.hljs-link{text-decoration:underline}
-24
View File
@@ -1,24 +0,0 @@
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 400;
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xK1dSBYKcSV-LCoeQqfX1RYOo3qPZ7nsDc.ttf) format('truetype');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 700;
src: local('Source Sans Pro Bold Italic'), local('SourceSansPro-BoldItalic'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZZclSds18E.ttf) format('truetype');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 400;
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7g.ttf) format('truetype');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 700;
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v11/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlxdr.ttf) format('truetype');
}
+1
View File
@@ -0,0 +1 @@
.hljs{display:block;background:white;padding:.5em;color:#333333;overflow-x:auto}.hljs-comment,.hljs-meta{color:#969896}.hljs-string,.hljs-variable,.hljs-template-variable,.hljs-strong,.hljs-emphasis,.hljs-quote{color:#df5000}.hljs-keyword,.hljs-selector-tag,.hljs-type{color:#a71d5d}.hljs-literal,.hljs-symbol,.hljs-bullet,.hljs-attribute{color:#0086b3}.hljs-section,.hljs-name{color:#63a35c}.hljs-tag{color:#333333}.hljs-title,.hljs-attr,.hljs-selector-id,.hljs-selector-class,.hljs-selector-attr,.hljs-selector-pseudo{color:#795da3}.hljs-addition{color:#55a532;background-color:#eaffea}.hljs-deletion{color:#bd2c00;background-color:#ffecec}.hljs-link{text-decoration:underline}
+296 -331
View File
@@ -1,116 +1,123 @@
/*
* Paper v2.0
* A simple & clean hugo theme
* Paper v3.0
* A simple, clean, flexible Hugo theme.
* Designed by 21beats (http://21beats.com)
* Updated in 2018.8.16
* Updated in 2019.3.31
*/
/* Reset
============================================================= */
------------------------------------------------------------ */
*,
*::before,
*::after {
box-sizing: border-box;
}
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, .2);
border-radius: 3px;
}
html {
-webkit-tap-highlight-color: transparent;
}
article, aside, figcaption, figure, footer, header, main, nav, section {
display: block;
}
body {
margin: 0;
font-family: 'Source Sans Pro', sans-serif;
color: rgba(0, 0, 0, .8);
font-size: 20px;
line-height: 1.6;
color: rgba(0, 0, 0, 0.9);
font-family: 'SF Pro Display', 'Microsoft Yahei', 'Helvetica Neue', 'Helvetica', 'Arial',
sans-serif;
font-size: 16px;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
margin-bottom: 0;
line-height: 1.2;
article,
aside,
figcaption,
figure,
footer,
header,
main,
nav,
section {
display: block;
}
h1,
h2,
h3,
h4,
h5,
h6,
p {
margin-top: 0;
margin-bottom: 0;
}
strong,
b {
font-weight: 500;
}
ul {
list-style: none;
margin: 0;
padding: 0;
}
a {
color: inherit;
color: rgba(0, 0, 0, 0.9);
text-decoration: none;
}
figure {
margin: 0;
}
img {
max-width: 100%;
vertical-align: middle;
table {
border-collapse: collapse;
border-spacing: 0;
}
button, input, textarea {
-webkit-appearance: none;
button,
input,
textarea {
padding: 0;
font: inherit;
background: transparent;
border: 0;
outline: 0;
-webkit-appearance: none;
}
button, input[type=button], input[type=submit] {
button,
input[type='button'],
input[type='submit'] {
cursor: pointer;
}
pre, code {
font-family: Menlo, Consolas, monospace;
font-size: inherit;
input,
textarea {
padding: 0;
border: 0;
outline: 0;
}
/* Body
============================================================= */
.list {
background: #f9f9f9;
input:-webkit-autofill,
textarea:-webkit-autofill {
box-shadow: 0 0 0 50px #fff inset;
}
img {
display: block;
max-width: 100%;
}
/* Header
============================================================= */
------------------------------------------------------------ */
.header {
display: flex;
justify-content: space-between;
height: 65px;
padding-left: 30px;
padding-right: 30px;
line-height: 65px;
}
.home .header {
background: #fff;
.header .wrap {
display: flex;
justify-content: space-between;
max-width: 1024px;
margin-left: auto;
margin-right: auto;
}
.title a {
.logo a,
.menu-toggle {
padding-left: 24px;
padding-right: 24px;
}
.logo a {
display: block;
margin-top: 18px;
font-size: 24px;
font-weight: 700;
line-height: 35px;
}
.noscroll {
overflow: hidden;
}
.menu-toggle {
display: block;
position: absolute;
top: 0;
right: 0;
z-index: 20;
width: 80px;
height: 65px;
position: relative;
width: 68px;
outline: 0;
}
.menu-toggle::before,
.menu-toggle::after {
@@ -121,6 +128,7 @@ pre, code {
width: 20px;
height: 2px;
background: #000;
transition: transform 0.2s;
}
.menu-toggle::before {
transform: translate3d(-50%, -5px, 0);
@@ -128,30 +136,36 @@ pre, code {
.menu-toggle::after {
transform: translate3d(-50%, 5px, 0);
}
.noscroll .menu-toggle::before {
transform: translate3d(-50%, -1px, 0) rotateZ(45deg);
.no-scroll .menu-toggle::before {
transform: translate3d(-50%, -1px, 0) rotateZ(135deg);
}
.noscroll .menu-toggle::after {
transform: translate3d(-50%, -1px, 0) rotateZ(-45deg);
.no-scroll .menu-toggle::after {
transform: translate3d(-50%, -1px, 0) rotateZ(-135deg);
}
.no-scroll .header {
position: sticky;
top: 0;
z-index: 10;
background: #fff;
}
.no-scroll .menu {
display: flex;
}
.menu {
display: none;
}
.noscroll .menu {
display: block;
}
.menu ul {
position: fixed;
top: 0;
z-index: 10;
top: 65px;
right: 0;
bottom: 0;
left: 0;
z-index: 10;
background: #fff;
display: flex;
justify-content: center;
flex-direction: column;
text-align: center;
padding-bottom: 130px;
}
.menu li {
width: 100%;
@@ -160,196 +174,171 @@ pre, code {
.menu a {
font-size: 20px;
}
/* List
-------------------------------------------------- */
.list {
background: #f5f5f5;
}
.main,
.footer {
max-width: 640px;
margin-left: auto;
margin-right: auto;
}
/* Main
======================================================================= */
-------------------------------------------------- */
.main {
min-height: calc(100vh - 130px);
overflow: hidden;
min-height: calc(100vh - 65px - 60px);
padding: 24px;
}
.list-header,
.first-entry > *,
.post-entry,
.list-footer {
max-width: 700px;
margin-left: auto;
margin-right: auto;
.page-header {
margin-bottom: 36px;
}
.list .main {
padding-bottom: 30px;
}
.list-header,
.list-footer {
padding-left: 30px;
padding-right: 30px;
}
.list-header {
margin-top: 30px;
margin-bottom: 30px;
}
.list-footer {
margin-top: 30px;
}
.single .main {
padding-top: 60px;
padding-bottom: 30px;
}
.post-view {
width: 700px;
margin-left: auto;
margin-right: auto;
}
@media (max-width: 767px) {
.main {
min-height: calc(100vh - 155px);
}
.list-header,
.first-entry > *,
.post-entry,
.list-footer,
.post-view {
width: 100%;
padding-left: 30px;
padding-right: 30px;
}
}
/* List header
------------------------------ */
.list-header span {
color: rgba(0, 0, 0, .4);
.page-header .tagged {
margin-bottom: 2px;
color: rgba(0, 0, 0, 0.6);
font-size: 12px;
letter-spacing: 2px;
text-transform: uppercase;
letter-spacing: 1.5px;
transform: scale(0.9);
transform-origin: left center;
}
.list-title {
font-size: 50px;
}
/* Post
------------------------------ */
.post-meta {
margin-top: 8px;
color: rgba(0, 0, 0, .4);
font-size: 16px;
letter-spacing: .5px;
}
/* First entry */
.first-entry {
position: relative;
min-height: calc(100vh - 65px - 80px);
margin-bottom: 80px;
padding-top: 12vh;
padding-bottom: 12vh;
background: #fff;
}
.welcome-emoji {
font-size: 60px;
line-height: 1;
}
.first-entry .post-title {
font-size: 50px;
transform: translateX(-3px);
}
.first-entry .post-summary {
margin-top: 15px;
margin-bottom: 15px;
font-size: 19px;
}
.post-title {
transform: translateX(-2px);
}
.post-summary {
margin-top: 10px;
color: rgba(0, 0, 0, .4);
font-size: 18px;
}
/* Post entry */
.post-entry {
position: relative;
padding: 30px;
background: #fff;
border-radius: 6px;
}
.post-entry:active {
transform: scale(.98);
transition: transform .1s;
}
.post-entry + .post-entry {
margin-top: 25px;
}
.post-entry:first-child {
margin-top: 40px;
}
.post-entry:hover {
box-shadow: 0 5px 40px -5px rgba(0, 0, 0, .1);
}
.post-entry .post-title {
.page-header h1 {
font-size: 30px;
}
.post-link {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
.page-footer .pagination {
display: flex;
}
/* Post view */
.post-view .post-title {
font-size: 45px;
.page-footer .pagination .next {
margin-left: auto;
}
/* Post entry
-------------------------------------------------- */
.post-entry {
position: relative;
margin-bottom: 24px;
padding: 24px;
background: #fff;
transition: box-shadow 0.2s;
}
.post-entry:hover {
box-shadow: 0 10px 80px rgba(0, 0, 0, 0.15);
}
.post-entry:active {
transform: scale(0.98);
transition: transform 0.1s;
}
.entry-header h2 {
font-size: 22px;
}
.entry-content {
margin-top: 8px;
margin-bottom: 14px;
color: rgba(0, 0, 0, 0.6);
font-size: 14px;
line-height: 1.7;
}
.entry-footer {
font-size: 12px;
}
.entry-link {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
/* Post single
-------------------------------------------------- */
.post-header {
margin-top: 12px;
margin-bottom: 36px;
}
.post-title {
margin-bottom: 8px;
font-size: 36px;
transform: translateX(-2px);
}
.post-meta {
font-size: 13px;
color: rgba(0, 0, 0, 0.6);
}
.post-content {
padding-top: 30px;
font-size: 17px;
line-height: 1.9;
word-wrap: break-word;
}
.post-content h1,
.post-content .form-item-title .ant-input,
.post-content h1 {
font-size: 36px;
font-weight: 700;
transform: translateX(-1px);
}
.post-content h1 {
margin-top: 48px;
margin-bottom: 36px;
}
.post-content h2 {
margin-bottom: 15px;
margin-top: 36px;
margin-bottom: 24px;
font-size: 28px;
}
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
margin-bottom: 10px;
margin-top: 24px;
margin-bottom: 12px;
}
.post-content h4,
.post-content h5,
.post-content h6 {
font-weight: 400;
}
.post-content h1 {
font-size: 45px;
margin-top: 50px;
}
.post-content h2 {
font-size: 32px;
margin-top: 40px;
font-weight: 500;
}
.post-content h3 {
font-size: 28px;
margin-top: 30px;
font-size: 22px;
}
.post-content h4 {
font-size: 24px;
}
.post-content h5 {
font-size: 20px;
}
.post-content h6 {
font-size: 18px;
}
.post-content h5 {
font-size: 16px;
}
.post-content h6 {
font-size: 14px;
}
.post-content a {
padding-bottom: 2px;
border-bottom: 1.5px solid rgba(0, 0, 0, .8);
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.9);
}
.post-content del {
text-decoration: none;
background: linear-gradient(to right, rgba(0, 0, 0, 0.9) 100%, transparent 0) 0 50% / 1.2px 1.2px
repeat-x;
}
.post-content p,
.post-content ul,
.post-content ol,
.post-content dl {
margin-bottom: 20px;
margin-bottom: 24px;
}
.post-content ul,
.post-content ol {
padding-left: 20px;
}
.post-content ul {
list-style: disc;
}
.post-content ul ul {
padding-left: 20px;
}
.post-content ol ol {
list-style: lower-roman;
}
.post-content ol {
list-style: decimal;
}
.post-content li {
margin-bottom: 10px;
margin-bottom: 5px;
}
.post-content li > ul,
.post-content li > ol {
@@ -376,8 +365,8 @@ pre, code {
}
.post-content pre,
.post-content table {
margin-top: 30px;
margin-bottom: 30px;
margin-top: 32px;
margin-bottom: 32px;
}
.post-content table {
width: 100%;
@@ -386,145 +375,121 @@ pre, code {
}
.post-content th,
.post-content td {
padding: 12px;
border: 1px solid #eee;
padding: 10px;
border-bottom: 1px solid #eee;
}
.post-content th {
font-size: 14px;
text-align: left;
}
.post-content pre code {
padding: 20px;
border-radius: 6px;
}
.post-content code {
padding: 3px 6px;
font-size: 0.75em;
margin-left: 4px;
margin-right: 4px;
padding: 4px;
font-family: Menlo, Monaco, 'Courier New', Courier, monospace;
font-size: 0.8em;
white-space: pre-wrap;
border-radius: 3px;
background: rgba(0, 0, 0, 0.04);
}
.post-content pre {
background: transparent !important;
}
.post-content pre code {
margin-left: 0;
margin-right: 0;
padding: 20px 22px;
line-height: 1.7;
border-radius: 2px;
}
.post-content blockquote {
margin: 0 0 0 -23px;
padding: 0 0 0 20px;
color: rgba(0, 0, 0, .6);
margin: 0 0 0 -24px;
padding: 0 0 0 21px;
font-style: italic;
border-left: 3px solid rgba(0, 0, 0, .8);
border-left: 3px solid rgba(0, 0, 0, 0.9);
}
.post-content hr {
margin-top: 70px;
margin-bottom: 70px;
border: solid rgba(0, 0, 0, .1);
border-width: 1px 0 0;
height: 0;
margin-top: 72px;
margin-bottom: 72px;
text-align: center;
border: 0;
overflow: visible;
}
.post-content hr::before {
content: '...';
display: inline-block;
color: rgba(0, 0, 0, 0.9);
font-size: 32px;
letter-spacing: 20px;
transform: translate(10px, -32px);
}
.post-content iframe {
max-width: 100%;
}
.post-view .post-tags {
margin-bottom: 30px;
.post-footer {
margin-top: 48px;
}
.post-tags li {
.post-footer .post-tags li {
display: inline-block;
}
.post-tags a {
display: block;
padding: 6px 16px;
color: rgba(0, 0, 0, .6);
font-size: 16px;
background: #f5f5f5;
border-radius: 3px;
}
.post-tags li + li {
.post-footer .post-tags li + li {
margin-left: 3px;
}
.post-tags a:hover {
background: #eee;
}
@media (max-width: 767px) {
.post-content blockquote {
margin: 0 0 0 -30px;
padding: 0 0 0 27px;
}
}
/* List footer
------------------------------ */
.pagination {
display: flex;
overflow: hidden;
}
.pagination a {
.post-footer .post-tags a {
display: block;
line-height: 30px;
padding-left: 12px;
padding-right: 12px;
color: rgba(0, 0, 0, 0.6);
font-size: 14px;
line-height: 32px;
background: #f5f5f5;
border-radius: 2px;
}
.pagination-next {
margin-left: auto;
}
/* 404
------------------------------ */
.not-found {
text-align: center;
font-size: 180px;
font-weight: 700;
line-height: calc(100vh - 300px);
.post-footer .post-tags a:hover {
background: #f2f2f2;
}
/* Footer
======================================================================= */
-------------------------------------------------- */
.footer {
padding: 20px;
font-size: 15px;
line-height: 25px;
padding-left: 24px;
padding-right: 24px;
color: rgba(0, 0, 0, 0.6);
font-size: 13px;
text-align: center;
line-height: 60px;
}
.footer span {
margin-left: 2px;
margin-right: 2px;
}
.footer a:hover {
text-decoration: underline;
.footer a {
color: inherit;
}
@media (max-width: 767px) {
.footer span:last-child {
display: block;
}
.footer span:nth-child(4) {
display: none;
}
/* 404
-------------------------------------------------- */
.not-found {
position: absolute;
left: 0;
right: 0;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
/* Highlight
------------------------------ */
.post-content pre code {
display: block;
.not-found::before {
content: '404';
color: transparent;
background: linear-gradient(120deg, #7492e6, #8f72c3, #9c66b3, #ba4d95, #ba4d95, #dc3c75);
-webkit-background-clip: text;
position: relative;
display: inline-block;
font-size: 200px;
font-weight: 700;
letter-spacing: 10px;
transform: translate(5px, -80px);
}
.post-content table code {
padding-top: 0;
padding-bottom: 0;
/* InstantClick
-------------------------------------------------- */
#instantclick-bar {
background: linear-gradient(120deg, #7492e6, #8f72c3, #9c66b3, #ba4d95, #ba4d95, #dc3c75);
}
.post-content pre {
margin: 30px 0px;
border-radius: 6px;
}
.post-content table pre {
margin: 20px 0px;
}
.highlight table {
margin: 30px 0 !important;
}
.highlight div {
border-radius: 6px;
}
.post-content table code {
white-space: pre;
}
.highlight td:nth-child(2) {
width: 100%;
}
/* Unflavored code fences
------------------------------ */
code {
padding: 20px;
}
pre {
border-radius: 6px;
background-color: #272822;
color: white;
}
+2 -3
View File
@@ -1,3 +1,2 @@
/*! highlight.js v9.12.0 | BSD3 License | git.io/hljslicense */
!function(e){var t="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):t&&(t.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return t.hljs}))}(function(e){function t(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function r(e){return e.nodeName.toLowerCase()}function a(e,t){var r=e&&e.exec(t);return r&&0===r.index}function n(e){return E.test(e)}function i(e){var t,r,a,i,s=e.className+" ";if(s+=e.parentNode?e.parentNode.className:"",r=M.exec(s))return w(r[1])?r[1]:"no-highlight";for(s=s.split(/\s+/),t=0,a=s.length;a>t;t++)if(i=s[t],n(i)||w(i))return i}function s(e){var t,r={},a=Array.prototype.slice.call(arguments,1);for(t in e)r[t]=e[t];return a.forEach(function(e){for(t in e)r[t]=e[t]}),r}function c(e){var t=[];return function a(e,n){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?n+=i.nodeValue.length:1===i.nodeType&&(t.push({event:"start",offset:n,node:i}),n=a(i,n),r(i).match(/br|hr|img|input/)||t.push({event:"stop",offset:n,node:i}));return n}(e,0),t}function o(e,a,n){function i(){return e.length&&a.length?e[0].offset!==a[0].offset?e[0].offset<a[0].offset?e:a:"start"===a[0].event?e:a:e.length?e:a}function s(e){function a(e){return" "+e.nodeName+'="'+t(e.value).replace('"',"&quot;")+'"'}u+="<"+r(e)+N.map.call(e.attributes,a).join("")+">"}function c(e){u+="</"+r(e)+">"}function o(e){("start"===e.event?s:c)(e.node)}for(var l=0,u="",d=[];e.length||a.length;){var b=i();if(u+=t(n.substring(l,b[0].offset)),l=b[0].offset,b===e){d.reverse().forEach(c);do o(b.splice(0,1)[0]),b=i();while(b===e&&b.length&&b[0].offset===l);d.reverse().forEach(s)}else"start"===b[0].event?d.push(b[0].node):d.pop(),o(b.splice(0,1)[0])}return u+t(n.substr(l))}function l(e){return e.v&&!e.cached_variants&&(e.cached_variants=e.v.map(function(t){return s(e,{v:null},t)})),e.cached_variants||e.eW&&[s(e)]||[e]}function u(e){function t(e){return e&&e.source||e}function r(r,a){return new RegExp(t(r),"m"+(e.cI?"i":"")+(a?"g":""))}function a(n,i){if(!n.compiled){if(n.compiled=!0,n.k=n.k||n.bK,n.k){var s={},c=function(t,r){e.cI&&(r=r.toLowerCase()),r.split(" ").forEach(function(e){var r=e.split("|");s[r[0]]=[t,r[1]?Number(r[1]):1]})};"string"==typeof n.k?c("keyword",n.k):k(n.k).forEach(function(e){c(e,n.k[e])}),n.k=s}n.lR=r(n.l||/\w+/,!0),i&&(n.bK&&(n.b="\\b("+n.bK.split(" ").join("|")+")\\b"),n.b||(n.b=/\B|\b/),n.bR=r(n.b),n.e||n.eW||(n.e=/\B|\b/),n.e&&(n.eR=r(n.e)),n.tE=t(n.e)||"",n.eW&&i.tE&&(n.tE+=(n.e?"|":"")+i.tE)),n.i&&(n.iR=r(n.i)),null==n.r&&(n.r=1),n.c||(n.c=[]),n.c=Array.prototype.concat.apply([],n.c.map(function(e){return l("self"===e?n:e)})),n.c.forEach(function(e){a(e,n)}),n.starts&&a(n.starts,i);var o=n.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([n.tE,n.i]).map(t).filter(Boolean);n.t=o.length?r(o.join("|"),!0):{exec:function(){return null}}}}a(e)}function d(e,r,n,i){function s(e,t){var r,n;for(r=0,n=t.c.length;n>r;r++)if(a(t.c[r].bR,e))return t.c[r]}function c(e,t){if(a(e.eR,t)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?c(e.parent,t):void 0}function o(e,t){return!n&&a(t.iR,e)}function l(e,t){var r=v.cI?t[0].toLowerCase():t[0];return e.k.hasOwnProperty(r)&&e.k[r]}function p(e,t,r,a){var n=a?"":L.classPrefix,i='<span class="'+n,s=r?"":R;return i+=e+'">',i+t+s}function m(){var e,r,a,n;if(!N.k)return t(E);for(n="",r=0,N.lR.lastIndex=0,a=N.lR.exec(E);a;)n+=t(E.substring(r,a.index)),e=l(N,a),e?(M+=e[1],n+=p(e[0],t(a[0]))):n+=t(a[0]),r=N.lR.lastIndex,a=N.lR.exec(E);return n+t(E.substr(r))}function f(){var e="string"==typeof N.sL;if(e&&!x[N.sL])return t(E);var r=e?d(N.sL,E,!0,k[N.sL]):b(E,N.sL.length?N.sL:void 0);return N.r>0&&(M+=r.r),e&&(k[N.sL]=r.top),p(r.language,r.value,!1,!0)}function g(){C+=null!=N.sL?f():m(),E=""}function _(e){C+=e.cN?p(e.cN,"",!0):"",N=Object.create(e,{parent:{value:N}})}function h(e,t){if(E+=e,null==t)return g(),0;var r=s(t,N);if(r)return r.skip?E+=t:(r.eB&&(E+=t),g(),r.rB||r.eB||(E=t)),_(r,t),r.rB?0:t.length;var a=c(N,t);if(a){var n=N;n.skip?E+=t:(n.rE||n.eE||(E+=t),g(),n.eE&&(E=t));do N.cN&&(C+=R),N.skip||(M+=N.r),N=N.parent;while(N!==a.parent);return a.starts&&_(a.starts,""),n.rE?0:t.length}if(o(t,N))throw new Error('Illegal lexeme "'+t+'" for mode "'+(N.cN||"<unnamed>")+'"');return E+=t,t.length||1}var v=w(e);if(!v)throw new Error('Unknown language: "'+e+'"');u(v);var y,N=i||v,k={},C="";for(y=N;y!==v;y=y.parent)y.cN&&(C=p(y.cN,"",!0)+C);var E="",M=0;try{for(var B,S,$=0;;){if(N.t.lastIndex=$,B=N.t.exec(r),!B)break;S=h(r.substring($,B.index),B[0]),$=B.index+S}for(h(r.substr($)),y=N;y.parent;y=y.parent)y.cN&&(C+=R);return{r:M,value:C,language:e,top:N}}catch(A){if(A.message&&-1!==A.message.indexOf("Illegal"))return{r:0,value:t(r)};throw A}}function b(e,r){r=r||L.languages||k(x);var a={r:0,value:t(e)},n=a;return r.filter(w).forEach(function(t){var r=d(t,e,!1);r.language=t,r.r>n.r&&(n=r),r.r>a.r&&(n=a,a=r)}),n.language&&(a.second_best=n),a}function p(e){return L.tabReplaLine truncated
var t="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},a={cN:"doctag",b:"@[A-Za-z]+"},n={b:"#<",e:">"},i=[e.C("#","$",{c:[a]}),e.C("^\\=begin","^\\=end",{c:[a],r:10}),e.C("^__END__","\\n$")],s={cN:"subst",b:"#\\{",e:"}",k:r},c={cN:"string",c:[e.BE,s],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{b:/<<(-?)\w+$/,e:/^\s*\w+$/}]},o={cN:"params",b:"\\(",e:"\\)",endsParent:!0,k:r},l=[c,n,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<\\s*",c:[{b:"("+e.IR+"::)?"+e.IR}]}].concat(i)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:t}),o].concat(i)},{b:e.IR+"::"},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":(?!\\s)",c:[c,{b:t}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{cN:"params",b:/\|/,e:/\|/,k:r},{b:"("+e.RSR+"|unless)\\s*",k:"unless",c:[n,{cN:"regexp",c:[e.BE,s],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(i),r:0}].concat(i);s.c=l,o.c=l;var u="[>?]>",d="[\\w#]+\\(\\w+\\):\\d+:\\d+>",b="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",p=[{b:/^\s*=>/,starts:{e:"$",c:l}},{cN:"meta",b:"^("+u+"|"+d+"|"+b+")",starts:{e:"$",c:l}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:r,i:/\/\*/,c:i.concat(p).concat(l)}}),e.registerLanguage("shell",function(e){return{aliases:["console"],c:[{cN:"meta",b:"^\\s{0,3}[\\w\\d\\[\\]()@-]*[>%$#]",starts:{e:"$",sL:"bash"}}]}}),e.registerLanguage("sql",function(e){var t=e.C("--","$");return{cI:!0,i:/[<>{}*#]/,c:[{bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment",e:/;/,eW:!0,l:/[\w\.]+/,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred dLine truncated
/*! highlight.js v9.15.6 | BSD3 License | git.io/hljslicense */
!function(e){var t="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):t&&(t.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return t.hljs}))}(function(n){var b=[],o=Object.keys,h={},p={},t=/^(no-?highlight|plain|text)$/i,m=/\blang(?:uage)?-([\w-]+)\b/i,r=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,a={case_insensitive:"cI",lexemes:"l",contains:"c",keywords:"k",subLanguage:"sL",className:"cN",begin:"b",beginKeywords:"bK",end:"e",endsWithParent:"eW",illegal:"i",excludeBegin:"eB",excludeEnd:"eE",returnBegin:"rB",returnEnd:"rE",relevance:"r",variants:"v",IDENT_RE:"IR",UNDERSCORE_IDENT_RE:"UIR",NUMBER_RE:"NR",C_NUMBER_RE:"CNR",BINARY_NUMBER_RE:"BNR",RE_STARTERS_RE:"RSR",BACKSLASH_ESCAPE:"BE",APOS_STRING_MODE:"ASM",QUOTE_STRING_MODE:"QSM",PHRASAL_WORDS_MODE:"PWM",C_LINE_COMMENT_MODE:"CLCM",C_BLOCK_COMMENT_MODE:"CBCM",HASH_COMMENT_MODE:"HCM",NUMBER_MODE:"NM",C_NUMBER_MODE:"CNM",BINARY_NUMBER_MODE:"BNM",CSS_NUMBER_MODE:"CSSNM",REGEXP_MODE:"RM",TITLE_MODE:"TM",UNDERSCORE_TITLE_MODE:"UTM",COMMENT:"C",beginRe:"bR",endRe:"eR",illegalRe:"iR",lexemesRe:"lR",terminators:"t",terminator_end:"tE"},N="</span>",v={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};function y(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function f(e){return e.nodeName.toLowerCase()}function w(e,t){var r=e&&e.exec(t);return r&&0===r.index}function g(e){return t.test(e)}function u(e){var t,r={},a=Array.prototype.slice.call(arguments,1);for(t in e)r[t]=e[t];return a.forEach(function(e){for(t in e)r[t]=e[t]}),r}function _(e){var n=[];return function e(t,r){for(var a=t.firstChild;a;a=a.nextSibling)3===a.nodeType?r+=a.nodeValue.length:1===a.nodeType&&(n.push({event:"start",offset:r,node:a}),r=e(a,r),f(a).match(/br|hr|img|input/)||n.push({event:"stop",offset:r,node:a}));return r}(e,0),n}function i(e){if(a&&!e.langApiRestored){for(var t in e.langApiRestored=!0,a)e[t]&&(e[a[t]]=e[t]);(e.c||[]).concat(e.v||[]).forEach(i)}}function E(s){function l(e){return e&&e.source||e}function c(e,t){return new RegExp(l(e),"m"+(s.cI?"i":"")+(t?"g":""))}!function t(r,e){if(!r.compiled){if(r.compiled=!0,r.k=r.k||r.bK,r.k){var a={},n=function(r,e){s.cI&&(e=e.toLowerCase()),e.split(" ").forEach(function(e){var t=e.split("|");a[t[0]]=[r,t[1]?Number(t[1]):1]})};"string"==typeof r.k?n("keyword",r.k):o(r.k).forEach(function(e){n(e,r.k[e])}),r.k=a}r.lR=c(r.l||/\w+/,!0),e&&(r.bK&&(r.b="\\b("+r.bK.split(" ").join("|")+")\\b"),r.b||(r.b=/\B|\b/),r.bR=c(r.b),r.endSameAsBegin&&(r.e=r.b),r.e||r.eW||(r.e=/\B|\b/),r.e&&(r.eR=c(r.e)),r.tE=l(r.e)||"",r.eW&&e.tE&&(r.tE+=(r.e?"|":"")+e.tE)),r.i&&(r.iR=c(r.i)),null==r.r&&(r.r=1),r.c||(r.c=[]),r.c=Array.prototype.concat.apply([],r.c.map(function(e){return(t="self"===e?r:e).v&&!t.cached_variants&&(t.cached_variants=t.v.map(function(e){return u(t,{v:null},e)})),t.cached_variants||t.eW&&[u(t)]||[t];var t})),r.c.forEach(function(e){t(e,r)}),r.starts&&t(r.starts,e);var i=r.c.map(function(e){return e.bK?"\\.?(?:"+e.b+")\\.?":e.b}).concat([r.tE,r.i]).map(l).filter(Boolean);r.t=i.length?c(function(e,t){for(var r=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,a=0,n="",i=0;i<e.length;i++){var s=a,c=l(e[i]);for(0<i&&(n+=t);0<c.length;){var o=r.exec(c);if(null==o){n+=c;break}n+=c.substring(0,o.index),c=c.substring(o.index+o[0].length),"\\"==o[0][0]&&o[1]?n+="\\"+String(Number(o[1])+s):(n+=o[0],"("==o[0]&&a++)}}return n}(i,"|"),!0):{exec:function(){return null}}}}(s)}function k(e,t,c,r){function o(e,t,r,a){var n='<span class="'+(a?"":v.classPrefix);return(n+=e+'">')+t+(r?"":N)}function l(){p+=null!=b.sL?function(){var e="string"==typeof b.sL;if(e&&!h[b.sL])return y(m);var t=e?k(b.sL,m,!0,i[b.sL]):x(m,b.sL.length?b.sL:void 0);return 0<b.r&&(f+=t.r),e&&(i[b.sL]=t.top),o(t.language,t.value,!1,!0)}():function(){var e,t,r,a,n,i,s;if(!b.k)return y(m);for(a="",t=0,b.lR.lastIndex=0,r=b.lR.exec(m);r;)a+=y(m.substring(t,r.index)),n=b,i=r,s=d.cI?i[0].toLowerCase():i[0],(e=n.k.hasOwnProperty(s)&&n.k[s])?(f+=e[1],a+=o(e[0],y(r[0]))):a+=y(r[0]),t=b.lR.lastIndex,r=b.lR.exec(m);return a+y(m.substr(t))}(),m=""}function u(e){p+=e.cN?o(e.cN,"",!0):"",b=Object.create(e,{parent:{value:b}})}function a(e,t){if(m+=e,null==t)return l(),0;var r=function(e,t){var r,a,n;for(r=0,a=t.c.length;r<a;r++)if(w(t.c[r].bR,e))return t.c[r].endSameAsBegin&&(t.c[r].eR=(n=t.c[r].bR.exec(e)[0],new RegExp(n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"m"))),t.c[r]}(t,b);if(r)return r.skip?m+=t:(r.eB&&(m+=t),l(),r.rB||r.eB||(m=t)),u(r),r.rB?0:t.length;var a,n,i=function e(t,r){if(w(t.eR,r)){for(;t.endsParent&&t.parent;)t=t.parent;return t}if(t.eW)return e(t.parent,r)}(b,t);if(i){var s=b;for(s.skip?m+=t:(s.rE||s.eE||(m+=t),l(),s.eE&&(m=t));b.cN&&(p+=N),b.skip||b.sL||(f+=b.r),(b=b.parent)!==i.parent;);return i.starts&&(i.endSameAsBegin&&(i.starts.eR=i.eR),u(i.starts)),s.rE?0:t.length}if(a=t,n=b,!c&&w(n.iR,a))throw new Error('Illegal lexeme "'+t+'" for mode "'+(b.cN||"<unnamed>")+'"');return m+=t,t.lLine truncated