Commit d831a0a7 authored by ZhangHuiJian's avatar ZhangHuiJian

增加导航栏

parent 8e872566
......@@ -88,6 +88,45 @@ See https://github.com/adobe-type-tools/cmap-resources
#viewerContainer {
top: 15px !important;
}
#__back{
position: fixed;
bottom:10vh;
right:30px;
background-color: red;
border-radius: 50%;
box-sizing: border-box;
width:60px;
height:60px;
z-index:10000000;
display: flex;
justify-content:center;
align-items: center;
color:#fff;
}
.nav{
height:48.5px;
width:100vw;
background-color: #fff;
color:#333;
font-size: 16px;
display: flex;
position: absolute;
}
#mainContainer{
top:48.5px!important;
}
.nav>div{
display: flex;
align-items: center;
justify-content: center;
}
.nav>.nav-text{
width:70%;
}
.nav-left{
width:15%;
background-color: #fff;
}
/* .page {
width: 95vw !important;
} */
......@@ -156,6 +195,7 @@ See https://github.com/adobe-type-tools/cmap-resources
});
}
/* if(!isWeixin){
document.addEventListener('webviewerloaded', () => {
console.log('webviewerloaded');
......@@ -166,12 +206,31 @@ See https://github.com/adobe-type-tools/cmap-resources
}
});
}*/
let PDFTitle = localStorage.getItem('PDFtitle')||'';
window.onload = ()=>{
window.localStorage.removeItem('pdfback');
let navBackDom = document.getElementById('nav-back');
// open 的时候用 _parent _self;
navBackDom.addEventListener('click',()=>{
window.localStorage.setItem('pdfback','1');
})
if(PDFTitle){
let navText = document.getElementById('nav-text');
navText.innerHTML = PDFTitle;
}
}
</script>
<body tabindex="1" class="loadingInProgress">
<div id="outerContainer">
<div class="nav">
<div class="nav-left" id="nav-back">
<svg t="1651657875528" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2041" width="20" height="20"><path d="M435.8 512L690 258c18.8-18.8 18.8-49.2 0-67.8-18.8-18.8-49.2-18.6-68 0L334 478c-18.2 18.2-18.6 47.4-1.4 66.2L621.8 834c9.4 9.4 21.8 14 34 14s24.6-4.6 34-14c18.8-18.8 18.8-49.2 0-67.8L435.8 512z" p-id="2042"></path></svg>
</div>
<div class="nav-text" id="nav-text"></div>
<div class="nav-right"></div>
</div>
<div id="sidebarContainer">
<div id="toolbarSidebar">
<div class="splitToolbarButton toggled">
......@@ -1053,6 +1112,7 @@ See https://github.com/adobe-type-tools/cmap-resources
</div>
<!-- overlayContainer -->
</div>
<!-- <div id="__back">back</div> -->
<!-- outerContainer -->
<div id="printContainer"></div>
<script src="https://cdn.bootcss.com/vConsole/3.3.4/vconsole.min.js" ></script >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment