-
Notifications
You must be signed in to change notification settings - Fork 1
/
poly-me-section.html
69 lines (53 loc) · 1.81 KB
/
poly-me-section.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="sections/cards-section.html">
<link rel="import" href="sections/content-section.html">
<link rel="import" href="sections/contact-section.html">
<link rel="import" href="sections/dated-section.html">
<link rel="import" href="sections/google-form-section.html">
<link rel="import" href="sections/jupyter-notebooks-section.html">
<!--
`poly-me-section`
A section of the web based resume. This element figures out which section to render.
Example:
```
<poly-me-section data="[[data]]"></poly-me-section>
```
-->
<dom-module id="poly-me-section">
<template>
<template is="dom-if" if="{{_checkEquals(data.type, 'content')}}">
<content-section data="[[data]]"></content-section>
</template>
<template is="dom-if" if="{{_checkEquals(data.type, 'cards')}}">
<cards-section data="[[data]]"></cards-section>
</template>
<template is="dom-if" if="{{_checkEquals(data.type, 'dated')}}">
<dated-section data="[[data]]"></dated-section>
</template>
<template is="dom-if" if="{{_checkEquals(data.type, 'contact')}}">
<contact-section data="[[data]]"></contact-section>
</template>
<template is="dom-if" if="{{_checkEquals(data.type, 'googleForm')}}">
<google-form-section data="[[data]]"></google-form-section>
</template>
<template is="dom-if" if="{{_checkEquals(data.type, 'jupyterNotebooks')}}">
<jupyter-notebooks-section data="[[data]]"></jupyter-notebooks-section>
</template>
</template>
<script>
Polymer({
is: 'poly-me-section',
properties: {
/**
* The section data
*/
data: {
type: Object
}
},
_checkEquals: function(a,b){
return a == b;
}
});
</script>
</dom-module>