-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
126 lines (101 loc) · 4.46 KB
/
index.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="shortcut icon" type="image/x-icon" href="loveLetter.ico" />
<title>Love letter</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<!-- JQuery-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<!-- Third party-->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/summernote-lite.min.css" rel="stylesheet">
<script src="ThirdParty/summernote-lite.min.js"></script>
<link rel="stylesheet" href="style/style.css">
<script>
window.addEventListener('DOMContentLoaded', () => {
const contentElement = document.querySelector('.editor');
// method to adjus margin-left for the text editor
const adjustMarginLeft = () => {
const windowWidth = window.innerWidth;
let porcentage = 0;
// if the screen is small enough the margin will be 0, otherwise will be 28%
if (windowWidth >= 950){
porcentage = 0.28;
}else {
porcentage = 0;
}
const marginLeft = Math.floor(windowWidth * porcentage);
contentElement.style.marginLeft = `${marginLeft}px`;
};
adjustMarginLeft();
//adjust screen size when the screen size changes
window.addEventListener('resize', adjustMarginLeft);
});
</script>
</head>
<body>
<nav class="navbar col sm-1 navbar-inverse navbar-expand-lg navbar-dark bg-dark container-fluid sticky-top" style="margin-bottom: 1.25%;">
<div class="container-fluid ">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand active " href="#" style="font-family: freestyle script; font-size: 300%;"> LoveLetter</a>
</div>
<div class="collapse navbar-collapse " id="myNavbar" >
<ul class="nav navbar-nav">
<li><a href="#" onclick="save()">Save</a> <script src="scripts/saveFile.js"> </script></li>
<li><a href="#" onclick="importData()"> <script src="scripts/openFile.js"></script> Open</a></li>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#" onclick="exportDoc()"><span class="glyphicon glyphicon-print"></span> Export </a></li>
<script src="main.js"></script>
</ul>
</div>
</div>
</nav>
<div class="container-fluid editor" >
<div class="row content " >
<div class="col-sm-1 col-md-1 custom-summernote " >
<div id="summernote" class="" ></div>
<script>
$('#summernote').summernote({
//placeholder: 'Hello stand alone ui',
tabsize: 2,
height: 840,
width: 750,
toolbar: [
['style', ['style']],
['font', ['bold', 'underline', 'clear']],
['fontname', ['fontname']],
['fontsize' , ['fontsize']],
['color', ['color' , 'backcolor']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['insert', ['link', 'picture']],
['view', ['help' , 'codeview']]
],
fontSizeUnits: ['px', 'pt'],
blockquoteBreakingLevel: 2,
lineHeights: ['0.2', '0.3', '0.4', '0.5', '0.6', '0.8', '1.0', '1.2', '1.4', '1.5', '2.0', '3.0']
});
</script>
</div>
<div class="" style="margin-left: 10%;">
</div>
</div>
</div>
<footer class="container-fluid">
<p class="text-left " style="display: inline; margin-right:0.1%;"> Developed by Jaime Arturo </p>
<p class="text-right" style="display: inline;"> | Version 1.0.0 </p>
</footer>
</body>
</html>