diff --git a/app.py b/app.py index 15e00ce..8675443 100644 --- a/app.py +++ b/app.py @@ -1,15 +1,23 @@ from flask import Flask from flask.templating import render_template +from helper import * app = Flask(__name__) + @app.route("/") def index(): - return render_template("index.html") + return render_template( + "index.html", + recentArticle=getRecentArticle(), + recentDiscussion=getRecentDiscussion(), + ) + @app.route("/privacy") def privacypolicy(): return render_template("privacypolicy.html") + if __name__ == "__main__": - app.run(host='0.0.0.0') + app.run(host="0.0.0.0") diff --git a/helper.py b/helper.py new file mode 100644 index 0000000..80c2b6e --- /dev/null +++ b/helper.py @@ -0,0 +1,9 @@ +def getRecentArticle(): + # TODO fetch latest article + recent = {"title": "N/A", "link": "#"} + return recent + +def getRecentDiscussion(): + # TODO fetch latest discussion + recent = {"title": "N/A", "link": "#"} + return recent diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..6ad0e5e --- /dev/null +++ b/readme.md @@ -0,0 +1,11 @@ +# 智慧奥运 + +This is the repository for 智慧奥运 project. + +## Roadmap + +- [x] Main UI +- [ ] Chinese Content +- [ ] Article list +- [ ] Discussion board +- [ ] Multilingual support diff --git a/templates/base.html b/templates/base.html index 4eeb416..d04d132 100644 --- a/templates/base.html +++ b/templates/base.html @@ -18,18 +18,31 @@

关于

- Add some information about the album below, the author, or any - other background context. Make it a few sentences long so folks - can pick up some informative tidbits. Then, link them off to - some social networking sites or contact information. + Ipsum rerum recusandae animi explicabo omnis asperiores ex Est + recusandae maiores modi harum quo? Nihil rem consequatur nemo + asperiores repellat Laboriosam nostrum inventore explicabo + doloribus molestias! Veniam quia tempora praesentium Elit + laudantium nam explicabo maxime officiis? Doloribus facere + architecto explicabo in optio Provident saepe dicta deleniti + necessitatibus commodi Iure velit voluptate eum et ipsum? Enim + at unde ad iusto architecto Lorem veritatis dolore + exercitationem inventore eos Consectetur velit repellendus omnis + commodi maxime. Laborum ipsa eius numquam perferendis repellat + delectus? Inventore quos aut pariatur sed eaque iure. + Repudiandae distinctio soluta suscipit.

-

联系我们

+

联系方式

+

更多链接

+
diff --git a/templates/index.html b/templates/index.html index 172e52f..f875894 100644 --- a/templates/index.html +++ b/templates/index.html @@ -13,30 +13,46 @@
-
+
-

文章列表

+

奥运文化

- Swap the background-color utility and add a `.text-*` color utility - to mix up the jumbotron look. Then, mix and match with additional - component themes and more. + Sports Culture即体育文化, + 该公众号主要是为大学生提供一个有关体育文化的有趣的中英文知识学习及互动平台, + 让大家在了解体育知识与文化的同时学习到英语知识。

+
+ + 最新文章: + {{ recentArticle['title'] }} + +
-
+
-

讨论区

+

奥运交流

Or, keep it light and add a border for some added definition to the boundaries of your content. Be sure to look under the hood at the source HTML here as we've adjusted the alignment and sizing of both column's content for equal-height.

+
+ + 最新讨论: + {{ recentDiscussion['title'] }} + +