Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Jan 16, 2025
1 parent bc63683 commit 80326b4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Source/Function/Commit/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import "datatables.net-searchpanes-dt";
import "datatables.net-select-dt";
import "datatables.net-staterestore-dt";
import _UUID from "@Function/Commit/UUID/Fn.js";
const { user, repo } = Astro.props;
const Last = await (
Expand All @@ -38,13 +40,17 @@ export interface Commit {
};
html_url: string;
}
const UU
---

<div>
{
Last.length > 0 ? (
<>
<table class="w-full text-left text-sm text-stone-500 dark:text-stone-400">
<table
class="w-full text-left text-sm text-stone-500 dark:text-stone-400"
id={UUID()}>
<thead class="bg-stone-50 text-xs uppercase text-stone-700 dark:bg-stone-700 dark:text-stone-400">
<tr>
<th scope="col" class="px-6 py-3">
Expand Down Expand Up @@ -113,7 +119,9 @@ export interface Commit {
}
</div>

<script>
<script define:vars={{}}>
new DataTable("#{UUID()}");

document
.querySelectorAll<HTMLSpanElement>("span[data-date]")
.forEach((element) => {
Expand Down
8 changes: 8 additions & 0 deletions Source/Function/Commit/UUID/Fn.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default () => {
const s4 = () =>
Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);

return `${s4()}${s4()}-${s4()}-${s4()}-${s4()}-${s4()}${s4()}${s4()}`;
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
"datatables.net-colreorder-dt": "2.0.4",
"datatables.net-dt": "2.2.1",
"datatables.net-fixedcolumns-dt": "5.0.4",
"datatables.net-fixedheader-dt": "4.0.1",
"datatables.net-keytable-dt": "2.12.1",
"dotenv": "16.4.7",
"firebase": "11.1.0",
"jquery": "3.7.1",
Expand Down

0 comments on commit 80326b4

Please sign in to comment.