Skip to content

Commit aa4113e

Browse files
committed
html для списка постов и отдельного поста
1 parent 72f84f3 commit aa4113e

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

src/js/renderRssFeed.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
export const renderRssFeed = () => {
2+
const wrapper = `
3+
<div class="card border-0">
4+
<div class="card-body">
5+
<h2 class="card-title h4">Посты</h2>
6+
</div>
7+
<ul class="list-group border-0 rounded-0">
8+
</ul>
9+
</div>`;
10+
11+
const postsContainer = document.querySelector(".posts");
12+
postsContainer.innerHTML = wrapper;
13+
14+
const ul = document.createElement('ul');
15+
ul.className = "list-group border-0 rounded-0";
16+
17+
postsContainer.appendChild(ul);
18+
19+
const li = document.createElement('li');
20+
li.className =
21+
"list-group-item d-flex justify-content-between align-items-start border-0 border-end-0";
22+
li.innerHTML = `
23+
<a href="#" class="fw-bold" data-id="" target="_blank" rel="noopener noreferrer"></a>
24+
<button type="button" class="btn btn-outline-primary btn-sm" data-id="" data-bs-toggle="modal" data-bs-target="#modal">Просмотр</button>
25+
`;
26+
27+
ul.appendChild(li);
28+
};

0 commit comments

Comments
 (0)