diff --git a/src/Controller/DefaultController.php b/src/Controller/DefaultController.php index 82c8146..adf7fd3 100644 --- a/src/Controller/DefaultController.php +++ b/src/Controller/DefaultController.php @@ -18,6 +18,9 @@ class DefaultController extends AbstractController #[Route('/', name: 'app_index')] public function index(): Response { + if ($this->isGranted('IS_AUTHENTICATED_FULLY')) { + return $this->redirect('/index.php/home'); + } return $this->render('default/index.html.twig'); } @@ -35,6 +38,12 @@ class DefaultController extends AbstractController ]); } + #[Route('/cheat-sheet', name: 'app_cheat_sheet')] + public function cheatSheet(): Response + { + return $this->render('default/cheat-sheet.html.twig'); + } + #[Route('/reference-editor', name: 'app_reference_editor')] public function referenceEditor(EntityManagerInterface $emi): Response { diff --git a/templates/default/cheat-sheet.html.twig b/templates/default/cheat-sheet.html.twig new file mode 100644 index 0000000..2e360dc --- /dev/null +++ b/templates/default/cheat-sheet.html.twig @@ -0,0 +1,163 @@ +{% extends 'base.html.twig' %} + +{% block title %}Markdown Cheat Sheet{% endblock %} + +{% block stylesheets %} + + + + + +{% endblock %} + +{% block javascripts %} + + + + + + + + + + +{% endblock %} + +{% block body %} +
The following was provided by The Markdown Guid
+ +This Markdown cheat sheet provides a quick overview of all the Markdown syntax elements. It can't cover every edge case, so if you need more information about any of these elements, refere to the reference guides for basic syntax and extended syntax.
+ +These are the elements outlined in John Gruberal's original design document. All Markdown applications support these elements. The quoted text is what is needed to render what is displayed right below
+ +blockquote+ +
code
These elements extend the basic syntax by adding additional features. Not all Markdown applications support these elements.
+ +Syntax | +Description | + + +
---|---|
Header | +Title | +
Paragraph | +Text | +
Specifying the language after the first 3 backticks may help with text formatting and highlighting based on the language entered, may or may not be supported in a given Markdown tools implementation
+ +```json+{ + "firstName": "John", + "lastName": "Smith", + "age": 25 +} ++