Skip to content

Commit 97d8814

Browse files
committed
conditional homework button
1 parent 37da81b commit 97d8814

File tree

9 files changed

+13
-1
lines changed

9 files changed

+13
-1
lines changed

.eleventy.js

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ module.exports = function (eleventyConfig) {
4141
})
4242

4343
eleventyConfig.addPassthroughCopy('_src/assets')
44+
// eleventyConfig.addPassthroughCopy("_src/styles")
4445

4546
eleventyConfig.addNunjucksFilter('bootstrapNav', toBootstrapNav)
4647

02-JS-I/README.json

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"lessonTitle": "JavaScript I",
33
"feedbackID": "02-JS-I",
44
"permalink": "/JavaScript_I/",
5+
"homeworkLink": "https://github.com/soyHenry/Prep-Course/tree/main/02-JS-I/homework",
56
"eleventyNavigation": {
67
"key": "JS I",
78
"order": 5

03-JS-II/README.json

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"lessonTitle": "JavaScript II",
33
"feedbackID": "03-JS-II",
44
"permalink": "/JavaScript_II/",
5+
"homeworkLink": "https://github.com/soyHenry/Prep-Course/tree/main/03-JS-II/homework",
56
"eleventyNavigation": {
67
"key": "JS II",
78
"order": 6

04-JS-III/README.json

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"lessonTitle": "JavaScript III",
33
"feedbackID": "04-JS-III",
44
"permalink": "/JavaScript_III/",
5+
"homeworkLink": "https://github.com/soyHenry/Prep-Course/tree/main/04-JS-III/homework",
56
"eleventyNavigation": {
67
"key": "JS III",
78
"order": 7

05-JS-IV/README.json

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"lessonTitle": "JavaScript IV",
33
"feedbackID": "05-JS-IV",
44
"permalink": "/JavaScript_IV/",
5+
"homeworkLink": "https://github.com/soyHenry/Prep-Course/tree/main/05-JS-IV/homework",
56
"eleventyNavigation": {
67
"key": "JS IV",
78
"order": 8

06-JS-V/README.json

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"lessonTitle": "JavaScript V",
33
"feedbackID": "06-JS-V",
44
"permalink": "/JavaScript_V/",
5+
"homeworkLink": "https://github.com/soyHenry/Prep-Course/tree/main/06-JS-V/homework",
56
"eleventyNavigation": {
67
"key": "JS V",
78
"order": 9

07-JS-VI/README.json

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"lessonTitle": "JavaScript VI",
33
"feedbackID": "07-JS-VI",
44
"permalink": "/JavaScript_VI/",
5+
"homeworkLink": "https://github.com/soyHenry/Prep-Course/tree/main/07-JS-VI/homework",
56
"eleventyNavigation": {
67
"key": "JS VI",
78
"order": 10

09-CSS-Positioning/README.json

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"lessonTitle": "CSS",
33
"feedbackID": "09-CSS-Positioning",
44
"permalink": "/CSS/",
5+
"homeworkLink": "https://github.com/soyHenry/Prep-Course/tree/main/09-CSS-Positioning/homework",
56
"eleventyNavigation": {
67
"key": "CSS",
78
"order": 12

_src/layouts/lesson.njk

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ favicon: 'https://henry-11ty-resources.s3.sa-east-1.amazonaws.com/Assets/favicon
2121
<link rel="stylesheet" href="{{ 'https://henry-11ty-resources.s3.sa-east-1.amazonaws.com/Styles/code.css' | url }}">
2222
<link rel="stylesheet" href="{{ 'https://henry-11ty-resources.s3.sa-east-1.amazonaws.com/Styles/footer.css' | url }}">
2323
<link rel="stylesheet" href="{{ 'https://henry-11ty-resources.s3.sa-east-1.amazonaws.com/Styles/responsive.css' | url }}">
24+
2425
<title>{{ lessonTitle }} | {{ config.repoTitle }}</title>
2526
</head>
2627

@@ -72,7 +73,10 @@ favicon: 'https://henry-11ty-resources.s3.sa-east-1.amazonaws.com/Assets/favicon
7273
</div>
7374

7475
<div class='lesson'>
75-
<div style="display:flex; justify-content: right; right: 0; width: 100%;">
76+
<div class='rightBox'>
77+
{% if homeworkLink %}
78+
<div class='homeworkBox'><a href={{homeworkLink}} target='blank'>Homework 📝</a></div>
79+
{% endif %}
7680
<div class="readingTime">
7781
Tiempo de lectura {{ content | readingTime }}
7882
</div>

0 commit comments

Comments
 (0)