-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
121 lines (94 loc) · 3.53 KB
/
index.html
File metadata and controls
121 lines (94 loc) · 3.53 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Demo - fsdialog</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
<link href="dist/fsdialogs.css?v=0.2.1" rel="stylesheet">
<!-- <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/prism.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/themes/prism.min.css" rel="stylesheet"> -->
<style>
.dialog-width {
width: 300px;
}
.font-8 {
font-size: 0.8em;
}
</style>
</head>
<body>
<div class="container">
<div class="d-flex" style="font-size:2em">
<div>
<a title="Github" class="text-secondary" href="https://github.com/fenisoft/fsdialog">
<i class="bi bi-github"></i>
</a>
</div>
</div>
<h3>fsdialog</h3>
<p>
A simple library for create dialog box with html5
<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog"><dialog></a> element, only js/css
zero dependencies
</p>
<h4>Demo</h4>
<div class="mt-3">
<button id="testBtn" type="button" class="btn btn-success">Simple Dialog</button>
</div>
<div class="d-flex align-items-center mt-4">
<button id="confirmBtn" type="button" class="btn btn-primary me-2">Confirm dialog</button>
<div id="confirmResult">Result:</div>
</div>
<div class="d-flex align-items-center mt-4">
<button id="promptBtn" type="button" class="btn btn-warning me-2">Prompt dialog</button>
<div id="promptResult">Ale</div>
</div>
<div class="d-flex align-items-center mt-4">
<button id="promptNumberBtn" type="button" class="btn btn-dark me-2">Prompt dialog number</button>
<div id="promptNumberResult">12</div>
</div>
<div class="d-flex align-items-center mt-4">
<button id="innerBtn" type="button" class="btn btn-info me-2">Inner dialog</button>
</div>
<!-- <div class="d-flex align-items-center mt-4">
<button id="successBtn" type="button" class="btn btn-success me-2">fsSuccess</button>
</div>
<div class="d-flex align-items-center mt-4">
<button id="alertBtn" type="button" class="btn btn-danger me-2">fsAlert</button>
</div> -->
</div>
<dialog class="fs-dialog-modal dialog-width" id="innerDialog">
<div class="title bg-info">
Inner dialog
</div>
<div class="body font-8">
<div><b>Canto primo</b></div>
<p>
Nel mezzo del cammin di nostra vita
mi ritrovai per una selva oscura,
ché la diritta via era smarrita.
</p>
<p>
Ahi quanto a dir qual era è cosa dura
esta selva selvaggia e aspra e forte
che nel pensier rinova la paura!
</p>
<div>
<button type="type" class="btn btn-link btn-sm" onclick="showInfo()">
Dante Alighieri
</button>
</div>
</div>
<div class="buttons">
<div class="fs-dialog-margin-auto"></div>
<button class="btn btn-sm btn-secondary" type="button" onclick="document.getElementById('innerDialog').close()">
CLOSE
</button>
</div>
</dialog>
<script type="module" src="app.js?0.1.9"></script>
<!-- <script src="app.js?v0.1.8"></script> -->
</body>
</html>