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