Skip to content

Commit f2c7a72

Browse files
committed
Fix block headers for module apis
1 parent 7135cf9 commit f2c7a72

File tree

3 files changed

+17
-2913
lines changed

3 files changed

+17
-2913
lines changed

assets/js/getModuleInfo.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ async function getInfo() {
170170
advance = advanced[0];
171171
}
172172
let examples = await rawString.match(
173-
/(?=#.*Example)([\s\S]*?)(?=\n#)/
173+
/(?=#.*Example\s\s)([\s\S]*?)(?=\n#)/
174174
);
175175
if (examples && repositories.data[r].name !== "bell") {
176176
rawString = await rawString.replace(

pages/family/_family/api/index.vue

+15-6
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@
2121
@input="onChildInput"
2222
/>
2323
<div class="tutorial-markdown-window">
24-
<h1 class="hapi-family-header">API <span class="api-version-span">v{{getVersion.match(/.*(?=\.)/)[0]}}.x</span></h1>
24+
<h1 class="hapi-family-header">
25+
API
26+
<span class="api-version-span"
27+
>v{{ getVersion.match(/.*(?=\.)/)[0] }}.x</span
28+
>
29+
</h1>
2530
<Install :name="name" :moduleAPI="moduleAPI" :version="version" />
2631
<FamilyDisplay :display="getAPI" />
2732
</div>
@@ -63,9 +68,9 @@ export default {
6368
data() {
6469
return {
6570
moduleAPI: moduleInfo,
66-
versionsArray: moduleInfo[this.$route.params.family].versionsArray.sort(
67-
(a, b) => Semver.compare(b, a)
68-
),
71+
versionsArray: moduleInfo[
72+
this.$route.params.family
73+
].versionsArray.sort((a, b) => Semver.compare(b, a)),
6974
display: "",
7075
page: "api",
7176
modules: this.modules,
@@ -86,7 +91,7 @@ export default {
8691
};
8792
},
8893
methods: {
89-
onClipboards() {
94+
onClipboards() {
9095
let that = this;
9196
setTimeout(function() {
9297
that.setClipboards();
@@ -163,7 +168,7 @@ export default {
163168
164169
for (let header of headers) {
165170
header.classList.add("api-doc-header");
166-
header.classList.add("api-main-doc-header");
171+
header.classList.add("api-main-doc-header", "tutorial-header");
167172
header.innerHTML =
168173
header.innerHTML +
169174
"<span class='api-clipboardCheck api-clipboard' title='Copy link to clipboard'></span>";
@@ -583,6 +588,10 @@ h1 a {
583588
opacity: 0.7;
584589
}
585590
591+
.tutorial-header {
592+
display: block !important;
593+
}
594+
586595
@media screen and (max-width: 900px) {
587596
.ecosystem-title {
588597
margin: 20px 0 0 0;

0 commit comments

Comments
 (0)