-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·138 lines (132 loc) · 4.46 KB
/
index.html
File metadata and controls
executable file
·138 lines (132 loc) · 4.46 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Solution Builder</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
.checkbox-group {
margin-top: 5px;
max-height: 150px; /* Optional: limit height and scroll if too many items */
overflow-y: auto;
}
.checkbox-group {
margin-top: 5px;
max-height: 150px;
overflow-y: auto;
display: inline-block;
vertical-align: top;
width: 100%;
margin-right: 5%;
}
.checkbox-group label {
display: flex; /* Use flexbox to align checkbox and text */
align-items: center; /* Vertically center checkbox and text */
margin: 2px 0; /* Reduce vertical spacing between options */
padding: 0; /* Remove any default padding */
}
.checkbox-group input[type="checkbox"] {
margin: 0 5px 0 0; /* Checkbox on left with minimal right margin */
width: 20px;
}
label {
display: block;
margin-top: 10px;
}
.checkbox-group:last-child {
margin-right: 0;
}
select, input, textarea {
width: 100%;
margin-top: 5px;
}
textarea {
height: 100px;
resize: vertical;
}
button {
margin-top: 20px;
padding: 10px;
background-color: #4CAF50;
color: white;
border: none;
cursor: pointer;
}
button:hover {
background-color: #45a049;
}
#keyForm, #solutionForm {
display: none;
}
#keyForm.active, #solutionForm.active {
display: block;
}
</style>
<script src="https://unpkg.com/jsoneditor@9.10.2/dist/jsoneditor.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
<link href="https://unpkg.com/jsoneditor@9.10.2/dist/jsoneditor.min.css" rel="stylesheet">
</head>
<body>
<div id="settingsForm" class="active">
<h2>Settings</h2>
<label>
<input type="radio" name="sourceType" value="github" onchange="selectSource('github')">
GitHub
</label>
<label>
<input type="radio" name="sourceType" value="local" checked onchange="selectSource('local')">
Local
</label>
<div id="githubSettings" style="display: none;">
<h3>GitHub Settings</h3>
<label for="githubPath">GitHub Path:</label>
<input type="text" id="githubPath" value="https://api.github.com/repos/openimis/solution-builder/contents/">
<br>
<label>
<input type="radio" name="githubAuth" value="anonymous" checked>
Anonymous
</label>
<label>
<input type="radio" name="githubAuth" value="authenticated">
Authenticated
</label>
<div id="githubApiKeyContainer" style="display: none;">
<label for="githubApiKeyInitial">GitHub API Key:</label>
<input type="text" id="githubApiKeyInitial">
</div>
</div>
<div id="localSettings" >
<h3>Local Settings</h3>
<button onclick="selectLocalFolder()">Select Folder</button>
</div>
<button onclick="proceedWithSettings()">Proceed</button>
</div>
<div id="solutionForm" class="inactive">
<h2>Solution Builder</h2>
<form>
<label for="solutions">solutions:</label>
<div id="solutions" class="checkbox-group"></div>
<br>
<label for="modules">Modules:</label>
<div id="modules" class="checkbox-group"></div>
<br>
<label for="other">Roles, menus... :</label>
<div id="other"></div>
<br>
<label for="gitBranch">Git Branch:</label>
<input type="text" id="gitBranch">
<br>
<button type="submit">Generate Solution</button>
</form>
</div>
<div id="result"></div>
<script src="solutionBuilder.js"></script>
<script src="solutionBuilderUI.js"></script>
</body>
</html>