-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Template: add webclip template engine #1680
Open
TomaszLukawskiSam
wants to merge
1
commit into
Samsung:tau_1.2
Choose a base branch
from
TomaszLukawskiSam:webclip-template-update
base: tau_1.2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,6 +89,7 @@ | |
"ylabel", | ||
"xinit", | ||
"yinit", | ||
"remoteui", | ||
|
||
//jslint specific words | ||
"nomen", | ||
|
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
3 changes: 3 additions & 0 deletions
3
examples/mobile/UIComponents/webclip/link-tab-template/css/style.css
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,3 @@ | ||
.test { | ||
font-size: 10px; | ||
} |
Binary file added
BIN
+91.9 KB
examples/mobile/UIComponents/webclip/link-tab-template/images/thumbnail_013.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions
17
...bile/UIComponents/webclip/link-tab-template/images/tw_list_icon_connections.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions
4
examples/mobile/UIComponents/webclip/link-tab-template/js/app.js
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,4 @@ | ||
/*global tau */ | ||
(function () { | ||
tau.log("app.js: template script"); | ||
})(); |
101 changes: 101 additions & 0 deletions
101
examples/mobile/UIComponents/webclip/link-tab-template/webclip.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,101 @@ | ||
<div class="ui-card ui-card-service"> | ||
<link data-template-rel="origin" href="css/style.css" rel="stylesheet" /> | ||
<script data-template-rel="origin" src="js/app.js"></script> | ||
<div class="ui-header"> | ||
<div class="ui-title">{{title}}</div> | ||
<div class="ui-icon app-icon"></div> | ||
<div class="ui-controls"> | ||
<button data-icon="down"></button> | ||
<button data-icon="reorder"></button> | ||
</div> | ||
</div> | ||
<div class="ui-content ui-tabs" style="height: 215px;"> | ||
<div class="ui-sub-tab ui-sub-tab-static"> | ||
<ul> | ||
<li class="ui-li-anchor"> | ||
<a class="ui-tab-active" href="#"> | ||
One | ||
</a> | ||
</li> | ||
<li class="ui-li-anchor"> | ||
<a href="#"> | ||
Two | ||
</a> | ||
</li> | ||
<li class="ui-li-anchor"> | ||
<a href="#"> | ||
Three | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="ui-section-changer"> | ||
<div> | ||
<section class="ui-content ui-section-active"> | ||
<ul class="ui-listview ui-content-area"> | ||
<li class="ui-li-divider"> | ||
<div class="ui-li-text"> | ||
<span class="ui-li-text-title"> | ||
Main text 01 | ||
</span> | ||
<span class="ui-li-text-sub ui-li-text-value"> | ||
Value text | ||
</span> | ||
</div> | ||
</li> | ||
<li class="ui-li-divider"> | ||
<div class="ui-li-text"> | ||
<span class="ui-li-text-title"> | ||
Main text 02 | ||
</span> | ||
</div> | ||
</li> | ||
</ul> | ||
</section> | ||
<section class="ui-content"> | ||
<ul class="ui-listview ui-content-area"> | ||
{{#images}} | ||
<li class="ui-li-has-icon ui-li-divider"> | ||
<div class="ui-li-icon"> | ||
<img data-template-rel="origin" src="{{img}}"/> | ||
</div> | ||
<div class="ui-li-text"> | ||
<span class="ui-li-text-title"> | ||
Main text 01 | ||
</span> | ||
<span class="ui-li-text-sub"> | ||
Subtitle on list item | ||
</span> | ||
</div> | ||
</li> | ||
{{/images}} | ||
</ul> | ||
</section> | ||
<section class="ui-content"> | ||
<ul class="ui-listview ui-content-area"> | ||
<li class="ui-li-divider"> | ||
<div class="ui-li-text"> | ||
<span class="ui-li-text-title"> | ||
Main text 03 | ||
</span> | ||
<span class="ui-li-text-sub"> | ||
Subtitle on list item | ||
</span> | ||
</div> | ||
</li> | ||
<li> | ||
<div class="ui-li-text"> | ||
<span class="ui-li-text-title"> | ||
Main text 04 | ||
</span> | ||
</div> | ||
</li> | ||
</ul> | ||
</section> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="ui-footer"> | ||
<button data-inline="true" data-action={{action}}>View more</button> | ||
</div> | ||
</div> |
3 changes: 3 additions & 0 deletions
3
examples/mobile/UIComponents/webclip/link-video-template/css/style.css
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,3 @@ | ||
.test { | ||
font-size: 10px; | ||
} |
6 changes: 6 additions & 0 deletions
6
examples/mobile/UIComponents/webclip/link-video-template/data.json
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,6 @@ | ||
{ | ||
"video": "https://file-examples-com.github.io/uploads/2017/04/file_example_MP4_480_1_5MG.mp4", | ||
"actionText": "View More", | ||
"title": "Title", | ||
"description": "description" | ||
} |
4 changes: 4 additions & 0 deletions
4
examples/mobile/UIComponents/webclip/link-video-template/js/app.js
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,4 @@ | ||
/*global tau */ | ||
(function () { | ||
tau.log("app.js: template script"); | ||
})(); |
17 changes: 17 additions & 0 deletions
17
examples/mobile/UIComponents/webclip/link-video-template/webclip.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,17 @@ | ||
`<div class="ui-card ui-card-ads"> | ||
<link href="css/style.css" rel="stylesheet" /> | ||
<div class="ui-content"> | ||
<script src="js/app.js"></script> | ||
<video src="{{video}}" id="video" style="width: 100%;"></video> | ||
<div class="ui-title">{{title}}</div> | ||
<div class="ui-subtitle">{{description}}</div> | ||
<script> | ||
document.getElementById("video").addEventListener("click", function () { | ||
this.play(); | ||
}); | ||
</script> | ||
</div> | ||
<div class="ui-footer"> | ||
<button data-inline="true">{{actionText}}</button> | ||
</div> | ||
</div>` |
3 changes: 3 additions & 0 deletions
3
examples/mobile/UIComponents/webclip/link-video/css/style.css
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,3 @@ | ||
.test { | ||
font-size: 10px; | ||
} |
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,4 @@ | ||
/*global tau */ | ||
(function () { | ||
tau.log("app.js: template script"); | ||
})(); |
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
Binary file added
BIN
+91.9 KB
examples/mobile/UIComponents/webclip/template-base-path/images/thumbnail_013.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions
17
...ile/UIComponents/webclip/template-base-path/images/tw_list_icon_connections.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
|
@@ -30,7 +30,7 @@ | |
templateFunctions = {}, | ||
globalOptions = { | ||
"pathPrefix": "", | ||
"default": "" | ||
"default": "html" | ||
}; | ||
|
||
/** | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For using the webclip in the device home, is it also included <script src="https://unpkg.com/mustache@latest"></script>?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but it is the first working version. This library can me merge with tau or included to tau/libs.