feat: 新增包文件
This commit is contained in:
253
packages/chrome-ui/ui/webui.html
Normal file
253
packages/chrome-ui/ui/webui.html
Normal file
@@ -0,0 +1,253 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Shell Browser</title>
|
||||
<style>
|
||||
:root {
|
||||
/* https://colorhunt.co/palette/161920 */
|
||||
--bg-color: #39375b;
|
||||
--text-color: #ececec;
|
||||
--tab-color: #745c97;
|
||||
--toolbar-control-color: #d597ce;
|
||||
|
||||
/* electron-chrome-extensions colors */
|
||||
--browser-action-badge-outline: var(--tab-color);
|
||||
}
|
||||
|
||||
*, *:before, *:after {
|
||||
box-sizing: border-box;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
html {
|
||||
background: var(--tab-color);
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", sans-serif;
|
||||
font-size: 16px;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.topbar {
|
||||
background: var(--bg-color);
|
||||
}
|
||||
|
||||
/*----- TABS -----*/
|
||||
|
||||
#tabstrip {
|
||||
width: 100%;
|
||||
height: calc(env(titlebar-area-height, 31px) + 1px);
|
||||
}
|
||||
|
||||
.tab-container {
|
||||
position: fixed;
|
||||
left: env(titlebar-area-x);
|
||||
top: env(titlebar-area-y);
|
||||
width: env(titlebar-area-width);
|
||||
height: calc(env(titlebar-area-height, 31px) + 1px);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.tab-list {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
#createtab {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
}
|
||||
|
||||
#createtab:hover {
|
||||
background: rgba(255,255,255,0.2);
|
||||
}
|
||||
|
||||
.tab {
|
||||
padding: 0.2rem 0.4rem;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
width: 12rem;
|
||||
box-shadow: inset -1px 0 0 0 rgba(0,0,0,0.33);
|
||||
}
|
||||
|
||||
.tab[data-active] {
|
||||
background: var(--tab-color);
|
||||
}
|
||||
|
||||
.tab .favicon[src] {
|
||||
display: none;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 0.2rem;
|
||||
}
|
||||
|
||||
.tab .favicon[src].loaded {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tab .title {
|
||||
white-space: nowrap;
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
font-size: 0.725rem;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.tab .controls {
|
||||
flex: 0 0 auto;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.tab .controls .control {
|
||||
background: rgba(0,0,0,0.2);
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
padding: 0;
|
||||
margin-left: 0.2rem;
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
color: #aaa;
|
||||
font-size: 0.7rem;
|
||||
vertical-align: middle;
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
.tab .controls .control:disabled {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.app-drag {
|
||||
flex: 1 0 auto;
|
||||
-webkit-app-region: drag;
|
||||
height: calc(100% - 5px);
|
||||
min-width: 2rem;
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
.window-controls {
|
||||
display: none;
|
||||
flex-direction: row;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.platform-linux .window-controls {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.window-controls .control {
|
||||
width: 2.5rem;
|
||||
background: none;
|
||||
border: none;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.window-controls .control:hover {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
/*----- TOOLBAR -----*/
|
||||
|
||||
.toolbar {
|
||||
height: 1.875rem;
|
||||
background-color: var(--tab-color);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0.2rem 0.5rem;
|
||||
}
|
||||
|
||||
.toolbar .page-controls {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
.address-bar {
|
||||
flex: 1 0 auto;
|
||||
line-height: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.address-bar input {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
border: none;
|
||||
border-radius: 2rem;
|
||||
padding: 0 0.5rem;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.toolbar .control {
|
||||
background: none;
|
||||
border: none;
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
padding: 0;
|
||||
line-height: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="topbar">
|
||||
<div id="tabstrip">
|
||||
<div class="tab-container">
|
||||
<ul class="tab-list">
|
||||
<template id="tabtemplate">
|
||||
<li class="tab">
|
||||
<img class="favicon" />
|
||||
<span class="title"></span>
|
||||
<div class="controls">
|
||||
<button class="control audio" disabled>🔊</button>
|
||||
<button class="control close">✕</button>
|
||||
</div>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
<button id="createtab">+</button>
|
||||
<div class="app-drag"></div>
|
||||
<div class="window-controls">
|
||||
<button id="minimize" class="control">🗕</button>
|
||||
<button id="maximize" class="control">🗖</button>
|
||||
<button id="close" class="control">🗙</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toolbar">
|
||||
<div class="page-controls">
|
||||
<button id="goback" class="control">⬅️</button>
|
||||
<button id="goforward" class="control">➡️</button>
|
||||
<button id="reload" class="control">🔄</button>
|
||||
</div>
|
||||
<div class="address-bar">
|
||||
<input id="addressurl" spellcheck="false" />
|
||||
</div>
|
||||
<browser-action-list id="actions" alignment="bottom left"></browser-action-list>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="./webui.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user