blob: ae76f097919137235a2a969ec3e7f0043cfd66db [file] [log] [blame]
<style>
#thirdPartyThemeContainer {
width: 100%;
}
#thirdPartyTheme {
align-items: center;
border-radius: 5px;
border: 1px solid var(--ntp-border-color);
color: var(--ntp-primary-text-color);
display: flex;
flex-direction: row;
margin-bottom: 24px;
padding: 0 16px;
}
#thirdPartyBrushIcon {
-webkit-mask-image: url(icons/brush.svg);
-webkit-mask-repeat: no-repeat;
-webkit-mask-size: 100%;
background-color: var(--ntp-primary-text-color);
height: 24px;
margin-inline-end: 20px;
width: 24px;
}
#thirdPartyThemeNameContainer {
flex-grow: 1;
margin-inline-end: 24px;
}
#thirdPartyThemeName {
font-weight: bold;
}
#thirdPartyLink {
-webkit-mask-image: url(chrome://resources/images/open_in_new.svg);
-webkit-mask-repeat: no-repeat;
-webkit-mask-size: 100%;
background-color: var(--ntp-primary-text-color);
height: 20px;
margin-inline-end: 24px;
width: 20px;
}
#uninstallThirdPartyButton {
margin: 16px 0;
}
#themesContainer {
--ntp-grid-gap: 20px;
padding: 3px;
}
#themesContainer > * {
outline-width: 0;
}
:host-context(.focus-outline-visible) #themesContainer > *:focus {
box-shadow: 0 0 0 2px rgba(var(--google-blue-600-rgb), .4);
}
#autogeneratedThemeContainer {
display: flex;
position: relative;
}
#colorPickerIcon {
-webkit-mask-image: url(icons/colorize.svg);
-webkit-mask-repeat: no-repeat;
-webkit-mask-size: 100%;
background-color: var(--google-grey-refresh-700);
height: 20px;
left: calc(50% - 10px);
position: absolute;
top: calc(50% - 10px);
width: 20px;
}
#autogeneratedTheme {
--ntp-theme-icon-frame-color: var(--google-grey-refresh-100);
--ntp-theme-icon-active-tab-color: white;
--ntp-theme-icon-stroke-color: var(--google-grey-refresh-300);
}
#defaultTheme {
--ntp-theme-icon-frame-color: rgb(222, 225, 230);
--ntp-theme-icon-active-tab-color: white;
}
@media (prefers-color-scheme: dark) {
#defaultTheme {
--ntp-theme-icon-frame-color: rgb(var(--google-grey-900-rgb));
--ntp-theme-icon-active-tab-color: rgb(50, 54, 57);
}
}
</style>
<div id="thirdPartyThemeContainer" hidden="[[!isThirdPartyTheme_(theme)]]">
<div id="thirdPartyTheme">
<div id="thirdPartyBrushIcon"></div>
<div id="thirdPartyThemeNameContainer">
<div id="thirdPartyThemeName" >
[[theme.info.thirdPartyThemeInfo.name]]
</div>
<div>
$i18n{thirdPartyThemeDescription}
</div>
</div>
<a id="thirdPartyLink" target="_blank"
href$="[[getThirdPartyLink_(theme.info.thirdPartyThemeInfo.id)]]">
</a>
<cr-button id="uninstallThirdPartyButton"
on-click="onUninstallThirdPartyThemeClick_">
$i18n{uninstallThirdPartyThemeButton}
</cr-button>
</div>
</div>
<input id="colorPicker" type="color" on-change="onCustomFrameColorChange_"
hidden>
</input>
<ntp-grid id="themesContainer" columns="6">
<div id="autogeneratedThemeContainer" tabindex="0"
on-click="onAutogeneratedThemeClick_">
<ntp-theme-icon id="autogeneratedTheme" title="$i18n{colorPickerLabel}"
selected$="[[isThemeIconSelected_('autogenerated', theme)]]">
</ntp-theme-icon>
<div id="colorPickerIcon"></div>
</div>
<ntp-theme-icon id="defaultTheme" title="$i18n{defaultThemeLabel}"
on-click="onDefaultThemeClick_" tabindex="0"
selected$="[[isThemeIconSelected_('default', theme)]]">
</ntp-theme-icon>
<dom-repeat id="themes" items="[[chromeThemes_]]">
<template>
<ntp-theme-icon title="[[item.label]]" on-click="onChromeThemeClick_"
style="--ntp-theme-icon-frame-color:
[[skColorToRgba_(item.colors.frame)]];
--ntp-theme-icon-active-tab-color:
[[skColorToRgba_(item.colors.activeTab)]];"
tabindex="0"
selected$="[[isThemeIconSelected_(item.id, theme)]]">
</ntp-theme-icon>
</template>
</dom-repeat>
</ntp-grid>