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.home = document.querySelector('#home')
|
||||
|
||||
this.status = document.querySelector('#status')
|
||||
|
||||
this.page = '/readme.md'
|
||||
|
||||
this.home.style.display = 'none'
|
||||
|
||||
const observer = new MutationObserver(() => {
|
||||
if (document.documentElement.classList.contains('light')) this.panel.classList.add('light')
|
||||
else this.panel.classList.remove('light')
|
||||
@@ -90,12 +86,15 @@ customElements.define('docs-viewer', class extends HTMLElement {
|
||||
const docsViewer = document.querySelector('docs-viewer')
|
||||
await docsViewer.load('/readme.md')
|
||||
}
|
||||
if (targetUrl.hash === '#status') {
|
||||
this.panel.style.display = 'none'
|
||||
this.status.style.display = ''
|
||||
}
|
||||
})
|
||||
|
||||
window.addEventListener('popstate', async (evt) => {
|
||||
console.log(evt)
|
||||
if (evt.state === null) {
|
||||
this.home.style.display = 'none'
|
||||
this.panel.style.display = 'none'
|
||||
this.status.style.display = ''
|
||||
return
|
||||
@@ -117,7 +116,6 @@ customElements.define('docs-viewer', class extends HTMLElement {
|
||||
const html = await fetch(page)
|
||||
const text = await marked.parse(await html.text())
|
||||
this.panel.querySelector('slot').innerHTML = text, { headerIds: false, mangle: false }
|
||||
this.home.style.display = ''
|
||||
this.panel.style.display = ''
|
||||
this.status.style.display = 'none'
|
||||
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; }
|
||||
.col { max-width: 63rem; margin: 0 auto; margin-top: 1rem; }
|
||||
|
||||
#back, #mode, #home {
|
||||
#back, #mode {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
position: absolute;
|
||||
@@ -119,19 +119,6 @@
|
||||
top: 60px;
|
||||
}
|
||||
|
||||
#home {
|
||||
top: 110px;
|
||||
}
|
||||
|
||||
html.light #home {
|
||||
color: #7c9735;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
header:has(~ #documentation:target) > #headin > #home {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#bar {
|
||||
backdrop-filter: blur(64px);
|
||||
-webkit-app-region: drag;
|
||||
@@ -183,7 +170,6 @@
|
||||
</defs>
|
||||
</svg>
|
||||
<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>
|
||||
<nav>
|
||||
<a href="#status" style="text-indent: -1rem">System Status</a>
|
||||
|
||||
Reference in New Issue
Block a user