Eclectic Media Git eclecticmedia.space / cdcffe7
Added an about us section - Uses markdown renderer for content/about-us.md to render about us section - Removes 'render_index', instead relying on the simple render Ariana Giroux 2 months ago
7 changed file(s) with 43 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
00 from flask import Flask
11
2 from utilities.renderer import render, render_index, render_markdown
2 from utilities.renderer import render, render_markdown
33
44 app = Flask(__name__)
55
66
77 @app.route('/', methods=['GET'])
88 def index():
9 return render_index()
9 return render('index.jinja',
10 context={'about_us':
11 render_markdown('content/about-us.md')}
12 )
1013
1114
1215 @app.route('/open-source-difference')
0 # About Us
1
2 We are a small team of independently organized freelancers, with Ariana Giroux
3 at the helm as our lead developer and organizer. With our flexible team
4 structure, we are able to find the best expert for your project. No matter the
5 technical challenge or end goal, we will find the best technology (*and matching
6 expert*) to fit!
7
8 We pride ourselves on using the best open source technology available on today's
9 market to enable faster development and more savings to you! Our pride for our
10 software lets us get closer to the core of what we do every day and allows for
11 more flexibility with your design.
12
13 With our team leader at the helm in Regina, Saskatchewan, we are spread
14 throughout western Canada with team members in Vancouver, Alberta, Saskatchewan, and Manitoba.
15 We are always eager to sit down for a coffee and
16 get into the nitty gritty of your dream site.
17
18
19 [Vanvouver, Alberta, Saskatchewan, and Manitoba]: /our-design-philosophy
139139 @import 'scss/_top.scss';
140140 @import 'scss/_middle.scss';
141141 @import 'scss/_bottom.scss';
142 @import 'scss/_about_us.scss';
142143 // @import 'scss/_top.scss';
143144 // @import 'scss/_bottom_25.scss';
144145 // @import 'scss/_wide_info.scss';
0 #AboutUs {
1 margin: 0; padding: 0;
2 margin-top: 4em;
3 animation-duration: 3s;
4 animation-delay: 1s;
5 }
0 <div id="AboutUs" class="row animated fadeIn">
1 <div class="col-3"></div>
2 <div class="col-6">
3 {{ body }}
4 </div>
5 <div class="col-3"></div>
6 </div>
1111 {%- endwith %}
1212 {%- with %}
1313 {%- include 'widgets/cards.jinja' with context %}
14 {%- endwith %}
15 {%- with %}
16 {%- set body=about_us %}
17 {%- include 'aboutus.jinja' with context %}
1418 {%- endwith %}
1519 {%- with %}
1620 {%- set demos=[
44 from markdown import markdown
55
66 renderer = Renderer(search_dirs='templates', file_extension='stache')
7
8
9 def render_index(**kwargs):
10 """ For jinja """
11 file_loader = FileSystemLoader('templates')
12 env = Environment(loader=file_loader)
13 template = env.get_template('index.jinja')
14
15 # Define data dictionaries
16 output = template.render(**kwargs)
17
18 return output
197
208
219 def render(path, context={}, **kwargs):