-
Notifications
You must be signed in to change notification settings - Fork 11
Frontend Templates
- Which files are still used?
- Are there some files we can clean up?
- Can we use a framework like bootstrap?
The base template is located at templates/page_template.html.
The Home Page is located at templates/homepage.html.
The stylesheets and JavaScript is loaded in lines 92-95.
The template value "js_css_packages" that is used in the jinja templates
is set in config_jinja.py:
line 21: import js_css_packages.templatetags
line 51: ... "js_css_packages": js_css_packages.templatetags, ...
import 'macros/user.html' as user
import 'macros/app.html' as app
What is this for on line 53?
{% if include_errorception and not hide_analytics -%} {%- endif %}
Line 60: block meta_page_title
Line 64: block meta_description
etc.
... More meta descriptions in blocks...
Lines 92-95: CSS
{{ js_css_packages.css_package("shared") }}
{% block pagecss %}{% endblock pagecss %}
{{ user.user_video_css(user_data) }}
{{ js_css_packages.js_package("shared") }}
Line 102: Block pagescript
Line 105: TODO (Clean Up)
Line 166: outer_wrapper
Line 193: page_container
Line 194: page_container_inner
Line 202-322: top_header
Line 323: block pagecontent (empty)
Line 331: block pagefooter
Line 335: block bottompagescript
###homepage.html
What does homepage.py have to do with homepage.html?
homepage.py renders the homepage.html template passing the
template values...
template_values = {
'rssblog': RSSBlog.get(0, 4),
'marquee_video': marquee_video,
'thumbnail_link_sets': thumbnail_link_sets,
'library_content': library_content,
'DVD_list': DVD_list,
'is_mobile_allowed': True,
'approx_vid_count': video_models.Video.approx_count(),
'link_heat': self.request_bool("heat", default=False),
'version_number': version_number,
'donate_redirect_url': donate_redirect_url
}
{% extends "page_template.html" %}
{% import 'macros/youtube.html' as youtube %}
{% import 'macros/analytics.html' as analytics %}
{% block pagetitle %}{% endblock pagetitle %}
Line 11: {% block pagecontent %}
Inside pagecontent for homepage.html lies
and inside that homepage-welcome-container with video and welcome text.
Line 139: if is_mobile? id="browse"
Does this mobile functionality work?
Line 168: {{library_content}} Where does this come from?
Line 177: endblock pagecontent Line 179-220: block pagescript
The homepage.html template extends the template for page_template.html