From 08e71721514a8fad599832c4846b1cfb45b0f12c Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 3 Oct 2015 12:35:48 +0200 Subject: Transform to a Sinatra app --- public/regform.js | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ public/styles.css | 39 ++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 public/regform.js create mode 100644 public/styles.css (limited to 'public') diff --git a/public/regform.js b/public/regform.js new file mode 100644 index 0000000..00e5486 --- /dev/null +++ b/public/regform.js @@ -0,0 +1,59 @@ +$(function() { + var num_members = 0; + var num_songs = 0; + + $('#add-member-button').click(function() { + num_members += 1; + $('#form-members').append( + '
' + + '

Medlem nr. '+num_members+'

' + + '
' + + ' ' + + ' ' + + '
' + + '
' + + ' ' + + ' ' + + '
' + + '
' + + ' ' + + ' ' + + '
' + + '
' + ) + }); + + $('#add-song-button').click(function() { + num_songs += 1; + $('#form-songs').append( + '
' + + '

Låt nr '+num_songs+'

' + + '
' + + ' ' + + ' ' + + '
' + + '
' + + ' ' + + ' '+ + '
' + + '
' + + ' ' + + ' '+ + '
' + + '
' + + ' '+ + ' ' + + '
' + + '
' + + ' '+ + ' ' + + '
' + + '
' + + ' '+ + ' ' + + '
' + + '
' + ) + }); + +}); \ No newline at end of file diff --git a/public/styles.css b/public/styles.css new file mode 100644 index 0000000..d0b13fc --- /dev/null +++ b/public/styles.css @@ -0,0 +1,39 @@ +body { + background-color: whitesmoke; + color: darkslategray; +} + +label { + width: 8em; + display: inline-block; + text-align: right; + vertical-align: top; +} + +.required:after { + content: " *"; + color: darkred; + vertical-align: top; +} + +input[type=text] { + border: 0; +} + +textarea { + border: 1px dashed slategray; + margin-top: 5px; + margin-bottom: 5px; +} + +input[type=text], textarea { + border-bottom: 1px solid darkslateblue; + background-color: whitesmoke; + color: darkslateblue; + + font-size: large; +} + +.song-info, .member-info { + padding-left: 1em; +} \ No newline at end of file -- cgit v1.2.3