Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document in attic should include disclaimer #1266

Open
guusdk opened this issue Jan 20, 2023 · 2 comments · May be fixed by xsf/xep-attic#4
Open

Document in attic should include disclaimer #1266

guusdk opened this issue Jan 20, 2023 · 2 comments · May be fixed by xsf/xep-attic#4

Comments

@guusdk
Copy link
Contributor

guusdk commented Jan 20, 2023

When content from the attic is looked at, it should be immediately clear that the content is archived, ideally with a reference to the non-archived equivalent.

This could, for example, be achieved by including a disclaimer.

@guusdk
Copy link
Contributor Author

guusdk commented Jan 20, 2023

As a basic approach, I would suggest to use the webserver's capability to rewrite content on the fly, to replace the <body> tag with content that adds a simple HTML banner (and restores the body tag), like this:

<body>
<div style="padding: 2em; text-align: center; background: #ffeb3b; color: black; font-size: 1.5em;">
  <h1>This is an older version of this file!</h1>
  <p>Beware: the content that is displayed here is an archived version, that has been updated. The updated document 
  <a href="#" onclick="window.location=window.location.protocol + '//' + window.location.host + '/extensions/xep-' + window.location.pathname.split('/').pop().match(/\d{4}/)[0] + '.html'; return false">can be found here</a>.</p>
</div>

@guusdk
Copy link
Contributor Author

guusdk commented Jan 24, 2023

I had never seen a similar banner on preview.xmpp.net.

Here's the solution above, modified to use the same style:

<body>
<div style="position: fixed;top: 0;background-color: #ff8f2c;width: 100%;height: 3.5rem; padding: 1rem;margin-bottom: 9em;opacity: 0.9;margin: 0;left: 0;"><strong>Beware: the content that is displayed here is an archived version of the document, that has been updated.</strong><br>
   The updated document <a href="#" onclick="window.location=window.location.protocol + '//' + window.location.host + '/extensions/xep-' + window.location.pathname.split('/').pop().match(/\d{4}/)[0] + '.html'; return false">can be found here</a>.
</div>

@cal0pteryx cal0pteryx linked a pull request Apr 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant