transition

This commit is contained in:
2024-08-14 22:04:34 +03:00
parent 1ab3f678b7
commit 1f3ebafe69
50 changed files with 924 additions and 172 deletions
+9
View File
@@ -0,0 +1,9 @@
<x-lucent::notice type="success" title="Success">
<p>
If you have provided a valid email you should receive in the following seconds a login email
</p>
<p>You can safely close this tab</p>
</x-lucent::notice>
+36
View File
@@ -0,0 +1,36 @@
@extends("lucent::layouts.account")
@section("content")
<div class="scope-login">
<div class="bg-image">
</div>
<div class="login-form">
<div class="form">
<h2 class="mb-5">Enter Lucent</h2>
<form hx-post="/lucent/login" >
<p>Submit your email address and you will receive a <b>login link</b> to your email</p>
<p>Don't forget to check your spam folder</p>
<div class="mt-5 mb-3">
<label for="emailaddress" class="form-label">Email address</label>
<input
type="email"
name="email"
class="form-control"
id="emailaddress"
required
/>
</div>
<x-lucent::button-indicator>
Send email
</x-lucent::button-indicator>
</form>
</div>
</div>
</div>
@endsection
+24
View File
@@ -0,0 +1,24 @@
@extends("lucent::layouts.account")
@section("content")
<div class="scope-login">
<div class="bg-image">
</div>
<div class="login-form">
<div class="form">
<h2 class="mb-5">Welcome to Lucent</h2>
<form hx-post="/lucent/verify" hx-redirect="/lucent" hx-target-error=".form-errors" >
<input type="hidden" value="{{$email}}" name="email" />
<input type="hidden" value="{{$token}}" name="token" />
@csrf
<x-lucent::button-indicator>
Enter as {{$email}}
</x-lucent::button-indicator>
</form>
<div class="form-errors"></div>
</div>
</div>
</div>
@endsection
+43
View File
@@ -0,0 +1,43 @@
@php
$side = $side ?? 48;
$colors = [
"#00AA55",
"#009FD4",
"#B381B3",
"#939393",
"#E3BC00",
"#D47500",
"#DC2A2A",
"#3ede91",
"#377dd4",
"#0256b0",
"#053d82",
"#3d026e",
"#b378e3",
"#c4065c",
"#543208",
"#d97811",
"#0c6b40",
];
$initials = function($name){
$segs = explode(" ",$name);
if(count($segs) > 1){
return strtoupper($segs[0][0]).strtoupper($segs[1][0]);
}
return strtoupper($segs[0][0]).strtoupper($segs[0][1]);
};
$name = $user["name"];
$charIndex = ord($name[1]) + strlen($name);
$colorIndex = $charIndex % 19;
$bgColor = $colors[$colorIndex];
@endphp
<div
class="avatar"
title="{{$name}}"
style="background-color:{{$bgColor}};height: {{$side}}px;width: {{$side}}px; font-size:{{$side / 2}}px"
>
<div class="avatar__letters">{{$initials($user["name"])}}</div>
</div>
@@ -0,0 +1,4 @@
<button class="bt bt-primary">
{{$slot}}
<img alt="indicator" id="indicator" class="htmx-indicator" src="/img/spinner.svg"/>
</button>
+4
View File
@@ -0,0 +1,4 @@
<div class="notice {{$type ?? "info"}}">
<div class="title">{{$title}}</div>
<div class="content">{{ $slot }}</div>
</div>
+5
View File
@@ -0,0 +1,5 @@
Login to your Lucent account!
If you were not the one making this request, please ignore this email.
{{ $url }}/verify?email={{ $email }}&token={{ $token }}
+9
View File
@@ -0,0 +1,9 @@
@if (count($errors) > 0)
<x-lucent::notice type="error" title="🛑 Submission failed">
<ul>
@foreach ($errors as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</x-lucent::notice>
@endif
+23
View File
@@ -0,0 +1,23 @@
@extends("lucent::layouts.channel")
@section("content")
<h3 class="header-small mb-4">Latest Content changes</h3>
@if($records->isNotEmpty())
<div class="lx-card mb-4">
<div class="lx-table p-0">
<table class="">
<tbody>
@foreach($records as $record)
<tr>
@include("lucent::records.card-row")
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@endif
@endsection
+21
View File
@@ -0,0 +1,21 @@
<div class="d-flex align-items-center ">
<a class="nav-item" href="/lucent">{{$channel->name}}</a>
<a class="nav-item" href="{channel.lucentUrl}/members">Members</a>
@if($channel->generateCommand)
<a href="{channel.lucentUrl}/build-report" class="btn btn-outline-primary btn-sm d-">Build website</a>
@endif
<!-- <div>-->
<!-- <form method="GET">-->
<!-- <input type="search" name="filter[search_regex]" placeholder="Search"-->
<!-- class="form-control" required/>-->
<!-- </form>-->
<!-- </div>-->
</div>
<div>
<a class="nav-item" href="/lucent/profile">
<x-lucent::avatar side="28" :user="$user"></x-lucent::avatar>
</a>
</div>
+34
View File
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('title') - Lucent Data Platform</title>
@if(config("lucent.env") === "production")
<!-- if production -->
<link rel="stylesheet" href="/vendor/lucent/dist/{{ $manifest['main.css']["file"] }}"/>
<script type="module" src="/vendor/lucent/dist/{{ $manifest['main.js']["file"] }}"></script>
@else
<!-- if development -->
@php
echo '<script type="module" crossorigin src="http://127.0.0.1:5173/@vite/client"></script>';
@endphp
<script type="module" crossorigin src="http://127.0.0.1:5173/main.js"></script>
@endif
{{-- <link rel="icon" type="image/x-icon" href="/favicon.ico"/>--}}
</head>
<body>
<div>
@yield('content')
</div>
</body>
</html>
+35
View File
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('title') - Lucent Data Platform</title>
@if(config("lucent.env") == "production")
<!-- if production -->
<link rel="stylesheet" href="/vendor/lucent/dist/{{ $manifest['main.css']["file"] }}"/>
<script type="module" src="/vendor/lucent/dist/{{ $manifest['main.js']["file"] }}"></script>
@else
<!-- if development -->
@php
echo '<script type="module" crossorigin src="http://127.0.0.1:5173/@vite/client"></script>';
@endphp
<script type="module" crossorigin src="http://127.0.0.1:5173/main.js"></script>
@endif
<link rel="icon" type="image/x-icon" href="/favicon.ico">
</head>
<body>
@include("lucent::includes.header")
<div class="main-wrapper">
@include("lucent::sidebar.sidebar")
<div class="main-content">
@yield('content')
</div>
</div>
</body>
</html>
+33
View File
@@ -0,0 +1,33 @@
@php
$schema = $schemas->where("name",$record->schema)->first();
@endphp
<td>
{{-- {#if schema.type === "files"}--}}
{{-- <Preview {record} size="tiny"/>--}}
{{-- {:else}--}}
<a
href="/lucent/records/{{$record->id}}"
class="text-decoration-none text-dark d-block"
>
{{$viewModel->getRecordName($record, $schemas)}}
</a>
{{$record->status->value === "draft" ? "Draft" : ""}}
{{-- {/if}--}}
</td>
<td><a
class="text-decoration-none lx-small-text"
href="/lucent/content/{{$schema->name}}">{{$schema->label}}</a
>
</td>
<td>
{{-- <div class="d-flex">--}}
{{-- <Avatar name={usernameById(users, record._sys.updatedBy)} side={24}/>--}}
{{-- <div class="ms-2">--}}
{{-- {frieldlyUpdatedAt}--}}
{{-- </div>--}}
{{-- </div>--}}
</td>
+10
View File
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{$title}}</title>
<meta http-equiv="refresh" content="0; url='{{$to}}'"/>
</head>
<body>
<p>{{$message}}</p>
</body>
</html>
@@ -0,0 +1,7 @@
@php
$currentSchema = $currentSchema ?? null;
$activeClass = $schema->name === $currentSchema?->name ? "active" : "";
@endphp
<a class="sidebar-item {{$activeClass}}" aria-current="page"
href="/lucent/content/{{$schema->name}}">{{$schema->label}}</a>
+20
View File
@@ -0,0 +1,20 @@
<div class="sidebar">
<div class="sidebar-header">
Content
</div>
@foreach($schemas->where("type.value", "collection")->where("isEntry",true) as $schema)
@include("lucent::sidebar.sidebar-item", ["schema" => $schema])
@endforeach
<div class="sidebar-header">
Files
</div>
@foreach($schemas->where("type.value", "files") as $schema)
@include("lucent::sidebar.sidebar-item", ["schema" => $schema])
@endforeach
<div class="sidebar-header">
Other
</div>
@foreach($schemas->where("type.value", "collection")->where("isEntry",false) as $schema)
@include("lucent::sidebar.sidebar-item", ["schema" => $schema])
@endforeach
</div>
+7
View File
@@ -0,0 +1,7 @@
@extends('lucent::layouts.'.$layout)
@section('title')
{{ $title }}
@endsection
@section('content')
{!! $svelte !!}
@endsection