You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2022/06/01 00:44:40 UTC

[whimsy] branch master updated: add a skeleton of a new icla application

This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 25483ad1 add a skeleton of a new icla application
25483ad1 is described below

commit 25483ad1b31bb64a52db09edd924646cd62a4d5f
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Tue May 31 20:44:10 2022 -0400

    add a skeleton of a new icla application
---
 www/project/icla2/main.rb          | 13 +++++++++++++
 www/project/icla2/views/answer.erb | 10 ++++++++++
 www/project/icla2/views/form.erb   | 14 ++++++++++++++
 www/project/icla2/views/index.erb  | 10 ++++++++++
 4 files changed, 47 insertions(+)

diff --git a/www/project/icla2/main.rb b/www/project/icla2/main.rb
new file mode 100755
index 00000000..d4386b6f
--- /dev/null
+++ b/www/project/icla2/main.rb
@@ -0,0 +1,13 @@
+require 'sinatra'
+
+get '/' do
+  erb :index
+end
+
+get '/form' do
+  erb :form
+end
+
+post '/answer' do
+  erb :answer
+end
diff --git a/www/project/icla2/views/answer.erb b/www/project/icla2/views/answer.erb
new file mode 100644
index 00000000..988e2d5f
--- /dev/null
+++ b/www/project/icla2/views/answer.erb
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>ICLA Demo</title>
+  </head>
+
+  <body>
+    <p>Hello <%= params[:name] %>.</p>
+  </body>
+</html>
diff --git a/www/project/icla2/views/form.erb b/www/project/icla2/views/form.erb
new file mode 100644
index 00000000..16c9dcea
--- /dev/null
+++ b/www/project/icla2/views/form.erb
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>ICLA Demo</title>
+  </head>
+
+  <body>
+    <form method="post" action="/answer">
+      <label for="name">What is your name?</label>
+      <input id="name" name="name">
+      <input type="submit">
+    </form>
+  </body>
+</html>
diff --git a/www/project/icla2/views/index.erb b/www/project/icla2/views/index.erb
new file mode 100644
index 00000000..d8acd158
--- /dev/null
+++ b/www/project/icla2/views/index.erb
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>ICLA Demo</title>
+  </head>
+
+  <body>
+    <p>Click on the following: <a href="/form">link</a>.</p>
+  </body>
+</html>