-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheditor.html
73 lines (69 loc) · 3.64 KB
/
editor.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
70
71
72
73
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Untitled</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.2/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/styles.min.css">
</head>
<body style="background-color:rgb(39,49,55);">
<div style="background-color:#2f3b43;height:100vh;width:90vw;margin-left:5vw;">
<h1 class="text-center" style="color:rgb(255,255,255);margin-top:32px;">CSStation v0.1</h1>
<div style="float:right;width:50%;margin-top:40vh;height:235px;">
<h1 class="text-center" style="color:rgb(255,255,255);margin-top:0px;font-size:20px;">Other options</h1>
<div class="d-flex justify-content-center" style="margin-top:3%;"><input type="button" class="btn btn-primary" id="selectBtn" onclick="openFile();" value="Open project..."/></div>
<div class="d-flex justify-content-center" style="margin-top:3%;"><button class="btn btn-secondary" type="button" style="background-color:rgb(56,67,75);width:100%;height:100%;">Create a new project...</button></div>
</div>
<div style="float:left;width:50%;margin-top:40vh;">
<h1 class="text-center" style="color:rgb(255,255,255);margin-top:0px;font-size:20px;">Recent projects</h1>
<div class="d-flex justify-content-center">
<div class="card-group">
<div class="card" style="background-color:rgb(56,70,79);">
<div class="card-body">
<h4 class="card-title" style="color:rgb(255,255,255);">Title</h4>
<p class="card-text" style="color:rgb(115,115,115);">path</p><input type="button" class="btn btn-primary" id="btnEd" value="Open" onclick="getData()" /></div>
</div>
<div class="card" style="background-color:rgb(56,70,79);">
<div class="card-body">
<h4 class="card-title" style="color:rgb(255,255,255);">Title</h4>
<p class="card-text" style="color:rgb(115,115,115);">path</p><input type="button" class="btn btn-primary" id="btnEd" value="Open" onclick="getData()" /></div>
</div>
<div class="card" style="background-color:rgb(56,70,79);">
<div class="card-body">
<h4 class="card-title" style="color:rgb(255,255,255);">Title</h4>
<p class="card-text" style="color:rgb(115,115,115);">path</p><input type="button" class="btn btn-primary" id="btnEd" value="Open" onclick="getData()" /></div>
</div>
</div>
</div>
</div>
</div>
<script>
require('./renderer.js')
function getData() {
alert("a");
}
const dialog = require('electron').remote.dialog
const fs = require('fs');
function openFile() {
dialog.showOpenDialog(function(fileNames) {
if (fileNames === undefined)
{
return;
}
var fileName = fileNames[0];
if(fileName.endsWith('csstudio'))
{
window.location.replace("editor.html");
}
else
{
alert("The filetype is not supported.");
}
});
}
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.2/js/bootstrap.bundle.min.js"></script>
</body>
</html>