diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2020-01-21 01:28:04 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2020-01-21 01:28:04 +0100 |
commit | c47b78e13afb092aa1a30296b885b2911444fe3c (patch) | |
tree | b387ea24ebced532a69937d3156a695781b9dd81 /app/view | |
parent | 61d7c9de6b7d50eb151e513e3be1e1805b4690d3 (diff) | |
download | wcms-c47b78e13afb092aa1a30296b885b2911444fe3c.tar.gz wcms-c47b78e13afb092aa1a30296b885b2911444fe3c.zip |
new user manual in markdown
Diffstat (limited to 'app/view')
-rw-r--r-- | app/view/templates/info.php | 48 | ||||
-rw-r--r-- | app/view/templates/man.php | 320 |
2 files changed, 20 insertions, 348 deletions
diff --git a/app/view/templates/info.php b/app/view/templates/info.php index 8f6377b..bcfc2c8 100644 --- a/app/view/templates/info.php +++ b/app/view/templates/info.php @@ -12,25 +12,24 @@ <nav> <div class="block"> - <h2>Manual Summary</h2> - <div class="scroll"> + + <h2>Version</h2> + + <?= $version ?> + + + + <h2>Links</h2> + <ul> - <li><a href="#startup">Startup</a></li> - <ul> - - </ul> - <li><a href="#structure">Structure</a></li> - <ul> - <li><a href="#attributes">Page attributes</a></li> - <li><a href="#database">Database</a></li> - </ul> - <li><a href="#editor">Editor</a></li> - <ul> - <li><a href="#elementsyntax">Elements syntax</a></li> - <li><a href="#bodysyntax">Body syntax</a></li> - </ul> + <li><a href="https://github.com/vincent-peugnet/wcms" target="_blank">🐱👤 Github</a></li> + <li><a href="https://w-cms.top" target="_blank">🌵 Website</a></li> </ul> + <h2>Manual Summary</h2> + + <?= $summary ?> + </div> </div> </nav> @@ -38,22 +37,12 @@ <section class="info"> <div class="block"> + <h1>Info</h1> <div class="scroll"> <article> - <h1>Info</h1> - - <h2>Version</h2> - - <?= $version ?> - <h2>Links</h2> - <ul> - <li><a href="https://github.com/vincent-peugnet/wcms" target="_blank">🐱👤 Github</a></li> - <li><a href="#manual">📕 Manual</a></li> - <li><a href="https://w-cms.top" target="_blank">🌵 Website</a></li> - </ul> <h2>About</h2> @@ -72,7 +61,10 @@ </article> - <?php $this->insert('man') ?> + <article id="manual"> + <?= $manual ?> + </article> + </div> </div> diff --git a/app/view/templates/man.php b/app/view/templates/man.php deleted file mode 100644 index deb81ee..0000000 --- a/app/view/templates/man.php +++ /dev/null @@ -1,320 +0,0 @@ - - -<nav> -<h2>Manual Summary</h2> -<ul> - <li><a href="#startup">Startup</a></li> - <ul> - - </ul> - <li><a href="#structure">Structure</a></li> - <ul> - <li><a href="#attributes">Page attributes</a></li> - <li><a href="#database">Database</a></li> - </ul> - <li><a href="#editor">Editor</a></li> - <ul> - <li><a href="#elementsyntax">Elements syntax</a></li> - <li><a href="#bodysyntax">Body syntax</a></li> - </ul> -</ul> - -</nav> - - - -<article id="manual"> - -<h2 id="manual">Manual</h2> - -<h3 id="startup">Startup</h3> - -<p>There is'nt a real start of anything when you're using W.</p> - -<p>Just type an adress in your web browser, after your W folder. You should see an empty page, not existing yet. You can login to create one at this adress. If you are already logged in, you can juste type <code><i>page_id</i>/add</code>, this will directly create a page at this adress.</p> - -<p>This <code><i>page_id</i></code> is the identifier of each page, you cant change it later, this is like a real solid adress, it cant move. It can only contain lowercase letters, numbers, hyphens or underscore charachters.</p> - -<p>No visitor can see the full list of pages you've created. The only way to see the whole map of your project, is to be conected at least as an editor, and go to the "homepage", the root adress where W is instaled.</p> - -<h3 id="structure">Structure</h3> - -<h4>Pages and IDs</h4> - -<p>The structure of website is very simple as there is no structure. It's you to link the pages together or not.</p> - -<p>A page is defined by a unique <code>id</code>. As it's created, you can access it typing <code>.../<i>your_page_id</i>/</code> or without slash <code>.../<i>your_page_id</i></code></p> - -<p>An ID can only contain lowercase letters, numbers, underscore and "-"</p> - - -<h4 id="attributes">Page attributes</h4> - -<h5>Id</h5> - -<p>Unique identifier, this is the url that point to your page</p> - -<h5>title</h5> - -<p>Page title, can use more complex characters than the ID element. It's printed in the explorer tab name. It's the official name of your page.</p> - -<h5>Description</h5> - -<p>The description attribute is a short informations about your page. It's used to create tooltip, when the mouse hover internal links.</p> - -<h5>Tag(s)</h5> - -<p>tags are used to create selections of pages. tags are one word only, sepparated by commas and whitespace.</p> - -<h5>Privacy level</h5> - -<p>Set the level of privacy of your page. -</br><strong>0</strong> -> public -</br><strong>1</strong> -> private <i>reserved to private readers</i> -</br><strong>2</strong> -> not published <i>Nobody but editors can see it.</i> </p> - - -<h5>Date & time</h5> - -<p>You can manualy set a date and time for each pages.</p> - -<h4 id="database">Database</h4> - -<p>All this pages are stored in your database, as a file by page. You can access them in the <code>.../database/<i>name_of_your_store</i>/</code></p> - - - - - - - - - - - -<h3 id="editor">Editor</h3> - -<p>W use the fives basics html elements to store your content</p> - -<ul> -<li>header</li> -<li>nav</li> -<li>aside</li> -<li>main</li> -<li>footer</li> -</ul> - -<p>You can use any of them, only one or all at the same time, as you prefer.</p> - -<h4 id="elementsyntax">Element syntax</h4> - -<p>In any of the five html element you can use to store content, you can use the following syntax, that is specific to W, extending the Markdown syntax :</p> - -<h5>quick internal link</h5> - -<p>You can create internal link very quickly, only by using the id of your page. The link text will be remplaced by the title associated with this page.</p> - -<blockquote> - [<i>page_id</i>] -</blockquote> - -<p>This will output :</p> - -<blockquote> -<a href="<i>page->url</i>" class="internal" title="<i>page->description</i>"><i>page->title</i></a> -</blockquote> - -<h5>Title shortcut</h5> - -<blockquote> - %TITLE% -</blockquote> - -<p>Will output the page <code>title</code> attribute. This can be usefull when templating, or including differents page element.</p> - - -<h5>Description shortcut</h5> - -<blockquote> - %DESCRIPTION% -</blockquote> - -<p>As for the title, this will output the <code>description</code> attribute of the page</p> - -<h5>Date shortcut</h5> - -<blockquote> - %DATE% %DATECREATION% %DATEMODIF% -</blockquote> - -<p>There are tree dates attributes that can be printed. The <strong>date</strong> attribute, will return the date that can be manualy set in the editor. <strong>datecreation</strong> will return the date of the page creation. <strong>datemodif</strong> will output the last editing date.</p> - - -<h5>Automatic summary</h5> - -<p>You can automatically generate summary, based on the page <code><h*></code> elements</p> - -<blockquote> - %SUMMARY% -</blockquote> - -<p>This will generate a classic <code><ul></code> html list.</p> - -<h5>Automatic list by tag</h5> - -<p>You can create a html list of links pointing to all the pages using this tag.</p> - -<blockquote> - %TAG:<i>__tag__</i>% -</blockquote> - -<p>Let's suppose we are in page3 and we have page2, page3, page5, using this tag, this will output :</p> - -<blockquote> -<ul id="<i>tag</i>"> -</br> -<li> -</br> -<a href="<i>2->url</i>" class="internal" title="<i>2->description</i>"><i>2->title</i></a> -</br> -</li> -</br> -<li> -</br> -<a href="<i>3->url</i>" class="internal actualpage" title="<i>3->description</i>"><i>3->title</i></a> -</br> -</li> -</br> -<li> -</br> -<a href="<i>5->url</i>" class="internal" title="<i>5->description</i>"><i>5->title</i></a> -</br> -</li> -</br> -</ul> -</blockquote> - -<p>The list is ordered by the <code>date</code> attribute, that you can set manualy for each page. You may have noticed that the actual page (page 3), has been specified using <code>.actualpage</code> class. This can be usefull to create a menu and highlight the current page.</p> - - -<h5>Article separator</h5> - -<p>You can use the <code>article</code> html element, by separating text using at least <code>====</code>. It is of course possible to use Markdown synthax inside those articles separators</p> - -<blockquote> -====</br></br> -<i>some text</i></br></br> -======<i>important</i></br></br> -<i>this is a longer text</i></br></br> -======</br></br> -</blockquote> - -<p>This will ouptut :</p> - -<blockquote> -<article></br> -<i>some text</i></br> -</article></br> -<article id="<i>important</i>"></br> -<i>this is a longer textt</i></br> -</article></br> -</blockquote> - - -<p>As you may have noticed, there is also the possibility to add a custom <code>id</code> to any of the articles created that way</p> - - -<h5>Media list</h5> - -<p>As it is too long adding all media of a folder one by one, you can just print the content of an entire folder using this method.</p> - -<blockquote> -%MEDIA:<i>__directory__</i> -</blockquote> - -<p>Just point to the good directory inside the media folder. This will output html list, creating image elements, audio players, video players, or just basic link, depending on the media type.</p> - - - - - - -<h4 id="bodysyntax">Body syntax</h4> - - - - -<h5>Basic including</h5> - -<blockquote>%HTML_ELEMENT%</blockquote> - - -<p>This will include the matching html element from your page's content in your page body. If there is nothing in the corresponding element, it won't print anything. The name of the html element as to be UPPERCASE.</p> - -<p>For example :</p> - -<blockquote> -%ASIDE% -</br> -</br> -%MAIN% -</blockquote> - -<p>Will output :</p> - -<blockquote> -<aside class="<i>page_id</i>"> -</br> -__the content of your aside__ -</br> - -</aside> -</br> -</br> -<main class="<i>page_id</i>"> -</br> -__the content of your main__ -</br> - -</main> - - -</blockquote> - -<p>You can also use one element multiple times.</p> - -<h5>Advanced includings</h5> - -<blockquote> - %<i>HTML_ELEMENT</i>:<i>page_id</i>% -</blockquote> - -<p>By doing this, you can include the <code>HTML_ELEMENT</code> of the page using this <code>page_id</code> id. You can even nest differents pages source by adding <code>page_id</code> separated by a dot, this would be like :</p> - -<blockquote> - %<i>HTML_ELEMENT</i>:<i>page1_id</i>+<i>page2_id</i>% -</blockquote> - -<p>And you can mix it with the original page content using <code>!</code> identifier</p> - -<blockquote> - %<i>HTML_ELEMENT</i>:<i>page3_id</i>+<i>!</i>% -</blockquote> - -<p>This will output :</p> - -<blockquote> - -<html_element class="<i>page3_id page_id</i>"> -</br> -__content of page1's html element__ -</br> -__content of this page html element__ -</br> -</html_element> - - - -</blockquote> - -</article> |