Skip to content

Commit 9d6ccf2

Browse files
committed
Updated site to support submissions & contacts
1 parent 6d36df9 commit 9d6ccf2

File tree

6 files changed

+228
-8
lines changed

6 files changed

+228
-8
lines changed

_includes/contact.html

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div class="container">
88
<div class="row">
99
<div class="col-lg-12 text-center">
10-
<h2>Get Involved!</h2>
10+
<h2>Contact Us</h2>
1111
<hr class="star-primary">
1212
</div>
1313
</div>
@@ -17,21 +17,21 @@ <h2>Get Involved!</h2>
1717
<div class="row control-group">
1818
<div class="form-group col-xs-12 floating-label-form-group controls">
1919
<label>Name</label>
20-
<input type="text" class="form-control" placeholder="Name" id="name" required data-validation-required-message="Please enter your name.">
20+
<input type="text" class="form-control" placeholder="Your Name" id="name" required data-validation-required-message="Please enter your name.">
2121
<p class="help-block text-danger"></p>
2222
</div>
2323
</div>
2424
<div class="row control-group">
2525
<div class="form-group col-xs-12 floating-label-form-group controls">
2626
<label>Email Address</label>
27-
<input type="email" class="form-control" placeholder="Email Address" id="email" required data-validation-required-message="Please enter your email address.">
27+
<input type="email" class="form-control" placeholder="Your Email Address" id="email" required data-validation-required-message="Please enter your email address.">
2828
<p class="help-block text-danger"></p>
2929
</div>
3030
</div>
3131
<div class="row control-group">
3232
<div class="form-group col-xs-12 floating-label-form-group controls">
3333
<label>Message or Submission (links to disk images for demos can be via dropbox/github etc.)</label>
34-
<textarea rows="5" class="form-control" placeholder="Message or Submission (links to disk images for demos can be via dropbox/github etc.)" id="message" required data-validation-required-message="Please enter a message."></textarea>
34+
<textarea rows="5" class="form-control" placeholder="Your Message " id="message" required data-validation-required-message="Please enter a message."></textarea>
3535
<p class="help-block text-danger"></p>
3636
</div>
3737
</div>
@@ -43,6 +43,16 @@ <h2>Get Involved!</h2>
4343
</div>
4444
</div>
4545
</form>
46+
47+
<ul class="list-inline item-details">
48+
49+
<li>
50+
Looking to submit something to us? Click <a href="submit.html">Here</a>!
51+
52+
</li>
53+
</ul>
54+
55+
4656
</div>
4757
</div>
4858
</div>

_layouts/compos_post.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ <h2>The Challenge</h2>
4343
</strong>
4444
</li>
4545
</ul>
46+
47+
48+
49+
50+
<!-- submit -->
51+
<a href="/submit.html" class="btn btn-md btn-success">
52+
<i class="fa fa-envelope"></i> Submit your entry
53+
</a>
4654
</div>
4755

4856

@@ -71,7 +79,7 @@ <h2>The Challenge</h2>
7179
<a target='_blank' href="http://www.stardot.org.uk/forums/" class="btn btn-lg btn-outline">
7280
<i class="fa fa-comments"></i> Visit the Forums
7381
</a>&nbsp;&nbsp;&nbsp;
74-
<a href="/info.html#contact" class="btn btn-lg btn-outline">
82+
<a href="/submit.html" class="btn btn-lg btn-outline">
7583
<i class="fa fa-envelope"></i> Submit an Entry
7684
</a>&nbsp;&nbsp;&nbsp;
7785
</div>

_layouts/submit_page.html

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
<!DOCTYPE html>
2+
<html>
3+
{% include head.html %}
4+
<body id="page-top" class="index">
5+
{% include nav.html %}
6+
7+
<!-- About Section -->
8+
<header class="success" id="about">
9+
<div class="container">
10+
<div class="row">
11+
<div class="col-lg-12 text-center ">
12+
<div class="intro-text">
13+
<span class="name">{{ page.title }}</span>
14+
<hr class="star-light">
15+
</div>
16+
</div>
17+
</div>
18+
19+
20+
<div class="row">
21+
<div class="col-lg-6 col-lg-offset-3">
22+
<h3>Submission Format</h3>
23+
<p>All submissions must be provided as a weblink to a zip file containing an <strong>.SSD or .DSD</strong> image file, a <strong>PNG screenshot</strong> image of your demo and a <strong>README.MD</strong> markdown format file containing information about your submission, which will be used when we publish your entry on this site.</p>
24+
</div>
25+
26+
</div>
27+
28+
29+
</div>
30+
</header>
31+
32+
<!-- Compo submission Section -->
33+
<!-- Uses Slack webhooks -->
34+
35+
36+
<section id="contact">
37+
<div class="container">
38+
<div class="row">
39+
<div class="col-lg-12 text-center">
40+
<h2>Please fill out all fields</h2>
41+
<hr class="star-primary">
42+
</div>
43+
</div>
44+
<div class="row">
45+
<div class="col-lg-8 col-lg-offset-2">
46+
<form name="sentMessage" id="submitForm" novalidate>
47+
<!-- Select Compo -->
48+
<div class="row control-group">
49+
<div class="form-group col-xs-12 controls">
50+
51+
52+
<label for="type">Select Submission Type:</label>
53+
<select class="form-control" id="type" novalidate>
54+
{% for post in site.posts %} {% if post.category contains 'compos' %}
55+
<option value="Compo entry - {{ post.title }}">Compo entry - '{{ post.title }}'</option>
56+
{% endif %}
57+
{% endfor %}
58+
59+
<option value="other">Other</option>
60+
</select>
61+
62+
63+
</div>
64+
</div>
65+
66+
<!-- Weblink -->
67+
<div class="row control-group">
68+
<div class="form-group col-xs-12 floating-label-form-group controls">
69+
<label>Web Link to your submission entry</label>
70+
<input type="url" class="form-control" placeholder="Web Link to your submission entry (dropbox, google drive, web etc.)" id="url" required data-validation-regex-regex="(http[s]?:\/\/){0,1}(www.){0,1}[a-zA-Z0-9.-]+.[a-zA-Z]{2,5}[.]{0,1}" data-validation-regex-message="enter valid URL" data-validation-required-message="Please enter a valid web link.">
71+
<p class="help-block text-danger"></p>
72+
</div>
73+
</div>
74+
<!-- Name -->
75+
<div class="row control-group">
76+
<div class="form-group col-xs-12 floating-label-form-group controls">
77+
<label>Your Name</label>
78+
<input type="text" class="form-control" placeholder="Your Name" id="name" required data-validation-required-message="Please enter your name.">
79+
<p class="help-block text-danger"></p>
80+
</div>
81+
</div>
82+
83+
84+
<!-- Email Address -->
85+
<div class="row control-group">
86+
<div class="form-group col-xs-12 floating-label-form-group controls">
87+
<label>Your Email Address</label>
88+
<input type="email" class="form-control" placeholder="Your Email Address (so we can contact you if necessary)" id="email" required data-validation-required-message="Please enter a valid email address.">
89+
<p class="help-block text-danger"></p>
90+
</div>
91+
</div>
92+
93+
<!-- Message -->
94+
<div class="row control-group">
95+
<div class="form-group col-xs-12 floating-label-form-group controls">
96+
<label>Message to accompany your Submission</label>
97+
<textarea rows="5" class="form-control" placeholder="Any Message to accompany your Submission" id="message" required data-validation-required-message="Please enter a message."></textarea>
98+
<p class="help-block text-danger"></p>
99+
</div>
100+
</div>
101+
<br>
102+
<div id="success"></div>
103+
<div class="row">
104+
<div class="form-group col-xs-12">
105+
<button type="submit" class="btn btn-success btn-lg">Send</button>
106+
</div>
107+
</div>
108+
</form>
109+
</div>
110+
</div>
111+
</div>
112+
</section>
113+
114+
{% include footer.html %}
115+
{% include js.html %}
116+
</body>
117+
</html>

_posts/compos/2016-08-19-ode-to-mode7.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ img: mode7.png
99
platform: BBC Micro
1010

1111
---
12-
Write a **game, demo, graphic effect, or anything fun / interesting** that runs in & showcases MODE 7.
12+
Write a **game, demo, graphic effect, or anything fun / interesting** that runs in & showcases the BBC Micro's Teletext MODE 7.
1313

1414
Preferred target machine is standard BBC Micro with DFS for broadest possible distribution but submissions that rely on original hardware extensions (e.g. B+, Master, SWRAM, ADFS, 2nd processor) are also accepted.
1515
All submissions must run on original hardware.

js/contact_me.js

Lines changed: 82 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
$(function() {
22

3+
// contact form
34
$("#contactForm input,#contactForm textarea").jqBootstrapValidation({
45
preventSubmit: true,
56
submitError: function($form, event, errors) {
@@ -19,8 +20,7 @@ $(function() {
1920
if (firstName.indexOf(' ') >= 0) {
2021
firstName = name.split(' ').slice(0, -1).join(' ');
2122
}
22-
var payLoad = { "text": "A message from the bitshifters website from: Name: '" + name + "', Email: '" + email + "', Message: '" + message + "'." };
23-
23+
2424
$.ajax({
2525
url: "https://hooks.slack.com/services/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",
2626
type: "POST",
@@ -78,6 +78,86 @@ $(function() {
7878
},
7979
});
8080

81+
// submission form
82+
$("#submitForm input,#submitForm textarea,#submitForm select").jqBootstrapValidation({
83+
preventSubmit: true,
84+
submitError: function($form, event, errors) {
85+
// additional error messages or events
86+
},
87+
submitSuccess: function($form, event) {
88+
// Prevent spam click and default submit behaviour
89+
$("#btnSubmit").attr("disabled", true);
90+
event.preventDefault();
91+
92+
// get values from FORM
93+
var type = $("select#type").val();
94+
var url = $("input#url").val();
95+
var name = $("input#name").val();
96+
var email = $("input#email").val();
97+
var message = $("textarea#message").val();
98+
var firstName = name; // For Success/Failure Message
99+
// Check for white space in name for Success/Fail message
100+
if (firstName.indexOf(' ') >= 0) {
101+
firstName = name.split(' ').slice(0, -1).join(' ');
102+
}
103+
104+
$.ajax({
105+
url: "https://hooks.slack.com/services/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",
106+
type: "POST",
107+
data: 'payload=' + JSON.stringify({ "channel" : "#compos",
108+
"text": "A submission from the bitshifters website of type: '" + type + "', url '" + url + "', Name: '" + name + "', Email: '" + email + "', Message: '" + message + "'."
109+
}),
110+
dataType: 'json',
111+
cache: false,
112+
success: function() {
113+
// Enable button & show success message
114+
$("#btnSubmit").attr("disabled", false);
115+
$('#success').html("<div class='alert alert-success'>");
116+
$('#success > .alert-success').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;")
117+
.append("</button>");
118+
$('#success > .alert-success')
119+
.append("<strong>Your message has been sent. </strong>");
120+
$('#success > .alert-success')
121+
.append('</div>');
122+
123+
//clear all fields
124+
$('#contactForm').trigger("reset");
125+
},
126+
error: function () {
127+
128+
// sm: knackered response from slack. Lets Just assume it works.
129+
// Enable button & show success message
130+
$("#btnSubmit").attr("disabled", false);
131+
$('#success').html("<div class='alert alert-success'>");
132+
$('#success > .alert-success').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;")
133+
.append("</button>");
134+
$('#success > .alert-success')
135+
.append("<strong>Your message has been sent. </strong>");
136+
$('#success > .alert-success')
137+
.append('</div>');
138+
139+
//clear all fields
140+
$('#submitForm').trigger("reset");
141+
142+
/*
143+
144+
// Fail message
145+
$('#success').html("<div class='alert alert-danger'>");
146+
$('#success > .alert-danger').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;")
147+
.append("</button>");
148+
$('#success > .alert-danger').append("<strong>Sorry " + firstName + ", it seems that my mail server is not responding. Please try again later!");
149+
$('#success > .alert-danger').append('</div>');
150+
//clear all fields
151+
$('#contactForm').trigger("reset");
152+
*/
153+
},
154+
});
155+
},
156+
filter: function() {
157+
return $(this).is(":visible");
158+
},
159+
});
160+
81161
$("a[data-toggle=\"tab\"]").click(function(e) {
82162
e.preventDefault();
83163
$(this).tab("show");

submit.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
layout: submit_page
3+
title: Send us fun things!
4+
subtitle: Subtitle
5+
---

0 commit comments

Comments
 (0)