From 02cb7b6fe373e71ff02dc0064c1ff74c1c921145 Mon Sep 17 00:00:00 2001 From: Robert McGovern Date: Tue, 8 Feb 2022 09:40:28 +0000 Subject: [PATCH] Fixes #1 Moved Other "Project Types" into the data file and changed the template to use that data. Shortens index.njk considerably. --- src/_data/webprojects.json | 325 +++++++++++++++++++++++-------------- src/css/style.css | 1 + src/index.njk | 157 ++++-------------- 3 files changed, 239 insertions(+), 244 deletions(-) diff --git a/src/_data/webprojects.json b/src/_data/webprojects.json index c19b2bb..682b75f 100644 --- a/src/_data/webprojects.json +++ b/src/_data/webprojects.json @@ -1,121 +1,208 @@ { - "frontendMentor": { - "serviceName": "Frontend Mentor", - "svgSource": "/svgs/frontendmentor.svg", - "svgAltText": "Frontend Mentor Logo", - "description": "Collection of challenges I completed for Frontend Mentor", - "difficulty": [ - { - "title": "Newbie", - "challenges": [ - { - "title": "Order Summary Card Component", - "url": "/FrontendMentor/newbie/order-summary-component/", - "description": "", - "techUsed": [ - "html5", - "css3" - ], - "screenshotURL": "/screenshots/fem-newbie-order-summary-component.png", - "screenshotAltText": "Order Summary Component Challenge from FrontendMentor" - }, - { - "title": "Profile Card Component", - "url": "/FrontendMentor/newbie/profile-card-component/", - "description": "", - "techUsed": [ - "html5", - "css3" - ], - "screenshotURL": "/screenshots/fem-newbie-profile-card-component.jpeg", - "screenshotAltText": "Profile Card Component Challenge from FrontendMentor" - }, - { - "title": "Stats Preview Card Component", - "url": "/FrontendMentor/newbie/stats-preview-card-component/", - "description": "", - "techUsed": [ - "html5", - "css3" - ], - "screenshotURL": "/screenshots/fem-newbie-stats-preview-card-component.jpeg", - "screenshotAltText": "Stats Preview Card Component Challenge from FrontendMentor" - }, - { - "title": "Article Preview Component", - "url": "/FrontendMentor/newbie/article-preview-component/", - "description": "", - "techUsed": [ - "html5", - "css3" - ], - "screenshotURL": "/screenshots/fem-newbie-article-preview-component.jpeg", - "screenshotAltText": "Article Preview Component Challenge from FrontendMentor" - }, - { - "title": "Four Card Feature Section", - "url": "/FrontendMentor/newbie/four-card-feature-section/", - "description": "", - "techUsed": [ - "html5", - "css3" - ], - "screenshotURL": "/screenshots/fem-newbie-four-card-feature-section.jpeg", - "screenshotAltText": "Four Card Feature Section Challenge from FrontendMentor" - }, - { - "title": "Single Price Grid Component", - "url": "/FrontendMentor/newbie/single-price-grid-component-master/", - "description": "", - "techUsed": [ - "html5", - "css3" - ], - "screenshotURL": "/screenshots/fem-newbie-single-price-grid-component.jpeg", - "screenshotAltText": "Single Price Grid Component Challenge from FrontendMentor" - }, - { - "title": "Ping Coming-Soon", - "url": "/FrontendMentor/newbie/ping-coming-soon-page-master/", - "description": "", - "techUsed": [ - "html5", - "css3", - "js" - ], - "screenshotURL": "/screenshots/fem-newbie-ping-coming-soon-page.jpeg", - "screenshotAltText": "Ping Coming-Soon Challenge from FrontendMentor" - }, - { - "title": "The Huddle Landing Page", - "url": "/FrontendMentor/newbie/huddle-landing-page-with-single-introductory-section-master/", - "description": "", - "techUsed": [ - "html5", - "css3", - "js" - ], - "screenshotURL": "/screenshots/fem-newbie-huddle-landing-page-with-single-introductory-section.png", - "screenshotAltText": "The Huddle Landing Page Challenge from FrontendMentor, with a single introductory section." - } - ] - }, - { - "title": "Junior", - "challenges": [] - }, - { - "title": "Intermediate", - "challenges": [] - }, - { - "title": "Advanced", - "challenges": [] - }, - { - "title": "Guru", - "challenges": [] - } - ] - } + "services": [ + { + "name": "Frontend Mentor", + "svgSource": "/svgs/frontendmentor.svg", + "svgAltText": "Frontend Mentor Logo", + "description": "Collection of challenges I completed for Frontend Mentor", + "cssClass": "", + "difficulty": [ + { + "title": "Newbie", + "cssClass": "frontEndMentorChallenges", + "challenges": [ + { + "title": "Order Summary Card Component", + "url": "/FrontendMentor/newbie/order-summary-component/", + "description": "", + "techUsed": [ + "html5", + "css3" + ], + "screenshotURL": "/screenshots/fem-newbie-order-summary-component.png", + "screenshotAltText": "Order Summary Component Challenge from FrontendMentor" + }, + { + "title": "Profile Card Component", + "url": "/FrontendMentor/newbie/profile-card-component/", + "description": "", + "techUsed": [ + "html5", + "css3" + ], + "screenshotURL": "/screenshots/fem-newbie-profile-card-component.jpeg", + "screenshotAltText": "Profile Card Component Challenge from FrontendMentor" + }, + { + "title": "Stats Preview Card Component", + "url": "/FrontendMentor/newbie/stats-preview-card-component/", + "description": "", + "techUsed": [ + "html5", + "css3" + ], + "screenshotURL": "/screenshots/fem-newbie-stats-preview-card-component.jpeg", + "screenshotAltText": "Stats Preview Card Component Challenge from FrontendMentor" + }, + { + "title": "Article Preview Component", + "url": "/FrontendMentor/newbie/article-preview-component/", + "description": "", + "techUsed": [ + "html5", + "css3" + ], + "screenshotURL": "/screenshots/fem-newbie-article-preview-component.jpeg", + "screenshotAltText": "Article Preview Component Challenge from FrontendMentor" + }, + { + "title": "Four Card Feature Section", + "url": "/FrontendMentor/newbie/four-card-feature-section/", + "description": "", + "techUsed": [ + "html5", + "css3" + ], + "screenshotURL": "/screenshots/fem-newbie-four-card-feature-section.jpeg", + "screenshotAltText": "Four Card Feature Section Challenge from FrontendMentor" + }, + { + "title": "Single Price Grid Component", + "url": "/FrontendMentor/newbie/single-price-grid-component-master/", + "description": "", + "techUsed": [ + "html5", + "css3" + ], + "screenshotURL": "/screenshots/fem-newbie-single-price-grid-component.jpeg", + "screenshotAltText": "Single Price Grid Component Challenge from FrontendMentor" + }, + { + "title": "Ping Coming-Soon", + "url": "/FrontendMentor/newbie/ping-coming-soon-page-master/", + "description": "", + "techUsed": [ + "html5", + "css3", + "js" + ], + "screenshotURL": "/screenshots/fem-newbie-ping-coming-soon-page.jpeg", + "screenshotAltText": "Ping Coming-Soon Challenge from FrontendMentor" + }, + { + "title": "The Huddle Landing Page", + "url": "/FrontendMentor/newbie/huddle-landing-page-with-single-introductory-section-master/", + "description": "", + "techUsed": [ + "html5", + "css3", + "js" + ], + "screenshotURL": "/screenshots/fem-newbie-huddle-landing-page-with-single-introductory-section.png", + "screenshotAltText": "The Huddle Landing Page Challenge from FrontendMentor, with a single introductory section." + } + ] + }, + { + "title": "Junior", + "cssClass": "frontEndMentorChallenges", + "challenges": [] + }, + { + "title": "Intermediate", + "cssClass": "frontEndMentorChallenges", + "challenges": [] + }, + { + "title": "Advanced", + "cssClass": "frontEndMentorChallenges", + "challenges": [] + }, + { + "title": "Guru", + "cssClass": "frontEndMentorChallenges", + "challenges": [] + } + ] + }, + { + "name": "Freecodecamp", + "svgSource": "/svgs/freecodecamp.svg", + "svgAltText": "Freecodecamp Logo", + "description": "Collection of challenges I completed while doing Freecodecamp", + "cssClass": "", + "difficulty": [ + { + "title": "Responsive Web Design Projects", + "description": "Note: As of 11 Oct 2020, these require a partial rework to look good on mobile. 1-3 where written much earlier in my learning, so while they fufill all the requirements, they don't look great on mobile.", + "cssClass": "responsiveProjects", + "challenges": [ + { + "title": "Project 1 - Tribute Page", + "url": "/freeCodeCamp/responsive-web-design-projects/Project1-TributePage/", + "description": "", + "techUsed": [ + "html5", + "css3" + ], + "screenshotURL": "/screenshots/fcc-web-Project1-TributePage.jpeg", + "screenshotAltText": "Project 1 - Tribute Page" + }, + { + "title": "Project 2 - Build A Survey Form", + "url": "/freeCodeCamp/responsive-web-design-projects/Project2-BuildaSurveyForm/", + "description": "", + "techUsed": [ + "html5", + "css3" + ], + "screenshotURL": "/screenshots/fcc-web-Project2-BuildaSurveyForm.jpeg", + "screenshotAltText": "Project 2 - Build A Survey Form" + }, + { + "title": "Project 3 - Product Landing Page", + "url": "/freeCodeCamp/responsive-web-design-projects/Project3-ProductLandingPage/", + "description": "", + "techUsed": [ + "html5", + "css3" + ], + "screenshotURL": "/screenshots/fcc-web-Project3-ProductLandingPage.jpeg", + "screenshotAltText": "Project 3 - Product Landing Page" + } + ] + } + ] + }, + { + "name": "The Complete 2022 Web Development Bootcamp", + "svgSource": "/svgs/udemy.svg", + "svgAltText": "Udemy Logo", + "description": "Coming Soon™", + "cssClass": "", + "difficulty": [ + { + "title": "", + "description": "", + "cssClass": "", + "challenges": [] + } + ] + }, + { + "name": "JavaScript Projects", + "svgSource": "/svgs/javascript.svg", + "svgAltText": "JavaScript", + "description": "Various JavaScript projects I've completed", + "cssClass": "", + "difficulty": [ + { + "title": "", + "description": "", + "cssClass": "", + "challenges": [] + } + ] + } + ] } \ No newline at end of file diff --git a/src/css/style.css b/src/css/style.css index fb0176d..dfcb3eb 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -87,6 +87,7 @@ body { .responsiveProjects > h3 { font-weight: 600; font-size: 1.3rem; + margin-bottom: 0.5rem; } /* .freecodeCampProjects {} */ diff --git a/src/index.njk b/src/index.njk index 1ace4dc..759ee5a 100644 --- a/src/index.njk +++ b/src/index.njk @@ -22,137 +22,44 @@ cssReset: true

Robert McGovern

-
-
-

{{webprojects.frontendMentor.serviceName}}

- {{webprojects.frontendMentor.svgAltText}} -
-

{{webprojects.frontendMentor.description}}

- - {% for difficultyLevel in webprojects.frontendMentor.difficulty %} - {% if difficultyLevel.challenges | length %} -
-

{{difficultyLevel.title}} Challenges

- -
- - {% for challenge in difficultyLevel.challenges %} - - {% set projectContent = challenge %} - {% include "components/project.njk" %} - {% endfor %} -
-
- - {% endif %} - {% endfor %} -
- -
-
-

Freecodecamp

- Freecodecamp -
-
-

Responsive Web Design Projects

-

- Note: As of 11 Oct 2020, these require a partial rework - to look good on mobile. 1-3 where written much earlier - in my learning, so while they fufill all the - requirements, they don't look great on mobile. -

-
-
- - Project 1 - Tribute Page - -
-

- Project 1 - Tribute Page -

- -
    -
  • - HTML5 -
  • -
  • - CSS3 -
  • -
-
-
-
- - Project 2 - Build A Survey Form - -
-

- Project 2 - Build A Survey Form -

- -
    -
  • - HTML5 -
  • -
  • - CSS3 -
  • -
-
-
-
- - Project 3 - Product Landing Page - -
-

- Project 3 - Product Landing Page -

- -
    -
  • - HTML5 -
  • -
  • - CSS3 -
  • -
-
-
+{% for service in webprojects.services %} +
+
+

{{service.name}}

+ {% if service.svgSource%} + {{service.svgAltText}} + {% endif %}
+ {% if service.description%} +

{{service.description}}

+ {% endif %} + + {% for difficultyLevel in service.difficulty %} + {% if difficultyLevel.challenges | length %} +
+ {% if difficultyLevel.title%} +

{{difficultyLevel.title}} Challenges

+ {% endif %} + {% if difficultyLevel.description%} +

{{difficultyLevel.description}}

+ {% endif %} +
+ {% for challenge in difficultyLevel.challenges %} + {% set projectContent = challenge %} + {% include "components/project.njk" %} + {% endfor %} +
+
+ {% endif %} + {% endfor %}
-
+{% endfor %}
-
-

- The Complete 2022 Web Development Bootcamp -

- The Complete 2022 Web Development Bootcamp Udemy Course +

Playground

+ A Purple Fedora
-

coming soon

-
- -
-

Vanilla JS Projects

-

coming soon

-
- -
-

Playground

Intended for just little snippets of code that look useful