add missing assets

This commit is contained in:
Urko 2023-06-15 14:36:11 +02:00
parent f5f1587da0
commit ffa0e85468
12 changed files with 4661 additions and 0 deletions

View File

@ -0,0 +1,89 @@
#contentBody img {
box-shadow: none;
}
#contentBody hr {
border-bottom: 1px solid #201d1a;
}
#contentBody hr {
background-color: #1e1b17;
}
#contentBody blockquote {
color: #958c82;
border-left: 0.25em solid #201d1a;
}
#contentBody kbd {
color: #bbb2a9;
background-color: #050403;
border: solid 1px #39342e;
border-bottom-color: #6a625a;
box-shadow: none;
}
#contentBody h1 .octicon-link,
#contentBody h2 .octicon-link,
#contentBody h3 .octicon-link,
#contentBody h4 .octicon-link,
#contentBody h5 .octicon-link,
#contentBody h6 .octicon-link {
color: #e4e0dc;
}
#contentBody h1 {
border-bottom: 1px solid #363636;
}
#contentBody h2 {
border-bottom: 1px solid #363636;
}
#contentBody h6 {
font-size: 0.85em;
color: #958c82;
}
#contentBody table th,
#contentBody table td {
padding: 6px 13px;
border: 1px solid #363636;
background-color: #090909;
}
#contentBody img {
background-color: #090909;
}
#contentBody code {
background-color: #090909;
}
#contentBody .highlight pre,
#contentBody pre {
background-color: #090909;
}
#contentBody .full-commit .btn-outline:not(:disabled):hover {
color: #005cc5;
border-color: #005cc5;
}
#contentBody kbd {
color: #bbb2a9;
background-color: #050403;
border: solid 1px #2e2a25;
border-bottom-color: #39342e;
box-shadow: none;
}
#contentBody :checked+.radio-label {
border-color: #0366d6;
}
#contentBody hr {
border-bottom-color: #111;
}

542
assets/css/markdown.css Normal file
View File

@ -0,0 +1,542 @@
#contentBody a {
background-color: transparent;
}
#contentBody a:active,
#contentBody a:hover {
outline-width: 0;
}
#contentBody strong {
font-weight: inherit;
}
#contentBody strong {
font-weight: bolder;
}
#contentBody h1 {
font-size: 2em;
margin: 0.67em 0;
}
#contentBody img {
border-style: none;
box-shadow: 0px 3px 15px rgba(0,0,0,0.2);
}
#contentBody code,
#contentBody kbd,
#contentBody pre {
font-family: monospace, monospace;
font-size: 1em;
}
#contentBody hr {
box-sizing: content-box;
height: 0;
overflow: visible;
}
#contentBody input {
font: inherit;
margin: 0;
}
#contentBody input {
overflow: visible;
}
#contentBody [type="checkbox"] {
box-sizing: border-box;
padding: 0;
}
#contentBody * {
box-sizing: border-box;
}
#contentBody input {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
#contentBody a {
/* color: #0366d6; */
/* text-decoration: none; */
text-decoration: underline;
}
#contentBody a:hover {
text-decoration: underline;
}
#contentBody strong {
font-weight: 600;
}
#contentBody hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #dfe2e5;
}
#contentBody hr::before {
display: table;
content: "";
}
#contentBody hr::after {
display: table;
clear: both;
content: "";
}
#contentBody table {
border-spacing: 0;
border-collapse: collapse;
}
#contentBody td,
#contentBody th {
padding: 0;
}
#contentBody h1,
#contentBody h2,
#contentBody h3,
#contentBody h4,
#contentBody h5,
#contentBody h6 {
margin-top: 0;
margin-bottom: 0;
}
#contentBody h1 {
font-size: 32px;
font-weight: 600;
}
#contentBody h2 {
font-size: 24px;
font-weight: 600;
}
#contentBody h3 {
font-size: 20px;
font-weight: 600;
}
#contentBody h4 {
font-size: 16px;
font-weight: 600;
}
#contentBody h5 {
font-size: 14px;
font-weight: 600;
}
#contentBody h6 {
font-size: 12px;
font-weight: 600;
}
#contentBody p {
margin-top: 0;
margin-bottom: 10px;
}
#contentBody blockquote {
margin: 0;
}
#contentBody ul,
#contentBody ol {
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
}
#contentBody ol ol,
#contentBody ul ol {
list-style-type: lower-roman;
}
#contentBody ul ul ol,
#contentBody ul ol ol,
#contentBody ol ul ol,
#contentBody ol ol ol {
list-style-type: lower-alpha;
}
#contentBody dd {
margin-left: 0;
}
#contentBody code {
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
#contentBody pre {
margin-top: 0;
margin-bottom: 0;
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
#contentBody .octicon {
vertical-align: text-bottom;
}
#contentBody .pl-0 {
padding-left: 0 !important;
}
#contentBody .pl-1 {
padding-left: 4px !important;
}
#contentBody .pl-2 {
padding-left: 8px !important;
}
#contentBody .pl-3 {
padding-left: 16px !important;
}
#contentBody .pl-4 {
padding-left: 24px !important;
}
#contentBody .pl-5 {
padding-left: 32px !important;
}
#contentBody .pl-6 {
padding-left: 40px !important;
}
#contentBody::before {
display: table;
content: "";
}
#contentBody::after {
display: table;
clear: both;
content: "";
}
#contentBody>*:first-child {
margin-top: 0 !important;
}
#contentBody>*:last-child {
margin-bottom: 0 !important;
}
#contentBody a:not([href]) {
color: inherit;
text-decoration: none;
}
#contentBody .anchor {
float: left;
padding-right: 4px;
margin-left: -20px;
line-height: 1;
}
#contentBody .anchor:focus {
outline: none;
}
#contentBody p,
#contentBody blockquote,
#contentBody ul,
#contentBody ol,
#contentBody dl,
#contentBody table,
#contentBody pre {
margin-top: 0;
margin-bottom: 16px;
}
#contentBody hr {
height: 0.25em;
padding: 0;
margin: 24px 0;
background-color: #e1e4e8;
border: 0;
}
#contentBody blockquote {
padding: 0 1em;
color: #6a737d;
border-left: 0.25em solid #dfe2e5;
}
#contentBody blockquote>:first-child {
margin-top: 0;
}
#contentBody blockquote>:last-child {
margin-bottom: 0;
}
#contentBody kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #444d56;
vertical-align: middle;
background-color: #fafbfc;
border: solid 1px #c6cbd1;
border-bottom-color: #959da5;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #959da5;
}
#contentBody h1,
#contentBody h2,
#contentBody h3,
#contentBody h4,
#contentBody h5,
#contentBody h6 {
margin-top: 24px;
margin-bottom: 16px;
font-weight: 600;
line-height: 1.25;
}
#contentBody h1 .octicon-link,
#contentBody h2 .octicon-link,
#contentBody h3 .octicon-link,
#contentBody h4 .octicon-link,
#contentBody h5 .octicon-link,
#contentBody h6 .octicon-link {
color: #1b1f23;
vertical-align: middle;
visibility: hidden;
}
#contentBody h1:hover .anchor,
#contentBody h2:hover .anchor,
#contentBody h3:hover .anchor,
#contentBody h4:hover .anchor,
#contentBody h5:hover .anchor,
#contentBody h6:hover .anchor {
text-decoration: none;
}
#contentBody h1:hover .anchor .octicon-link,
#contentBody h2:hover .anchor .octicon-link,
#contentBody h3:hover .anchor .octicon-link,
#contentBody h4:hover .anchor .octicon-link,
#contentBody h5:hover .anchor .octicon-link,
#contentBody h6:hover .anchor .octicon-link {
visibility: visible;
}
#contentBody h1 {
padding-bottom: 0.3em;
font-size: 2em;
border-bottom: 1px solid #c9c9c9;
}
#contentBody h2 {
padding-bottom: 0.3em;
font-size: 1.5em;
border-bottom: 1px solid #c9c9c9;
}
#contentBody h3 {
font-size: 1.25em;
}
#contentBody h4 {
font-size: 1em;
}
#contentBody h5 {
font-size: 0.875em;
}
#contentBody h6 {
font-size: 0.85em;
color: #6a737d;
}
#contentBody ul,
#contentBody ol {
padding-left: 2em;
}
#contentBody ul ul,
#contentBody ul ol,
#contentBody ol ol,
#contentBody ol ul {
margin-top: 0;
margin-bottom: 0;
}
#contentBody li {
word-wrap: break-all;
}
#contentBody li>p {
margin-top: 16px;
}
#contentBody li+li {
margin-top: 0.25em;
}
#contentBody dl {
padding: 0;
}
#contentBody dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: 600;
}
#contentBody dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
#contentBody table {
display: block;
width: 100%;
overflow: auto;
}
#contentBody table th {
font-weight: 600;
}
#contentBody table th,
#contentBody table td {
padding: 6px 13px;
border: 1px solid #c9c9c9;
background-color: #f6f6f6;
}
#contentBody img {
max-width: 100%;
box-sizing: content-box;
background-color: #f6f6f6;
}
#contentBody img[align=right] {
padding-left: 20px;
}
#contentBody img[align=left] {
padding-right: 20px;
}
#contentBody code {
padding: 0.2em 0.4em;
margin: 0;
font-size: 85%;
background-color: #f6f6f6;
border-radius: 3px;
}
#contentBody pre {
word-wrap: normal;
}
#contentBody pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
#contentBody .highlight {
margin-bottom: 16px;
}
#contentBody .highlight pre {
margin-bottom: 0;
word-break: normal;
}
#contentBody .highlight pre,
#contentBody pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f6f6f6;
}
#contentBody pre code {
display: inline;
max-width: auto;
padding: 0;
margin: 0;
overflow: visible;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
#contentBody .full-commit .btn-outline:not(:disabled):hover {
color: #005cc5;
border-color: #005cc5;
}
#contentBody kbd {
display: inline-block;
padding: 3px 5px;
font: 11px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #444d56;
vertical-align: middle;
background-color: #fafbfc;
border: solid 1px #d1d5da;
border-bottom-color: #c6cbd1;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #c6cbd1;
}
#contentBody :checked+.radio-label {
position: relative;
z-index: 1;
border-color: #0366d6;
}
#contentBody .task-list-item {
list-style-type: none;
}
#contentBody .task-list-item+.task-list-item {
margin-top: 3px;
}
#contentBody .task-list-item input {
margin: 0 0.2em 0.25em -1.6em;
vertical-align: middle;
}
#contentBody hr {
border-bottom-color: #eee;
}

56
assets/css/style-dark.css Normal file
View File

@ -0,0 +1,56 @@
/* General */
body {
background-color: #101010;
color: #8f8f8f;
}
a:link {
color: #8f8f8f;
}
a:visited {
color: #8f8f8f;
}
a:hover {
color: #8f8f8f;
}
a:active {
color: #8f8f8f;
}
mark {
color: #8f8f8f;
}
#searchBox #searchBoxInput {
color: #8f8f8f;
background-color:#363636;
border: solid 1px #363636;
}
#searchBox #searchBoxInput::placeholder {
color: #363636;
}
#searchResults {
background-color:#363636;
border: solid 1px #363636;
}
#searchResults mark {
background-color: #222020;
}
#tags li a {
background-color: #222020;
}
#contentsList hr.separator {
border: solid 1px #363636;
}
img.avatar-border {
filter: invert(100%);
}

197
assets/css/style.css Normal file
View File

@ -0,0 +1,197 @@
/* General */
body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
min-height:100vh;
margin: 0;
padding: 20px;
box-sizing:border-box;
background-color: #EFEFEF;
color: #707070;
text-align: center;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
line-height: 1.5;
font-size: 16px;
word-wrap: break-word;
}
mark {
color: #707070;
font-weight: bold;
}
a:link {
color: #707070;
}
a:visited {
color: #707070;
}
a:hover {
color: #707070;
}
a:active {
color: #707070;
}
/* Header */
header .avatar {
position: relative;
height: 100px;
}
header .avatar img {
position: absolute;
width: 100px;
margin: 0 auto;
left: 0;
right: 0;
}
header .avatarMask {
clip-path: circle(48px at center);
-webkit-clip-path: circle(48px at center);
}
/* Footer */
footer {
font-size: 12px;
box-sizing:border-box;
}
/* Top page */
#profileContainer {
min-height: calc(100vh - 100px);
display: flex;
justify-content: center;
align-items: center;
}
#profile {
max-width: 600px;
/* min-width: 300px; */
}
nav ul {
display: flex;
justify-content: center;
padding: 0;
list-style: none;
}
nav li {
margin: 0 10px;
}
/* Contents List */
#searchBox {
position: relative;
max-width: 300px;
height: 30px;
margin: 20px auto;
}
#searchBox #searchBoxInput {
position: absolute;
width: 100%;
height: 100%;
padding: 0 35px 0 15px;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-radius: 15px;
outline: 0;
font-size: 15px;
color: #707070;
background-color:#f6f6f6;
border: solid 1px #c9c9c9;
box-sizing: border-box;
}
#searchBox #searchBoxInput::placeholder {
color: #c9c9c9;
}
#searchBox #searchBoxIcon {
position: absolute;
height: 20px;
width: 20px;
top: 5px;
right: 10px;
}
#searchResults {
display: none;
position: absolute;
max-width: 600px;
/* min-width: 300px; */
margin: 0 auto;
top: 330px;
left: 0;
right: 0;
padding: 5px;
background-color:#f6f6f6;
border: solid 1px #c9c9c9;
border-radius: 5px;
text-align: left;
box-sizing: border-box;
}
#searchResults .searchResultPage {
padding: 20px
}
#searchResults .searchResultTitle {
font-weight: bold;
margin: 5px 0;
}
#searchResults .searchResultBody {
font-size: 14px;
}
#searchResults mark {
background-color: #dddfdf;
}
#tags ul {
max-width: 600px;
margin: 0 auto;
display: flex;
padding: 0;
justify-content: center;
flex-wrap: wrap;
list-style: none;
}
#tags li a {
display: block;
height: 24px;
margin: 5px;
padding: 0 5px;
background-color: #dddfdf;
border-radius: 5px;
font-size: 14px;
/* text-decoration: none; */
}
#contentsList {
padding: 20px 0;
}
#contentsList hr.separator {
width: 10px;
margin: 30px auto;
border: solid 1px #c9c9c9;
}
/* Page */
#contentBody {
max-width: 800px;
margin: 0 auto;
padding: 20px 0;
text-align: left;
}

View File

@ -0,0 +1,69 @@
.highlight .hll { background-color: #ffffcc }
.highlight { background: #f8f8f8; }
.highlight .c { color: #6a737d } /* Comment */
.highlight .err { } /* Error */
.highlight .k { color: #d73a49 } /* Keyword */
.highlight .o { } /* Operator */
.highlight .ch { color: #6a737d } /* Comment.Hashbang */
.highlight .cm { color: #6a737d } /* Comment.Multiline */
.highlight .cp { color: #d73a49 } /* Comment.Preproc */
.highlight .cpf { color: #032f62 } /* Comment.PreprocFile */
.highlight .c1 { color: #6a737d } /* Comment.Single */
.highlight .cs { color: #6a737d } /* Comment.Special */
.highlight .gd { color: #b31d28; background-color: #ffeef0 } /* Generic.Deleted */
.highlight .ge { } /* Generic.Emph */
.highlight .gr { } /* Generic.Error */
.highlight .gh { color: #005cc5 } /* Generic.Heading */
.highlight .gi { color: #22863a; background-color: #f0fff4 } /* Generic.Inserted */
.highlight .go { } /* Generic.Output */
.highlight .gp { } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #6f42c1; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #0044DD } /* Generic.Traceback */
.highlight .kc { color: #005cc5 } /* Keyword.Constant */
.highlight .kd { color: #d73a49 } /* Keyword.Declaration */
.highlight .kn { color: #d73a49 } /* Keyword.Namespace */
.highlight .kp { color: #d73a49 } /* Keyword.Pseudo */
.highlight .kr { color: #d73a49 } /* Keyword.Reserved */
.highlight .kt { color: #d73a49 } /* Keyword.Type */
.highlight .m { color: #666666 } /* Literal.Number */
.highlight .s { color: #032f62 } /* Literal.String */
.highlight .na { } /* Name.Attribute */
.highlight .nb { color: #005cc5 } /* Name.Builtin */
.highlight .nc { color: #6f42c1 } /* Name.Class */
.highlight .no { color: #005cc5 } /* Name.Constant */
.highlight .nd { color: #6f42c1 } /* Name.Decorator */
.highlight .ni { color: #005cc5 } /* Name.Entity */
.highlight .ne { color: #005cc5 } /* Name.Exception */
.highlight .nf { color: #6f42c1 } /* Name.Function */
.highlight .nl { color: #005cc5 } /* Name.Label */
.highlight .nn { color: #6f42c1 } /* Name.Namespace */
.highlight .nt { color: #22863a } /* Name.Tag */
.highlight .nv { color: #24292e } /* Name.Variable */
.highlight .ow { color: #d73a49; } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #005cc5 } /* Literal.Number.Bin */
.highlight .mf { color: #005cc5 } /* Literal.Number.Float */
.highlight .mh { color: #005cc5 } /* Literal.Number.Hex */
.highlight .mi { color: #005cc5 } /* Literal.Number.Integer */
.highlight .mo { color: #005cc5 } /* Literal.Number.Oct */
.highlight .sa { color: #d73a49 } /* Literal.String.Affix */
.highlight .sb { color: #032f62 } /* Literal.String.Backtick */
.highlight .sc { color: #032f62 } /* Literal.String.Char */
.highlight .dl { color: #d73a49 } /* Literal.String.Delimiter */
.highlight .sd { color: #032f62 } /* Literal.String.Doc */
.highlight .s2 { color: #032f62 } /* Literal.String.Double */
.highlight .se { color: #032f62 } /* Literal.String.Escape */
.highlight .sh { color: #032f62 } /* Literal.String.Heredoc */
.highlight .si { color: #005cc5 } /* Literal.String.Interpol */
.highlight .sx { color: #032f62 } /* Literal.String.Other */
.highlight .sr { color: #032f62 } /* Literal.String.Regex */
.highlight .s1 { color: #032f62 } /* Literal.String.Single */
.highlight .ss { color: #005cc5 } /* Literal.String.Symbol */
.highlight .bp { color: #005cc5 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #005cc5 } /* Name.Function.Magic */
.highlight .vc { color: #24292e } /* Name.Variable.Class */
.highlight .vg { color: #24292e } /* Name.Variable.Global */
.highlight .vi { color: #24292e } /* Name.Variable.Instance */
.highlight .vm { color: #005cc5 } /* Name.Variable.Magic */
.highlight .il { color: #005cc5 } /* Literal.Number.Integer.Long */

2
assets/js/jquery-3.5.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

7
assets/js/jquery.mark.es6.min.js vendored Normal file

File diff suppressed because one or more lines are too long

3471
assets/js/lunr.js Normal file

File diff suppressed because it is too large Load Diff

175
assets/js/search.js Normal file
View File

@ -0,0 +1,175 @@
/* global lunr $ */
let lunrIndex
let lunrResult
let pagesIndex
/**
* A function for splitting a string into bigram.
*
* @static
* @param {?(string|object|object[])} obj - The object to convert into tokens
* @param {?object} metadata - Optional metadata to associate with every token
* @returns {lunr.Token[]}
*/
const bigramTokeniser = (obj, metadata) => {
if (obj == null || obj === undefined) {
return []
}
let str = obj.toString().trim().toLowerCase()
let tokens = []
for (let i = 0; i <= str.length - 2; i++) {
const tokenMetadata = lunr.utils.clone(metadata) || {}
tokenMetadata['position'] = [i, i + 2]
tokenMetadata['index'] = tokens.length
tokens.push(
new lunr.Token(
str.slice(i, i + 2),
tokenMetadata
)
)
}
return tokens
}
/**
* A function for separating a string into bigram and join it with space.
*
* @static
* @param {?string} query - The string to convert into tokens
* @returns {string}
*/
const queryNgramSeparator = (query) => {
const str = query.toString().trim().toLowerCase()
const tokens = []
for (let i = 0; i <= str.length - 2; i++) {
tokens.push(str.slice(i, i + 2))
}
return tokens.join(' ')
}
/**
* Preparation for using lunr.js
*/
const initLunr = () => {
$.getJSON('index.json').done((index) => {
pagesIndex = index
lunrIndex = lunr(builder => {
builder.tokenizer = bigramTokeniser
builder.pipeline.reset()
builder.ref('ref')
builder.field('title', { boost: 10 })
builder.field('tags', { boost: 10 })
builder.field('body')
builder.metadataWhitelist = ['position']
for (let page of pagesIndex) {
builder.add(page)
}
})
}).fail((jqxhr, textStatus, error) => {
const err = textStatus + ', ' + error
console.error('Error getting Hugo index flie:', err)
})
}
/**
* Searching pages using lunr
* @param {String} query - Query string for searching
* @return {Object[]} - Array of search results
*/
const search = (query) => {
lunrResult = lunrIndex.search(queryNgramSeparator(query))
return lunrResult.map((result) => {
return pagesIndex.filter((page) => {
return page.ref === result.ref
})[0]
})
}
/**
* Setup UI for Search
*/
const initUI = () => {
// Clear query when clear icon is clicked
$('#searchBoxIcon').click(() => {
$('#searchBoxInput').val('')
$('#searchBoxInput').trigger('keyup')
$('#searchBoxInput').focus()
})
// Event when chenging query
$('#searchBoxInput').keyup(event => {
const $searchResults = $('#searchResults')
const query = $(event.currentTarget).val()
// Icon switching
const iconUrl = $('#searchBoxIcon').attr('src')
if (query.length) {
$('#searchBoxIcon').attr('src', iconUrl.replace('search.png', 'clear.png'))
$('#searchBoxIcon').css('cursor', 'pointer')
} else {
$('#searchBoxIcon').attr('src', iconUrl.replace('clear.png', 'search.png'))
$('#searchBoxIcon').css('cursor', 'default')
}
// Only trigger a search when 2 chars. at least have been provided
if (query.length < 2) {
$searchResults.hide()
return
}
// Display search results
renderResults(search(query))
$searchResults.show()
})
// Emit keyup event for when the query is already setted with browser back etc.
$('#searchBoxInput').trigger('keyup')
// Focus at searchBox
$('#searchBoxInput').focus()
}
/**
* Rendering search results
* @param {Object[]} results Array of search results
*/
const renderResults = (results) => {
const $searchResults = $('#searchResults')
const query = $('#searchBoxInput').val()
const BODY_LENGTH = 100
const MAX_PAGES = 10
// Clear search result
$searchResults.empty()
// Show message when results is empty
if (!results.length) {
$searchResults.append('<div class="searchResultPage">No results found for query "' + query + '"</div>')
return
}
// Only show the ten first results
results.slice(0, MAX_PAGES).forEach((result, idx) => {
const $searchResultPage = $('<div class="searchResultPage">')
const metadata = lunrResult[idx].matchData.metadata
const matchPosition = metadata[Object.keys(metadata)[0]].body ? metadata[Object.keys(metadata)[0]].body.position[0][0] : 0
const bodyStartPosition = (matchPosition - (BODY_LENGTH / 2) > 0) ? matchPosition - (BODY_LENGTH / 2) : 0
$searchResultPage.append('<a class="searchResultTitle" href="' + result.ref + '">' + result.title + '</a>')
$searchResultPage.append('<div class="searchResultBody">' + result.body.substr(bodyStartPosition, BODY_LENGTH) + '</div>')
$searchResults.append($searchResultPage)
// Highlight keyword
$('#searchResults').mark(query)
})
}
initLunr()
$(() => {
initUI()
})

View File

@ -0,0 +1,22 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<defs>
<style>
.cls-1, .cls-3 {
fill: none;
}
.cls-1 {
stroke: #d3d3d3;
stroke-width: 3px;
}
.cls-2 {
stroke: none;
}
</style>
</defs>
<g id="楕円形_1" data-name="楕円形 1" class="cls-1">
<circle class="cls-2" cx="50" cy="50" r="50"/>
<circle class="cls-3" cx="50" cy="50" r="48.5"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 459 B

31
public/img/logo.svg Normal file
View File

@ -0,0 +1,31 @@
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 800 800" style="enable-background:new 0 0 800 800;" xml:space="preserve">
<g>
<g>
<path d="M743.52,470.4c-0.07,0.42-0.19,0.84-0.19,1.25c-0.01,5-0.01,10-0.01,15c0,0.43,0,0.87,0,1.39c-58.59,0-117.08,0-175.64,0
c0-54,0-107.97,0-162.03c19.48,0,38.97,0,58.57,0c0,37.12,0,74.22,0,111.52c39.16,0,78.22,0,117.27,0
C743.52,448.48,743.52,459.44,743.52,470.4z"/>
<path d="M60.48,487.68c0.46-0.73,0.96-1.43,1.36-2.18c29.36-55.08,58.71-110.17,88.06-165.26c9.52-17.87,19.03-35.74,28.55-53.61
c0.2-0.38,0.43-0.76,0.73-1.29c0.79,1.47,1.53,2.82,2.25,4.18c9.19,17.23,18.37,34.46,27.58,51.68c0.37,0.7,0.44,1.21,0.05,1.96
c-12.32,23.7-24.62,47.42-36.92,71.14c-11.95,23.04-23.88,46.09-35.83,69.14c-4.12,7.94-8.25,15.87-12.33,23.84
c-0.43,0.84-0.98,0.86-1.72,0.86c-20.12-0.01-40.24-0.01-60.36-0.01c-0.48,0-0.96,0.03-1.44,0.04
C60.48,488,60.48,487.84,60.48,487.68z"/>
<path d="M743.28,261.12c0.01,1.76,0.04,3.52,0.04,5.28c0,13.4,0,26.79,0,40.19c0,0.48,0,0.95,0,1.52c-58.58,0-117.08,0-175.72,0
c0-1.21,0-2.4,0-3.58c0.01-4.52,0.03-9.04,0.04-13.55c0.03-9.44,0.06-18.87,0.08-28.31c0-0.51-0.07-1.03-0.11-1.54
C626.16,261.12,684.72,261.12,743.28,261.12z"/>
<path d="M432.74,265.28c4.45,8.34,8.75,16.41,13.05,24.48c5.56,10.43,11.12,20.86,16.7,31.28c0.44,0.81,0.5,1.42,0.05,2.3
c-15.34,29.52-30.63,59.06-45.94,88.59c-12.9,24.89-25.82,49.77-38.69,74.67c-0.59,1.15-1.23,1.55-2.54,1.55
c-19.88-0.05-39.76-0.04-59.64-0.04c-0.48,0-0.96,0-1.73,0C353.6,413.81,393.11,339.66,432.74,265.28z"/>
<path d="M218.46,338.99c26.51,49.77,52.92,99.34,79.49,149.21c-52.41,0-104.57,0-156.78,0c0.08-0.19,0.19-0.52,0.35-0.82
c9.22-17.48,18.46-34.96,27.66-52.45c0.42-0.8,0.87-1.04,1.74-1.03c9.6,0.07,19.19,0.1,28.79,0.14c2.2,0.01,4.39,0,6.76,0
c-0.14-0.35-0.24-0.66-0.4-0.95c-5.86-11.22-11.7-22.45-17.6-33.65c-0.55-1.04-0.55-1.82-0.01-2.86
c9.8-18.8,19.56-37.62,29.33-56.44C217.97,339.83,218.15,339.53,218.46,338.99z"/>
<path d="M472.03,339c26.48,49.7,52.9,99.3,79.49,149.2c-52.45,0-104.6,0-156.8,0c0.1-0.22,0.23-0.55,0.39-0.85
c9.22-17.48,18.45-34.96,27.66-52.45c0.39-0.74,0.81-1,1.65-1c9.64,0.07,19.27,0.1,28.91,0.14c2.2,0.01,4.39,0,6.76,0
c-0.17-0.37-0.31-0.72-0.48-1.05c-5.93-11.36-11.86-22.73-17.82-34.07c-0.37-0.7-0.31-1.21,0.03-1.86
c9.87-18.99,19.72-37.99,29.58-56.99C471.56,339.76,471.76,339.46,472.03,339z"/>
<path d="M644.34,348.67c33.05,0.37,65.93,0.73,98.89,1.1c0,15.76,0,31.46,0,47.24c-32.82,0-65.63,0-98.52,0
C644.59,380.91,644.47,364.89,644.34,348.67z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
public/img/search.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB