Skip to content

Commit 43baecb

Browse files
committed
Tidied up top-level welcome page/app.
1 parent 1aff777 commit 43baecb

File tree

6 files changed

+66
-0
lines changed

6 files changed

+66
-0
lines changed

Application.cfc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<cfcomponent extends="org.corfield.framework"><cfscript>
2+
this.name = 'fw1-root';
3+
</cfscript></cfcomponent>

controllers/main.cfc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<cfcomponent output="false">
2+
3+
<cffunction name="default" output="false">
4+
<cfargument name="rc" type="struct" />
5+
6+
<cfset var files = 0 />
7+
8+
<cfdirectory action="list" directory="#expandPath(request.base)#examples/" name="files" />
9+
10+
<cfset rc.files = files />
11+
12+
</cffunction>
13+
14+
</cfcomponent>

css/fw1.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
body {
2+
margin: 0;
3+
}
4+
.wrap {
5+
border: blue 1px solid;
6+
margin: 5;
7+
padding: 5;
8+
font-family: verdana, helvetica;
9+
}
10+
.page {
11+
padding: 5;
12+
background-color: lightgray;
13+
}
14+
.footer {
15+
text-align: center;
16+
font-size: small;
17+
}

index.cfm

Whitespace-only changes.

layouts/default.cfm

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html>
2+
<head>
3+
<title>FW/1 - Framework One</title>
4+
<link rel="stylesheet" type="text/css" href="/css/fw1.css" />
5+
</head>
6+
<body>
7+
<div class="wrap">
8+
<div class="page">
9+
<cfoutput>#body#</cfoutput>
10+
</div>
11+
<div class="footer">
12+
(c) 2009 Sean Corfield -
13+
<a href="http://www.apache.org/licenses/LICENSE-2.0">Licensed under the Apache License, Version 2.0</a>
14+
</div>
15+
</div>
16+
</body>
17+
</html>

views/main/default.cfm

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<h1>Welcome to Framework One!</h1>
2+
<p>FW/1 - Framework One - leverages Application.cfc and some simple conventions to provide a 'full' MVC framework in a single file.</p>
3+
<p>Intended to require near-zero configuration, FW/1 lets you build your application without worrying about a framework getting in your way.</p>
4+
<p>Controllers, Services (the gateway to your application's model), Views and Layouts are all 'discovered' using straightforward conventions.</p>
5+
<p>Your controller and service CFCs don't need to extend anything.</p>
6+
<p>Your views and layouts don't need to know about objects and method calls (a simple 'request context' structure - rc - is available containing URL and form scope data as well as data setup and passed by the framework and controllers).</p>
7+
<p>Supports your choice of bean factory (as long as it offers containsBean(name) and getBean(name) methods) and autowiring of controllers and services. Your controller and service CFC instances can be managed by your bean factory instead if you prefer, again following a simple naming convention!</p>
8+
<h2>Examples</h2>
9+
<ul>
10+
<cfoutput query="rc.files">
11+
<cfif rc.files.type is 'dir' and left(rc.files.name,1) is not '.'>
12+
<li><a href="/examples/#rc.files.name#/">#rc.files.name#</a></li>
13+
</cfif>
14+
</cfoutput>
15+
</ul>

0 commit comments

Comments
 (0)