forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[memories] Memories landing page (part 3)
Related tab groups and bookmarks section of the memory card screenshot/BC46BmffK375p7i Bug: 1180970 Change-Id: I35b29fe8578854bed389a9120bb76212afc63090 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2745786 Commit-Queue: Moe Ahmadi <[email protected]> Reviewed-by: dpapad <[email protected]> Reviewed-by: Rebekah Potter <[email protected]> Reviewed-by: Tommy Li <[email protected]> Cr-Commit-Position: refs/heads/master@{#865970}
- Loading branch information
Moe Ahmadi
authored and
Chromium LUCI CQ
committed
Mar 24, 2021
1 parent
8acd3cb
commit 1589a1c
Showing
21 changed files
with
326 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<style> | ||
:host { | ||
display: inline-flex; | ||
flex-direction: column; | ||
} | ||
|
||
a { | ||
color: inherit; | ||
text-decoration: none; | ||
} | ||
|
||
[name$='Caption'] { | ||
-webkit-box-orient: vertical; | ||
-webkit-line-clamp: var(--caption-max-lines); | ||
display: -webkit-box; | ||
line-height: 20px; | ||
overflow: hidden; | ||
} | ||
|
||
[name='primaryCaption'] { | ||
--caption-max-lines: 2; | ||
font-size: 14px; | ||
margin-top: 12px; | ||
} | ||
|
||
[name='secondaryCaption'] { | ||
--caption-max-lines: 1; | ||
color: var(--cr-secondary-text-color); | ||
} | ||
</style> | ||
<a href$="[[url.url]]"> | ||
<slot name="main"></slot> | ||
<slot name="primaryCaption"></slot> | ||
<slot name="secondaryCaption"></slot> | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright 2021 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import './shared_vars.js'; | ||
|
||
import {Url} from 'chrome://resources/mojo/url/mojom/url.mojom-webui.js'; | ||
import {html, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; | ||
|
||
/** | ||
* @fileoverview This file provides a custom element displaying a tile with | ||
* slots for a main section at the top and primary and secondary captions below. | ||
*/ | ||
|
||
class MemoryTileElement extends PolymerElement { | ||
static get is() { | ||
return 'memory-tile'; | ||
} | ||
|
||
static get template() { | ||
return html`{__html_template__}`; | ||
} | ||
|
||
static get properties() { | ||
return { | ||
//======================================================================== | ||
// Public properties | ||
//======================================================================== | ||
|
||
/** | ||
* Optional URL to navigate to when the tile is clicked. | ||
* @type {Url} | ||
*/ | ||
url: Object, | ||
}; | ||
} | ||
} | ||
|
||
customElements.define(MemoryTileElement.is, MemoryTileElement); |
Oops, something went wrong.