Skip to content

Commit 7d2227b

Browse files
committed
fixed styles
1 parent a549041 commit 7d2227b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+123
-119
lines changed

Dockerfile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
FROM docker.io/antora/antora:3.1.12
22

3-
RUN yarn global add asciidoctor-kroki
4-
RUN yarn global add asciidoctor-emoji
5-
RUN yarn global add @antora/lunr-extension
3+
# We have yarn.tar.gz with all these deps
4+
# This was needed because javascript dependencies tend to rot with time
5+
# So we have static deps that works for this specific antora version
6+
7+
COPY ./yarn.tar.gz /usr/local/share/.config/yarn/global
8+
RUN tar -xzvf /usr/local/share/.config/yarn/global/yarn.tar.gz -C /usr/local/share/.config/yarn/global
9+
10+
# You can install deps manually if you want
11+
#RUN yarn global add [email protected]
12+
#RUN yarn global add [email protected]
13+
#RUN yarn global add @antora/[email protected]
14+
#RUN yarn global add @djencks/[email protected]

docs/404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width,initial-scale=1">
66
<title>Page Not Found :: Elixir Full-Stack</title>
7-
<meta name="generator" content="Antora 3.1.12">
7+
<meta name="generator" content="Antora 3.1.10">
88
<link rel="stylesheet" href="/elixir-fullstack/_/css/site.css">
99
</head>
1010
<body class="status-404">

docs/_/js/search-ui.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,14 @@
133133
document.head.appendChild(link);
134134
}
135135

136+
function highlightPageTitle (title, terms) {
137+
const positions = getTermPosition(title, terms);
138+
return buildHighlightedText(title, positions, snippetLength)
139+
}
140+
136141
function highlightSectionTitle (sectionTitle, terms) {
137142
if (sectionTitle) {
138-
const text = sectionTitle.title ?? sectionTitle.text;
143+
const text = sectionTitle.text;
139144
const positions = getTermPosition(text, terms);
140145
return buildHighlightedText(text, positions, snippetLength)
141146
}
@@ -151,7 +156,8 @@
151156
return []
152157
}
153158

154-
function highlightText (text, terms) {
159+
function highlightText (doc, terms) {
160+
const text = doc.text;
155161
const positions = getTermPosition(text, terms);
156162
return buildHighlightedText(text, positions, snippetLength)
157163
}
@@ -177,12 +183,9 @@
177183
}
178184
}
179185
return {
180-
pageTitleNodes: highlightText(doc.title, terms.title || []),
186+
pageTitleNodes: highlightPageTitle(doc.title, terms.title || []),
181187
sectionTitleNodes: highlightSectionTitle(sectionTitle, terms.title || []),
182-
pageContentNodes: highlightText(
183-
sectionTitle?.title && sectionTitle.text ? sectionTitle.text : doc.text,
184-
terms.text || []
185-
),
188+
pageContentNodes: highlightText(doc, terms.text || []),
186189
pageKeywordNodes: highlightKeyword(doc, terms.keyword || []),
187190
}
188191
}
@@ -196,12 +199,12 @@
196199
let sectionTitle;
197200
if (ids.length > 1) {
198201
const titleId = ids[1];
199-
sectionTitle = doc.titles.find(function (item) {
202+
sectionTitle = doc.titles.filter(function (item) {
200203
return String(item.id) === titleId
201-
});
204+
})[0];
202205
}
203206
const metadata = item.matchData.metadata;
204-
const highlightingResult = highlightHit(metadata, sectionTitle || doc, doc);
207+
const highlightingResult = highlightHit(metadata, sectionTitle, doc);
205208
const componentVersion = store.componentVersions[`${doc.component}/${doc.version}`];
206209
if (componentVersion !== undefined && currentComponent !== componentVersion) {
207210
const searchResultComponentHeader = document.createElement('div');

docs/abstract.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="viewport" content="width=device-width,initial-scale=1">
66
<title>Untitled :: Elixir Full-Stack</title>
77
<link rel="canonical" href="https://elixircl.github.io/elixir-fullstack/abstract.html">
8-
<meta name="generator" content="Antora 3.1.12">
8+
<meta name="generator" content="Antora 3.1.10">
99
<link rel="stylesheet" href="./_/css/site.css">
1010
</head>
1111
<body class="article">

docs/afterword.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="viewport" content="width=device-width,initial-scale=1">
66
<title>Untitled :: Elixir Full-Stack</title>
77
<link rel="canonical" href="https://elixircl.github.io/elixir-fullstack/afterword.html">
8-
<meta name="generator" content="Antora 3.1.12">
8+
<meta name="generator" content="Antora 3.1.10">
99
<link rel="stylesheet" href="./_/css/site.css">
1010
</head>
1111
<body class="article">

docs/authors.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="viewport" content="width=device-width,initial-scale=1">
66
<title>Untitled :: Elixir Full-Stack</title>
77
<link rel="canonical" href="https://elixircl.github.io/elixir-fullstack/authors.html">
8-
<meta name="generator" content="Antora 3.1.12">
8+
<meta name="generator" content="Antora 3.1.10">
99
<link rel="stylesheet" href="./_/css/site.css">
1010
</head>
1111
<body class="article">

docs/bibliography.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="viewport" content="width=device-width,initial-scale=1">
66
<title>Untitled :: Elixir Full-Stack</title>
77
<link rel="canonical" href="https://elixircl.github.io/elixir-fullstack/bibliography.html">
8-
<meta name="generator" content="Antora 3.1.12">
8+
<meta name="generator" content="Antora 3.1.10">
99
<link rel="stylesheet" href="./_/css/site.css">
1010
</head>
1111
<body class="article">

docs/book.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="viewport" content="width=device-width,initial-scale=1">
66
<title>Untitled :: Elixir Full-Stack</title>
77
<link rel="canonical" href="https://elixircl.github.io/elixir-fullstack/book.html">
8-
<meta name="generator" content="Antora 3.1.12">
8+
<meta name="generator" content="Antora 3.1.10">
99
<link rel="stylesheet" href="./_/css/site.css">
1010
</head>
1111
<body class="article">

docs/colophon.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="viewport" content="width=device-width,initial-scale=1">
66
<title>Untitled :: Elixir Full-Stack</title>
77
<link rel="canonical" href="https://elixircl.github.io/elixir-fullstack/colophon.html">
8-
<meta name="generator" content="Antora 3.1.12">
8+
<meta name="generator" content="Antora 3.1.10">
99
<link rel="stylesheet" href="./_/css/site.css">
1010
</head>
1111
<body class="article">

docs/dedication.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="viewport" content="width=device-width,initial-scale=1">
66
<title>Untitled :: Elixir Full-Stack</title>
77
<link rel="canonical" href="https://elixircl.github.io/elixir-fullstack/dedication.html">
8-
<meta name="generator" content="Antora 3.1.12">
8+
<meta name="generator" content="Antora 3.1.10">
99
<link rel="stylesheet" href="./_/css/site.css">
1010
</head>
1111
<body class="article">

0 commit comments

Comments
 (0)