aboutsummaryrefslogtreecommitdiffstats
path: root/utils/index-for-gh-pages.html
blob: a6d7f631790e46789a41b6c77767118dd5ca33f3 (plain)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta content="IE=edge" http-equiv="X-UA-Compatible" />
  <title>Storybook</title>
  <style>
    body, html {
      width: 100%;
      height: 100%;
      padding: 0;
      margin: 0;
    }
    .header {
      display: flex;
      padding: 18px 40px 0 40px;
    }
    .logo {
      margin-right: 95px;
      cursor: pointer;
    }
    img {
      width: 125px;
      height: 26px;
    }
    .showcase-header {
      display: flex;
    }
    .case-tab-name {
      font-family: OpenSans, OpenSans-Regular, 'Open Sans', Arial, sans-serif;
      font-size: 14px;
      line-height: 1.71;
      letter-spacing: -0.2px;
      margin: 0 20px;
      padding: 4px 8px 12px 8px;
      color: #5a5a5a;
      cursor: pointer;
      text-transform: uppercase;
    }
    .case-tab-name[active=true] {
      color: #009fdb;
      border-bottom: solid 2px #009fdb;
    }
    .showcase-wrapper {
      height: calc(100% - 60px);
      display: flex;
      flex-direction: column;
      background-color: #FFFFFF;
    }
    .showcase-iframe {
      height: 100%;
      border-top: solid 1px #aaaaaa;
    }
  </style>

  <script>
    var shows = {
      mainPage: "main-page.html",
      react: "react/index.html",
      angular: "angular/index.html"
    };
    function show(type){
      document.getElementById('showcase').src = shows[type];
      setActiveTab(type);
    }
    function setActiveTab(type) {
      var allTabs = document.getElementsByClassName('case-tab-name');
      for(var i = 0; i < allTabs.length; i++ ) {
        if(allTabs[i].getAttribute('id') === type+'-tab') {
          allTabs[i].setAttribute('active', true);
        }
        else {
          allTabs[i].setAttribute('active', false);
        }
      }
    }
  </script>

</head>

<body>
  <div class="header">
    <div class="logo" onClick="show('mainPage')"><img src="assets/images/logo_onap.png"/></div>
    <div class="showcase-header">
      <div class="case-tab-name" id="react-tab" onClick="show('react')">React</div>
      <div class="case-tab-name" id="angular-tab" onClick="show('angular')">Angular</div>
    </div>
  </div>

  <div class="showcase-wrapper">
    <iframe id="showcase" src="main-page.html" class="showcase-iframe">
    </iframe>
  </div>
</body>

</html>