Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/misc/iframe.html
- This file was added.
{% comment %} | |||||
Copyright (C) 2021 The Software Heritage developers | |||||
See the AUTHORS file at the top-level directory of this distribution | |||||
License: GNU Affero General Public License version 3, or any later version | |||||
See top-level LICENSE file for more information | |||||
{% endcomment %} | |||||
<!DOCTYPE html> | |||||
{% load static %} | |||||
{% load render_bundle from webpack_loader %} | |||||
{% load swh_templatetags %} | |||||
<html lang="en"> | |||||
<head> | |||||
<meta charset="utf-8"> | |||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |||||
<title>Software Heritage archived object</title> | |||||
<script src="{% url 'js_reverse' %}" type="text/javascript"></script> | |||||
{% render_bundle 'vendors' %} | |||||
{% render_bundle 'webapp' %} | |||||
{% render_bundle 'browse' %} | |||||
<script> | |||||
/* | |||||
@licstart The following is the entire license notice for the JavaScript code in this page. | |||||
Copyright (C) 2021 The Software Heritage developers | |||||
This program is free software: you can redistribute it and/or modify | |||||
it under the terms of the GNU Affero General Public License as | |||||
published by the Free Software Foundation, either version 3 of the | |||||
License, or (at your option) any later version. | |||||
This program is distributed in the hope that it will be useful, | |||||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
GNU Affero General Public License for more details. | |||||
You should have received a copy of the GNU Affero General Public License | |||||
along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
@licend The above is the entire license notice for the JavaScript code in this page. | |||||
*/ | |||||
</script> | |||||
<style> | |||||
.card { | |||||
border: none; | |||||
margin-bottom: 0 !important; | |||||
} | |||||
.card-header { | |||||
position: fixed; | |||||
top: 0; | |||||
left: 0; | |||||
width: 100%; | |||||
height: 80px; | |||||
border-bottom: 1px solid rgba(0, 0, 0, 0.125); | |||||
} | |||||
.breadcrumbs-container { | |||||
border-top: 1px solid rgba(0, 0, 0, 0.125); | |||||
border-bottom: 1px solid rgba(0, 0, 0, 0.125); | |||||
background: white; | |||||
margin-left: -20px; | |||||
margin-right: -20px; | |||||
margin-bottom: 5px; | |||||
} | |||||
.breadcrumbs-container ul { | |||||
padding-left: 25px; | |||||
} | |||||
.card-block { | |||||
margin-top: 78px; | |||||
overflow: auto; | |||||
} | |||||
.swh-content pre { | |||||
margin-top: 5px; | |||||
margin-bottom: 0; | |||||
padding: 0; | |||||
} | |||||
.swh-directory-table { | |||||
margin-top: 3px; | |||||
} | |||||
.bread-crumbs { | |||||
font-size: large; | |||||
} | |||||
.hljs-ln-numbers { | |||||
cursor: default !important; | |||||
} | |||||
#swh-identifiers { | |||||
top: 60px !important; | |||||
} | |||||
#swh-identifiers .card-body { | |||||
padding-top: 0; | |||||
padding-bottom: 0; | |||||
padding-left: 8px; | |||||
} | |||||
</style> | |||||
</head> | |||||
<body style="padding-bottom: 0;"> | |||||
<div class="wrapper" style="margin-left: 0;"> | |||||
<div class="content"> | |||||
<div class="container-fluid"> | |||||
{% include "includes/show-swhids.html" %} | |||||
<div class="card"> | |||||
<div class="card-header bg-gray-light"> | |||||
<div class="d-flex align-items-center"> | |||||
<a class="mr-auto" href="https://www.softwareheritage.org" | |||||
target="_blank" rel="noopener noreferrer"> | |||||
<div class="brand-text sitename"> | |||||
<img src="{% static 'img/swh-logo.svg' %}" style="height: 40px;"/> | |||||
<span class="first-word pl-1">Software</span> | |||||
<span class="second-word">Heritage</span> | |||||
</div> | |||||
</a> | |||||
<div class="d-none d-md-block"> | |||||
Navigating in | |||||
<img src="{% url 'swh-badge-swhid' swhid %}"> | |||||
</div> | |||||
<div class="ml-auto d-flex align-items-center"> | |||||
{% if swhid != focus_swhid %} | |||||
<a class="d-flex align-items-center pr-2" href="{% url 'swhid-iframe' focus_swhid %}" | |||||
title="Reset view to its original state"> | |||||
<div class="d-none d-lg-block">Reset view</div> | |||||
<i class="mdi mdi-refresh" aria-hidden="true"></i> | |||||
</a> | |||||
{% endif %} | |||||
<a class="d-none d-lg-block" href="{% url 'browse-swhid' swhid %}" | |||||
target="_blank" rel="noopener noreferrer"> | |||||
View in the archive | |||||
<i class="mdi mdi-open-in-new" aria-hidden="true"></i> | |||||
</a> | |||||
<a class="d-lg-none" href="{% url 'browse-swhid' swhid %}" | |||||
target="_blank" rel="noopener noreferrer" | |||||
title="Go to archive"> | |||||
<i class="mdi mdi-open-in-new" aria-hidden="true"></i> | |||||
</a> | |||||
</div> | |||||
</div> | |||||
<div class="d-flex align-items-center breadcrumbs-container mt-1"> | |||||
{% include "includes/breadcrumbs.html" %} | |||||
</div> | |||||
</div> | |||||
<div class="card-block"> | |||||
{% if error_code != 200 %} | |||||
{% include "includes/http-error.html" %} | |||||
{% elif object_type == "cnt" %} | |||||
{% include "includes/content-display.html" %} | |||||
{% elif object_type == "dir" %} | |||||
{% include "includes/directory-display.html" %} | |||||
{% endif %} | |||||
</div> | |||||
</div> | |||||
vlorentz: Why `display: none`? | |||||
Done Inline ActionsLibreJS does not require the link to be visible and I do not think it is relevant to show it for the iframe case. anlambert: LibreJS does not require the link to be visible and I do not think it is relevant to show it… | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<a href="{% url 'jslicenses' %}" rel="jslicense" style="display: none;"> | |||||
JavaScript license information | |||||
</a> | |||||
{% if object_type == "cnt" %} | |||||
<script> | |||||
setTimeout(function() { | |||||
{% if lines %} | |||||
swh.webapp.scrollToLine(swh.webapp.highlightLine({{ lines.0|jsonify }}), 100); | |||||
swh.webapp.highlightLines({{ lines.0|jsonify }}, {{ lines.1|jsonify }}); | |||||
{% endif %} | |||||
}, 500); | |||||
</script> | |||||
{% endif %} | |||||
</body> | |||||
</html> |
Why display: none?