Skip to content

Commit 3c05401

Browse files
author
fabianmoronzirfas
committed
feat(working search! woohoo!):
1 parent bd7b457 commit 3c05401

20 files changed

+4658
-1649
lines changed

Diff for: .babelrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"presets": ["@babel/preset-env"]
2+
"presets": ["@babel/preset-env"],
3+
"plugins": ["@babel/plugin-transform-runtime"]
34
}

Diff for: .bundle/config

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
---

Diff for: Gemfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ DEPENDENCIES
6464
tzinfo-data
6565

6666
RUBY VERSION
67-
ruby 2.4.2p198
67+
ruby 2.3.7p456
6868

6969
BUNDLED WITH
70-
1.17.2
70+
1.17.3

Diff for: _includes/search-bar.html

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<div id="flex-search">
2+
<input class="searchfield flex-search-item" id="lunr-search" placeholder="Search" /> <button id="lunr-clear" class="flex-search-item">Clear</button>
3+
</div>
4+
<div id="flex-search-results">
5+
</div>

Diff for: _layouts/default.html

+5-11
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
</head>
1717
<!--
1818
the filtering of the titles for a body class is a little cumbersome.
19-
If we have some special characters in the tile we will have to filter it here
19+
If we have some special characters in the title we will have to filter it here
2020
-->
21-
2221
<body class="{{
2322
page.title | replace: '.', '' | replace: ' ', '' | downcase
2423
}}">
@@ -39,15 +38,10 @@
3938
<script src="assets/js/vendors~main.bundle.js" type="text/javascript" defer></script>
4039
{% endif %}
4140
<script src="/assets/js/main.bundle.js" type="text/javascript"></script>
42-
<!-- <script type="text/javascript">
43-
window.onblur = function() {
44-
noLoop();
45-
}
46-
window.onfocus = function() {
47-
loop();
48-
}
49-
</script> -->
50-
{% if page.layout == 'reference' %}
41+
{% if page.layout == 'reference' or page.layout == 'entry' %}
42+
{% if jekyll.environment == "production" %}
43+
<script src="/assets/js/vendors~reference.bundle.js" type="text/javascript" defer></script>
44+
{% endif %}
5145
<script src="/assets/js/reference.bundle.js" type="text/javascript"></script>
5246
{% endif %}
5347
</body>

Diff for: _layouts/entry.html

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
layout: default
33
---
44
<!-- start layout entry -->
5+
<style>
6+
#distance{
7+
padding-top: 2em;
8+
}
9+
</style>
10+
<div id="distance">
11+
12+
{%- include search-bar.html -%}
13+
</div>
514
{% include entry-card.html entry=page ispage=true %}
615
{{content}}
716

Diff for: _sass/_reference-index.scss

+129-17
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,129 @@
1-
.index{
2-
column-width: 250px;
3-
}
4-
.category{
5-
break-inside: avoid;
6-
}
7-
.reference-category{
8-
font-size: 1.3em !important;
9-
}
10-
.reference-subcategory{
11-
font-size: 1.1em !important;
12-
margin-left: 0.6em;
13-
14-
}
15-
.reference-lists {
16-
margin-left: 1.2em;
17-
}
1+
.index {
2+
column-width: 250px;
3+
}
4+
5+
.category {
6+
break-inside: avoid;
7+
}
8+
9+
.reference-category {
10+
font-size: 1.3em !important;
11+
}
12+
13+
.reference-subcategory {
14+
font-size: 1.1em !important;
15+
margin-left: 0.6em;
16+
}
17+
18+
.reference-lists {
19+
margin-left: 1.2em;
20+
}
21+
22+
h1#new-cat-index {
23+
padding-top: 0.37em;
24+
}
25+
26+
.sub-category {
27+
column-width: 250px;
28+
/* border-bottom: 1px dotted #9636FC; */
29+
}
30+
31+
#toc-categories {
32+
column-width: 250px;
33+
padding-bottom: 3em;
34+
/* border-bottom: 1px dotted #9636FC; */
35+
}
36+
37+
.heading-category {
38+
border-top: 1px dotted #9636FC;
39+
}
40+
41+
.cat {
42+
padding-top: 0.5em;
43+
}
44+
45+
.cat-subcat {
46+
padding-bottom: 0.1em;
47+
}
48+
49+
.subcat {
50+
padding-left: 0.5em;
51+
/* padding-bottom: 0em; */
52+
}
53+
54+
.cat-group {
55+
break-inside: avoid;
56+
}
57+
58+
.box-drawings {
59+
font-weight: bold;
60+
color: #9636FC;
61+
}
62+
63+
64+
/* .entry-heading{
65+
margin-top: 0;
66+
} */
67+
68+
.summary,
69+
.ref-entry {
70+
break-inside: avoid;
71+
}
72+
73+
.summary {
74+
min-height: 6em;
75+
margin-top: 0.5em;
76+
}
77+
78+
#flex-search {
79+
display: flex;
80+
}
81+
82+
#flex-search>* {
83+
margin-right: 0.5em;
84+
}
85+
86+
#flex-search>button {
87+
margin-right: 0 !important;
88+
background-color: white;
89+
background: white;
90+
background-image: none;
91+
border: 1px solid #9636FC;
92+
}
93+
94+
.flex-search-item,
95+
.flex-search-item::placeholder {
96+
font-family: 'Times New Roman', Times, serif;
97+
font-size: 1.2em;
98+
}
99+
100+
input.flex-search-item {
101+
flex-grow: 2;
102+
border: 1px solid #9636FC;
103+
}
104+
105+
button.flex-search-item {
106+
flex-grow: 1;
107+
}
108+
109+
button.flex-search-item:hover {
110+
background: #9636FC !important;
111+
color: white;
112+
}
113+
114+
button.flex-search-item:active {
115+
background: black !important;
116+
}
117+
118+
#flex-search-results>.search-result-container>.ref-entry {
119+
padding-top: 0.5em;
120+
border-top: 1px dotted #9636FC;
121+
}
122+
123+
#flex-search-results>.search-result-container>.ref-entry>p.summary {
124+
min-height: 0;
125+
}
126+
127+
.search-result-container {
128+
padding-top: 1em;
129+
}

Diff for: assets/js/main.bundle.js

+78-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: assets/js/main.bundle.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)