|
1 | 1 | <!--- Place HTML here that should be used as the default layout of your application. ---> |
2 | 2 | <!--- This condition prevents the content to be wrapped in HTML for the Junit, TXT and JSON formats when they are passed in the URL as "format=json","format=txt" and "format=junit" as these formats shouldn't have html wrapped around them ---> |
| 3 | +<cfsilent> |
| 4 | + <cfset pathInfo = trim(cgi.path_info)> |
| 5 | + <cfset isBlog = find("/blog", pathInfo)> |
| 6 | + <cfset isApi = find("/api", pathInfo)> |
| 7 | + <cfset isLogin = find("/login", pathInfo)> |
| 8 | + <cfset isRegister = find("/register", pathInfo)> |
| 9 | + <cfset isForgotPassword = find("/forgot-password", pathInfo)> |
| 10 | + <cfset isResetPassword = find("/reset-password", pathInfo)> |
| 11 | + <cfset isDocs = find("/docs", pathInfo) or isApi> |
| 12 | + <cfset isCommunity = find("/community", pathInfo)> |
| 13 | + <cfset isNews = find("/news", pathInfo) or isBlog and !find("/blog/create", pathInfo)> |
| 14 | + <cfset isAuthPage = (isLogin OR isRegister OR isForgotPassword OR isResetPassword)> |
3 | 15 |
|
4 | | -<cfset pathInfo = trim(cgi.path_info)> |
5 | | -<cfset isBlog = find("/blog", pathInfo)> |
6 | | -<cfset isApi = find("/api", pathInfo)> |
7 | | -<cfset isLogin = find("/login", pathInfo)> |
8 | | -<cfset isRegister = find("/register", pathInfo)> |
9 | | -<cfset isForgotPassword = find("/forgot-password", pathInfo)> |
10 | | -<cfset isResetPassword = find("/reset-password", pathInfo)> |
11 | | -<cfset isDocs = find("/docs", pathInfo) or isApi> |
12 | | -<cfset isCommunity = find("/community", pathInfo)> |
13 | | -<cfset isNews = find("/news", pathInfo) or isBlog and !find("/blog/create", pathInfo)> |
14 | | -<cfset isAuthPage = (isLogin OR isRegister OR isForgotPassword OR isResetPassword)> |
| 16 | + <cfset pageTitle = "Wheels - An open source CFML framework inspired by Ruby on Rails"> |
| 17 | + <cfset ogTitle = "Wheels - An open source CFML framework inspired by Ruby on Rails"> |
| 18 | + <cfset metaDescription = "Modern CFML web framework inspired by Rails. Build powerful, fast, and clean web apps with Wheels.dev’s intuitive MVC architecture."> |
| 19 | + <cfset ogDescription = "Modern CFML web framework inspired by Rails. Build powerful, fast, and clean web apps with Wheels.dev’s intuitive MVC architecture."> |
15 | 20 |
|
16 | | -<cfset pageTitle = "Wheels - an open source CFML framework inspired by Ruby on Rails"> |
17 | | -<cfset ogTitle = "Wheels - an open source CFML framework inspired by Ruby on Rails"> |
18 | | -<cfset metaDescription = "Build apps quickly with an organized, Ruby on Rails-inspired structure. Get up and running in no time!"> |
19 | | -<cfset ogDescription = "Build apps quickly with an organized, Ruby on Rails-inspired structure. Get up and running in no time!"> |
| 21 | + <cfif isBlog> |
| 22 | + <cfset blogSlug = listLast(pathInfo, "/")> |
20 | 23 |
|
21 | | -<cfif isBlog> |
22 | | - <cfset blogSlug = listLast(pathInfo, "/")> |
| 24 | + <!--- Fetch the blog post by slug ---> |
| 25 | + <cfset post = model("Blog").findOne(where="slug = '#blogSlug#'")> |
23 | 26 |
|
24 | | - <!--- Fetch the blog post by slug ---> |
25 | | - <cfset post = model("Blog").findOne(where="slug = '#blogSlug#'")> |
| 27 | + <cfif isStruct(post) && structKeyExists(post, "id")> |
| 28 | + <cfset metaDescription = this.generateMetaDescription(post.content)> |
26 | 29 |
|
27 | | - <cfif isStruct(post) && structKeyExists(post, "id")> |
28 | | - <cfset metaDescription = this.generateMetaDescription(post.content)> |
| 30 | + <cfset pageTitle = post.title & " - Wheels"> |
| 31 | + <cfset ogTitle = post.title> |
| 32 | + <cfset ogDescription = metaDescription> |
| 33 | + <cfset ogImage = ''> |
| 34 | + <cfelse> |
| 35 | + <cfset pageTitle = "Blogs - Wheels"> |
| 36 | + <cfset metaDescription = "Explore our latest blogs on Wheels."> |
| 37 | + <cfset ogTitle = pageTitle> |
| 38 | + <cfset ogDescription = metaDescription> |
| 39 | + </cfif> |
| 40 | + </cfif> |
29 | 41 |
|
30 | | - <cfset pageTitle = post.title & " - Wheels"> |
31 | | - <cfset ogTitle = post.title> |
32 | | - <cfset ogDescription = metaDescription> |
33 | | - <cfset ogImage = ''> |
34 | | - <cfelse> |
35 | | - <cfset pageTitle = "Blogs - Wheels"> |
36 | | - <cfset metaDescription = "Explore our latest blogs on Wheels."> |
37 | | - <cfset ogTitle = pageTitle> |
38 | | - <cfset ogDescription = metaDescription> |
39 | | - </cfif> |
40 | | -</cfif> |
| 42 | + <cfif isApi> |
| 43 | + <cfset apiPath = listLast(pathInfo, "/")> |
| 44 | + <cfset pageTitle = apiPath & " - Wheels API "> |
| 45 | + </cfif> |
41 | 46 |
|
42 | | -<cfif isApi> |
43 | | - <cfset apiPath = listLast(pathInfo, "/")> |
44 | | - <cfset pageTitle = apiPath & " - Wheels API "> |
45 | | -</cfif> |
| 47 | + <cfif isDocs> |
| 48 | + <cfset docsPath = listLast(pathInfo, "/")> |
| 49 | + <cfset docsPath = uCase(left(docsPath, 1)) & mid(docsPath, 2)> |
| 50 | + <cfset pageTitle = docsPath & " - Wheels "> |
| 51 | + </cfif> |
46 | 52 |
|
47 | | -<cfif isDocs> |
48 | | - <cfset docsPath = listLast(pathInfo, "/")> |
49 | | - <cfset docsPath = uCase(left(docsPath, 1)) & mid(docsPath, 2)> |
50 | | - <cfset pageTitle = docsPath & " - Wheels "> |
51 | | -</cfif> |
| 53 | + <cfif isCommunity> |
| 54 | + <cfset communityPath = listLast(pathInfo, "/")> |
| 55 | + <cfset communityPath = uCase(left(communityPath, 1)) & mid(communityPath, 2)> |
| 56 | + <cfset pageTitle = communityPath & " - Wheels "> |
| 57 | + </cfif> |
52 | 58 |
|
53 | | -<cfif isCommunity> |
54 | | - <cfset communityPath = listLast(pathInfo, "/")> |
55 | | - <cfset communityPath = uCase(left(communityPath, 1)) & mid(communityPath, 2)> |
56 | | - <cfset pageTitle = communityPath & " - Wheels "> |
57 | | -</cfif> |
| 59 | + <cfif isNews> |
| 60 | + <cfset newsPath = listLast(pathInfo, "/")> |
| 61 | + <cfset newsPath = uCase(left(newsPath, 1)) & mid(newsPath, 2)> |
| 62 | + <cfset pageTitle = newsPath & " - Wheels "> |
| 63 | + </cfif> |
| 64 | + |
| 65 | + <cfif isLogin> |
| 66 | + <cfset pageTitle = "Login to Your Account | Wheels.dev - CFML Framework Access"> |
| 67 | + <cfset ogTitle = pageTitle> |
| 68 | + <cfset metaDescription = "Access your Wheels.dev account to manage and contribute to the community, and explore documentation. Secure login for developers."> |
| 69 | + <cfset ogDescription = metaDescription> |
| 70 | + </cfif> |
58 | 71 |
|
59 | | -<cfif isNews> |
60 | | - <cfset newsPath = listLast(pathInfo, "/")> |
61 | | - <cfset newsPath = uCase(left(newsPath, 1)) & mid(newsPath, 2)> |
62 | | - <cfset pageTitle = newsPath & " - Wheels "> |
63 | | -</cfif> |
| 72 | + <cfif isRegister> |
| 73 | + <cfset pageTitle = "Sign Up for Wheels.dev | Free Account for Wheels Community"> |
| 74 | + <cfset ogTitle = pageTitle> |
| 75 | + <cfset metaDescription = "Create your free account on Wheels.dev and start building web applications with our powerful CFML framework. Join the community today!"> |
| 76 | + <cfset ogDescription = metaDescription> |
| 77 | + </cfif> |
| 78 | + |
| 79 | + <cfif isResetPassword or isForgotPassword> |
| 80 | + <cfset pageTitle = "Reset Your Password | Wheels.dev - CFML Web Framework"> |
| 81 | + <cfset ogTitle = pageTitle> |
| 82 | + <cfset metaDescription = "Forgot your password? Quickly reset it and regain access to your Wheels.dev account, the modern CFML framework for rapid web development."> |
| 83 | + <cfset ogDescription = metaDescription> |
| 84 | + </cfif> |
| 85 | +</cfsilent> |
64 | 86 |
|
65 | 87 | <cfif application.contentOnly> |
66 | 88 | <cfoutput> |
|
86 | 108 | <meta property="og:image" content="#ogImage#"> |
87 | 109 | </cfif> |
88 | 110 | </cfoutput> |
89 | | - <meta property="og:description" content="Build apps quickly with an organized, Ruby on Rails-inspired structure. Get up and running in no time!"> |
90 | 111 | <meta property="og:url" content="https://wheels.dev/"> |
91 | 112 | <meta property="og:site_name" content="Wheels"> |
92 | 113 | <!-- Bootstrap CSS --> |
|
307 | 328 | <ul class="list-unstyled"> |
308 | 329 | <cfif isLoggedInUser()> |
309 | 330 | <li class="mt-2"> |
310 | | - <a href="#" class="text--secondary fs-14 text-decoration-none cursor-pointer"> |
| 331 | + <a class="text--secondary fs-14 text-decoration-none cursor-pointer"> |
311 | 332 | <cfoutput> |
312 | 333 | #session.username# |
313 | 334 | </cfoutput> |
|
332 | 353 | class="text--secondary fs-14 text-decoration-none cursor-pointer">RSS Comments |
333 | 354 | Feed</a> |
334 | 355 | </li> |
335 | | - <li class="mt-2"><a href="#" |
| 356 | + <li class="mt-2"><a |
336 | 357 | class="text--secondary fs-14 text-decoration-none cursor-pointer"></a> |
337 | 358 | </li> |
338 | 359 | </ul> |
|
0 commit comments