blob: 59e496ae37a90385a161a0c5fd70caaa40291507 [file] [log] [blame]
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_components/managed_footnote/managed_footnote.html">
<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
<link rel="import" href="chrome://resources/cr_elements/cr_toast/cr_toast_manager.html">
<link rel="import" href="chrome://resources/html/cr/ui/splitter.html">
<link rel="import" href="chrome://resources/html/find_shortcut_behavior.html">
<link rel="import" href="api_listener.html">
<link rel="import" href="command_manager.html">
<link rel="import" href="constants.html">
<link rel="import" href="dnd_manager.html">
<link rel="import" href="folder_node.html">
<link rel="import" href="list.html">
<link rel="import" href="mouse_focus_behavior.html">
<link rel="import" href="router.html">
<link rel="import" href="shared_vars.html">
<link rel="import" href="store.html">
<link rel="import" href="strings.html">
<link rel="import" href="toolbar.html">
<link rel="import" href="util.html">
<dom-module id="bookmarks-app">
<template>
<style>
:host {
color: var(--cr-primary-text-color);
display: flex;
flex-direction: column;
height: 100%;
line-height: 1.54; /* 20px. */
}
#main-container {
display: flex;
flex-direction: row;
flex-grow: 1;
overflow: hidden;
}
#splitter {
box-sizing: border-box;
cursor: col-resize;
<if expr="is_win">
/* Unlike other platforms, e-resize is a two-way arrow on Windows. */
cursor: e-resize;
</if>
flex: 0 0 var(--splitter-width);
opacity: 0;
}
#splitter:hover,
#splitter.splitter-active {
border-inline-start: 1px solid rgba(0, 0, 0, 0.1);
opacity: 1;
transition: opacity 100ms ease-out;
}
:host-context([dark]) #splitter:hover,
:host-context([dark]) #splitter.splitter-active {
border-inline-start-color: var(--cr-separator-color);
}
#sidebar {
display: flex;
flex-direction: column;
max-width: 40%;
min-width: var(--min-sidebar-width);
width: var(--min-sidebar-width);
}
bookmarks-folder-node {
flex: 1;
overflow-y: auto;
padding: 8px 3px 0 18px;
user-select: none;
}
managed-footnote {
--managed-footnote-icon-padding: 12px;
flex: 0;
padding-bottom: 24px;
padding-top: 24px;
}
bookmarks-list {
flex: 1;
overflow-x: hidden;
}
</style>
<bookmarks-toolbar sidebar-width="[[sidebarWidth_]]" role="banner">
</bookmarks-toolbar>
<div id="main-container">
<div id="sidebar" role="tree" aria-label="$i18n{sidebarAxLabel}">
<bookmarks-folder-node item-id="0" depth="-1"></bookmarks-folder-node>
<managed-footnote></managed-footnote>
</div>
<div id="splitter"></div>
<bookmarks-list></bookmarks-list>
</div>
<bookmarks-router></bookmarks-router>
<bookmarks-command-manager></bookmarks-command-manager>
<cr-toast-manager duration="10000" on-undo-click="onUndoClick_"
undo-label="$i18n{undo}" undo-description="$i18n{undoDescription}">
</cr-toast-manager>
</template>
<script src="app.js"></script>
</dom-module>