Skip to content

Commit 255bad0

Browse files
committed
Split blade templates
1 parent 582d0a4 commit 255bad0

File tree

4 files changed

+26
-15
lines changed

4 files changed

+26
-15
lines changed

readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ The purpose of this application was to create a simple project based on Laravel
1616
- Includes PHPUnit tests. Placed in `tests/ConverterTest.php` and run by typing `vendor/bin/phpunit`
1717
- Project structure was made using Laravel installer
1818

19+
#### Frontend
20+
The theme is built using gulp, elixir ans scss. It's designed with simplicity in mind. Blade templates are split into multiple files.
21+
1922
### Use Case
2023

2124
- When submitted the form should display both the integer and roman numeral

resources/views/converter.blade.php

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
<!DOCTYPE html>
2-
<html>
3-
<head>
4-
<title>Roman numerals converter</title>
1+
@extends('layout.base')
52

6-
<link href='https://fonts.googleapis.com/css?family=Lato:100,400,300,700,900' rel='stylesheet' type='text/css'>
3+
@section('head')
4+
<title>Roman numerals converter</title>
5+
@endsection
76

8-
<link type="text/css" rel="stylesheet" href="{{ URL::asset('css/app.css') }}"/>
9-
<script type="text/javascript" src="{{ URL::asset('js/app.js') }}"></script>
10-
</head>
11-
<body>
12-
<div class="container">
7+
@section('content')
138
<section class="header">
149
<h1>Roman numerals converter</h1>
1510
</section>
@@ -52,9 +47,5 @@
5247
</ul>
5348
@endif
5449
</div>
55-
5650
</section>
57-
</div>
58-
</body>
59-
</html>
60-
51+
@endsection
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
@include('layout.head')
5+
@yield('head')
6+
</head>
7+
<body>
8+
<div class="container">
9+
@yield('content')
10+
</div>
11+
</body>
12+
</html>
13+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<link href='https://fonts.googleapis.com/css?family=Lato:100,400,300,700,900' rel='stylesheet' type='text/css'>
2+
3+
<link type="text/css" rel="stylesheet" href="{{ URL::asset('css/app.css') }}"/>
4+
<script type="text/javascript" src="{{ URL::asset('js/app.js') }}"></script>

0 commit comments

Comments
 (0)