|
@@ -0,0 +1,220 @@
|
|
1
|
+<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+<style>
|
|
4
|
+
|
|
5
|
+ .image {
|
|
6
|
+
|
|
7
|
+ display: block;
|
|
8
|
+ margin-left: auto;
|
|
9
|
+ margin-right: auto;
|
|
10
|
+ margin-top: 150px;
|
|
11
|
+ width: 50%;
|
|
12
|
+ position: sticky;
|
|
13
|
+ }
|
|
14
|
+
|
|
15
|
+ .floating-menu {
|
|
16
|
+ font-family: sans-serif;
|
|
17
|
+ border-width:5px;
|
|
18
|
+ border-style:solid;
|
|
19
|
+ /*background: yellowgreen;*/
|
|
20
|
+ padding: 5px;;
|
|
21
|
+ width: 170px;
|
|
22
|
+ z-index: 100;
|
|
23
|
+ margin-left: left;
|
|
24
|
+ margin-top: -500px;
|
|
25
|
+ }
|
|
26
|
+
|
|
27
|
+ .show_colors {
|
|
28
|
+ border: none;
|
|
29
|
+ background-color: inherit;
|
|
30
|
+ /*padding: 14px 28px;*/
|
|
31
|
+ margin: 0 0.5em;
|
|
32
|
+ font-size: 2.5em;
|
|
33
|
+ cursor: pointer;
|
|
34
|
+ display: inline-block;
|
|
35
|
+ }
|
|
36
|
+ .show_colors:hover {background: #eee}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+ .colors {
|
|
40
|
+ border: none;
|
|
41
|
+ background-color: inherit;
|
|
42
|
+ margin: 0 0.5em;
|
|
43
|
+ font-size: 1.5em;
|
|
44
|
+ cursor: pointer;
|
|
45
|
+ display: inline-block;
|
|
46
|
+ }
|
|
47
|
+ .colors:hover {background: #eee}
|
|
48
|
+
|
|
49
|
+ .XRF {
|
|
50
|
+ font-family: sans-serif;
|
|
51
|
+ border-width:5px;
|
|
52
|
+ border-style:solid;
|
|
53
|
+ display: none;
|
|
54
|
+ /*padding: 5px;;*/
|
|
55
|
+ width: 140px;
|
|
56
|
+ margin-top: -190px;
|
|
57
|
+ margin-left: 165px;
|
|
58
|
+ }
|
|
59
|
+
|
|
60
|
+ .FORS {
|
|
61
|
+ font-family: sans-serif;
|
|
62
|
+ border-width:5px;
|
|
63
|
+ border-style:solid;
|
|
64
|
+ display: none;
|
|
65
|
+ /*padding: 5px;;*/
|
|
66
|
+ width: 140px;
|
|
67
|
+ margin-top: -125px;
|
|
68
|
+ margin-left: 165px;
|
|
69
|
+ }
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+</style>
|
|
73
|
+
|
|
74
|
+<html lang="en">
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+ <!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
|
79
|
+ <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
|
80
|
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
|
81
|
+ <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
|
|
82
|
+
|
|
83
|
+ <script type="text/javascript">
|
|
84
|
+
|
|
85
|
+ function Load(){
|
|
86
|
+ imageLoad();
|
|
87
|
+ create_colors();
|
|
88
|
+ }
|
|
89
|
+
|
|
90
|
+ function imageLoad(){
|
|
91
|
+ // var link = getUrlVars()["link"];
|
|
92
|
+ var link = "./nier.jpg"
|
|
93
|
+ var body = document.getElementById('image');
|
|
94
|
+ var image = document.createElement('img');
|
|
95
|
+ image.setAttribute("class", "image");
|
|
96
|
+ image.src = link;
|
|
97
|
+ body.appendChild(image);
|
|
98
|
+ }
|
|
99
|
+
|
|
100
|
+ function getUrlVars() {
|
|
101
|
+ var vars = {};
|
|
102
|
+ var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
|
|
103
|
+ vars[key] = value;
|
|
104
|
+ });
|
|
105
|
+ return vars;
|
|
106
|
+ }
|
|
107
|
+
|
|
108
|
+ function create_colors(){
|
|
109
|
+ var buttons = document.getElementById('XRFcolors');
|
|
110
|
+ var newNode = document.createElement('button');
|
|
111
|
+ newNode.setAttribute("class", "colors");
|
|
112
|
+ newNode.appendChild(document.createTextNode('dynamic'));
|
|
113
|
+ buttons.appendChild(newNode);
|
|
114
|
+
|
|
115
|
+ var buttons = document.getElementById('FORScolors');
|
|
116
|
+ var newNode = document.createElement('button');
|
|
117
|
+ newNode.setAttribute("class", "colors");
|
|
118
|
+ newNode.appendChild(document.createTextNode('dynamic'));
|
|
119
|
+ buttons.appendChild(newNode);
|
|
120
|
+
|
|
121
|
+ var fs = require("fs");
|
|
122
|
+ var text = fs.readFileSync("~/Desktop/Proyecto_Oller/FORS&XRF/dummy_colors");
|
|
123
|
+ text.toString().split(/\n/).forEach(function(line){
|
|
124
|
+ console.log(line)
|
|
125
|
+ // aqui va lo que esta arriba
|
|
126
|
+ });
|
|
127
|
+ }
|
|
128
|
+
|
|
129
|
+ function show_XRF(){
|
|
130
|
+ var x = document.getElementById("XRFcolors");
|
|
131
|
+ var y = document.getElementById("FORScolors");
|
|
132
|
+ if (x.style.display === "none") {
|
|
133
|
+ x.style.display = "block";
|
|
134
|
+ y.style.display = "none";
|
|
135
|
+ } else {
|
|
136
|
+ x.style.display = "none";
|
|
137
|
+ }
|
|
138
|
+ }
|
|
139
|
+
|
|
140
|
+ function show_FORS(){
|
|
141
|
+ var x = document.getElementById("FORScolors");
|
|
142
|
+ var y = document.getElementById("XRFcolors");
|
|
143
|
+
|
|
144
|
+ if (x.style.display === "none") {
|
|
145
|
+ x.style.display = "block";
|
|
146
|
+ y.style.display = "none";
|
|
147
|
+ } else {
|
|
148
|
+ x.style.display = "none";
|
|
149
|
+ }
|
|
150
|
+ }
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+ </script>
|
|
154
|
+
|
|
155
|
+ <head>
|
|
156
|
+ <!-- Required meta tags -->
|
|
157
|
+ <meta charset="utf-8">
|
|
158
|
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
159
|
+ <!-- Link to CSS -->
|
|
160
|
+ <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
|
161
|
+ <link rel="stylesheet" type="text/css" href="css/style.css">
|
|
162
|
+ <title>XRF & FORS</title>
|
|
163
|
+ <!-- Collapse Navbar (needs some work) -->
|
|
164
|
+ <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
|
165
|
+ <a class="navbar-brand" href="#"><img src="https://upload.wikimedia.org/wikipedia/en/thumb/c/c8/Francisco_Oller.jpg/220px-Francisco_Oller.jpg" width="30" height="30" class="d-inline-block align-top" alt=""> Proyecto Oller</a>
|
|
166
|
+ <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
|
167
|
+ <span class="navbar-toggler-icon"></span>
|
|
168
|
+ </button>
|
|
169
|
+
|
|
170
|
+ <div class="collapse navbar-collapse" id="navbarSupportedContent">
|
|
171
|
+ <ul class="navbar-nav mr-auto">
|
|
172
|
+ <li class="nav-item active">
|
|
173
|
+ <a class="nav-link" href="#">Home</a>
|
|
174
|
+ </li>
|
|
175
|
+ <li class="nav-item">
|
|
176
|
+ <a class="nav-link" href="#">Link</a>
|
|
177
|
+ </li>
|
|
178
|
+ <li class="nav-item dropdown">
|
|
179
|
+ <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
180
|
+ Dropdown
|
|
181
|
+ </a>
|
|
182
|
+ <div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
|
183
|
+ <a class="dropdown-item" href="#">Action</a>
|
|
184
|
+ <a class="dropdown-item" href="#">Another action</a>
|
|
185
|
+ <div class="dropdown-divider"></div>
|
|
186
|
+ <a class="dropdown-item" href="#">Something else here</a>
|
|
187
|
+ </div>
|
|
188
|
+ </li>
|
|
189
|
+ <li class="nav-item">
|
|
190
|
+ <a class="nav-link disabled" href="#">Disabled</a>
|
|
191
|
+ </li>
|
|
192
|
+ </ul>
|
|
193
|
+ <form class="form-inline my-2 my-lg-0">
|
|
194
|
+ <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
|
|
195
|
+ <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
|
|
196
|
+ </form>
|
|
197
|
+ </div>
|
|
198
|
+ </nav>
|
|
199
|
+
|
|
200
|
+ </head>
|
|
201
|
+ <div id="image"></div>
|
|
202
|
+ <body onload="Load();">
|
|
203
|
+
|
|
204
|
+ <nav class="floating-menu">
|
|
205
|
+ <button onclick="show_XRF();" class="show_colors">XRF</button>
|
|
206
|
+ <button onclick="show_FORS();" class="show_colors">FORS</button>
|
|
207
|
+ <a href="/Users/spider/Desktop/Proyecto_Oller/MSI/msi.html"><button class="show_colors">MSI</button></a>
|
|
208
|
+ </nav>
|
|
209
|
+
|
|
210
|
+ <nav class="XRF" id="XRFcolors"></nav>
|
|
211
|
+ <nav class="FORS" id="FORScolors"></nav>
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+ </body>
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+</html>
|