Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sinatra & shell info #7

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,19 @@
# import events list
from models import events


@app.route('/')
def index():
return render_template(
'index.html',
events = events.eventlist
pastevents=events.pastevents,
upcomingevents=events.upcomingevents
)

@app.route('/faq')
def faq():
return render_template(
'faq.html'
)

@app.route('/about')
Expand All @@ -23,26 +31,36 @@ def aboutus():
def schedule():
return render_template(
'schedule.html',
events = events.eventlist
pastevents=events.pastevents,
upcomingevents=events.upcomingevents
)


@app.route('/materials')
def materials():
return render_template(
'materials.html'
)

@app.route('/materials/html5')
def html_workshop():
@app.route('/materials/html5_2013')
def html_2013_workshop():
return render_template(
'materials/html5workshop2013.html'
)

@app.route('/materials/html5_2012')
def materials_html_workshop():
return render_template(
'materials/html5workshop.html'
)


@app.route('/materials/gitjquery')
def html_workshop():
def materials_gitjquery():
return render_template(
'materials/gitjquery.html'
)


if __name__ == "__main__":
app.run()
53 changes: 46 additions & 7 deletions models/events.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,58 @@
eventlist = [
upcomingevents = [
{
"title": "Web Development first steps with Sinatra",
"datetime": "Saturday, 16 February 2013, 10am - 1pm",
"location": "Global Learning Room, Education Resource Centre, University Town",
"audience": "Beginner",
"prereq": "HTML/CSS, and programming basics is assumed. Familiarity with Ruby is not required.",
"description": "Sinatra is a small but powerful micro-framework for creating web applications in Ruby. In this workshop, we'll take a whirlwind tour of Sinatra and in the process, learn about the common MVC web application pattern. This workshop will also cover the basic ideas necessary for building web applications (whether in Sinatra or otherwise).<br/><a href='https://docs.google.com/a/linuxnus.org/spreadsheet/viewform?formkey=dDVvX0JKQVZBQnZob3ZRdW1pVERLNXc6MQ'>Sign up here &rarr;</a>",
"image": "/static/img/sinatra.png"
},
{
"title": "Unix and Shell Scripting Basics",
"datetime": "Saturday, 23 February 2013, 10am - 1pm",
"location": "Global Learning Room, Education Resource Centre, University Town",
"audience": "Beginner",
"description": "In the professional world, unix is ubiquitous, and shell scripting is the staple of unix. With shell scripting, you can automate tasks that'd otherwise take you hours to accomplish. We'll be explaining the basic philosophy & ideas behind the design of Unix, and introducing shell scripting by way of walking through some very common tasks.<br/><a href='https://docs.google.com/a/linuxnus.org/spreadsheet/viewform?formkey=dDVvX0JKQVZBQnZob3ZRdW1pVERLNXc6MQ'>Sign up here &rarr;</a>",
"image": "/static/img/freebsd.png"
}
]

pastevents = [
{
"title": "Git for Beginners",
"datetime": "Saturday, 2 February 2013, 10am - 1pm",
"location": "Global Learning Room, Education Resource Centre, University Town",
"audience": "Beginner",
"description": "Ever used Dropbox to store your code because it makes backups? Made multiple copies of your assignment's folder just to try different things? Worked on group projects by coding in Google Docs? Git is the tool for you: <strong>it'll change the way you code for the better.</strong> <a href='https://docs.google.com/a/linuxnus.org/spreadsheet/viewform?formkey=dDVvX0JKQVZBQnZob3ZRdW1pVERLNXc6MQ'>Sign up here &rarr;</a>",
"image": "/static/img/git.png",
"materials": "Materials to come."
},
{
"title": "Introduction to HTML5/CSS3",
"datetime": "Saturday, 26 January 2013, 10am - 1pm",
"location": "Seminar Room 3, COM1, School of Computing, NUS",
"audience": "Beginner",
"description": "Wanted to make a website, but found w3c's tutorials too boring? We'll teach you HTML5 and CSS3 from scratch. Come down to get a hands-on experience on designing beautiful webpages, and <strong>walk away with a personalized website.</strong> Workshop complete; <a href='/materials/html5_2013'>materials here</a>.",
"image": "/static/img/html5.png",
"materials": "Materials to come."
},
{
"title": "Git & jQuery for beginners",
"datetime": "Monday, 24 September 2012, 10am - 1pm",
"datetime": "Monday, 24 September 2012, 10am - 1pm (Event concluded)",
"location": "NUS COM1-02-12 SR3 ",
"audience": "Beginner",
"description": "jQuery is a swiss army knife for frontend web development. Also, meet Git, a version control system. It'll change the way you code. Seriously. <strong> You'll wonder what you were doing before Git. </strong> <a class='calltoaction' href='https://docs.google.com/spreadsheet/viewform?formkey=dG1DVmx6V3VWUE9jYTlKUzVSUGhRcWc6MQ'>Sign Up Here!</a>",
"image": "/static/img/gitjs.png"
"description": "jQuery is a swiss army knife for frontend web development. Also, meet Git, a version control system. It'll change the way you code. Seriously. <strong> You'll wonder what you were doing before Git. </strong><a class='calltoaction' href='/materials/gitjquery'>materials here</a>",
"image": "/static/img/gitjs.png",
"materials": "</strong><a class='calltoaction' href='/materials/gitjquery'>Materials here</a>"
},
{
"title": "Introduction to HTML5/CSS3",
"datetime": "Saturday, 22 September 2012, 10am - 1pm (Event concluded)",
"location": "NUS COM1-02-12 SR3 ",
"audience": "Beginner",
"description": "Wanted to make a website, but found w3c's tutorials too boring? We'll teach you HTML5 and CSS3 from scratch. Come down to get a hands-on experience on designing beautiful webpages, and <strong>walk away with a personalized website.</strong> <a class='calltoaction' href='/materials/html5'>Event over; materials here &rarr;</a>",
"image": "/static/img/html5.png"
"description": "Wanted to make a website, but found w3c's tutorials too boring? We'll teach you HTML5 and CSS3 from scratch. Come down to get a hands-on experience on designing beautiful webpages, and <strong>walk away with a personalized website.</strong> <a class='calltoaction' href='/materials/html5_2012'>materials here</a>",
"image": "/static/img/html5.png",
"materials": "</strong><a class='calltoaction' href='/materials/html5_2012'>Materials here</a>"
},

]
Loading