Skip to content

Commit

Permalink
Tidied up top-level welcome page/app.
Browse files Browse the repository at this point in the history
  • Loading branch information
seancorfield committed Jul 19, 2009
1 parent 1aff777 commit 43baecb
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Application.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<cfcomponent extends="org.corfield.framework"><cfscript>
this.name = 'fw1-root';
</cfscript></cfcomponent>
14 changes: 14 additions & 0 deletions controllers/main.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<cfcomponent output="false">

<cffunction name="default" output="false">
<cfargument name="rc" type="struct" />

<cfset var files = 0 />

<cfdirectory action="list" directory="#expandPath(request.base)#examples/" name="files" />

<cfset rc.files = files />

</cffunction>

</cfcomponent>
17 changes: 17 additions & 0 deletions css/fw1.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
body {
margin: 0;
}
.wrap {
border: blue 1px solid;
margin: 5;
padding: 5;
font-family: verdana, helvetica;
}
.page {
padding: 5;
background-color: lightgray;
}
.footer {
text-align: center;
font-size: small;
}
Empty file added index.cfm
Empty file.
17 changes: 17 additions & 0 deletions layouts/default.cfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<html>
<head>
<title>FW/1 - Framework One</title>
<link rel="stylesheet" type="text/css" href="/css/fw1.css" />
</head>
<body>
<div class="wrap">
<div class="page">
<cfoutput>#body#</cfoutput>
</div>
<div class="footer">
(c) 2009 Sean Corfield -
<a href="http://www.apache.org/licenses/LICENSE-2.0">Licensed under the Apache License, Version 2.0</a>
</div>
</div>
</body>
</html>
15 changes: 15 additions & 0 deletions views/main/default.cfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<h1>Welcome to Framework One!</h1>
<p>FW/1 - Framework One - leverages Application.cfc and some simple conventions to provide a 'full' MVC framework in a single file.</p>
<p>Intended to require near-zero configuration, FW/1 lets you build your application without worrying about a framework getting in your way.</p>
<p>Controllers, Services (the gateway to your application's model), Views and Layouts are all 'discovered' using straightforward conventions.</p>
<p>Your controller and service CFCs don't need to extend anything.</p>
<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>
<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>
<h2>Examples</h2>
<ul>
<cfoutput query="rc.files">
<cfif rc.files.type is 'dir' and left(rc.files.name,1) is not '.'>
<li><a href="/examples/#rc.files.name#/">#rc.files.name#</a></li>
</cfif>
</cfoutput>
</ul>

0 comments on commit 43baecb

Please sign in to comment.