celesteh / Immrama

A live notated graphic score
4 stars 0 forks source link

Intro text setter #1

Open celesteh opened 7 years ago

celesteh commented 7 years ago

setintro.php does not yet exist

celesteh commented 7 years ago

OBVIOUSLY, setting the front page's html should have markdown support (kill me now) (Specifically: lists, paragraphs, headers)

celesteh commented 7 years ago

Ok, should users be able to:

celesteh commented 7 years ago

A PHP file will show them what they've got as their current text in a text edit window (that i dunno, maybe has some buttons on top like github's text edit windows).

A smaller text area lets them name this version.

A 'preview' button shows them the rendered text.

A 'save' button puts the rendered text into the page they're writing text for AND saves it under the name they have selected.

Javascript checks if their filename is evil and either complains of sanitises it? Do we also warn if we're overwriting an existing file?

A python script takes their markdown, saves it under the (sanitised) provided name, turns it into html, and shoves it into the page (pre-renders stuff), somehow saves which file is the active one.

Do we create a mechanism for deleting old files?

celesteh commented 7 years ago

This is way more work than it's worth.

Ok, so currently:

  1. we've got simpleMDE as a recommended install for raspbian users. It looks ok and has a good menu What we need still setinro.php
  2. Must have a drop down list of all the files in the intro directory
  3. Select a file
    1. Has the local text thing changed?
    2. If so, do we want to leave it or stay on the page?
  4. Selecting a file re-loads setintro.php with the file name as an argument
  5. And file set as an argument puts the file contents as the default text in the text are and saves the text to a variable (needed for step 3.1)
  6. There needs to be some 'do you want a new file name?' question
  7. filenames: can't be 'new' or 'current', start with a letter, contain only [-a-zA-Z0-9_], no dots (the .md is hidden)
celesteh commented 7 years ago

We're just doing a fucking CMS because wtf not

celesteh commented 7 years ago

Splitting out the CMS https://github.com/celesteh/miniCMS

celesteh commented 7 years ago

This may actually be the answer: http://automad.org/documentation

celesteh commented 7 years ago

This is moved back to a later milestone.