Skip to content

Simple and fast CMS that allows to edit images and text by using a custom API

License

Notifications You must be signed in to change notification settings

subgression/cream

Repository files navigation

Cream

Table of Contents

[TOCM]

Features

  • Server side rendering of text and image sources
  • Toppings! (WIP) Allow developers to specify react-like components, and rendering them server side, as fast as possible, and allowing user to edit all the content of one (or multiple) toppings.
  • SEO Tool (WIP) Analyze and scan pages to find errors in SEO configuration, reach millions of users!
  • Image Compressor (WIP) Auto compress images and video to the correct format
  • Compatible with all major browsers, inclusing mobile!

Why Cream?

When doing a project, most of the work is editing small part of content, such as texts and images, simple stuff that even customer can edit, if provided with a simple enough interface, so why not creating that from scratch?

How To Use

Cream is created to be as simple as possible, no unnecessary and complex backend to handle content! Each page that use the Cream needs the following requirements:

<?php require "./cream/src/Cream.class.php"; ?>

Config.json

This will be the main Config file, it will contain info about what path will store images, videos, and components (WIP), it will be easilty editable via Cream Manager, example:

{
    "creamImageFiles": [
        {
            "name" : "Pagina Iniziale",
            "path" : "../img/"
        },
        {
            "name" : "Prodotti",
            "path" : "../img/products/"
        },
        {
            "name" : "Macchine",
            "path" : "../img/machines/"
        },
        {
            "name" : "Bubbles",
            "path" : "../img/bubbles/"
        },
        {
            "name" : "Test Upload",
            "path" : "../img/test/"
        }
    ]
}

Text

Simply replace any of the tag you need to allow edit from:

<p> Foo </p>

to:

<p data-cream-type="text" data-cream-name="your-id"> $Cream->Text("your_id", "Foo"); </p>`

Image

Same as text! Replace:

<img src="your_src" />

with:

<img data-cream-type="image" data-cream-name="your-id" src=<?php $Cream->Image("your_id", "your_src"); ?> />

Changelog

V0.1.0

  • Initial commit
  • Somewhat functioning cream basic script

V0.2.0

  • Updated UI
  • Better frontend managmente using functions
  • Bugfixing and performance improvements

V0.2.1

  • Added a function to reset content to defaults

V0.2.2

  • Added a really poor login system (@todo: Make a new one, avoiding sending password in clear)

V0.2.3

  • Added config.json, where the user can config paths to image folders
  • Created Video Gallery Section
  • Added an Image Upload Section

V0.2.4

  • Added a new image selector
  • Extended Cream API

V0.3.0

  • Added MySQL integration
  • Created wizard to configure all the settings

About

Simple and fast CMS that allows to edit images and text by using a custom API

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published