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

Use ic-scroll-to-target where applicable

This commit is contained in:
Jason McBrayer 2018-09-15 16:40:16 -04:00
parent a289ef37e5
commit a2efc3fe08
3 changed files with 13 additions and 4 deletions

View File

@ -11,7 +11,6 @@ function setTitle(user, page)
function afterPage(user, page) function afterPage(user, page)
{ {
scrollTop();
setTitle(user,page); setTitle(user,page);
var menu = document.querySelector('#navMenu'); var menu = document.querySelector('#navMenu');
menu.classList.remove('is-active'); menu.classList.remove('is-active');

View File

@ -44,7 +44,8 @@
{% endif %} {% endif %}
</head> </head>
<body class="has-navbar-fixed-top" <body class="has-navbar-fixed-top"
ic-global-include='{"csrfmiddlewaretoken": "{{ csrf_token }}"}'> ic-global-include='{"csrfmiddlewaretoken": "{{ csrf_token }}"}'
ic-history-elt="true">
{% block navbar %} {% block navbar %}
<nav class="navbar is-fixed-top" role="navigation" <nav class="navbar is-fixed-top" role="navigation"
aria-label="main navigation"> aria-label="main navigation">
@ -52,6 +53,7 @@
<a class="navbar-item" href="{% url "home" %}" <a class="navbar-item" href="{% url "home" %}"
ic-get-from="{% url "home" %}" ic-get-from="{% url "home" %}"
ic-target="#main" ic-target="#main"
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-success="afterPage('{{ own_acct.username }}', 'Home');"
@ -74,6 +76,7 @@
<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-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-success="afterPage('{{ own_acct.username }}', 'Home');"
@ -84,6 +87,7 @@
<a class="navbar-item" href="{% url "note" %}" <a class="navbar-item" href="{% url "note" %}"
ic-get-from="{% url "note" %}" ic-get-from="{% url "note" %}"
ic-target="#main" ic-target="#main"
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 }}', 'Notifications');" ic-on-success="afterPage('{{ own_acct.username }}', 'Notifications');"
@ -94,6 +98,7 @@
<a class="navbar-item" href="{% url "local" %}" <a class="navbar-item" href="{% url "local" %}"
ic-get-from="{% url "local" %}" ic-get-from="{% url "local" %}"
ic-target="#main" ic-target="#main"
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 }}', 'Local timeline');" ic-on-success="afterPage('{{ own_acct.username }}', 'Local timeline');"
@ -104,6 +109,7 @@
<a class="navbar-item" href="{% url "fed" %}" <a class="navbar-item" href="{% url "fed" %}"
ic-get-from="{% url "fed" %}" ic-get-from="{% url "fed" %}"
ic-target="#main" ic-target="#main"
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 }}', 'Federated timeline');" ic-on-success="afterPage('{{ own_acct.username }}', 'Federated timeline');"
@ -114,6 +120,7 @@
<a class="navbar-item" href="{% url "toot" %}" <a class="navbar-item" href="{% url "toot" %}"
ic-get-from="{% url "toot" %}" ic-get-from="{% url "toot" %}"
ic-target="#main" ic-target="#main"
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 }}', 'New toot');" ic-on-success="afterPage('{{ own_acct.username }}', 'New toot');"
@ -124,6 +131,7 @@
<a class="navbar-item" href="{% url "search" %}" <a class="navbar-item" href="{% url "search" %}"
ic-get-from="{% url "search" %}" ic-get-from="{% url "search" %}"
ic-target="#main" ic-target="#main"
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 }}', 'Search');" ic-on-success="afterPage('{{ own_acct.username }}', 'Search');"
@ -136,7 +144,8 @@
<a class="navbar-item" href="{% url "settings" %}" <a class="navbar-item" href="{% url "settings" %}"
ic-get-from="{% url "settings" %}" ic-get-from="{% url "settings" %}"
ic-target="#main" ic-target="#main"
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-success="afterPage('{{ own_acct.username }}', 'Settings');"
ic-indicator="#page-load-indicator"> ic-indicator="#page-load-indicator">
@ -154,7 +163,7 @@
</nav> </nav>
{% endblock %} {% endblock %}
<div id="page-load-indicator">&nbsp</div> <div id="page-load-indicator">&nbsp</div>
<section id="main" class="section" ic-history-elt="true"> <section id="main" class="section">
<div class="container"> <div class="container">
{% block content %} {% block content %}
<h1 class="title"> <h1 class="title">

View File

@ -142,6 +142,7 @@
<a class="level-item" href="{% url "thread" toot.id %}" <a class="level-item" href="{% url "thread" toot.id %}"
ic-get-from="{% url "thread" toot.id %}" ic-get-from="{% url "thread" toot.id %}"
ic-target="#main" ic-target="#main"
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 }}', 'thread')" ic-on-success="afterPage('{{ own_acct.username }}', 'thread')"