Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
lyove authored Jan 12, 2024
1 parent 4ef13bd commit cde3d68
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 18 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
CHANGELOG.md export-ignore
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Laravel-AineCMS
# Laravel-Aine
AineCMS is a self-hosted headless CMS built with Laravel and VueJs. It provides a clean and easy to use interface and a powerful Content API.

# What is a Headless CMS?
Expand Down
4 changes: 2 additions & 2 deletions app/Elmapi/ElmapiHelpers.php → app/Aine/AineHelpers.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace App\Elmapi;
namespace App\Aine;

class ElmapiHelpers
class AineHelpers
{
public static function getUploadMaxFileSize()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Elmapi;
namespace App\Aine;

use App\Http\Resources\ContentResource;
use App\Models\Webhook;
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/FormController.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function getEmbeded($uuid)
{
$data['form'] = Form::where('uuid', $uuid)->firstOrFail();

$data['upload_max_filesize'] = \App\Elmapi\ElmapiHelpers::getUploadMaxFileSize();
$data['upload_max_filesize'] = \App\Aine\AineHelpers::getUploadMaxFileSize();

return $data;
}
Expand All @@ -154,7 +154,7 @@ public function upload($uuid, Request $request)

$project = Project::findOrFail($form->project_id);

$max_file_size = \App\Elmapi\ElmapiHelpers::getUploadMaxFileSize();
$max_file_size = \App\Aine\AineHelpers::getUploadMaxFileSize();
$supported_mimes = 'png,gif,jpeg,jpg,bmp';
$request->validate([
'file' => 'required|file|max:'.($max_file_size / 1024).'|mimes:'.$supported_mimes,
Expand Down
2 changes: 1 addition & 1 deletion app/Listeners/ProcessWebhooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ public function handle($event)
$eventSource = $event->getEventSource();
$eventContent = $event->getEventContent();

\App\Elmapi\WebhookHelper::processWebhooks($eventContent, $eventName, $eventSource);
\App\Aine\WebhookHelper::processWebhooks($eventContent, $eventName, $eventSource);
}
}
2 changes: 1 addition & 1 deletion public/js/form.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions resources/js/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ window.axios.defaults.headers.common = {
'X-CSRF-TOKEN' : document.querySelector('meta[name="csrf-token"]').content
};

// elmapiForm
Vue.component('elmapiForm', require('./layouts/Form.vue').default);
// aineForm
Vue.component('aineForm', require('./layouts/Form.vue').default);

// VCalendar
Vue.use(VCalendar, {
Expand All @@ -26,5 +26,5 @@ Vue.use(VCalendar, {
Vue.component('v-select', vSelect)

const form = new Vue({
el: '#elmapiForm',
el: '#aineForm',
});
2 changes: 1 addition & 1 deletion resources/js/pages/Projects/Content/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@
</div>
<div v-if="field.type == 'relation'" class="field-type-relation w-full">
<div class="w-full border rounded-md p-2">
<div class="text-indigo-500 text-sm cursor-pointer p-2 hover:bg-indigo-50 rounded-md w-full lg:w-1/3 xl:1/4" @click="openRelationModalFn(field.name, field.options.relation.collection, field.options.relation.type)">
<div class="text-indigo-500 text-sm cursor-pointer p-2 hover:bg-indigo-50 rounded-md w-full" @click="openRelationModalFn(field.name, field.options.relation.collection, field.options.relation.type)">
<i class="fa fa-link"></i> Select relation ({{ field.options.relation.type == 1 ? 'One to One' : 'One to Many'}})
</div>

Expand Down
2 changes: 1 addition & 1 deletion resources/js/pages/Projects/Content/New.vue
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@
</div>
<div v-if="field.type == 'relation'" class="w-full">
<div class="w-full border rounded-md p-2">
<div class="text-indigo-500 text-sm cursor-pointer p-2 hover:bg-indigo-50 rounded-md w-full lg:w-1/3 xl:1/4" @click="openRelationModalFn(field.name, field.options.relation.collection, field.options.relation.type)">
<div class="text-indigo-500 text-sm cursor-pointer p-2 hover:bg-indigo-50 rounded-md w-full" @click="openRelationModalFn(field.name, field.options.relation.collection, field.options.relation.type)">
<i class="fa fa-link"></i> Select relation ({{ field.options.relation.type == 1 ? 'One to One' : 'One to Many'}})
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
</div>
</div>
<div class="mt-2 clear-both flex justify-between items-center">
<div>
<div class="block">
<pagination :data="content" size="small" :limit="3" @pagination-change-page="getContent"></pagination>
</div>

Expand Down
4 changes: 3 additions & 1 deletion resources/views/forms/embeded.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<script src="{{ mix('js/form.js') }}" defer></script>
</head>
<body class="font-sans antialiased">
<div id="elmapiForm" v-cloak><elmapi-form uuid="{{$form->uuid}}"></elmapi-form></div>
<div id="aineForm" v-cloak>
<aine-form uuid="{{$form->uuid}}"></aine-form>
</div>
</body>
</html>
4 changes: 2 additions & 2 deletions routes/console.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
| simple approach to interacting with each command's IO methods.
|
*/
Artisan::command('elmapi:create_super {name} {email} {password}', function(){
Artisan::command('aine:create_super {name} {email} {password}', function(){
$user = \App\Models\User::create([
'name' => $this->argument('name'),
'email' => $this->argument('email'),
Expand All @@ -27,7 +27,7 @@

})->describe('Create a new super admin account.');

Artisan::command('elmapi:refresh', function() {
Artisan::command('aine:refresh', function() {
exec('rm ' . storage_path('logs/laravel*'));
$this->info('Logs cleared!');

Expand Down

0 comments on commit cde3d68

Please sign in to comment.