Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature create core layout #40

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Th-Fernandes
Copy link
Collaborator

@Th-Fernandes Th-Fernandes commented Apr 11, 2024

Description

In order to make it easier to re-use the most used layout all over the project, this PR introduces the layout-core.blade.php layout.

Overview

  • a new layout component at resources/views/layout
  • a new header component that uses the new brand's color
  • a aside component that navigates through project details
  • wrapper components that render different versions of the layout depending in which route user is
  • the configuration of the new color at tailwind file. Just use main-400 prefix to use it

Use-case

It is quite simple to re-use the layout component. Here are the step-by-step:

  • create a new blade file
  • include "@extends('layout.core.layout')" at the top of the file
  • wrap all the main content of your new file using "@section" directive (it must be called 'content' in order for the layout component to recognize your content )
/* resources/views/project/index.blade.php */

@extends('layout.core.layout')

@section('content')
   <h1> Sup everyone!</h1>
   <p> This is how the layout should be re-used :D</p>
@endSection

Releated Issues

Copy link

netlify bot commented Apr 11, 2024

Deploy Preview for diagier failed.

Name Link
🔨 Latest commit 45596e3
🔍 Latest deploy log https://app.netlify.com/sites/diagier/deploys/6618730030eb880008e8614e

@Th-Fernandes Th-Fernandes self-assigned this Apr 11, 2024
@Th-Fernandes Th-Fernandes added the 👨‍💻dev 👨‍💻 dev task label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👨‍💻dev 👨‍💻 dev task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant