Skip to content

Commit

Permalink
Rename _base.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Yangguang Li committed Jun 28, 2019
1 parent b5e37a3 commit 178e4b6
Show file tree
Hide file tree
Showing 20 changed files with 19 additions and 18 deletions.
3 changes: 2 additions & 1 deletion developer-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Front end codes exist in two parts: main site (including admin) and http2push.
All the pages are rendered in a combination of Django template (`/templates`) and front-end components (`/static/elements`).

1. `/templates/base.html` and `/templates/base_embed.html` are the html skeleton.
1. Templates in `/templates` (extend the `base.html` or `embed_base.html`) are the Django templates for each page.
1. Templates in `/templates` (extend the `_base.html` or `_embed_base.html`) are the Django templates for each page.
- The folder organization and template file names matches the router. (See `template_path=os.path.join(path + '.html')` in `server.py`)
- lit-element components, css, js files are all imported/included in those templates.
- We pass backend variables to js like this: `const variableInJs = {{variable_in_template|safe}}`.
1. All lit-element components are in `/static/elements`.
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion templates/admin/blink.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "_base.html" %}
{% load verbatim %}
{% load inline_file %}

Expand Down
2 changes: 1 addition & 1 deletion templates/admin/features/edit.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "_base.html" %}

{% block preload %}
<script type="module" src="/static/elements/admin-imports.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/features/launch.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "_base.html" %}
{% load inline_file %}

{% block preload %}
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/features/new.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "_base.html" %}

{% block preload %}
<script type="module" src="/static/elements/admin-imports.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/notifications/list.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "_base.html" %}

{% load inline_file %}

Expand Down
2 changes: 1 addition & 1 deletion templates/admin/subscribers.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "_base.html" %}
{% load verbatim %}
{% load inline_file %}

Expand Down
2 changes: 1 addition & 1 deletion templates/admin/users/new.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "_base.html" %}

{% block css %}
<!-- <link rel="stylesheet" href="/static/css/users/users.css"> -->
Expand Down
2 changes: 1 addition & 1 deletion templates/feature.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends embed|yesno:"base_embed.html,base.html" %}
{% extends embed|yesno:"_base_embed.html,_base.html" %}
{% load inline_file %}

{% block page_title %}{% if feature.name %}{{ feature.name }} - {% endif %}{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion templates/features.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "_base.html" %}

{% load inline_file %}
{% load cache %}
Expand Down
2 changes: 1 addition & 1 deletion templates/metrics/css/animated.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "_base.html" %}
{% load inline_file %}

{% block css %}
Expand Down
2 changes: 1 addition & 1 deletion templates/metrics/css/popularity.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "_base.html" %}
{% load inline_file %}

{% block css %}
Expand Down
2 changes: 1 addition & 1 deletion templates/metrics/css/timeline/animated.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "_base.html" %}
{% load inline_file %}

{% block css %}
Expand Down
2 changes: 1 addition & 1 deletion templates/metrics/css/timeline/popularity.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "_base.html" %}
{% load inline_file %}

{% block css %}
Expand Down
2 changes: 1 addition & 1 deletion templates/metrics/feature/popularity.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "_base.html" %}
{% load inline_file %}

{% block css %}
Expand Down
2 changes: 1 addition & 1 deletion templates/metrics/feature/timeline/popularity.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "_base.html" %}
{% load inline_file %}

{% block css %}
Expand Down
2 changes: 1 addition & 1 deletion templates/samples.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "_base.html" %}
{% load verbatim %}
{% load inline_file %}

Expand Down
2 changes: 1 addition & 1 deletion templates/schedule.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "_base.html" %}
{% load verbatim %}
{% load inline_file %}

Expand Down

0 comments on commit 178e4b6

Please sign in to comment.