forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[remoting android] Generate trimmed-down credits.html.
This copies resources to a central location, so that the Android build is independent of anything under remoting/webapp. This provides GN options to tools/licenses.py to only list third-party projects that are included in the app (currently the "remoting_apk" target, but followup work will enable us to specify the actual target for Official builds). Also stripped out CSS rules that were only meaningful for the webapp. BUG=697128,178215 Review-Url: https://codereview.chromium.org/2728913002 Cr-Commit-Position: refs/heads/master@{#454936}
- Loading branch information
lambroslambrou
authored and
Commit bot
committed
Mar 6, 2017
1 parent
58f544f
commit aeec4d3
Showing
5 changed files
with
158 additions
and
5 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 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,18 @@ | ||
<!doctype html> | ||
<html class="full-height"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Credits</title> | ||
<!-- The CSS and JS files are named this way so they can be used as | ||
Android resources, which requires the filenames without the | ||
extensions to be distinct. --> | ||
<link rel="stylesheet" href="credits_css.css"> | ||
<script src="credits_js.js"></script> | ||
</head> | ||
<body class="full-height"> | ||
<div class="entries"> | ||
<div class="page-title">Credits</div> | ||
{{entries}} | ||
</div> | ||
</body> | ||
</html> |
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,75 @@ | ||
/* Copyright (c) 2012 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. | ||
*/ | ||
|
||
body { | ||
font-family: "Arial", "Helvetica", sans-serif; | ||
color: #222; | ||
font-size: 13px; | ||
margin: 0; | ||
direction: __MSG_@@bidi_dir__; | ||
overflow: auto; | ||
} | ||
|
||
a { | ||
text-decoration: none; | ||
color: #15c; | ||
cursor: pointer; | ||
} | ||
|
||
a:active { | ||
color: #d14836; | ||
} | ||
|
||
body.show-only-selected .product:not(.selected) { | ||
display: none; | ||
} | ||
|
||
.page-title { | ||
font-size: 164%; | ||
font-weight: bold; | ||
} | ||
|
||
.entries { | ||
margin: 8px; | ||
} | ||
|
||
.product { | ||
background-color: #c3d9ff; | ||
border-radius: 5px; | ||
margin-top: 16px; | ||
overflow: auto; | ||
padding: 2px; | ||
} | ||
|
||
.product .title { | ||
float: left; | ||
font-size: 110%; | ||
font-weight: bold; | ||
margin: 3px; | ||
} | ||
|
||
.right-align { | ||
float: right; | ||
margin: 3px 6px; | ||
} | ||
|
||
.licence { | ||
background-color: #e8eef7; | ||
border-radius: 3px; | ||
clear: both; | ||
padding: 16px; | ||
} | ||
|
||
.product:not(.selected) .licence { | ||
display: none; | ||
} | ||
|
||
.licence h3 { | ||
margin-top: 0; | ||
} | ||
|
||
.licence pre { | ||
white-space: pre-wrap; | ||
} |
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,12 @@ | ||
<div class="product"> | ||
<span class="title">{{name}}</span> | ||
<span class="right-align"> | ||
<span class="homepage"><a href="{{url}}" target="_blank">homepage</a></span> | ||
- | ||
<a class="toggle-licence" href="#">show license</a> | ||
</span> | ||
<div class="licence"> | ||
<pre>{{license}}</pre> | ||
</div> | ||
</div> | ||
|
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,20 @@ | ||
// Copyright 2015 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. | ||
|
||
(function() { | ||
|
||
'use strict'; | ||
|
||
/** @param {Event} event */ | ||
function onClick(event) { | ||
var element = /** @type {HTMLElement} */ (event.target); | ||
if (element.classList.contains('toggle-licence')) { | ||
element.parentElement.parentElement.classList.toggle('selected'); | ||
document.body.classList.toggle('show-only-selected'); | ||
} | ||
} | ||
|
||
document.addEventListener('click', onClick, false); | ||
|
||
})(); |