generated from dwd/boilarplate-astro-tailwind
change
parent
abb1200c95
commit
00a1640ff5
|
@ -7,13 +7,13 @@ import AdminHeader from "../../components/AdminHeader.astro";
|
|||
<main>
|
||||
<div>
|
||||
<section class="container mx-auto px-4">
|
||||
<div>
|
||||
<div class="mt-16">
|
||||
<table class="border-2">
|
||||
<thead>
|
||||
<tr class="text-center">
|
||||
<th>ID</th>
|
||||
<th>Status</th>
|
||||
<th>Image</th>
|
||||
<th class="border-[2px] border-[#dbdde1]">ID</th>
|
||||
<th class="border-[2px] border-[#dbdde1]">News Slug</th>
|
||||
<th class="border-[2px] border-[#dbdde1]">Image</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="border-2" id="statusTableBody"></tbody>
|
||||
|
@ -21,11 +21,7 @@ import AdminHeader from "../../components/AdminHeader.astro";
|
|||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container mx-auto px-4 flex flex-col space-y-4">
|
||||
<div class="container mx-auto px-4 flex flex-col space-y-4">
|
||||
<!-- <form action="https://apisp.dev2.cicdhosting.com/upload_file/v2/" method="post" enctype="multipart/form-data">
|
||||
Select image to upload:
|
||||
<input type="file" name="fileToUploadToSpApi" id="fileToUpload">
|
||||
|
@ -56,11 +52,15 @@ import AdminHeader from "../../components/AdminHeader.astro";
|
|||
let tableBody = document.getElementById('statusTableBody');
|
||||
data.forEach(function(singleData) {
|
||||
let row = tableBody.insertRow();
|
||||
row.style.border = '2px solid #dbdde1';
|
||||
let cellId = row.insertCell(0);
|
||||
cellId.style.border = '2px solid #dbdde1';
|
||||
cellId.innerHTML = singleData.id;
|
||||
let cellStatus = row.insertCell(1);
|
||||
cellStatus.style.border = '2px solid #dbdde1';
|
||||
cellStatus.innerHTML = singleData.slug;
|
||||
let cellEdit = row.insertCell(2);
|
||||
cellEdit.style.border = '2px solid #dbdde1';
|
||||
let addButton = document.createElement('a');
|
||||
addButton.innerText = 'Add';
|
||||
addButton.style.color = 'blue';
|
||||
|
|
|
@ -61,17 +61,4 @@ console.log(news);
|
|||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<!-- <main>
|
||||
<div>
|
||||
<p>News English</p>
|
||||
<div class="">
|
||||
{data.map((items: {id: string | undefined; title: string | undefined;}) =>
|
||||
<div>
|
||||
<p>{items.id}</p>
|
||||
<p>{items.title}</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</main> -->
|
||||
</Layout>
|
||||
|
|
Loading…
Reference in New Issue