Skip to content
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

WIP simple ui with Polymer #24

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions public/demo/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<!doctype html>
<html>

<head>

<title>unquote</title>

<meta name="viewport"
content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">

<script src="../components/webcomponentsjs/webcomponents.js">
</script>

<link rel="import" href="../components/font-roboto/roboto.html">
<link rel="import" href="../components/paper-button/paper-button.html">
<link rel="import" href="../polymer_components/rocon-button.html">

<style>
html,body {
height: 100%;
margin: 0;
font-family: 'RobotoDraft', sans-serif;
}
.container {
width: 80%;
margin: 50px auto;
}
@media (min-width: 481px) {
#tabs {
width: 200px;
}
.container {
width: 400px;
}
}
</style>

</head>

<body unresolved>
<template id="tpl0" is="auto-binding">
<style>
#container {


}

</style>
<div id="container" style="height:100%;" vertical layout>
<div id="container" style="height:100%;" horizontal layout>
<div style="color: {{color}};">{{foo}}</div>
<rocon-button flex on-tap="{{debug2}}">Button1</rocon-button>
</div>
<div id="container" style="height:100%;" horizontal layout>
<rocon-button flex on-tap="{{debug2}}">Buttonx</rocon-button>
<rocon-button flex on-tap="{{debug2}}">Buttonx</rocon-button>
</div>
<div id="container" style="height:100%;" horizontal layout>
<rocon-button flex on-tap="{{debug2}}">Buttony</rocon-button>
<rocon-button flex on-tap="{{debug2}}">Buttony</rocon-button>
</div>

</div>
</template>
<script>
var scope = document.querySelector('#tpl0');
console.log(scope);

scope.foo = "Some value"

scope.change_attr = function(){

};

scope.debug = function(e){
scope.foo = ""+new Date();
scope.color = "blue";


};
scope.debug2 = function(e){
scope.foo = ""+new Date();
scope.color = "red";


};
</script>
</body>


</html>
34 changes: 34 additions & 0 deletions public/polymer_components/rocon-button.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@


<link rel="import" href="../components/polymer/polymer.html">
<!-- <link rel="import" href="../components/paper-button/paper-button.html"> -->
<link rel="import" href="../components/paper-button/paper-button-base.html">
<polymer-element name="rocon-button" role="button">
<template>
<style>
:host {
display: flex;
cursor: pointer;

}
.tile {
margin: 4px;
border: solid 1px #aaa;

}



</style>
<div class="tile" horizontal layout center-justified center flex>
<div><content></content></div>
</div>
<!-- <paper-button flex raised>Button</paper-button></div> -->
</template>


<script>
Polymer({});
</script>

</polymer-element>
Empty file.
3 changes: 2 additions & 1 deletion rocon_composer_blockly/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
public/components
node_modules
.env
.env*
test.js
tmp

4 changes: 3 additions & 1 deletion rocon_composer_blockly/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
"highlightjs": "~8.4.0",
"vkbeautify-wrapper": "*",
"angular-sanitize": "~1.3.10",
"jsonselect": "~0.2.1"
"jsonselect": "~0.2.1",
"polymer": "Polymer/polymer#~0.5.5",
"paper-button": "Polymer/paper-button#~0.5.5"
},
"overrides": {
"jsonselect": {
Expand Down
Loading