1
0
mirror of https://gitlab.com/brutaldon/brutaldon.git synced 2024-12-04 14:46:24 -05:00

Restrict scope of scroll-position-saving

This commit is contained in:
Jason McBrayer 2018-09-18 06:13:13 -04:00
parent 075b8f67fe
commit 98afb6cde2
2 changed files with 95 additions and 87 deletions

View File

@ -40,8 +40,7 @@
{% endif %} {% endif %}
</head> </head>
<body class="has-navbar-fixed-top" ic-history-elt="true" <body class="has-navbar-fixed-top" ic-history-elt="true"
ic-global-include='{"csrfmiddlewaretoken": "{{ csrf_token }}"}' ic-global-include='{"csrfmiddlewaretoken": "{{ csrf_token }}"}'>
ic-on-beforeSend="savePlace()">
<div id="page-load-indicator">&nbsp</div> <div id="page-load-indicator">&nbsp</div>
{% block navbar %} {% block navbar %}
<nav class="navbar is-fixed-top" role="navigation" <nav class="navbar is-fixed-top" role="navigation"
@ -53,99 +52,107 @@
ic-scroll-to-target="true" ic-scroll-to-target="true"
ic-select-from-response="#main" ic-select-from-response="#main"
ic-push-url="true" ic-push-url="true"
ic-on-beforeSend="savePlace"
ic-on-success="afterPage('{{ own_acct.username }}', 'Home');" ic-on-success="afterPage('{{ own_acct.username }}', 'Home');"
ic-indicator="#page-load-indicator"> ic-indicator="#page-load-indicator">
{% if own_acct %} {% if own_acct %}
<img src="{{ own_acct.avatar_static }}" <img src="{{ own_acct.avatar_static }}"
class="image is-32x32 avatar" class="image is-32x32 avatar"
alt="Brutaldon ('{{ own_acct.username }}')"> alt="Brutaldon ('{{ own_acct.username }}')">
{% else %} {% else %}
<img src="{% static "images/brutaldon.png" %}" <img src="{% static "images/brutaldon.png" %}"
class="image is-32x32" alt="Brutaldon"> class="image is-32x32" alt="Brutaldon">
{% endif %} {% endif %}
</a> </a>
</div> </div>
{% if request.session.instance %} {% if request.session.instance %}
{% if request.session.username or request.session.access_token %} {% if request.session.username or request.session.access_token %}
<div class="navbar-menu is-active" id="navMenu"> <div class="navbar-menu is-active" id="navMenu">
<!-- navbar start, navbar end --> <!-- navbar start, navbar end -->
<div class="navbar-start"> <div class="navbar-start">
<a href="{% url "home" %}" class="navbar-item" <a href="{% url "home" %}" class="navbar-item"
ic-get-from="{% url "home" %}" ic-get-from="{% url "home" %}"
ic-target="#main" ic-target="#main"
ic-scroll-to-target="true" ic-scroll-to-target="true"
ic-select-from-response="#main" ic-select-from-response="#main"
ic-push-url="true" ic-push-url="true"
ic-on-success="afterPage('{{ own_acct.username }}', 'Home');" ic-on-beforeSend="savePlace"
ic-indicator="#page-load-indicator"> ic-on-success="afterPage('{{ own_acct.username }}', 'Home');"
<span class="fa fa-home"></span> ic-indicator="#page-load-indicator">
<span>&nbsp; Home</span> <span class="fa fa-home"></span>
</a> <span>&nbsp; Home</span>
<a class="navbar-item" href="{% url "note" %}" </a>
ic-get-from="{% url "note" %}" <a class="navbar-item" href="{% url "note" %}"
ic-target="#main" ic-get-from="{% url "note" %}"
ic-scroll-to-target="true" ic-target="#main"
ic-select-from-response="#main" ic-scroll-to-target="true"
ic-push-url="true" ic-select-from-response="#main"
ic-on-success="afterPage('{{ own_acct.username }}', 'Notifications');" ic-push-url="true"
ic-indicator="#page-load-indicator"> ic-on-beforeSend="savePlace"
<span class="fa fa-bell-o"></span> ic-on-success="afterPage('{{ own_acct.username }}', 'Notifications');"
<span >&nbsp; Notifications</span> ic-indicator="#page-load-indicator">
</a> <span class="fa fa-bell-o"></span>
<a class="navbar-item" href="{% url "local" %}" <span >&nbsp; Notifications</span>
ic-get-from="{% url "local" %}" </a>
ic-target="#main" <a class="navbar-item" href="{% url "local" %}"
ic-scroll-to-target="true" ic-get-from="{% url "local" %}"
ic-select-from-response="#main" ic-target="#main"
ic-push-url="true" ic-scroll-to-target="true"
ic-on-success="afterPage('{{ own_acct.username }}', 'Local timeline');" ic-select-from-response="#main"
ic-indicator="#page-load-indicator"> ic-push-url="true"
<span class="fa fa-community"></span> ic-on-beforeSend="savePlace"
<span >&nbsp; Local</span> ic-on-success="afterPage('{{ own_acct.username }}', 'Local timeline');"
</a> ic-indicator="#page-load-indicator">
<a class="navbar-item" href="{% url "fed" %}" <span class="fa fa-community"></span>
ic-get-from="{% url "fed" %}" <span >&nbsp; Local</span>
ic-target="#main" </a>
ic-scroll-to-target="true" <a class="navbar-item" href="{% url "fed" %}"
ic-select-from-response="#main" ic-get-from="{% url "fed" %}"
ic-push-url="true" ic-target="#main"
ic-on-success="afterPage('{{ own_acct.username }}', 'Federated timeline');" ic-scroll-to-target="true"
ic-indicator="#page-load-indicator"> ic-select-from-response="#main"
<span class="fa fa-globe"></span> ic-push-url="true"
<span >&nbsp;Federated</span> ic-on-beforeSend="savePlace"
</a> ic-on-success="afterPage('{{ own_acct.username }}', 'Federated timeline');"
<a class="navbar-item" href="{% url "toot" %}" ic-indicator="#page-load-indicator">
ic-get-from="{% url "toot" %}" <span class="fa fa-globe"></span>
ic-target="#main" <span >&nbsp;Federated</span>
ic-scroll-to-target="true" </a>
ic-select-from-response="#main" <a class="navbar-item" href="{% url "toot" %}"
ic-push-url="true" ic-get-from="{% url "toot" %}"
ic-on-success="afterPage('{{ own_acct.username }}', 'New toot');" ic-target="#main"
ic-indicator="#page-load-indicator"> ic-scroll-to-target="true"
<span class="fa fa-edit"> </span> ic-select-from-response="#main"
<span >&nbsp; New Toot</span> ic-push-url="true"
</a> ic-on-beforeSend="savePlace"
<a class="navbar-item" href="{% url "search" %}" ic-on-success="afterPage('{{ own_acct.username }}', 'New toot');"
ic-get-from="{% url "search" %}" ic-indicator="#page-load-indicator">
ic-target="#main" <span class="fa fa-edit"> </span>
ic-scroll-to-target="true" <span >&nbsp; New Toot</span>
ic-select-from-response="#main" </a>
ic-push-url="true" <a class="navbar-item" href="{% url "search" %}"
ic-on-success="afterPage('{{ own_acct.username }}', 'Search');" ic-get-from="{% url "search" %}"
ic-indicator="#page-load-indicator"> ic-target="#main"
<span class="fa fa-search"> </span> ic-scroll-to-target="true"
<span >&nbsp; Search</span> ic-select-from-response="#main"
</a> ic-push-url="true"
</div> ic-on-beforeSend="savePlace"
<div class="navbar-end" > ic-on-success="afterPage('{{ own_acct.username }}', 'Search');"
<a class="navbar-item" href="{% url "settings" %}" ic-indicator="#page-load-indicator">
ic-get-from="{% url "settings" %}" <span class="fa fa-search"> </span>
ic-target="#main" <span >&nbsp; Search</span>
</a>
</div>
<div class="navbar-end" >
<a class="navbar-item" href="{% url "settings" %}"
ic-get-from="{% url "settings" %}"
ic-target="#main"
ic-scroll-to-target="true" ic-select-from-response="#main" ic-scroll-to-target="true" ic-select-from-response="#main"
ic-push-url="true" ic-push-url="true"
ic-on-success="afterPage('{{ own_acct.username }}', 'Settings');" ic-on-beforeSend="savePlace"
ic-indicator="#page-load-indicator"> ic-on-success="afterPage('{{ own_acct.username }}', 'Settings');"
ic-indicator="#page-load-indicator">
<span class="fa fa-gear"></span> <span class="fa fa-gear"></span>
<span >&nbsp;Settings</span> <span >&nbsp;Settings</span>
</a> </a>

View File

@ -146,7 +146,8 @@
ic-select-from-response="#main" ic-select-from-response="#main"
ic-push-url="true" ic-push-url="true"
ic-on-success="afterPage('{{ own_acct.username }}', 'thread')" ic-on-success="afterPage('{{ own_acct.username }}', 'thread')"
ic-indicator="#page-load-indicator""> ic-indicator="#page-load-indicator"
ic-on-beforeSend="savePlace">
thread thread
</a> </a>
</div> </div>