new features, added chat and enabled the blogs on the homepage
This commit is contained in:
parent
d27df86be8
commit
329bfbcb85
|
@ -2,7 +2,7 @@
|
||||||
page_menu = [
|
page_menu = [
|
||||||
('Home', '/'),
|
('Home', '/'),
|
||||||
#('About', '#about'),
|
#('About', '#about'),
|
||||||
('Competition', '/competition'),
|
#('Competition', '/competition'),
|
||||||
('Contact', '#mailing-list-signup')]
|
('Contact', '#mailing-list-signup')]
|
||||||
|
|
||||||
banner_images = [
|
banner_images = [
|
||||||
|
|
|
@ -38,6 +38,7 @@ if __name__ == "__main__":
|
||||||
pages_list = (
|
pages_list = (
|
||||||
('pages.homepage', 'index', 'index.html'),
|
('pages.homepage', 'index', 'index.html'),
|
||||||
('pages.blog', 'index', 'blog.html'),
|
('pages.blog', 'index', 'blog.html'),
|
||||||
|
('pages.chat', 'index', 'chat.html'),
|
||||||
('pages.competition', 'index', 'competition.html'))
|
('pages.competition', 'index', 'competition.html'))
|
||||||
|
|
||||||
for module, page, filename in pages_list:
|
for module, page, filename in pages_list:
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -12,6 +12,11 @@
|
||||||
|
|
||||||
<link rel="stylesheet" id="navigationCss" href="/static/template/js/jquery-ui/themes/base/jquery-ui.css" media="" type="text/css" />
|
<link rel="stylesheet" id="navigationCss" href="/static/template/js/jquery-ui/themes/base/jquery-ui.css" media="" type="text/css" />
|
||||||
|
|
||||||
|
<link rel="icon" type="image/png" href="/static/images/favicon.png">
|
||||||
|
<link rel="stylesheet" id="navigationCss" href="/static/template/default.css" media="" type="text/css" />
|
||||||
|
|
||||||
|
<link rel="stylesheet" id="navigationCss" href="/static/template/js/jquery-ui/themes/base/jquery-ui.css" media="" type="text/css" />
|
||||||
|
|
||||||
<link rel="icon" type="image/png" href="/static/images/favicon.png">
|
<link rel="icon" type="image/png" href="/static/images/favicon.png">
|
||||||
<link rel="stylesheet" id="navigationCss" href="/static/template/default.css" media="" type="text/css" />
|
<link rel="stylesheet" id="navigationCss" href="/static/template/default.css" media="" type="text/css" />
|
||||||
|
|
||||||
|
@ -29,10 +34,14 @@
|
||||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.js"></script>
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.js"></script>
|
||||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular-animate.js"></script>
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular-animate.js"></script>
|
||||||
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
|
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
|
||||||
|
<script type="text/javascript" src="/static/js/jquery-2.1.4.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.js"></script>
|
||||||
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular-animate.js"></script>
|
||||||
|
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="headerstrip"><nav class="navstrip"><div class="left mini-logo">Maidstone Hackspace</div><div class="social"><div class="btn"><a href="https://twitter.com/share" class="twitter-share-button" data-via="MHackspace">Tweet</a></div><div class="btn"><script type="IN/Share" data-url="http://maidstone-hackspace.org.uk/" data-counter="right"></script></div><div class="btn"><div size="standard" class="g-plusone" data-href="http://maidstone-hackspace.org.uk/" data-size="medium" data-annotation="bubble" count="true"></div></div></div></nav></div>
|
<div id="headerstrip"><nav class="navstrip"><div class="left mini-logo">Maidstone Hackspace</div><div class="social"><div class="btn"><a href="https://twitter.com/share" class="twitter-share-button" data-via="MHackspace">Tweet</a></div><div class="btn"><script type="IN/Share" data-url="http://maidstone-hackspace.org.uk/" data-counter="right"></script></div><div class="btn"><div size="standard" class="g-plusone" data-href="http://maidstone-hackspace.org.uk/" data-size="medium" data-annotation="bubble" count="true"></div></div></div></nav></div>
|
||||||
<nav id="leftNav" class="menu" ><ul><li class="active mi0"><a href="/" >Home</a></li><li class="mi1"><a href="/competition" >Competition</a></li><li class="mi2"><a href="#mailing-list-signup" >Contact</a></li></ul><div style="clear:both;"></div></nav>
|
<nav id="leftNav" class="menu" ><ul><li class="active mi0"><a href="/" >Home</a></li><li class="mi1"><a href="#mailing-list-signup" >Contact</a></li></ul><div style="clear:both;"></div></nav>
|
||||||
<div class="page" ><header class="pageHeader"><img src="/static/images/competitions/screw_sorting_competition_banner.jpg" alt="Screw sorting competition banner" align="middle" style="margin:auto;display:block;width:500px;" /></header><section class="pageSection"><p>Welcome to the first ever maidstone hackspace competition, we are a new hackspace, so we are looking to get the word out and get some collaberation going.The First cometition will be to design a device which can sort a jar of screws by size, the winning entry we will attempt to build.</p></section><section class="pageSection"><ul class="bullet-list" >
|
<div class="page" ><header class="pageHeader"><img src="/static/images/competitions/screw_sorting_competition_banner.jpg" alt="Screw sorting competition banner" align="middle" style="margin:auto;display:block;width:500px;" /></header><section class="pageSection"><p>Welcome to the first ever maidstone hackspace competition, we are a new hackspace, so we are looking to get the word out and get some collaberation going.The First cometition will be to design a device which can sort a jar of screws by size, the winning entry we will attempt to build.</p></section><section class="pageSection"><ul class="bullet-list" >
|
||||||
<li>Submit designs by 31st of July</li>
|
<li>Submit designs by 31st of July</li>
|
||||||
<li>Images can be design in any software or drawn on a piece of paper but must be submitted as a jpg on the mailing list.</li>
|
<li>Images can be design in any software or drawn on a piece of paper but must be submitted as a jpg on the mailing list.</li>
|
||||||
|
@ -87,6 +96,11 @@
|
||||||
|
|
||||||
<link rel="stylesheet" id="navigationCss" href="/static/template/js/jquery-ui/themes/base/jquery-ui.css" media="" type="text/css" />
|
<link rel="stylesheet" id="navigationCss" href="/static/template/js/jquery-ui/themes/base/jquery-ui.css" media="" type="text/css" />
|
||||||
|
|
||||||
|
<link rel="icon" type="image/png" href="/static/images/favicon.png">
|
||||||
|
<link rel="stylesheet" id="navigationCss" href="/static/template/default.css" media="" type="text/css" />
|
||||||
|
|
||||||
|
<link rel="stylesheet" id="navigationCss" href="/static/template/js/jquery-ui/themes/base/jquery-ui.css" media="" type="text/css" />
|
||||||
|
|
||||||
<link rel="icon" type="image/png" href="/static/images/favicon.png">
|
<link rel="icon" type="image/png" href="/static/images/favicon.png">
|
||||||
<link rel="stylesheet" id="navigationCss" href="/static/template/default.css" media="" type="text/css" />
|
<link rel="stylesheet" id="navigationCss" href="/static/template/default.css" media="" type="text/css" />
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="headerstrip"><nav class="navstrip"><div class="left mini-logo">Maidstone Hackspace</div><div class="social"><div class="btn"><a href="https://twitter.com/share" class="twitter-share-button" data-via="MHackspace">Tweet</a></div><div class="btn"><script type="IN/Share" data-url="http://maidstone-hackspace.org.uk/" data-counter="right"></script></div><div class="btn"><div size="standard" class="g-plusone" data-href="http://maidstone-hackspace.org.uk/" data-size="medium" data-annotation="bubble" count="true"></div></div></div></nav></div>
|
<div id="headerstrip"><nav class="navstrip"><div class="left mini-logo">Maidstone Hackspace</div><div class="social"><div class="btn"><a href="https://twitter.com/share" class="twitter-share-button" data-via="MHackspace">Tweet</a></div><div class="btn"><script type="IN/Share" data-url="http://maidstone-hackspace.org.uk/" data-counter="right"></script></div><div class="btn"><div size="standard" class="g-plusone" data-href="http://maidstone-hackspace.org.uk/" data-size="medium" data-annotation="bubble" count="true"></div></div></div></nav></div>
|
||||||
<nav id="leftNav" class="menu" ><ul><li class="active mi0"><a href="/" >Home</a></li><li class="mi1"><a href="/competition" >Competition</a></li><li class="mi2"><a href="#mailing-list-signup" >Contact</a></li></ul><div style="clear:both;"></div></nav>
|
<nav id="leftNav" class="menu" ><ul><li class="active mi0"><a href="/" >Home</a></li><li class="mi1"><a href="#mailing-list-signup" >Contact</a></li></ul><div style="clear:both;"></div></nav>
|
||||||
<div id="headerstrip"><nav class="navstrip"><div class="left mini-logo">Maidstone Hackspace</div><div class="social"></div></nav></div>
|
<div id="headerstrip"><nav class="navstrip"><div class="left mini-logo">Maidstone Hackspace</div><div class="social"></div></nav></div>
|
||||||
<nav id="leftNav" class="menu" ><ul><li class="active mi0"><a href="/" >Home</a></li><li class="mi1"><a href="/competition" >Competition</a></li><li class="mi2"><a href="#mailing-list-signup" >Contact</a></li></ul><div style="clear:both;"></div></nav>
|
<nav id="leftNav" class="menu" ><ul><li class="active mi0"><a href="/" >Home</a></li><li class="mi1"><a href="#mailing-list-signup" >Contact</a></li></ul><div style="clear:both;"></div></nav>
|
||||||
<div class="page" ><header class="pageHeader"></header><section class="pageSection"><img src="/static/template/images/tile-01.jpg" alt="" class="tile-right" />
|
<div class="page" ><header class="pageHeader"></header><section class="pageSection"><img src="/static/template/images/tile-01.jpg" alt="" class="tile-right" />
|
||||||
<img src="/static/template/images/tile-01.jpg" alt="" class="tile-right" /><div class="banner-slide" ng-app="myApp" ng-controller="sliderController"><ul ng-switch on="currentSlide" ng-init="length=3;"><li class="slide" ng-switch-when="0"><img src="/static/template/images/hackspace-banner.png" /><div class="content">title<br />intro text</div></li><li class="slide" ng-switch-when="1"><img src="/static/template/images/example-01.jpg" /><div class="content">title<br />intro text</div></li><li class="slide" ng-switch-when="2"><img src="/static/template/images/example-02.jpg" /><div class="content">title<br />intro text</div></li><li style="clear:both;"></li></ul><div ng-click="prev()" title="Previous" role="button" class="slide-button left"><</div><div ng-click="next()" title="Next" role="button" class="slide-button right">></div></div><div class="clear"></div></section><section class="pageSection"><h2>Introduction</h2></section><section class="pageSection"><p>Hackspaces are a shared space where artists, designers, makers, hackers, programmers, tinkerers, professionals and hobbyists
|
<img src="/static/template/images/tile-01.jpg" alt="" class="tile-right" /><div class="banner-slide" ng-app="myApp" ng-controller="sliderController"><ul ng-switch on="currentSlide" ng-init="length=3;"><li class="slide" ng-switch-when="0"><img src="/static/template/images/hackspace-banner.png" /><div class="content">title<br />intro text</div></li><li class="slide" ng-switch-when="1"><img src="/static/template/images/example-01.jpg" /><div class="content">title<br />intro text</div></li><li class="slide" ng-switch-when="2"><img src="/static/template/images/example-02.jpg" /><div class="content">title<br />intro text</div></li><li style="clear:both;"></li></ul><div ng-click="prev()" title="Previous" role="button" class="slide-button left"><</div><div ng-click="next()" title="Next" role="button" class="slide-button right">></div></div><div class="clear"></div></section><section class="pageSection"><h2>Introduction</h2></section><section class="pageSection"><p>Hackspaces are a shared space where artists, designers, makers, hackers, programmers, tinkerers, professionals and hobbyists
|
||||||
can work on their projects, share knowledge and collaborate.We are in the process of developing Maidstone Hackspace. We're previous members of <span class="info" title="Innovation center medway prototype">(ICMP)</span> and looking to form a new space in the future.
|
can work on their projects, share knowledge and collaborate.We are in the process of developing Maidstone Hackspace. We're previous members of <span class="info" title="Innovation center medway prototype">(ICMP)</span> and looking to form a new space in the future.
|
||||||
|
|
|
@ -7,6 +7,7 @@ from flask import make_response
|
||||||
|
|
||||||
import generate
|
import generate
|
||||||
from pages import homepage
|
from pages import homepage
|
||||||
|
from pages import chat
|
||||||
from pages import blog
|
from pages import blog
|
||||||
from pages import competition
|
from pages import competition
|
||||||
|
|
||||||
|
@ -35,5 +36,10 @@ def competition_index():
|
||||||
"""competition page"""
|
"""competition page"""
|
||||||
return make_response(competition.index())
|
return make_response(competition.index())
|
||||||
|
|
||||||
|
@web_app.route("/chat/", methods=['GET'])
|
||||||
|
def chat_index():
|
||||||
|
"""competition page"""
|
||||||
|
return make_response(chat.index())
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
web_app.run(host='0.0.0.0', port=5000, debug=True)
|
web_app.run(host='0.0.0.0', port=5000, debug=True)
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
import constants as site
|
||||||
|
|
||||||
|
from libs.rss_fetcher import feed_reader
|
||||||
|
|
||||||
|
from pages import web
|
||||||
|
from pages import header, footer
|
||||||
|
|
||||||
|
|
||||||
|
def index():
|
||||||
|
header()
|
||||||
|
web.template.body.append(web.header_strip.create({}).render())
|
||||||
|
web.template.body.append(web.menu.render())
|
||||||
|
web.page.create(web.title.create('IRC Chat Room').render())
|
||||||
|
web.page.create(web.paragraph.create('Pop in and say hi, please be patient users tend to idle and will respond when they get a chance.').render())
|
||||||
|
web.page.section(web.chat.create('maidstone-hackspace').render())
|
||||||
|
web.template.body.append(web.page.render())
|
||||||
|
return footer()
|
|
@ -131,6 +131,9 @@ button {margin-bottom:20px;background-color: #fff; height: 48px; width:100%; bor
|
||||||
#footerbottom div.container {margin:auto;background-color:#0087A8;height:250px;width:960px;}
|
#footerbottom div.container {margin:auto;background-color:#0087A8;height:250px;width:960px;}
|
||||||
.twitter-feed {width:460px;margin:20px;}
|
.twitter-feed {width:460px;margin:20px;}
|
||||||
|
|
||||||
|
.social-chat {width:100%;height:480px;position:relative;}
|
||||||
|
.social-chat .contain{left:0px;right:0px;height:480px;position:absolue;margin:20px;}
|
||||||
|
.social-chat iframe{display:block;border:0px;width:100%;height:100%;}
|
||||||
|
|
||||||
.social {z-index:1;position:absolute;right:0px;top:0px;margin-top:25px;}
|
.social {z-index:1;position:absolute;right:0px;top:0px;margin-top:25px;}
|
||||||
.social div{float:left;margin-left:20px;}
|
.social div{float:left;margin-left:20px;}
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
from scaffold.core.widget import base_widget
|
||||||
|
|
||||||
|
class control(base_widget):
|
||||||
|
|
||||||
|
def create(self, calendar):
|
||||||
|
self.calendar = calendar
|
||||||
|
return self
|
||||||
|
|
||||||
|
def render(self):
|
||||||
|
self.count += 1
|
||||||
|
return """<iframe src="https://www.google.com/calendar/embed?src=%s%%40group.calendar.google.com&ctz=Europe/London" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>""" % self.calendar
|
|
@ -0,0 +1,11 @@
|
||||||
|
from scaffold.core.widget import base_widget
|
||||||
|
|
||||||
|
class control(base_widget):
|
||||||
|
|
||||||
|
def create(self, channel):
|
||||||
|
self.channel = channel
|
||||||
|
return self
|
||||||
|
|
||||||
|
def render(self):
|
||||||
|
self.count += 1
|
||||||
|
return """<div class="social-chat"><div class="contain"><iframe src="http://webchat.freenode.net?channels=%%23%s&uio=MTE9MjU207"></iframe></div></div>""" % self.channel
|
Loading…
Reference in New Issue