-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlogs.html
More file actions
125 lines (111 loc) · 4.22 KB
/
Blogs.html
File metadata and controls
125 lines (111 loc) · 4.22 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
r<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<title>Daksh Hande - Blog</title>
<style>
/* Your existing CSS styles */
/* Additional styles for the blog section */
section {
max-width: 800px;
margin: 20px auto;
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
img {
max-width: 100%;
border-radius: 8px;
margin-bottom: 10px;
}
#comments {
list-style-type: none;
padding: 0;
}
.comment {
border: 1px solid #ccc;
border-radius: 8px;
padding: 10px;
margin-bottom: 10px;
}
textarea {
width: 100%;
margin-bottom: 10px;
}
</style>
</head>
<body>
<header>
<h1>Welcome to my Blog!</h1>
</header>
<section>
<h2>Exploring the World of Python</h2>
<img src="content://media/external/downloads/1000117565" alt="Python Programming">
<p>
Python, a versatile programming language, has gained immense popularity in recent years.
From web development to data science, its applications are vast and diverse.
In this blog post, I'll share my journey of learning Python and exploring its capabilities.
</p>
<p>
You have been learning python for so your .I will teach you core python shots . This thing you will learn
as a new sill . Rember skill are more valuable noe rather than a simplified paper degree ,🤙
<p>
Not lying at all . If you want to help me with my project you can post issue and do changes and create a Pull request
Stay tuned for more blogs . Comment below!
</p>
<div id="commentsSection">
<textarea id="commentInput" placeholder="Leave a comment"></textarea>
<button onclick="addComment()">Submit Comment</button>
<ul id="comments"></ul>
</div>
</section>
<footer>
<p>Feel free to reach out at <a href="https://mail.google.com/mail/mu/mp/903/#">handedaksh@gmail.com</a></p>
<span>© 2024 Daksh Hande. All Rights Reserved.</span>
</footer>
<script>
// Load existing comments from local storage
document.addEventListener('DOMContentLoaded', loadComments);
function loadComments() {
const storedComments = localStorage.getItem('comments');
const commentsList = document.getElementById('comments');
if (storedComments) {
const comments = JSON.parse(storedComments);
comments.forEach(commentText => {
const comment = document.createElement('li');
comment.className = 'comment';
comment.textContent = commentText;
commentsList.appendChild(comment);
});
}
}
function addComment() {
const commentInput = document.getElementById('commentInput');
const commentsList = document.getElementById('comments');
if (commentInput.value.trim() !== '') {
const comment = document.createElement('li');
comment.className = 'comment';
comment.textContent = commentInput.value;
commentsList.appendChild(comment);
// Save comment to local storage
saveComment(commentInput.value);
// Clear the comment input
commentInput.value = '';
}
}
function saveComment(commentText) {
let storedComments = localStorage.getItem('comments');
if (!storedComments) {
storedComments = [];
} else {
storedComments = JSON.parse(storedComments);
}
storedComments.push(commentText);
localStorage.setItem('comments', JSON.stringify(storedComments));
}
</script>
</body>
</html>