CodexWorker

Backend Developer | Go, Microservices, Scalability

Today’s Website Developments: Enhancements & New Features

What developments have taken place today?

This commit modified data insertion into a table by adding a slug field to the title column and updating existing post slugs (“123-slug” and “22-slug”). All other fields remain unchanged, improving data organization and URL structure.

A website navigation and breadcrumb overhaul was implemented, enhancing visual consistency and clarity. Specifically, visited links in the main navigation and breadcrumbs now appear blue, and the breadcrumb display shows “Home” alongside the website name, offering improved user guidance. Additionally, a recent development posts section was added to facilitate content discovery.

The HTML template was updated to introduce <section> elements styled as “article” for each blog post, incorporating styling through the new articles.scss stylesheet and adjusting spacing, container width, and table styles for a more refined layout.

A new website detail page was introduced, showcasing project information alongside related posts using templates like render_posts.go.tmpl. This provides a consolidated view of key project data, including description, recent activity, and associated content. The weekly stats are fetched from Gitlab via a new repository, offering real-time development insights.

The contact form was removed, streamlining the website’s interface. Template updates (header.go.tmpl and footer.go.tmpl) were applied alongside basic styling for container, section, and table elements, improving overall visual presentation. The Gitlab project stats repo was updated with new fields for weekly change data, and a placeholder was added for a newsletter signup form.

A date formatting function (humanReadableTimeDifference) was introduced in date_format.ts to provide human-readable date representations, enhancing the clarity of post creation dates on the website. The “About Me” section was redesigned with a photo and updated description emphasizing relevant skills. A table displaying project changes, including commit counts, lines added/removed, and repository size, was implemented for enhanced tracking. Project information visibility was controlled by user role, providing improved access management. Finally, analytics tables were created to track user sessions.

Sensitive database credentials and remote host information have been removed from the configuration, enhancing security by preventing accidental exposure. A check has also been added to gracefully terminate the application if a database connection error occurs.

Website styling and layout enhancements were implemented, including a new breadcrumb navigation system with links to “Home” and project pages. Page titles are now styled for increased prominence, and navigation link colors have been standardized to white with a hover effect. Visited link styles have been corrected to match the design aesthetic. The ORDER BY clause in the Gitlab project stats query was adjusted for proper sorting. The header has been updated to include an anchor tag linking to the homepage and wrapping the title in an <h1> tag.

A set of CSS variables were defined at the :root level, establishing a consistent color palette across the application. These variables control primary, dark, light background, and accent colors for greater design flexibility. Additionally, spacing and padding were adjusted throughout the design to ensure visual harmony. The HTML background color was updated to a lighter off-white shade, and the margin below sections was reduced for improved readability.

A slug generation feature has been implemented for post creation, ensuring that URLs are consistently formatted and user-friendly. The PostRepository now utilizes the github.com/gosimple/slug library to generate slugs from post titles. A database migration was applied to add a dedicated slug column to the post table and populate it with generated slugs for existing posts.

Analytics data collection has been introduced through new tables (analytics, analytics_url). These tables store information about user sessions, including cookie IDs, locations, durations, IP addresses, and referrer URLs. This enhanced tracking provides valuable insights into website usage patterns.

Finally, a message is now displayed if a website does not have a publicly accessible URL, informing users of the situation instead of omitting the link.

Summary: These changes focused on improving data organization, enhancing user experience through navigation and layout refinements, securing sensitive information, adding new features like slug generation and analytics tracking, and streamlining the overall presentation of project details and recent activity on the website.

website development ui/ux data organization security analytics