drago-ex / project-front-ui
Integration of a basic template for the website: the layout, the home page with the blog and the static pages in the menu.
Package info
github.com/drago-ex/project-front-ui
Language:Latte
Type:drago-tools-resource
pkg:composer/drago-ex/project-front-ui
Requires
- php: >=8.3 <9
- drago-ex/application: ^5.0
- drago-ex/component: ^4.0
- drago-ex/form: ^4.0
- drago-ex/permission: ^2.0
- drago-ex/project-account: ^2.0
- drago-ex/project-auth: ^2.0
- drago-ex/project-blog: ^2.0
- drago-ex/project-front: ^3.0
- drago-ex/project-settings: ^2.0
- drago-ex/project-static-page: ^2.0
- drago-ex/project-user: ^1.0
- drago-ex/texy-toolbar: ^1.1
- drago-ex/translator: ^4.0.1
Requires (Dev)
- drago-ex/project-tools: ^1.0
- phpstan/phpstan: ^2.0
- phpstan/phpstan-nette: ^2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
The website design of Drago Project: a Bootstrap layout with the blog and the static pages in the menu, the user menu, a light/dark theme, a footer and the home page with the latest articles.
Requirements
- PHP >= 8.3, < 9
- Drago Project
Installation
composer require drago-ex/project-front-ui
Project Tools copies the files of the package into the project once,
replacing the plain files of Project Front (BasePresenter,
BaseTemplate, the front layout, the home page, assets/front.js and front.scss). Its npm dependencies
(compostrap, Bootstrap Icons) are installed by npm install of the
project; then build the assets again (npm run vite:build). It requires Blog, Static Pages,
Settings and Account.
Layout
The website is the blog of compostrap. Front/@layout.latte has a header with the brand (the website setting),
the blog, the static pages marked "Show in the menu" and the menu of the signed-in user (account, administration,
theme, sign out), or a theme button and a sign-in button. The administration item is shown only to users allowed Backend:Admin. The footer has the brand, the
links of the site and the tools the site is built with; edit them freely.
Front/Home shows the latest seven articles of the blog, the same list as the blog.
BasePresenter checks every presenter by the ACL, loads the settings and gives the layout the static pages of
the menu.
Assets
assets/front.js registers the Naja extensions of the website: the spinner, the submit button, toasts,
dropdowns, the Texy toolbar of comments with the copy button of code blocks and the reply to a blog comment.
assets/front.scss imports the styles of the website from compostrap: its module blog (header, footer, article
cards, an article with its Texy text, comments) and the modules the header uses. Your own styles of the website go
under these imports.