junebug 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,8 +7,7 @@ span.actions a {
7
7
  }
8
8
 
9
9
  input.button {
10
- margin-right: 5px;
11
- margin-top: 4px;
10
+ margin: 5px 4px;
12
11
  }
13
12
 
14
13
  input, textarea {
@@ -143,6 +142,10 @@ body {
143
142
  margin-bottom: 10px;
144
143
  }
145
144
 
145
+ .content h2, .content h3, .content h4 {
146
+ color: 04766f;
147
+ }
148
+
146
149
  .content h1 {
147
150
  margin-bottom: 10px;
148
151
  font-size: 182%;
@@ -151,7 +154,7 @@ body {
151
154
  .content h2 {
152
155
  font-size: 152%;
153
156
  border-bottom: 1px dotted #bbb;
154
- /* background-color: #eef;*/
157
+ /* background-color: #d6fbf4;*/
155
158
  }
156
159
 
157
160
  .content h3 {
@@ -211,11 +214,16 @@ body {
211
214
  padding: 8px 20px;
212
215
  }
213
216
 
217
+ .content table {
218
+ }
219
+
214
220
  .content th, .content td {
215
221
  padding: 2px 5px;
222
+ border: solid #eee;
216
223
  }
217
224
 
218
225
  .content th {
219
226
  font-weight: bold;
227
+ background-color: #d7e0ff;
220
228
  }
221
229
  /* http://longren.org/2006/09/27/wrapping-text-inside-pre-tags */
@@ -1,144 +1,144 @@
1
- ---
2
- - updated_at: 2006-11-06 09:15:45 -08:00
3
- title: JunebugWiki
4
- readonly: true
5
- body: |
6
- h1. Welcome to Junebug!
7
-
8
- To complete setup of you new wiki, here are a few things you should do:
9
-
10
-
11
- h3. 1. Login to your account
12
-
13
- When you created this wiki, the username and password you submitted were used to set up an account for you. Now click the 'sign in' link at the upper right and sign in.
14
-
15
- Once you sign in you will see your username in the upper right corner.
16
-
17
-
18
- h3. 2. Set the start page
19
-
20
- This page will always be the default start page for a new wiki. Probably not what you want, right? Fortunately, it is easy to change. Open the config.yml file (in your wiki directory) with any texteditor, and change the startpage field to the page you want.
21
-
22
- Next, in your wiki directory, run the command:
23
-
24
- ./wiki restart
25
-
26
- The next time you click on the 'Home' link in the nav bar, you will be taken to your new start page. If the page doesn't already exist, you will first be asked to login, and then you will be presented with an edit form to create the page.
27
-
28
-
29
- h3. 3. Create some pages!
30
-
31
- If you have any trouble, or need some help getting started, click on the 'Help' link in the nav bar. The documentation is pretty sparse right now, but I'm working on it!
32
-
33
- id: 1
34
- version: 1
35
- user_id: 1
36
- created_at: 2006-10-29 16:19:34 -08:00
37
- - updated_at: 2006-11-06 09:15:45 -08:00
38
- title: JunebugHelp
39
- readonly:
40
- body: This is a work in progress
41
- id: 2
42
- version: 1
43
- user_id: 1
44
- created_at: 2006-11-01 00:10:07 -08:00
45
- - updated_at: 2006-11-06 21:49:04 -08:00
46
- title: FormatTest
47
- readonly:
48
- body: |-
49
- See "this page":http://hobix.com/textile/ for the full range of formatting options
50
-
51
- h2. Headers
52
-
53
- h1. Header 1
54
-
55
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
56
-
57
- h2. Header 2
58
-
59
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
60
-
61
- h3. Header 3
62
-
63
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
64
-
65
- h4. Header 4
66
-
67
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
68
-
69
- h2. Structural emphasis
70
-
71
- This is _emphasis_ (italic)
72
-
73
- This is *strong* (bold)
74
-
75
- This is @code@
76
-
77
- more code
78
- @difftext = diff( @v1_markup , @v2_markup)
79
-
80
- This is -deleted- text
81
-
82
- This is +inserted+ text
83
-
84
- Arbitrary style: I'm %{color:red}unaware% of most soft drinks.
85
-
86
-
87
- h2. Arbitrary html, pre, and code
88
-
89
- Inserting arbitrary html (pre/code)
90
-
91
- <pre><code>a.gsub!( /</, '' )</code></pre>
92
-
93
- Inserting arbitrary html (pre/code)
94
-
95
- <pre>
96
- <code>a.gsub!( /</, '' )</code>
97
- </pre>
98
-
99
- Arbitrary html (pre)
100
-
101
- <pre>
102
- a.gsub!( /</, '' )
103
- </pre>
104
-
105
- Code by indenting
106
-
107
- more code
108
- @difftext = diff( @v1_markup , @v2_markup)
109
-
110
- h2. Lists
111
-
112
- # A first item
113
- # A second item
114
- # A third
115
-
116
- # Fuel could be:
117
- ## Coal
118
- ## Gasoline
119
- ## Electricity
120
- # Humans need only:
121
- ## Water
122
- ## Protein
123
-
124
- * A first item
125
- * A second item
126
- * A third
127
-
128
- h2. External references
129
-
130
- This is a link: "Google":http://google.com
131
-
132
- Images: !/static/images/feed-icon-14x14.png!
133
-
134
-
135
- h2. Tables
136
-
137
- |_. name |_. age |_. sex |
138
- | joan | 24 | f |
139
- | archie | 29 | m |
140
- | bella | 45 | f |
141
- id: 3
142
- version: 1
143
- user_id: 1
144
- created_at: 2006-11-06 09:40:53 -08:00
1
+ ---
2
+ - updated_at: 2006-11-07 18:24:43 -08:00
3
+ title: JunebugWiki
4
+ readonly: true
5
+ body: |
6
+ h1. Welcome to Junebug!
7
+
8
+ To complete setup of you new wiki, here are a few things you should do:
9
+
10
+
11
+ h3. 1. Login to your account
12
+
13
+ When you created this wiki, the username and password you submitted were used to set up an account for you. Now click the 'sign in' link at the upper right and sign in.
14
+
15
+ Once you sign in you will see your username in the upper right corner.
16
+
17
+
18
+ h3. 2. Set the start page
19
+
20
+ This page will always be the default start page for a new wiki. Probably not what you want, right? Fortunately, it is easy to change. Open the config.yml file (in your wiki directory) with any texteditor, and change the startpage field to the page you want.
21
+
22
+ Next, in your wiki directory, run the command:
23
+
24
+ ./wiki restart
25
+
26
+ The next time you click on the 'Home' link in the nav bar, you will be taken to your new start page. If the page doesn't already exist, you will first be asked to login, and then you will be presented with an edit form to create the page.
27
+
28
+
29
+ h3. 3. Create some pages!
30
+
31
+ If you have any trouble, or need some help getting started, click on the 'Help' link in the nav bar. The documentation is pretty sparse right now, but I'm working on it!
32
+
33
+ id: 1
34
+ version: 1
35
+ user_id: 1
36
+ created_at: 2006-10-29 16:19:34 -08:00
37
+ - updated_at: 2006-11-07 18:24:43 -08:00
38
+ title: JunebugHelp
39
+ readonly:
40
+ body: This is a work in progress
41
+ id: 2
42
+ version: 1
43
+ user_id: 1
44
+ created_at: 2006-11-01 00:10:07 -08:00
45
+ - updated_at: 2006-11-07 18:24:43 -08:00
46
+ title: FormatTest
47
+ readonly:
48
+ body: |-
49
+ See "this page":http://hobix.com/textile/ for the full range of formatting options
50
+
51
+ h2. Headers
52
+
53
+ h1. Header 1
54
+
55
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
56
+
57
+ h2. Header 2
58
+
59
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
60
+
61
+ h3. Header 3
62
+
63
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
64
+
65
+ h4. Header 4
66
+
67
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
68
+
69
+ h2. Structural emphasis
70
+
71
+ This is _emphasis_ (italic)
72
+
73
+ This is *strong* (bold)
74
+
75
+ This is @code@
76
+
77
+ more code
78
+ @difftext = diff( @v1_markup , @v2_markup)
79
+
80
+ This is -deleted- text
81
+
82
+ This is +inserted+ text
83
+
84
+ Arbitrary style: I'm %{color:red}unaware% of most soft drinks.
85
+
86
+
87
+ h2. Arbitrary html, pre, and code
88
+
89
+ Inserting arbitrary html (pre/code)
90
+
91
+ <pre><code>a.gsub!( /</, '' )</code></pre>
92
+
93
+ Inserting arbitrary html (pre/code)
94
+
95
+ <pre>
96
+ <code>a.gsub!( /</, '' )</code>
97
+ </pre>
98
+
99
+ Arbitrary html (pre)
100
+
101
+ <pre>
102
+ a.gsub!( /</, '' )
103
+ </pre>
104
+
105
+ Code by indenting
106
+
107
+ more code
108
+ @difftext = diff( @v1_markup , @v2_markup)
109
+
110
+ h2. Lists
111
+
112
+ # A first item
113
+ # A second item
114
+ # A third
115
+
116
+ # Fuel could be:
117
+ ## Coal
118
+ ## Gasoline
119
+ ## Electricity
120
+ # Humans need only:
121
+ ## Water
122
+ ## Protein
123
+
124
+ * A first item
125
+ * A second item
126
+ * A third
127
+
128
+ h2. External references
129
+
130
+ This is a link: "Google":http://google.com
131
+
132
+ Images: !/static/images/feed-icon-14x14.png!
133
+
134
+
135
+ h2. Tables
136
+
137
+ |_. name |_. age |_. sex |
138
+ | joan | 24 | f |
139
+ | archie | 29 | m |
140
+ | bella | 45 | f |
141
+ id: 3
142
+ version: 1
143
+ user_id: 1
144
+ created_at: 2006-11-06 09:40:53 -08:00
@@ -28,10 +28,15 @@ module Junebug::Controllers
28
28
 
29
29
  def post page_name
30
30
  redirect(Login) and return if @state.user_id.blank?
31
- attrs = { :body => input.post_body, :title => input.post_title }
32
- attrs[:readonly] = input.post_readonly if @state.user_id == 1
33
- if Page.find_or_create_by_title(page_name).update_attributes( attrs )
34
- redirect Show, input.post_title
31
+ if input.submit == 'delete'
32
+ Page.find_by_title(page_name).destroy() if @state.user_id == 1
33
+ redirect Index
34
+ else
35
+ attrs = { :body => input.post_body, :title => input.post_title }
36
+ attrs[:readonly] = input.post_readonly if @state.user_id == 1
37
+ if Page.find_or_create_by_title(page_name).update_attributes( attrs )
38
+ redirect Show, input.post_title
39
+ end
35
40
  end
36
41
  end
37
42
  end
data/lib/junebug/views.rb CHANGED
@@ -73,7 +73,8 @@ module Junebug::Views
73
73
  text " Readonly"
74
74
  br
75
75
  end
76
- input :type => 'submit', :value=>'save'
76
+ input :type => 'submit', :name=>'submit', :value=>'delete', :class=>'button', :onclick=>'return confirm("You sure?")', :style=>'float: right;'
77
+ input :type => 'submit', :name=>'submit', :value=>'save', :class=>'button'
77
78
  end
78
79
  _button 'cancel', :href => R(Show, @page.title, @page.version); text '&nbsp;'
79
80
  a 'syntax help', :href => 'http://hobix.com/textile/', :target=>'_blank'
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: junebug
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.5
7
- date: 2006-11-06 00:00:00 -08:00
6
+ version: 0.0.6
7
+ date: 2006-11-07 00:00:00 -08:00
8
8
  summary: Junebug is a minimalist ruby wiki.
9
9
  require_paths:
10
10
  - lib