mirror of
https://github.com/aljazceru/pear-docs.git
synced 2025-12-17 14:34:19 +01:00
removed home icon
This commit is contained in:
@@ -52,14 +52,10 @@ customElements.define('docs-viewer', class extends HTMLElement {
|
|||||||
|
|
||||||
this.panel = this.root.querySelector('#panel')
|
this.panel = this.root.querySelector('#panel')
|
||||||
|
|
||||||
this.home = document.querySelector('#home')
|
|
||||||
|
|
||||||
this.status = document.querySelector('#status')
|
this.status = document.querySelector('#status')
|
||||||
|
|
||||||
this.page = '/readme.md'
|
this.page = '/readme.md'
|
||||||
|
|
||||||
this.home.style.display = 'none'
|
|
||||||
|
|
||||||
const observer = new MutationObserver(() => {
|
const observer = new MutationObserver(() => {
|
||||||
if (document.documentElement.classList.contains('light')) this.panel.classList.add('light')
|
if (document.documentElement.classList.contains('light')) this.panel.classList.add('light')
|
||||||
else this.panel.classList.remove('light')
|
else this.panel.classList.remove('light')
|
||||||
@@ -90,12 +86,15 @@ customElements.define('docs-viewer', class extends HTMLElement {
|
|||||||
const docsViewer = document.querySelector('docs-viewer')
|
const docsViewer = document.querySelector('docs-viewer')
|
||||||
await docsViewer.load('/readme.md')
|
await docsViewer.load('/readme.md')
|
||||||
}
|
}
|
||||||
|
if (targetUrl.hash === '#status') {
|
||||||
|
this.panel.style.display = 'none'
|
||||||
|
this.status.style.display = ''
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
window.addEventListener('popstate', async (evt) => {
|
window.addEventListener('popstate', async (evt) => {
|
||||||
console.log(evt)
|
console.log(evt)
|
||||||
if (evt.state === null) {
|
if (evt.state === null) {
|
||||||
this.home.style.display = 'none'
|
|
||||||
this.panel.style.display = 'none'
|
this.panel.style.display = 'none'
|
||||||
this.status.style.display = ''
|
this.status.style.display = ''
|
||||||
return
|
return
|
||||||
@@ -117,7 +116,6 @@ customElements.define('docs-viewer', class extends HTMLElement {
|
|||||||
const html = await fetch(page)
|
const html = await fetch(page)
|
||||||
const text = await marked.parse(await html.text())
|
const text = await marked.parse(await html.text())
|
||||||
this.panel.querySelector('slot').innerHTML = text, { headerIds: false, mangle: false }
|
this.panel.querySelector('slot').innerHTML = text, { headerIds: false, mangle: false }
|
||||||
this.home.style.display = ''
|
|
||||||
this.panel.style.display = ''
|
this.panel.style.display = ''
|
||||||
this.status.style.display = 'none'
|
this.status.style.display = 'none'
|
||||||
if (!opts.back) history.pushState({ page }, null)
|
if (!opts.back) history.pushState({ page }, null)
|
||||||
|
|||||||
16
pulse.html
16
pulse.html
@@ -101,7 +101,7 @@
|
|||||||
blockquote::before { content: "ℹ"; float: left; font-size: 1.625rem; margin-left: 1rem; margin-right: 0.625rem; }
|
blockquote::before { content: "ℹ"; float: left; font-size: 1.625rem; margin-left: 1rem; margin-right: 0.625rem; }
|
||||||
.col { max-width: 63rem; margin: 0 auto; margin-top: 1rem; }
|
.col { max-width: 63rem; margin: 0 auto; margin-top: 1rem; }
|
||||||
|
|
||||||
#back, #mode, #home {
|
#back, #mode {
|
||||||
width: 32px;
|
width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -119,19 +119,6 @@
|
|||||||
top: 60px;
|
top: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#home {
|
|
||||||
top: 110px;
|
|
||||||
}
|
|
||||||
|
|
||||||
html.light #home {
|
|
||||||
color: #7c9735;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
header:has(~ #documentation:target) > #headin > #home {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
#bar {
|
#bar {
|
||||||
backdrop-filter: blur(64px);
|
backdrop-filter: blur(64px);
|
||||||
-webkit-app-region: drag;
|
-webkit-app-region: drag;
|
||||||
@@ -183,7 +170,6 @@
|
|||||||
</defs>
|
</defs>
|
||||||
</svg>
|
</svg>
|
||||||
<img id="mode" src="/assets/light.svg" onclick="document.documentElement.classList.toggle('light');"></img>
|
<img id="mode" src="/assets/light.svg" onclick="document.documentElement.classList.toggle('light');"></img>
|
||||||
<img id="home" src="/assets/home.svg" onclick="document.querySelector('docs-viewer').load('/readme.md')"></img>
|
|
||||||
<img id="back" src="/assets/arrow.svg" onclick="history.back()"></img>
|
<img id="back" src="/assets/arrow.svg" onclick="history.back()"></img>
|
||||||
<nav>
|
<nav>
|
||||||
<a href="#status" style="text-indent: -1rem">System Status</a>
|
<a href="#status" style="text-indent: -1rem">System Status</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user