generated from codeforamerica/form-flow-starter-app
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scaffolds for household info flow and script to generate scaffold tem…
…plates (#314)
- Loading branch information
1 parent
e80b1d1
commit aac7436
Showing
33 changed files
with
1,003 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#brew install yq | ||
flowName="${1:-laDigitalAssister}" | ||
flowIndex="${2:-1}" | ||
templates=`ls -1 src/main/resources/templates/laDigitalAssister/*.html | cut -d'/' -f6-` | ||
screens=( $(yq '[select(document_index == '"$flowIndex"') | .flow.*.nextScreens[0].name] | flatten' src/main/resources/flows-config.yaml) ) | ||
screenNames=( $( printf '%s\n' ${screens[@]} | egrep -v '^(---|-|null|\[*\])' ) ) | ||
for i in "${!screenNames[@]}"; do | ||
if grep -q "${screenNames[$i]}.html" <<< "${templates[*]}"; then | ||
echo "found ${screenNames[$i]} in templates" | ||
else | ||
echo "${screenNames[$i]} not in templates; creating one" | ||
cat scripts/scaffold.html >> "src/main/resources/templates/${flowName}/${screenNames[$i]}.html" | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html th:lang="${#locale.language}"> | ||
<head th:replace="fragments/head :: head(title='Scaffold')"></head> | ||
<body> | ||
<div class="page-wrapper"> | ||
<div th:replace="fragments/toolbar :: toolbar"></div> | ||
<section class="slab"> | ||
<div class="grid"> | ||
<div th:replace="fragments/goBack :: goBackLink"></div> | ||
<main id="content" role="main" class="form-card spacing-above-35"> | ||
<!-- <th:block--> | ||
<!-- th:replace="'fragments/cardHeader' :: cardHeader(header=#{}, subtext=#{})"/>--> | ||
<th:block th:replace="'fragments/form' :: form(action=${formAction}, content=~{::formContent})"> | ||
<th:block th:ref="formContent"> | ||
<div class="form-card__content"> | ||
|
||
</div> | ||
<div class="form-card__footer"> | ||
|
||
</div> | ||
</th:block> | ||
</th:block> | ||
</main> | ||
</div> | ||
</section> | ||
</div> | ||
<th:block th:replace="fragments/footer :: footer" /> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/main/resources/templates/laDigitalAssister/additionalParent.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html th:lang="${#locale.language}"> | ||
<head th:replace="fragments/head :: head(title='Scaffold')"></head> | ||
<body> | ||
<div class="page-wrapper"> | ||
<div th:replace="fragments/toolbar :: toolbar"></div> | ||
<section class="slab"> | ||
<div class="grid"> | ||
<div th:replace="fragments/goBack :: goBackLink"></div> | ||
<main id="content" role="main" class="form-card spacing-above-35"> | ||
<!-- <th:block--> | ||
<!-- th:replace="'fragments/cardHeader' :: cardHeader(header=#{}, subtext=#{})"/>--> | ||
<th:block th:replace="'fragments/form' :: form(action=${formAction}, content=~{::formContent})"> | ||
<th:block th:ref="formContent"> | ||
<div class="form-card__content"> | ||
|
||
</div> | ||
<div class="form-card__footer"> | ||
|
||
</div> | ||
</th:block> | ||
</th:block> | ||
</main> | ||
</div> | ||
</section> | ||
</div> | ||
<th:block th:replace="fragments/footer :: footer" /> | ||
</body> | ||
</html> |
29 changes: 29 additions & 0 deletions
29
src/main/resources/templates/laDigitalAssister/childCareWho.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html th:lang="${#locale.language}"> | ||
<head th:replace="fragments/head :: head(title='Scaffold')"></head> | ||
<body> | ||
<div class="page-wrapper"> | ||
<div th:replace="fragments/toolbar :: toolbar"></div> | ||
<section class="slab"> | ||
<div class="grid"> | ||
<div th:replace="fragments/goBack :: goBackLink"></div> | ||
<main id="content" role="main" class="form-card spacing-above-35"> | ||
<!-- <th:block--> | ||
<!-- th:replace="'fragments/cardHeader' :: cardHeader(header=#{}, subtext=#{})"/>--> | ||
<th:block th:replace="'fragments/form' :: form(action=${formAction}, content=~{::formContent})"> | ||
<th:block th:ref="formContent"> | ||
<div class="form-card__content"> | ||
|
||
</div> | ||
<div class="form-card__footer"> | ||
|
||
</div> | ||
</th:block> | ||
</th:block> | ||
</main> | ||
</div> | ||
</section> | ||
</div> | ||
<th:block th:replace="fragments/footer :: footer" /> | ||
</body> | ||
</html> |
29 changes: 29 additions & 0 deletions
29
src/main/resources/templates/laDigitalAssister/childrenWithParentOutsideHome.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html th:lang="${#locale.language}"> | ||
<head th:replace="fragments/head :: head(title='Scaffold')"></head> | ||
<body> | ||
<div class="page-wrapper"> | ||
<div th:replace="fragments/toolbar :: toolbar"></div> | ||
<section class="slab"> | ||
<div class="grid"> | ||
<div th:replace="fragments/goBack :: goBackLink"></div> | ||
<main id="content" role="main" class="form-card spacing-above-35"> | ||
<!-- <th:block--> | ||
<!-- th:replace="'fragments/cardHeader' :: cardHeader(header=#{}, subtext=#{})"/>--> | ||
<th:block th:replace="'fragments/form' :: form(action=${formAction}, content=~{::formContent})"> | ||
<th:block th:ref="formContent"> | ||
<div class="form-card__content"> | ||
|
||
</div> | ||
<div class="form-card__footer"> | ||
|
||
</div> | ||
</th:block> | ||
</th:block> | ||
</main> | ||
</div> | ||
</section> | ||
</div> | ||
<th:block th:replace="fragments/footer :: footer" /> | ||
</body> | ||
</html> |
29 changes: 29 additions & 0 deletions
29
src/main/resources/templates/laDigitalAssister/criminalJusticeSituations.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html th:lang="${#locale.language}"> | ||
<head th:replace="fragments/head :: head(title='Scaffold')"></head> | ||
<body> | ||
<div class="page-wrapper"> | ||
<div th:replace="fragments/toolbar :: toolbar"></div> | ||
<section class="slab"> | ||
<div class="grid"> | ||
<div th:replace="fragments/goBack :: goBackLink"></div> | ||
<main id="content" role="main" class="form-card spacing-above-35"> | ||
<!-- <th:block--> | ||
<!-- th:replace="'fragments/cardHeader' :: cardHeader(header=#{}, subtext=#{})"/>--> | ||
<th:block th:replace="'fragments/form' :: form(action=${formAction}, content=~{::formContent})"> | ||
<th:block th:ref="formContent"> | ||
<div class="form-card__content"> | ||
|
||
</div> | ||
<div class="form-card__footer"> | ||
|
||
</div> | ||
</th:block> | ||
</th:block> | ||
</main> | ||
</div> | ||
</section> | ||
</div> | ||
<th:block th:replace="fragments/footer :: footer" /> | ||
</body> | ||
</html> |
29 changes: 29 additions & 0 deletions
29
src/main/resources/templates/laDigitalAssister/custodyOfChild.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html th:lang="${#locale.language}"> | ||
<head th:replace="fragments/head :: head(title='Scaffold')"></head> | ||
<body> | ||
<div class="page-wrapper"> | ||
<div th:replace="fragments/toolbar :: toolbar"></div> | ||
<section class="slab"> | ||
<div class="grid"> | ||
<div th:replace="fragments/goBack :: goBackLink"></div> | ||
<main id="content" role="main" class="form-card spacing-above-35"> | ||
<!-- <th:block--> | ||
<!-- th:replace="'fragments/cardHeader' :: cardHeader(header=#{}, subtext=#{})"/>--> | ||
<th:block th:replace="'fragments/form' :: form(action=${formAction}, content=~{::formContent})"> | ||
<th:block th:ref="formContent"> | ||
<div class="form-card__content"> | ||
|
||
</div> | ||
<div class="form-card__footer"> | ||
|
||
</div> | ||
</th:block> | ||
</th:block> | ||
</main> | ||
</div> | ||
</section> | ||
</div> | ||
<th:block th:replace="fragments/footer :: footer" /> | ||
</body> | ||
</html> |
29 changes: 29 additions & 0 deletions
29
src/main/resources/templates/laDigitalAssister/fosterCareUntilAdult.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html th:lang="${#locale.language}"> | ||
<head th:replace="fragments/head :: head(title='Scaffold')"></head> | ||
<body> | ||
<div class="page-wrapper"> | ||
<div th:replace="fragments/toolbar :: toolbar"></div> | ||
<section class="slab"> | ||
<div class="grid"> | ||
<div th:replace="fragments/goBack :: goBackLink"></div> | ||
<main id="content" role="main" class="form-card spacing-above-35"> | ||
<!-- <th:block--> | ||
<!-- th:replace="'fragments/cardHeader' :: cardHeader(header=#{}, subtext=#{})"/>--> | ||
<th:block th:replace="'fragments/form' :: form(action=${formAction}, content=~{::formContent})"> | ||
<th:block th:ref="formContent"> | ||
<div class="form-card__content"> | ||
|
||
</div> | ||
<div class="form-card__footer"> | ||
|
||
</div> | ||
</th:block> | ||
</th:block> | ||
</main> | ||
</div> | ||
</section> | ||
</div> | ||
<th:block th:replace="fragments/footer :: footer" /> | ||
</body> | ||
</html> |
29 changes: 29 additions & 0 deletions
29
src/main/resources/templates/laDigitalAssister/fosterSystem.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html th:lang="${#locale.language}"> | ||
<head th:replace="fragments/head :: head(title='Scaffold')"></head> | ||
<body> | ||
<div class="page-wrapper"> | ||
<div th:replace="fragments/toolbar :: toolbar"></div> | ||
<section class="slab"> | ||
<div class="grid"> | ||
<div th:replace="fragments/goBack :: goBackLink"></div> | ||
<main id="content" role="main" class="form-card spacing-above-35"> | ||
<!-- <th:block--> | ||
<!-- th:replace="'fragments/cardHeader' :: cardHeader(header=#{}, subtext=#{})"/>--> | ||
<th:block th:replace="'fragments/form' :: form(action=${formAction}, content=~{::formContent})"> | ||
<th:block th:ref="formContent"> | ||
<div class="form-card__content"> | ||
|
||
</div> | ||
<div class="form-card__footer"> | ||
|
||
</div> | ||
</th:block> | ||
</th:block> | ||
</main> | ||
</div> | ||
</section> | ||
</div> | ||
<th:block th:replace="fragments/footer :: footer" /> | ||
</body> | ||
</html> |
29 changes: 29 additions & 0 deletions
29
src/main/resources/templates/laDigitalAssister/householdCount.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html th:lang="${#locale.language}"> | ||
<head th:replace="fragments/head :: head(title='Scaffold')"></head> | ||
<body> | ||
<div class="page-wrapper"> | ||
<div th:replace="fragments/toolbar :: toolbar"></div> | ||
<section class="slab"> | ||
<div class="grid"> | ||
<div th:replace="fragments/goBack :: goBackLink"></div> | ||
<main id="content" role="main" class="form-card spacing-above-35"> | ||
<!-- <th:block--> | ||
<!-- th:replace="'fragments/cardHeader' :: cardHeader(header=#{}, subtext=#{})"/>--> | ||
<th:block th:replace="'fragments/form' :: form(action=${formAction}, content=~{::formContent})"> | ||
<th:block th:ref="formContent"> | ||
<div class="form-card__content"> | ||
|
||
</div> | ||
<div class="form-card__footer"> | ||
|
||
</div> | ||
</th:block> | ||
</th:block> | ||
</main> | ||
</div> | ||
</section> | ||
</div> | ||
<th:block th:replace="fragments/footer :: footer" /> | ||
</body> | ||
</html> |
Oops, something went wrong.