Skip to content

Latest commit

 

History

History
53 lines (40 loc) · 3.97 KB

Week_13.md

File metadata and controls

53 lines (40 loc) · 3.97 KB

Guidance

Answer the following questions considering the learning outcomes for

Make sure to record evidence of your processes. You can use code snippets, screenshots or any other material to support your answers.

Do not fill in the feedback section. The Founders and Coders team will update this with feedback on your progress.

Assessment

1. Show evidence of some of the learning outcomes you have achieved this week.

  • Created templates for key pages, including Projects, Organisations, and Resources, to provide structured layouts for dynamic content. I also built a front-page template to link section titles (Projects, Organisations, Resources) to their respective pages.
Screenshot 2024-12-04 at 21 34 22
  • Created folders to categorise posts by section (Projects, Organisations, Resources) and used tags to filter topics. For example, tags like "Education," "Art," and "Community Tool" were added to improve navigation. Screenshot 2024-12-04 at 21 42 30Screenshot 2024-12-04 at 21 44 38

  • Understanding pages/posts:

  • Posts: Used for dynamic content that can be categorised and tagged for filtering.

  • Pages: Used for static content that is not intended for frequent updates.

  • I dynamically filter and display content based on tags using Query Blocks. For instance, I added tags like 'Education,' 'Art,' and 'Event' to various posts. This allows users to filter and view content tailored to their interests directly on the site, enhancing the browsing experience. This process involves configuring Query Blocks to fetch posts tagged with specific terms and displaying them in the posts.

Screenshot 2024-12-04 at 22 03 59
  • Went back to Larascast tutorial. In one of the lessons, at the suggestion of my colleague, I not only followed the tutorial but also tried to improve code flexibility independently. I modularised Tailwind CSS class logic by separating it from the index.view.php file. Created a functions.php file with a navStyle() function to dynamically apply classes based on the current URL.
<!-- index.view.php -->
<a href="/" class="<?php echo navStyle('/'); ?>" aria-current="page">Home</a>

<!-- functions.php -->
<?php
function navStyle($path) {
    return ($_SERVER['REQUEST_URI'] === $path) ? 
        'bg-gray-900 text-white px-3 py-2 text-sm font-medium' : 
        'text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 text-sm font-medium';
}
?>

2. Show an example of some of the learning outcomes you have struggled with and/or would like to re-visit.

  • Built post templates for different sections (Projects, Organisations, Resources). Although WordPress does not allow inserting templates into posts directly, I resolved this by creating Patterns (reusable components) that serve as pre-configured layouts for posts. This workaround ensures the product owner can easily add content by filling in pre-set blocks with images and text, maintaining a consistent design.
Screenshot 2024-12-04 at 21 44 18

Overcoming this limitation deepened my problem-solving skills. The use of Patterns was a creative solution to deliver a customised experience while adhering to WordPress’s constraints. Screenshot 2024-12-04 at 21 50 02

Feedback (For CF's)

[Course Facilitator name]
[What went well]
[Even better if]