2017 © Pedro Peláez
 

library onpagecms

A CMS without Admin Panel but an js overlay

image

marvinosswald/onpagecms

A CMS without Admin Panel but an js overlay

  • Wednesday, August 3, 2016
  • by marvinosswald
  • Repository
  • 2 Watchers
  • 1 Stars
  • 7 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Onpage CMS Demo

ALPHA Things can and will break..., (*1)

Install

    'providers' = [
    ...
        marvinosswald\OnpageCMS\Providers\OnpageCMSServiceProvider::class
    ]

Setup

Right now you will need to setup a few things before you can start., (*2)

Database

Please migrate the cms table., (*3)

Routing

The frontend overlay expects to send requests as PUT to api/cms as of now this is hardcoded. - PUT api/cms => '\marvinosswald\OnpageCMS\Controllers\CMSController@updateBlock', (*4)

I don't publish a routing for it myself so you can setup authentication as you wish for example like this:, (*5)

Route::put('api/cms',['middleware' => ['jwt.auth'], 'uses' => '\marvinosswald\OnpageCMS\Controllers\CMSController@updateBlock']);

Authentication

The frontend overlay provides a login modal, therefor you need to provide a function which returns a token like {"token":"ABCYXZ"}, (*6)

The Frontend expects to get a token with a POST Request at /api/cms/login you get the following fields as payload: email,password, (*7)

Frontend

You need to setup a loader script there is one included vendor/marvinosswald/OnpageCMS/resources/assets/js/opCMSLoader.js you may just want copy the content into your app.js or whatsoever because loader.uri and loader.element should be customized - loader.element points to an id which acts as an activator for the overlay - loader.uri must point to opCMS.js it gets copied to your public path something like public/opcms/js/opCMS.js, (*8)

Usage

For instance you need to inject the cms directive into your view like:, (*9)

@inject('cms', 'marvinosswald\OnpageCMS\Services\CMS'), (*10)

Define cms blocks in your views. There are two types of block right now:, (*11)

text()

   {!! $cms->text()->Title() !!}

Output: ``` html , (*12)

### meta()
Use the function call to set the name attribute like:
``` php
   {!! $cms->meta()->description() !!}

Output: html <meta id="cms-en-#-meta-description" class="cms-meta" name="description" content="">, (*13)

Functions

Title()

Generates a Title Tag like: php {!! $cms->meta()->title() !!} Output: html <title id="cms-en-#-meta-title" class="cms-meta"></title>, (*14)

The Versions

03/08 2016

dev-master

9999999-dev

A CMS without Admin Panel but an js overlay

  Sources   Download

MIT

The Development Requires

by Marvin Oßwald

03/08 2016

0.1.0

0.1.0.0

A CMS without Admin Panel but an js overlay

  Sources   Download

MIT

The Development Requires

by Marvin Oßwald