File tree Expand file tree Collapse file tree 2 files changed +66
-2
lines changed Expand file tree Collapse file tree 2 files changed +66
-2
lines changed Original file line number Diff line number Diff line change 1
1
<%
2
2
const { slug , content } = await _ .resolveRoute ()
3
+ const isNotFound = ! Object .keys (content).length
3
4
_ .breadcrumbs = [{
4
5
name: content .title ,
5
6
link: ` /pages/${ slug} `
@@ -15,4 +16,35 @@ if (!content.sections || !content.sections.length) {
15
16
}
16
17
%>
17
18
18
- <% - await include (' @/view' ) %>
19
+ <% if (! isNotFound) { % >
20
+ < %- await include (' @/view' ) % >
21
+ < % } else { % >
22
+ < ! doctype html>
23
+ < html lang= " <%= _.lang.replace('_', '-') %>" dir= " ltr" >
24
+ < head>
25
+ < %- await include (' @/head' ) % >
26
+ < / head>
27
+ < body id= " page-404" >
28
+ < %- await include (' @/layout/menu' ) % >
29
+ < main role= " main" id= " main" >
30
+ < %- await include (' @/layout/header' ) % >
31
+ < div class = " container py-5" >
32
+ < article id= " fallback-404" >
33
+ < p class = " display-1" >
34
+ < b> 404 < / b>
35
+ < / p>
36
+ < p class = " display-4 text-muted" >
37
+ P ágina não encontrada.
38
+ < / p>
39
+ < p class = " display-4" >
40
+ < a href= " /" > Ir para a home< / a>
41
+ < / p>
42
+ < / article>
43
+ < / div>
44
+ < %- await include (' @/layout/footer' ) % >
45
+ < / main>
46
+ < %- await include (' @/json' ) % >
47
+ < %- await include (' @/scripts' ) % >
48
+ < / body>
49
+ < / html>
50
+ < % } %>
Original file line number Diff line number Diff line change 1
1
<%
2
2
const blogPage = _ .cms (' blog' )
3
3
const { slug , content } = await _ .resolveRoute ()
4
+ const isNotFound = ! Object .keys (content).length
4
5
_ .breadcrumbs = [{
5
6
name: blogPage .title ,
6
7
link: ` /blog`
@@ -19,4 +20,35 @@ if (!content.sections || !content.sections.length) {
19
20
}
20
21
%>
21
22
22
- <% - await include (' @/view' ) %>
23
+ <% if (! isNotFound) { % >
24
+ < %- await include (' @/view' ) % >
25
+ < % } else { % >
26
+ < ! doctype html>
27
+ < html lang= " <%= _.lang.replace('_', '-') %>" dir= " ltr" >
28
+ < head>
29
+ < %- await include (' @/head' ) % >
30
+ < / head>
31
+ < body id= " page-404" >
32
+ < %- await include (' @/layout/menu' ) % >
33
+ < main role= " main" id= " main" >
34
+ < %- await include (' @/layout/header' ) % >
35
+ < div class = " container py-5" >
36
+ < article id= " fallback-404" >
37
+ < p class = " display-1" >
38
+ < b> 404 < / b>
39
+ < / p>
40
+ < p class = " display-4 text-muted" >
41
+ Post não encontrado.
42
+ < / p>
43
+ < p class = " display-4" >
44
+ < a href= " /blog" > Ir para o blog< / a>
45
+ < / p>
46
+ < / article>
47
+ < / div>
48
+ < %- await include (' @/layout/footer' ) % >
49
+ < / main>
50
+ < %- await include (' @/json' ) % >
51
+ < %- await include (' @/scripts' ) % >
52
+ < / body>
53
+ < / html>
54
+ < % } %>
You can’t perform that action at this time.
0 commit comments