Skip to content
This repository was archived by the owner on Apr 21, 2026. It is now read-only.

Commit 735353a

Browse files
authored
Home Page Cleaning and Updates
implemented homepage fixes
2 parents f562a9e + 61a57a5 commit 735353a

6 files changed

Lines changed: 64 additions & 32 deletions

File tree

app/controllers/web/BlogController.cfc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,18 @@ component extends="app.Controllers.Controller" {
12151215
}
12161216
}
12171217
} catch (any e) {
1218-
local.exception = e;
1218+
model("Log").log(
1219+
category = "wheels.blog.tags",
1220+
level = "ERROR",
1221+
message = "Failed to save blog tags for blogId: #blogId#",
1222+
details = {
1223+
"blog_id": blogId,
1224+
"error_message": e.message,
1225+
"error_detail": e.detail,
1226+
"error_type": e.type
1227+
},
1228+
userId = GetSignedInUserId()
1229+
);
12191230
}
12201231
}
12211232

app/controllers/web/HomeController.cfc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ component extends="app.Controllers.Controller" {
3333
perPage = 3
3434
);
3535
settings = model("Setting").findAll();
36+
blogs = model('Blog').getTenLatest(); // Get blog list
37+
features = getAllFeatures();
3638
renderView();
3739
}
3840

app/models/Blog.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ component extends="app.Models.Model" {
5353
where='statusid <> 1',
5454
include="User",
5555
maxRows=10,
56-
order="postDate DESC"
56+
order="random"
5757
);
5858
return blogs;
5959
}

app/views/web/BlogController/index.cfm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@
1313
<div class="pt-5">
1414
<div class="row">
1515
<div class="col-lg-4 col-12">
16-
<input id="blogSearchInput" placeholder="Search" type="text" hx-get="/blog/Search" hx-trigger="keyup changed delay:500ms" hx-target="#blogsContainer" hx-swap="innerHTML" name="searchTerm" class="fs-14 flex-grow-1 form-control form-check-input-primary py-2 px-3 rounded-18">
16+
<input id="blogSearchInput" placeholder="Search articles..." type="text" hx-get="/blog/Search" hx-trigger="keyup changed delay:500ms" hx-target="#blogsContainer" hx-swap="innerHTML" name="searchTerm" class="fs-14 flex-grow-1 form-control form-check-input-primary py-2 px-3 rounded-18">
1717
</div>
1818
<div class="col-lg-5 mt-lg-0 mt-3 offset-lg-3 col-12">
1919
<div class="d-flex blogs align-items-center justify-content-end gap-3 flex-wrap">
2020

2121
<cfif isEditor>
2222
<a href="/blog/create"
23-
class="bg--primary text-white text-center d-none py-2 fs-16 rounded-3 col-4">Create
24-
Blog</a>
23+
class="bg--primary text-white text-center d-none py-2 fs-16 rounded-3 col-4">Create New Article</a>
2524
</cfif>
2625

2726
<button onclick="handleBlogFilter('All', this)" hx-swap="innerHTML"

app/views/web/HomeController/index.cfm

Lines changed: 46 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -36,33 +36,48 @@
3636

3737
<!-- Cards -->
3838
<div class="container pb-5">
39-
<div class="row gy-3 gy-sm-5 gx-sm-5" id="features-container" hx-get="/home/loadFeatures" hx-trigger="load"
40-
hx-target="#features-container" hx-swap="innerHTML">
41-
<!-- Features will be loaded here via HTMX -->
39+
<div class="row gy-3 gy-sm-5 gx-sm-5" id="features-container">
40+
<cfoutput query="features">
41+
<div class="col-lg-4">
42+
<div class="px-4 py-4 bg-white border-transparent border-2 cards rounded-5 cursor-pointer shadow-sm">
43+
<div class="icon-container d-flex justify-content-center align-items-center">
44+
#features.image#
45+
</div>
46+
<div class="mt-3">
47+
<p class="fw-bold fs-24 text--secondary">#features.title#</p>
48+
<p class="fs-18 text--secondary/70 pt-1 line-clamp-2">#features.description#</p>
49+
</div>
50+
</div>
51+
</div>
52+
</cfoutput>
4253
</div>
4354
</div>
4455

4556
<!-- Latest blogs -->
4657
<div class="pt-5 px-2 blog-main">
47-
<h2 class="text-center fw-bold fs-60">Latest Blog Posts</h2>
58+
<h1 class="text-center fw-bold fs-60">Latest From the Wheels Dev Blog</h1>
4859
<div class="swiper py-5 blogSwiper h-max">
49-
<div class="swiper-wrapper" id="blogs-container" hx-get="/home/loadBlogs" hx-trigger="load"
50-
hx-target="#blogs-container" hx-swap="innerHTML">
51-
<!-- Blogs will be loaded here via HTMX -->
60+
<div class="swiper-wrapper" id="blogs-container">
61+
<cfoutput query= "blogs">
62+
<div class="p-4 bg-white rounded-5 shadow-sm swiper-slide">
63+
<a href="/blog/#slug#" class="">
64+
<div>
65+
<p class="fs-18 mb-3 text--secondary/70 fw-bold line-clamp-1">#blogs.title#</p>
66+
</div>
67+
68+
<div class="d-flex gap-2 justify-content-between align-items-center">
69+
<p class="fs-16 truncate fw-medium text--lightGray">#dateformat(blogs.postDate, 'MMMM DD, YYYY')# by #blogs.fullName#</p>
70+
<button class="bg--primary text-nowrap fs-16 text-white rounded-2 px-3 py-1">Learn more</button>
71+
</div>
72+
</a>
73+
</div>
74+
</cfoutput>
5275
</div>
5376
</div>
5477
</div>
5578

56-
<!-- our guide -->
57-
<div class="gudie-main py-5 d-none">
58-
<h2 class="text-center text-white fs-60 fw-bold">Our Guide</h2>
59-
<div class="container mt-5" id="guides-container" hx-get="/home/loadGuides" hx-trigger="load"
60-
hx-target="#guides-container" hx-swap="innerHTML">
61-
<!-- Guides will be loaded here via HTMX -->
62-
</div>
63-
</div>
64-
6579
<!-- welcome community -->
80+
<cfoutput>
6681
<div class="container py-5 mt-5">
6782
<div class="row align-items-center gy-5">
6883
<div class="col-lg-12 space-y-3 text-center col-12">
@@ -71,15 +86,16 @@
7186
Welcome to Our Community - a place where like-minded people connect, share ideas, <br> and grow
7287
together in a positive and supportive environment.
7388
</p>
74-
<a href="/community" class="bg--primary d-block w-max mx-auto fs-16 px-3 py-2 rounded-18 text-white">
89+
<a href="#urlFor(route='community')#" class="bg--primary d-block w-max mx-auto fs-16 px-3 py-2 rounded-18 text-white">
7590
<span>Explore community</span>
7691
</a>
7792
</div>
7893
<div class="text-center col-12">
79-
<img src="/images/community.png" class="img-fluid" alt="Community">
94+
#imageTag(source="community.png", class="img-fluid", alt="Wheels.dev Community")#
8095
</div>
8196
</div>
8297
</div>
98+
</cfoutput>
8399

84100
<!-- Testimonials -->
85101
<cfoutput>
@@ -99,7 +115,11 @@
99115
<cfloop query="testimonials">
100116
<div class="d-flex row swiper-slide">
101117
<div class="col-lg-3 col-12 pb-2 pb-sm-0">
102-
<img src="#len(testimonials.logoPath) gt 0 ? testimonials.logoPath : '/images/testi.png'#" class="img-fluid" alt="#encodeForHtml(testimonials.companyName)#" style="width: 330px; height: 290px;">
118+
<cfset imgSrc = testimonials.logoPath>
119+
<cfif !len(trim(imgSrc))>
120+
<cfset imgSrc = "testi.png">
121+
</cfif>
122+
#imageTag(source=imgSrc, class="img-fluid", alt=encodeForHtml(testimonials.companyName), style="width: 330px; height: 290px;")#
103123
</div>
104124
<div class="col-lg-9 col-12">
105125
<div class="d-flex flex-column justify-content-between h-100">
@@ -108,9 +128,9 @@
108128
#encodeForHtml(testimonials.testimonialText)#
109129
</p>
110130
<p class="fs-18 text--secondary fw-medium border-top pt-4">
111-
<cfif structKeyExists(variables, "user_fullName") AND len(trim(user_fullName))>
112-
#encodeForHtml(user_fullName)#
113-
<cfelseif len(trim(testimonials.companyName))>
131+
<cfif structKeyExists(testimonials, "authorName") AND len(trim(testimonials.authorName))>
132+
#encodeForHtml(testimonials.authorName)#
133+
<cfelseif structKeyExists(testimonials, "companyName") AND len(trim(testimonials.companyName))>
114134
#encodeForHtml(testimonials.companyName)#
115135
<cfelse>
116136
Anonymous
@@ -149,12 +169,12 @@
149169
</div>
150170
<div class="d-flex flex-wrap justify-content-center mt-5 gap-3">
151171
<a href="https://github.com/wheels-dev/wheels/graphs/contributors" target="_blank">
152-
<img src="https://contrib.rocks/image?repo=wheels-dev/wheels" style="max-width: 100%;">
172+
<img src="https://contrib.rocks/image?repo=wheels-dev/wheels" style="max-width: 100%;" alt="GitHub Contributors for CFWheels">
153173
</a>
154174
</div>
155175
</div>
156176

157-
<div class="container d-none mt-5 py-5">
177+
<!-- <div class="container d-none mt-5 py-5">
158178
<div class="text-center">
159179
<p class="fs-60 mb-2 text--secondary line-height-70 fw-bold">Our Top Contributer</p>
160180
</div>
@@ -378,7 +398,7 @@
378398
<div class="swiper-button-next end-0"></div>
379399
<div class="swiper-button-prev start-0"></div>
380400
</div>
381-
</div>
401+
</div> -->
382402
<!-- Testimonial Popup Modal -->
383403
<cfif settings.enableTestimonial>
384404
<div class="modal fade" id="testimonialPromptModal" tabindex="-1" aria-labelledby="testimonialPromptModalLabel" aria-hidden="true">
@@ -478,4 +498,4 @@
478498
</script>
479499
</cfif>
480500
</cfif>
481-
</main>
501+
</main>

app/views/web/NewsletterController/welcome.cfm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta charset="UTF-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<title>Welcome to Wheels.dev Newsletter</title>
7+
<title>Welcome to the Wheels.dev Community</title>
88
<style>
99
body {
1010
font-family: Arial, sans-serif;

0 commit comments

Comments
 (0)