-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblog.html
91 lines (77 loc) · 2.05 KB
/
blog.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
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
@import "https://fonts.googleapis.com/css?family=Kaushan+Script";
.gradient-text {
position: relative;
text-shadow: .15em .15em .35em #888;
padding: .5em;
}
.gradient-text::after {
content: '';
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background: -webkit-radial-gradient(70% 3%, circle, #aa048b, #bb9801);
background: radial-gradient(circle at 70% 3%, #aa048b, #bb9801);
mix-blend-mode: screen;
}
html {
background: #fff;
}
body {
font-size: 4vmax;
text-align: center;
background: #fff;
color: #000;
}
blockquote {
margin: 0;
}
h1 {
font-family: 'Kaushan Script', sans-serif;
letter-spacing: -.1ch;
margin: 0;
line-height: 1.3;
}
p {
font-family: sans-serif;
font-size: 1ch;
opacity: .35;
}
</style>
</head>
<body>
<div class="container">
<div id="blog" class="row">
<div class="col-md-10 blogShort">
<h1 class="gradient-text" id="h"></h1>
<img class="pull-left img-responsive thumb margin10 img-thumbnail" id="image">
<article><p id="para1">
</p></article>
</div>
</div>
</div>
<script>
var x = localStorage.getItem("id");
var formdata= {"blogId": x};
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function(){
if(this.readyState == 4 && this.status==200) {
console.log(JSON.parse(this.responseText));
var a=JSON.parse(this.responseText);
document.getElementById("para1").innerHTML=a.body;
document.getElementById("h").innerHTML=a.title;
document.getElementById("image").src=a.imageUrl;
}
};
xhttp.open("POST", "http://koushikmln.com:7500/blogs/getBlog" , true);
xhttp.setRequestHeader("Content-type", "application/json");
xhttp.send(JSON.stringify(formdata));
</script>
</body>
</html>