#146 Add a message for noscript users
Closed 2 years ago by darknao. Opened 3 years ago by misc.
fedora-web/ misc/websites add_noscript  into  master

Add a message for noscript users
Michael Scherer • 2 years ago  
@@ -23,6 +23,7 @@ 

  

  {% block js %}

  {% assets "js_all" %}

+ <noscript>{% trans %}Please enable Javascript if you have trouble seeing part of the website. All our code is under a free license and is available on{% endtrans %}<a href="https://pagure.io/fedora-web/websites.git">{% trans %}our forge{% endtrans %}</a>.</noscript> 

  <script type="text/javascript" src="{{ ASSET_URL }}"></script>

  {% endassets %}

  {% endblock %}

So I am using noscript, and going on https://getfedora.org/coreos/download, it do not display anything useful. I figured some messages could help to remind people that the website need JS.

I didn't test how it render everything, so maybe it should go somewhere else.

This would need to be wrapped properly in {% trans %} blocks (see other templates for examples of how to do this properly with links).

Also, only the coreos page(s) should require JS (and that team manages/controls those pages themselves), so we might only want this warning on those pages.

rebased onto fb96033

2 years ago

From a quick look at the current getfedora prage, we also have some JS code there. However, it seems to be loaded at the end of the HTML code, so I am not sure why.

And I think it is better to show the warning in all cases rather than just where we know this is broken. The fact that no one reported before me kinda imply that nobody tested before, and so others pages might be broken as well.

Prefer something like this, which pulls the link out in a way that makes the translation not lose context:

<noscript>
  {% trans trimmed url="https://pagure.io/fedora-web/websites" %}
  Please enable Javascript if you have trouble seeing part of the website. All
  our code is under a free license and is available on
  <a href="{{ url }}">our forge</a>.
  {% endtrans %}
</noscript>

rebased onto aa75a36

2 years ago

rebased onto ffafbac

2 years ago

Metadata Update from @darknao:
- Request assigned

2 years ago

Pull-Request has been closed by darknao

2 years ago