瀏覽代碼

Up to date FORS

Kevinlega 6 年之前
父節點
當前提交
83617a11b7
共有 5 個檔案被更改,包括 252 行新增98 行删除
  1. 0
    98
      FORS&XRF.html
  2. 220
    0
      FORS&XRF/FORS&XRF.html
  3. 16
    0
      FORS&XRF/dummy save
  4. 16
    0
      FORS&XRF/dummy_colors
  5. 二進制
      FORS&XRF/nier.jpg

+ 0
- 98
FORS&XRF.html 查看文件

@@ -1,98 +0,0 @@
1
-<!DOCTYPE html>
2
-
3
-<style>
4
-  
5
-  .floating-menu {
6
-    font-family: sans-serif;
7
-    background: /*yellowgreen*/;
8
-    padding: 5px;;
9
-    width: 130px;
10
-    z-index: 100;
11
-    position: fixed;
12
-  }
13
-  .floating-menu a {
14
-    font-size: 0.9em;
15
-    display: block;
16
-    margin: 0 0.5em;
17
-    color: black;
18
-  }
19
-</style>
20
-
21
-<html lang="en">
22
-	<head>
23
-		<!-- Required meta tags -->
24
-	    <meta charset="utf-8">
25
-	    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
26
-	    <!-- Link to CSS -->
27
-		<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
28
-		<title>MSI</title>
29
-		<!-- Collapse Navbar (needs some work) -->
30
-		<div class="pos-f-t">
31
-			<div class="collapse" id="navbarToggleExternalContent">
32
-		    	<div class="bg-dark p-4">
33
-		      		<h5 class="text-white h4">Collapsed content</h5>
34
-		      		<span class="text-muted">Toggleable via the navbar brand.</span>
35
-		    	</div>
36
-		  	</div>
37
-		  	<nav class="navbar navbar-dark bg-dark">
38
-		    	<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggleExternalContent" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
39
-		      		<span class="navbar-toggler-icon"></span>
40
-		    	</button>
41
-		 	</nav>
42
-		</div>
43
-	</head>
44
-	<body>
45
-
46
-			<nav class="floating-menu">
47
-				<a href="#hola">Hi</a>
48
-			</nav>
49
-
50
-
51
-
52
-
53
-		
54
-			<!-- <button class="dropdown-btn">Dropdown
55
-    			<i class="fa fa-caret-down"></i>
56
-  			</button>
57
-	 			<div class="dropdown-container">
58
-			    	<a href="#">Link 1</a>
59
-			    	<a href="#">Link 2</a>
60
-					<a href="#">Link 3</a>
61
-				</div> -->
62
-
63
-
64
-
65
-
66
-	    <!-- <h1>MSI</h1> -->
67
-	    <!-- Optional JavaScript (No se para que es esto.) -->
68
-	    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
69
-	    <!-- <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> -->
70
-	    <!-- <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> -->
71
-	    <!-- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script> -->
72
-		
73
-	    <!-- Image Selector -->
74
-	    <!-- <form> -->
75
-			<!-- <div class="form-group"> -->
76
-		    	<!-- <label for="frontImage">Front Image</label>
77
-		    	<select class="form-control" id="frontImage">
78
-		      		<option>1</option>
79
-				    <option>2</option>
80
-				    <option>3</option>
81
-				    <option>4</option>
82
-				    <option>5</option>
83
-		    	</select>
84
-		  	</div>
85
-		  	<div class="form-group">
86
-		    	<label for="backgroundImage">Background Image</label>
87
-		    	<select class="form-control" id="backgroundImage">
88
-		      		<option>1</option>
89
-				    <option>2</option>
90
-				    <option>3</option>
91
-				    <option>4</option>
92
-				    <option>5</option>
93
-		    	</select>
94
-		  	</div>
95
-		</form> -->
96
-
97
-	</body>
98
-</html>

+ 220
- 0
FORS&XRF/FORS&XRF.html 查看文件

@@ -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>

+ 16
- 0
FORS&XRF/dummy save 查看文件

@@ -0,0 +1,16 @@
1
+White 	#FFFFFF
2
+Silver 	#C0C0C0
3
+Gray 	#808080
4
+Black 	#000000
5
+Red 	#FF0000
6
+Maroon 	#800000
7
+Yellow 	#FFFF00
8
+Olive 	#808000
9
+Lime 	#00FF00
10
+Green 	#008000
11
+Aqua 	#00FFFF
12
+Teal 	#008080
13
+Blue 	#0000FF
14
+Navy 	#000080
15
+Fuchsia #FF00FF
16
+Purple 	#800080

+ 16
- 0
FORS&XRF/dummy_colors 查看文件

@@ -0,0 +1,16 @@
1
+White
2
+Silver
3
+Gray
4
+Black
5
+Red
6
+Maroon
7
+Yellow
8
+Olive
9
+Lime
10
+Green
11
+Aqua
12
+Teal
13
+Blue
14
+Navy
15
+Fuchsia
16
+Purple

二進制
FORS&XRF/nier.jpg 查看文件