Using new wvc features.
This commit is contained in:
parent
1f88d1b76d
commit
4985bb4b86
@ -9,10 +9,10 @@ import com.jessebrault.site.icon.YoutubeIcon
|
||||
<body>
|
||||
<div class="header-banner-container">
|
||||
<Header />
|
||||
<% children -> children << banner() %>
|
||||
<Outlet children={[banner()]} />
|
||||
</div>
|
||||
<main>
|
||||
<% children -> mainChildren.each { children << it } %>
|
||||
<Outlet children={mainChildren} />
|
||||
</main>
|
||||
<footer>
|
||||
<div class="social-icons">
|
||||
|
@ -2,7 +2,6 @@ package com.jessebrault.site.lessons
|
||||
|
||||
import com.jessebrault.site.util.TitleMaker
|
||||
import com.jessebrault.ssg.di.InjectText
|
||||
import com.jessebrault.ssg.di.InjectTexts
|
||||
import com.jessebrault.ssg.di.SelfPage
|
||||
import com.jessebrault.ssg.page.Page
|
||||
import com.jessebrault.ssg.page.PageSpec
|
||||
@ -16,22 +15,22 @@ class LessonsPage extends WvcPageView {
|
||||
static final String description = 'Information about lessons offered by Jesse Brault.'
|
||||
|
||||
final Page selfPage
|
||||
final Text lessons
|
||||
private final TitleMaker titleMaker
|
||||
private final Text lessonsText
|
||||
|
||||
@Inject
|
||||
LessonsPage(@SelfPage Page selfPage, TitleMaker titleMaker, @InjectText('/Lessons.md') Text lessonsText) {
|
||||
LessonsPage(@SelfPage Page selfPage, TitleMaker titleMaker, @InjectText('/Lessons.md') Text lessons) {
|
||||
this.selfPage = selfPage
|
||||
this.titleMaker = titleMaker
|
||||
this.lessonsText = lessonsText
|
||||
this.lessons = lessons
|
||||
}
|
||||
|
||||
String getPageTitle() {
|
||||
titleMaker.makeTitle(selfPage.name)
|
||||
String getTitle() {
|
||||
titleMaker.makeTitle(pageTitle)
|
||||
}
|
||||
|
||||
String renderLessons() {
|
||||
this.lessonsText.render()
|
||||
this.lessons.render()
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ package com.jessebrault.site.videos
|
||||
|
||||
import com.jessebrault.site.util.TitleMaker
|
||||
import com.jessebrault.ssg.di.InjectText
|
||||
import com.jessebrault.ssg.di.InjectTexts
|
||||
import com.jessebrault.ssg.di.SelfPage
|
||||
import com.jessebrault.ssg.page.Page
|
||||
import com.jessebrault.ssg.page.PageSpec
|
||||
@ -16,22 +15,22 @@ class VideosPage extends WvcPageView {
|
||||
static final String description = 'Conducting videos of Jesse Brault.'
|
||||
|
||||
final Page selfPage
|
||||
final Text videos
|
||||
private final TitleMaker titleMaker
|
||||
private final Text videosText
|
||||
|
||||
@Inject
|
||||
VideosPage(@SelfPage Page selfPage, TitleMaker titleMaker, @InjectText('/Videos.md') Text videosText) {
|
||||
VideosPage(@SelfPage Page selfPage, TitleMaker titleMaker, @InjectText('/Videos.md') Text videos) {
|
||||
this.selfPage = selfPage
|
||||
this.titleMaker = titleMaker
|
||||
this.videosText = videosText
|
||||
this.videos = videos
|
||||
}
|
||||
|
||||
String getPageTitle() {
|
||||
titleMaker.makeTitle(selfPage.name)
|
||||
String getTitle() {
|
||||
titleMaker.makeTitle(pageTitle)
|
||||
}
|
||||
|
||||
String renderVideos() {
|
||||
videosText.render()
|
||||
videos.render()
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ import com.jessebrault.site.util.OpenGraph
|
||||
>
|
||||
<div class="article-container">
|
||||
<article id="biography-article">
|
||||
<%= renderBiography() %>
|
||||
<Render item={biography} />
|
||||
</article>
|
||||
</div>
|
||||
</StandardPage>
|
||||
|
@ -65,7 +65,7 @@ import com.jessebrault.site.util.OpenGraph
|
||||
</WhenNotEmpty>
|
||||
</section>
|
||||
<section class="composition-text">
|
||||
${composition.text.render()}
|
||||
<Render item={composition.text} />
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
|
@ -5,10 +5,10 @@ import com.jessebrault.site.StandardPage
|
||||
import com.jessebrault.site.util.OpenGraph
|
||||
---
|
||||
<StandardPage
|
||||
title={pageTitle}
|
||||
title={title}
|
||||
description={description}
|
||||
openGraph={<OpenGraph
|
||||
title={selfPage.name}
|
||||
title={pageTitle}
|
||||
description={description}
|
||||
path={selfPage.path}
|
||||
/>}
|
||||
@ -16,7 +16,7 @@ import com.jessebrault.site.util.OpenGraph
|
||||
>
|
||||
<div class="article-container">
|
||||
<article id="lessons-article">
|
||||
<%= renderLessons() %>
|
||||
<Render item={lessons} />
|
||||
</article>
|
||||
</div>
|
||||
</StandardPage>
|
||||
|
@ -5,10 +5,10 @@ import com.jessebrault.site.StandardPage
|
||||
import com.jessebrault.site.util.OpenGraph
|
||||
---
|
||||
<StandardPage
|
||||
title={pageTitle}
|
||||
title={title}
|
||||
description={description}
|
||||
openGraph={<OpenGraph
|
||||
title={selfPage.name}
|
||||
title={pageTitle}
|
||||
description={description}
|
||||
path={selfPage.path}
|
||||
/>}
|
||||
@ -16,7 +16,7 @@ import com.jessebrault.site.util.OpenGraph
|
||||
>
|
||||
<div class="article-container">
|
||||
<article id="videos-article">
|
||||
<%= renderVideos() %>
|
||||
<Render item={videos} />
|
||||
</article>
|
||||
</div>
|
||||
</StandardPage>
|
||||
|
Loading…
Reference in New Issue
Block a user