frank 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,72 @@
1
+ body
2
+ color: #222
3
+ font-family: Helvetica, Arial
4
+ font-size: 14px
5
+ line-height: 20px
6
+
7
+ ul, ol
8
+ margin: 0
9
+ padding: 0
10
+
11
+ h1
12
+ margin: 0 0 10px
13
+ font: bold 72px Georgia
14
+ h2
15
+ margin: 0
16
+ font-size: 24px
17
+ line-height: 32px
18
+ color: #cecece
19
+
20
+ em
21
+ color: #4D9EEF
22
+ font-family: Inconsolata, Monaco, monospace
23
+ font-style: normal
24
+
25
+ #wrapper
26
+ position: relative
27
+ width: 600px
28
+ margin: 0px auto
29
+
30
+ #tooltip
31
+ position: absolute
32
+ top: 80px
33
+ left: 380px
34
+ color: #4D9EEF
35
+ font-weight: bold
36
+ z-index: 20
37
+ cursor: pointer
38
+
39
+ #header, #help
40
+ position: absolute
41
+ left: 300px
42
+ width: 300px
43
+ margin-left: -150px
44
+
45
+ #header
46
+ width: 350px
47
+ height: 600px
48
+ margin-left: -175px
49
+ background: #fff
50
+ z-index: 10
51
+ top: 60px
52
+ cursor: pointer
53
+
54
+ h2
55
+ width: 300px
56
+ img
57
+ margin-left: -25px
58
+ h1
59
+ margin-left: -3px
60
+
61
+ #help
62
+ top: 180px
63
+ border-top: 1px #7a7a7a solid
64
+
65
+ li
66
+ font-weight: bold
67
+ color: #ddd
68
+ p
69
+ font-weight: normal
70
+ color: #222
71
+
72
+
@@ -0,0 +1,15 @@
1
+ #tooltip
2
+ Click for help.
3
+
4
+ #header
5
+ %img{:src=>'/images/frank-med.png'}
6
+ %h1 Frank
7
+ %h2 Relax, fella. Frank's got it under control.
8
+
9
+ %ol#help
10
+ %li
11
+ %p= "Edit <em>settings.yml</em> to set the hostname/port to your liking. Also make sure to set your preferred languages as well. You can also set up multiple layouts for your views."
12
+ %li
13
+ %p= "Stash your static files (images, flash movies, &c.) in the <em>[project]/public</em> folder."
14
+ %li
15
+ %p= "The files in your <em>css</em> & <em>js</em> folders will be auto- matically parsed from the source files. For example if you visit <em>/js/example.js</em>, Frank will parse & return <em>[project]/js/example.coffee</em>"
@@ -0,0 +1,49 @@
1
+ # -----------------------------------------------
2
+ #
3
+ # This is pretty gross; Gotta love what those
4
+ # JS libraries do for you
5
+ #
6
+ # -
7
+
8
+
9
+ # Easing function borrowed from jQuery.easing
10
+ easeInOutQuad: t, b, c, d =>
11
+ ((t/=d/2) < 1) and (c/2*t*t + b) or (-c/2 * ((--t)*(t-2) - 1) + b)
12
+
13
+ # Expand / Collapse help info
14
+ expanded: false
15
+ expanding: false
16
+ slide: el, end, duration, start, now =>
17
+ now ||= 0.001
18
+ start ||= parseInt(document.defaultView.getComputedStyle(el,null).getPropertyValue('left'))
19
+ el.style.left = Math.round(start + (end-start) * easeInOutQuad(now, 0, 1, duration)) + 'px'
20
+
21
+ now += 30
22
+ if now < duration
23
+ setTimeout(
24
+ => slide(el, end, duration, start, now)
25
+ 30 )
26
+ else
27
+ expanding: false
28
+
29
+ expand: =>
30
+ document.getElementById('tooltip').style.display = 'none';
31
+ slide( document.getElementById('header'), 75, 600)
32
+ slide( document.getElementById('help'), 525, 600)
33
+
34
+ collapse: =>
35
+ document.getElementById('tooltip').style.display = 'block';
36
+ slide( document.getElementById('header'), 300, 600)
37
+ slide( document.getElementById('help'), 300, 600)
38
+
39
+ toggle: e =>
40
+ return false if expanding
41
+ expanded = !expanded
42
+ expanding: true
43
+ if expanded then expand() else collapse()
44
+ false
45
+
46
+ init: =>
47
+ document.addEventListener('click', toggle, false)
48
+
49
+ window.onload: init
@@ -0,0 +1,9 @@
1
+ !!! Strict
2
+ %html
3
+ %head
4
+ %title Frank's on the scene.
5
+ %link{:rel=>'stylesheet', :type=>'text/css', :href=>'/css/frank.css'}
6
+ %script{:type=>'text/javascript', :src=>'/js/frank.js'}
7
+ %body
8
+ #wrapper
9
+ = yield
@@ -0,0 +1,3 @@
1
+ module FrankHelpers
2
+ # helpers go here
3
+ end
@@ -0,0 +1,68 @@
1
+ # -----------------------------------------------
2
+ # Frank settings:
3
+ #
4
+ # These settings will apply to this project only.
5
+ # If you would like to use this project as a
6
+ # template for new projects, just copy this
7
+ # project folder to `~/.frank` and it will be
8
+ # duplicated for you every time you run the
9
+ # `frank` command.
10
+ #
11
+ # Feel free to trash all these comments, too.
12
+ #
13
+
14
+
15
+ # ----------------------
16
+ # Server settings:
17
+ #
18
+ # Change the server host/port to bind rack to.
19
+ # 'server' can be any Rack-supported server, e.g.
20
+ # Mongrel, Thin, WEBrick
21
+ #
22
+ server:
23
+ handler: mongrel
24
+ hostname: 0.0.0.0
25
+ port: 3601
26
+
27
+
28
+ # ----------------------
29
+ # Static folder:
30
+ #
31
+ # All files in this folder will be served up
32
+ # directly, without interpretation
33
+ #
34
+ static_folder: static
35
+
36
+ # ----------------------
37
+ # Dynamic folder:
38
+ #
39
+ # Frank will try to interpret any of the files
40
+ # in this folder based on their extension
41
+ #
42
+ dynamic_folder: dynamic
43
+
44
+ # ----------------------
45
+ # Templates:
46
+ #
47
+ # 'extension' is appended to requests to find
48
+ # a template. For example, if you request
49
+ # '/blog/archive', Frank will look in the
50
+ # 'blog' folder for 'archive.haml'.
51
+ #
52
+ # 'default' is the optional default template to
53
+ # serve from a folder (include the root folder)
54
+ #
55
+ # 'layouts' is a list of layouts to use, where
56
+ # 'name' is the filename (without extension).
57
+ # You can also use multiple layouts, and limit
58
+ # their scopes like so:
59
+ # - name: blog_layout
60
+ # only: [blog]
61
+ # - name: normal
62
+ # not: [blog, ajax]
63
+ templates:
64
+ extension: haml
65
+ default: index
66
+ layouts:
67
+ - name: layout
68
+
metadata ADDED
@@ -0,0 +1,85 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: frank
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - blahed
8
+ - nwah
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2010-01-15 00:00:00 -05:00
14
+ default_executable:
15
+ dependencies: []
16
+
17
+ description: Create/Dump static builds using whatever templating/helper languages you wish
18
+ email: travis.dunn@thisismedium.com
19
+ executables:
20
+ - frank
21
+ - frankout
22
+ - frankup
23
+ extensions: []
24
+
25
+ extra_rdoc_files:
26
+ - LICENSE
27
+ - README.md
28
+ files:
29
+ - .gitignore
30
+ - LICENSE
31
+ - README.md
32
+ - Rakefile
33
+ - VERSION
34
+ - bin/frank
35
+ - bin/frankout
36
+ - bin/frankup
37
+ - frank.gemspec
38
+ - lib/frank.rb
39
+ - lib/frank/base.rb
40
+ - lib/frank/output.rb
41
+ - lib/frank/rescue.rb
42
+ - lib/frank/statik.rb
43
+ - lib/frank/template_helpers.rb
44
+ - lib/frank/templates/404.haml
45
+ - lib/frank/templates/500.haml
46
+ - lib/frank/templates/frank-404.png
47
+ - lib/frank/templates/frank-500.png
48
+ - lib/frank/tilt.rb
49
+ - lib/template/dynamic/css/frank.sass
50
+ - lib/template/dynamic/index.haml
51
+ - lib/template/dynamic/js/frank.coffee
52
+ - lib/template/dynamic/layout.haml
53
+ - lib/template/helpers.rb
54
+ - lib/template/settings.yml
55
+ - lib/template/static/images/frank-med.png
56
+ has_rdoc: true
57
+ homepage: http://github.com/blahed/frank
58
+ licenses: []
59
+
60
+ post_install_message:
61
+ rdoc_options:
62
+ - --charset=UTF-8
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: "0"
70
+ version:
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: "0"
76
+ version:
77
+ requirements: []
78
+
79
+ rubyforge_project:
80
+ rubygems_version: 1.3.5
81
+ signing_key:
82
+ specification_version: 3
83
+ summary: Stupidly Simple Static Slinger
84
+ test_files: []
85
+