- Craft 3 Documentation: Craft 3 Docs
- Twig Template Language: Twig Symfony Twig Primer
- All templates are separated according to the Atomic Design Pattern
- All pages with url's are found in
/templates/_pagesfrom there on all elements are split into includes. Its easiest to look for the include in_pagesfor orientation. - All templates inherit
_layout.twigso if you need global variables, put them there. - There is a file called
_incl/docMacros.twigwhich contain a few twig snippets. (eg. every wysiwyg field is sanitised trough a macro). - SEO Code: All twig SEO is written in
_organisms/seoPage. It grabs all the seo fields of each page and puts it into the head. If there are empty seo fields on a page it will grab the fallback text fromGlobale Inhalte - Some Craft Entry IDs are hard-wired in the templates:
- Main menu entries: in _layout.twig
- Special direct buttons on Home page: in indexOversight.twig
- Stylesheets are also separated according to the Atomic Design Pattern (Although it doesn't work as nicely as in the twig markup)
- There is no Framework in place. It is all custom CSCC
- The stylesheet
IEhack.scssis applied on IE 11 and contains all adjustments. Pleas place IE stuf only there. - For npm package specific styling there is a
plugins.scssfor ugly overrides (e.g. Lightbox Plugin).
- All layouts are made with either grid or flexbox
- Each page has it's own grid stylesheet. They are suposed for layout mechanics only!!
- Static translations in Craft are stored in the
translationsand then called in twig with thetFilter:{{ 'Deine übersetzung' | t }}Static Translations
- on dev environements run:
npm ionce and then for development:npm run dev
- Craft 3 uses DOTENV principle
- All custom vlaues are stored in a
.envfile which are applied into the files inconfig. The.envfile mustn't be checked in because the whole idea is to not have any passwords in the repo. Just rename.env-exampleand adjust values accordingly
- copy the db from the specific server
- Folders where CMS users can upload files trough the CMS are not in the repo. See
.gitignorefor said folders.
npm run dev cd www php -S localhost:8000