Skip to content

Commit

Permalink
Merge branch 'master' into remove_place_query
Browse files Browse the repository at this point in the history
  • Loading branch information
gmechali authored Dec 9, 2024
2 parents ddf2b3b + 480a56e commit a6331b8
Show file tree
Hide file tree
Showing 48 changed files with 52,168 additions and 661 deletions.
1 change: 1 addition & 0 deletions server/routes/dev_place/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ def chart_config_to_overview_charts(chart_config, child_place_type: str):
# Maps each parent place type to a list of valid child place types.
# This hierarchy defines how places are related in terms of containment.
PLACE_TYPES_TO_CHILD_PLACE_TYPES = {
"Continent": ["Country"],
"GeoRegion": ["Country", "City"],
"Country": [
"State", "EurostatNUTS1", "EurostatNUTS2", "AdministrativeArea1"
Expand Down
2 changes: 1 addition & 1 deletion server/routes/place/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from flask import current_app
from flask import g
from flask_babel import gettext
from multidict import MultiDict
from werkzeug.datastructures import MultiDict

from server.lib.cache import cache
from server.lib.config import GLOBAL_CONFIG_BUCKET
Expand Down
9 changes: 6 additions & 3 deletions server/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

Optional variables:

is_show_header_search_bar: boolean, if true, a search bar will appear in the header. Default false.
is_hide_header_search_bar: boolean, if true, the header will not contain a search bar. Default false.
is_hide_full_footer: boolean, if true, hides the full expanded footer. Default false
is_hide_sub_footer: boolean, if true, hides the sub footer. Default false
locale: string, value for html lang attr
Expand Down Expand Up @@ -108,7 +108,7 @@
</script>
</head>

<body {% if not is_show_header_search_bar %}class="no-header-search-bar"{% endif %}>
<body {% if is_hide_header_search_bar %}class="no-header-search-bar"{% endif %}>

<div id="metadata-base" class="d-none"
data-header="{{ HEADER_MENU_V2 }}"
Expand All @@ -118,7 +118,9 @@
data-name="{{ NAME }}"
data-show-disaster="{{ SHOW_DISASTER }}"
data-show-sustainability="{{ SHOW_SUSTAINABILITY }}"
data-show-header-search-bar="{{ is_show_header_search_bar }}"
data-hide-header-search-bar="{{ is_hide_header_search_bar }}"
data-ga-value-search-source="{{ ga_value_search_source }}"
data-search-bar-hash-mode="{{ is_search_bar_hash_mode }}"
data-hide-full-footer="{{ is_hide_full_footer }}"
data-hide-sub-footer="{{ is_hide_sub_footer }}"
data-subfooter-extra="{{ subfooter_extra_content|safe }}"
Expand All @@ -129,6 +131,7 @@
{% include 'metadata/labels.html' %}
{% include 'metadata/routes.html' %}

<script src={{url_for('static', filename='queryStore.js', t=config['VERSION'])}} async></script>
<script src={{url_for('static', filename='base.js', t=config['VERSION'])}} async></script>

<div id="main">
Expand Down
1 change: 1 addition & 0 deletions server/templates/custom_dc/custom/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
{% if OVERRIDE_CSS_PATH %}
<link href="{{ OVERRIDE_CSS_PATH }}" rel="stylesheet">
{% endif %}
<script src={{url_for('static', filename='queryStore.js', t=config['VERSION'])}} async></script>
</head>

<body>
Expand Down
1 change: 1 addition & 0 deletions server/templates/custom_dc/feedingamerica/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
{% block head %}
{% endblock %}
<link href="/custom_dc/feedingamerica/css/overrides.css" rel="stylesheet">
<script src={{url_for('static', filename='queryStore.js', t=config['VERSION'])}} async></script>
</head>

<body id="dc-fa">
Expand Down
1 change: 1 addition & 0 deletions server/templates/custom_dc/floret/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
globalThis.isCustomDC = {{ config['CUSTOM']|int }};
globalThis.STAT_VAR_HIERARCHY_CONFIG = {{ config['STAT_VAR_HIERARCHY_CONFIG'] | tojson }};
</script>
<script src={{url_for('static', filename='queryStore.js', t=config['VERSION'])}} async></script>
</head>

<body>
Expand Down
1 change: 1 addition & 0 deletions server/templates/custom_dc/iitm/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
{% block head %}
{% endblock %}
<link href="/custom_dc/iitm/style.css" rel="stylesheet">
<script src={{url_for('static', filename='queryStore.js', t=config['VERSION'])}} async></script>
</head>

<body id="iitm-india">
Expand Down
1 change: 1 addition & 0 deletions server/templates/custom_dc/stanford/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
{% if OVERRIDE_CSS_PATH %}
<link href="{{ OVERRIDE_CSS_PATH }}" rel="stylesheet">
{% endif %}
<script src={{url_for('static', filename='queryStore.js', t=config['VERSION'])}} async></script>
</head>

<body>
Expand Down
1 change: 1 addition & 0 deletions server/templates/custom_dc/unsdg/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
<script>
globalThis.STAT_VAR_HIERARCHY_CONFIG = {{ config['STAT_VAR_HIERARCHY_CONFIG'] | tojson }};
</script>
<script src={{url_for('static', filename='queryStore.js', t=config['VERSION'])}} async></script>
</head>

<body id="dc-unsdg">
Expand Down
2 changes: 2 additions & 0 deletions server/templates/explore.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#}
{%- extends BASE_HTML -%}

{% set is_search_bar_hash_mode = true %}
{% set ga_value_search_source = 'explore' %}
{% set is_hide_full_footer = true %}
{% set main_id = 'explore' %}
{% set page_id = 'explore-page' %}
Expand Down
2 changes: 1 addition & 1 deletion server/templates/explore_landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{% set main_id = 'explore-landing' %}
{% set page_id = 'explore-landing-page' %}
{% set title = 'Explore ' + topic | title %}
{% set is_show_header_search_bar = true %}
{% set is_hide_header_search_bar = true %}

{% block head %}
<link rel="stylesheet" href={{url_for('static', filename='css/explore_landing.min.css', t=config['VERSION'])}} >
Expand Down
4 changes: 2 additions & 2 deletions server/templates/place.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ <h3 id="place-type" data-pt="{{ place_type }}">{{ place_type_with_parent_places_
<h3 id="locale" data-lc="{{ locale }}"></h3>
<div id="place-highlight"></div>
</div>
<div id="place-change-ui">
<div id="place-search-container"></div>
<div class="dcid-and-knowledge-graph">
dcid:&nbsp;<a href="/browser/{{ place_dcid }}">{{ place_dcid }}</a>
</div>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion server/templates/static/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
{% set main_id = 'about' %}
{% set page_id = 'page-about' %}
{% set title = 'About Us' %}
{% set is_show_header_search_bar = true %}

{% block head %}
<link rel="stylesheet" href={{url_for('static', filename='css/about.min.css', t=config['VERSION'])}}>
Expand Down
2 changes: 0 additions & 2 deletions server/templates/static/build.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@
See the License for the specific language governing permissions and
limitations under the License.
#}

{%- extends BASE_HTML -%}

{% set main_id = 'build' %}
{% set page_id = 'page-build' %}
{% set title = 'Build your own Data Commons' %}
{% set is_show_header_search_bar = true %}

{% block head %}
<link rel="stylesheet" href={{url_for('static', filename='css/build.min.css', t=config['VERSION'])}}>
Expand Down
Loading

0 comments on commit a6331b8

Please sign in to comment.