|
@@ -22,8 +22,7 @@ class HomeController extends AdminController
|
|
|
amis()->Grid()->columns([
|
|
|
$this->lineChart()->set('md', 8),
|
|
|
amis()->Flex()->className('h-full')->items([
|
|
|
- $this->clock(),
|
|
|
- $this->codeView(),
|
|
|
+ $this->clock()
|
|
|
])->direction('column'),
|
|
|
]),
|
|
|
]);
|
|
@@ -31,23 +30,6 @@ class HomeController extends AdminController
|
|
|
return $this->response()->success($page);
|
|
|
}
|
|
|
|
|
|
- public function codeView()
|
|
|
- {
|
|
|
- return amis()->Panel()->className('h-full clear-card-mb rounded-md')->body([
|
|
|
- amis()->Markdown()->options(['html' => true, 'breaks' => true])->value(<<<MD
|
|
|
-### __The beginning of everything__
|
|
|
-
|
|
|
-<br>
|
|
|
-
|
|
|
-```php
|
|
|
-<?php
|
|
|
-
|
|
|
-echo 'Hello World';
|
|
|
-```
|
|
|
-MD
|
|
|
- ),
|
|
|
- ]);
|
|
|
- }
|
|
|
|
|
|
public function clock()
|
|
|
{
|
|
@@ -56,7 +38,8 @@ MD
|
|
|
amis()->Custom()
|
|
|
->name('clock')
|
|
|
->html('<div id="clock" class="text-4xl"></div><div id="clock-date" class="mt-5"></div>')
|
|
|
- ->onMount(<<<JS
|
|
|
+ ->onMount(
|
|
|
+ <<<JS
|
|
|
const clock = document.getElementById('clock');
|
|
|
const tick = () => {
|
|
|
clock.innerHTML = (new Date()).toLocaleTimeString();
|
|
@@ -95,10 +78,7 @@ JS
|
|
|
amis()->Image()->src(url(Admin::config('admin.logo'))),
|
|
|
amis()->Wrapper()->className('text-3xl mt-9 font-bold')->body(Admin::config('admin.name')),
|
|
|
amis()->Flex()->className('w-full mt-5')->justify('center')->items([
|
|
|
- $link('GitHub', 'https://github.com/slowlyo/owl-admin'),
|
|
|
$link('Official website', 'https://owladmin.com'),
|
|
|
- $link('Documentation', 'https://doc.owladmin.com'),
|
|
|
- $link('Demo', 'https://demo.owladmin.com'),
|
|
|
]),
|
|
|
]),
|
|
|
])
|
|
@@ -192,7 +172,8 @@ JS
|
|
|
public function cube()
|
|
|
{
|
|
|
return amis()->Card()->className('h-96 ml-4 w-8/12')->body(
|
|
|
- amis()->Html()->html(<<<HTML
|
|
|
+ amis()->Html()->html(
|
|
|
+ <<<HTML
|
|
|
<style>
|
|
|
.cube-box{ height: 300px; display: flex; align-items: center; justify-content: center; }
|
|
|
.cube { width: 100px; height: 100px; position: relative; transform-style: preserve-3d; animation: rotate 10s linear infinite; }
|