some styling in tables

This commit is contained in:
2024-09-27 16:48:05 +03:00
parent 19931cb4d1
commit 499a064a49
4 changed files with 32 additions and 5 deletions
@@ -18,7 +18,7 @@
<div class="references"> <div class="references">
{#each recordEdges as recordEdge} {#each recordEdges as recordEdge}
<span class="mr-3"> <span class="reference">
<PreviewCardSmall {schemas} {graph} record={recordEdge}/> <PreviewCardSmall {schemas} {graph} record={recordEdge}/>
</span> </span>
{/each} {/each}
@@ -13,11 +13,8 @@
{#if record?.data} {#if record?.data}
<a <a
href="{channel.lucentUrl}/records/{record.id}" href="{channel.lucentUrl}/records/{record.id}"
class="text-decoration-none rounded py-1 px-2 d-inline-block"
{title} {title}
style="border:2px solid {!schema.color class="reference"
? '#999'
: schema.color}!important;white-space: nowrap;"
> >
{title} {title}
</a> </a>
+12
View File
@@ -113,6 +113,18 @@
.field-ui-number { .field-ui-number {
text-align: right; text-align: right;
} }
.references{
display: flex;
gap: 4px;
.reference{
font-size: 13px;
border-radius: 12px;
background: var(--p30);
padding: 1px 5px;
}
}
} }
.file-table-row { .file-table-row {
+18
View File
@@ -45,3 +45,21 @@ if (!function_exists('schemas_path')) {
return storage_path("lucent/lucent.schemas.json"); return storage_path("lucent/lucent.schemas.json");
} }
} }
if (!function_exists('lucent_file')) {
function lucent_file(\Lucent\Record\QueryRecord $record): string
{
$path = $record->_file->path;
return app()->make(\Lucent\Channel\ChannelService::class)->channel->disks[$record->_file->disk] ."/". $path;
}
}
if (!function_exists('lucent_image')) {
function lucent_image(\Lucent\Record\QueryRecord $record, string $template): string
{
$path = $record->_file->path;
return app()->make(\Lucent\Channel\ChannelService::class)->channel->disks[$record->_file->disk] . "/templates/$template/$path";
}
}