-
Notifications
You must be signed in to change notification settings - Fork 1
/
tryblog.html
154 lines (121 loc) · 5.29 KB
/
tryblog.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<!DOCTYPE html>
<html>
<title>Blog</title>
<meta charset="UTF-8">
<script src = "scriptsrc.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://www.w3schools.com/lib/w3-theme-black.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
html,body,h1,h2,h3,h4,h5,h6 {font-family: "Roboto", sans-serif}
table {
border-collapse: collapse ;
width: 150% ;
}
table, th, td {
border: 2px solid black ;
height: 25px ;
}
</style>
<script type="text/javascript">
function refresh() {
location.reload() ;
}
</script>
<body>
<div class="w3-top">
<div class="w3-bar w3-theme w3-top w3-left-align w3-large">
<a class="w3-bar-item w3-button w3-right w3-hide-large w3-hover-white w3-large w3-theme-l1" href="javascript:void(0)" onclick="w3_open()"><i class="fa fa-bars"></i></a>
<a href="About.html" class="w3-bar-item w3-button w3-hide-small w3-hover-white">About</a>
</div>
</div>
<nav class="w3-sidebar w3-bar-block w3-collapse w3-large w3-theme-l5 w3-animate-left" style="z-index:3;width:250px;margin-top:43px;" id="mySidebar">
<a href="javascript:void(0)" onclick="w3_close()" class="w3-right w3-xlarge w3-padding-large w3-hover-black w3-hide-large" title="Close Menu">
<i class="fa fa-remove"></i>
</a>
<h4 class="w3-bar-item"><b>Menu</b></h4>
<a class="w3-bar-item w3-button w3-hover-black" href="index.html">Home</a>
<a class="w3-bar-item w3-button w3-hover-black" href="tryuserinfo.html">User Details</a>
<a class="w3-bar-item w3-button w3-hover-black" href="trycontestinfo.html">Contest Details</a>
<a class="w3-bar-item w3-button w3-hover-black" href="tryblog.html">Blog Posts</a>
<a class="w3-bar-item w3-button w3-hover-black" href="tryproblem.html">Problem Set</a>
<a class="w3-bar-item w3-button w3-hover-black" href="tryavcontests.html">Available Contests</a>
</nav>
<div class="w3-overlay w3-hide-large" onclick="w3_close()" style="cursor:pointer" title="close side menu" id="myOverlay"></div>
<div class="w3-main" style="margin-left:250px">
<div class="w3-row w3-padding-64">
<div class="w3-twothird w3-container">
<h1 class="w3-text-teal" style="font-size:275%;" style="text-align:center;">Blog Posts</h1>
<div class="w3-twothird w3-container">
<!-- To display blogs by author -->
<h3 style="font-size: 160%"> Blog Posts By Author</h3>
<p style="font-size: 140%">Enter User handle</p>
<input type="text" id = "user-handle-blog" name="handle-for-blog">
<button type="button" class="submit-button" onclick="call_blog_by_handle()">Go</button>
<button onclick="refresh()">Refresh</button>
</div>
<div class="w3-twothird w3-container" id = "for-error-6" style="font-size: 120%">
<p id = "error-sentence-6"></p>
</div>
<div class="w3-twothird w3-container" id = "for-output-6" style="font-size: 120%">
<!-- To display blogs by author -->
<p id = "title-author"></p>
<table id = "author-blog-details">
</table>
</div>
<div class="w3-twothird w3-container">
<!-- To display blogs -->
<h3 style="font-size: 160%"> Blog Posts By Blog-Id</h3>
<p style="font-size: 140%">Enter Blog Id</p>
<input tsype="text" id = "blog-id" name="blog-id-user">
<button type="button" class="submit-button" onclick="call_blog()">Go</button>
<button onclick="refresh()">Refresh</button>
</div>
<div class="w3-twothird w3-container" id = "for-error-7" style="font-size: 120%">
<p id = "error-sentence-7"></p>
</div>
<div class="w3-twothird w3-container" id = "for-output-7" style="font-size: 120%">
<!-- To display blogs -->
<div class="blog-response" id = "blog-content">
</div>
</div>
<div class = "w3-twothird w3-container">
<!-- To display blog comments -->
<h3 style="font-size: 160%">Blog Comments By Blog-Id</h3>
<p style="font-size: 140%">Enter Blog Id</p>
<input type="text" id = "blog-id-comments" name="blog-id-user-comment">
<button type="button" class="submit-button" onclick="call_blog_comment()">Go</button>
<button onclick="refresh()">Refresh</button>
</div>
<div class="w3-twothird w3-container" id = "for-error-8" style="font-size: 120%">
<p id = "error-sentence-8"></p>
</div>
<div class="w3-twothird w3-container" id = "for-output-8" style="font-size: 120%">
<!-- To display blogs -->
<table id="comments-list">
</table>
</div>
</div>
</div>
</div>
<script>
var mySidebar = document.getElementById("mySidebar");
var overlayBg = document.getElementById("myOverlay");
function w3_open() {
if (mySidebar.style.display === 'block') {
mySidebar.style.display = 'none';
overlayBg.style.display = "none";
} else {
mySidebar.style.display = 'block';
overlayBg.style.display = "block";
}
}
function w3_close() {
mySidebar.style.display = "none";
overlayBg.style.display = "none";
}
</script>
</body>
</html>