reuse admin styling for pubic index and add page
This commit is contained in:
parent
f0040580c8
commit
6a8f6992d8
|
@ -1,3 +1,4 @@
|
||||||
|
{% load admin_urls %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
@ -7,222 +8,8 @@
|
||||||
<title>Archived Sites</title>
|
<title>Archived Sites</title>
|
||||||
<meta charset="utf-8" name="viewport" content="width=device-width, initial-scale=1">
|
<meta charset="utf-8" name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
<style>
|
<link rel="stylesheet" href="{% static 'admin/css/base.css' %}">
|
||||||
:root {
|
<link rel="stylesheet" type="text/css" href="{% static 'admin.css' %}">
|
||||||
--bg-main: #efefef;
|
|
||||||
--accent-1: #aa1e55;
|
|
||||||
--accent-2: #ffebeb;
|
|
||||||
--accent-3: #efefef;
|
|
||||||
|
|
||||||
--text-1: #1c1c1c;
|
|
||||||
--text-2: #eaeaea;
|
|
||||||
--text-main: #1a1a1a;
|
|
||||||
--font-main: "Gill Sans", Helvetica, sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Dark Mode (WIP) */
|
|
||||||
/*
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
:root {
|
|
||||||
--accent-2: hsl(160, 100%, 96%);
|
|
||||||
|
|
||||||
--text-1: #eaeaea;
|
|
||||||
--text-2: #1a1a1a;
|
|
||||||
--bg-main: #101010;
|
|
||||||
}
|
|
||||||
|
|
||||||
#table-bookmarks_wrapper,
|
|
||||||
#table-bookmarks_wrapper img,
|
|
||||||
tbody td:nth-child(3),
|
|
||||||
tbody td:nth-child(3) span,
|
|
||||||
footer {
|
|
||||||
filter: invert(100%);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
html,
|
|
||||||
body {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 200;
|
|
||||||
text-align: center;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
font-family: var(--font-main);
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-top small {
|
|
||||||
font-weight: 200;
|
|
||||||
color: var(--accent-3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-top {
|
|
||||||
width: 100%;
|
|
||||||
height: auto;
|
|
||||||
min-height: 40px;
|
|
||||||
margin: 0px;
|
|
||||||
text-align: center;
|
|
||||||
color: white;
|
|
||||||
font-size: calc(11px + 0.84vw);
|
|
||||||
font-weight: 200;
|
|
||||||
padding: 4px 4px;
|
|
||||||
border-bottom: 3px solid var(--accent-1);
|
|
||||||
background-color: var(--accent-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=search] {
|
|
||||||
width: 22vw;
|
|
||||||
border-radius: 4px;
|
|
||||||
border: 1px solid #aeaeae;
|
|
||||||
padding: 3px 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav>div {
|
|
||||||
min-height: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-top a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: rgba(0, 0, 0, 0.6);
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-top a:hover {
|
|
||||||
text-decoration: none;
|
|
||||||
color: rgba(0, 0, 0, 0.9);
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-top .col-lg-4 {
|
|
||||||
text-align: center;
|
|
||||||
padding-top: 4px;
|
|
||||||
padding-bottom: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-archivebox img {
|
|
||||||
display: inline-block;
|
|
||||||
margin-right: 3px;
|
|
||||||
height: 30px;
|
|
||||||
margin-left: 12px;
|
|
||||||
margin-top: -4px;
|
|
||||||
margin-bottom: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-archivebox img:hover {
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
#table-bookmarks_length,
|
|
||||||
#table-bookmarks_filter {
|
|
||||||
padding-top: 12px;
|
|
||||||
opacity: 0.8;
|
|
||||||
padding-left: 24px;
|
|
||||||
padding-right: 22px;
|
|
||||||
margin-bottom: -16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
padding: 6px;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
table thead th {
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
table tr {
|
|
||||||
height: 35px;
|
|
||||||
}
|
|
||||||
|
|
||||||
tbody tr:nth-child(odd) {
|
|
||||||
background-color: var(--accent-2) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
table tr td {
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
/*padding-bottom: 0.4em;*/
|
|
||||||
/*padding-top: 0.4em;*/
|
|
||||||
padding-left: 2px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
table tr td a {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
table tr td img,
|
|
||||||
table tr td object {
|
|
||||||
display: inline-block;
|
|
||||||
margin: auto;
|
|
||||||
height: 24px;
|
|
||||||
width: 24px;
|
|
||||||
padding: 0px;
|
|
||||||
padding-right: 5px;
|
|
||||||
vertical-align: middle;
|
|
||||||
margin-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#table-bookmarks {
|
|
||||||
width: 100%;
|
|
||||||
overflow-y: scroll;
|
|
||||||
table-layout: fixed;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dataTables_wrapper {
|
|
||||||
background-color: #fafafa;
|
|
||||||
}
|
|
||||||
|
|
||||||
table tr a span[data-archived~=False] {
|
|
||||||
opacity: 0.4;
|
|
||||||
}
|
|
||||||
|
|
||||||
.files-spinner {
|
|
||||||
height: 15px;
|
|
||||||
width: auto;
|
|
||||||
opacity: 0.5;
|
|
||||||
vertical-align: -2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.in-progress {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
tr td a.favicon img {
|
|
||||||
padding-left: 6px;
|
|
||||||
padding-right: 12px;
|
|
||||||
vertical-align: -4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
tr td a.title {
|
|
||||||
font-size: 1.4em;
|
|
||||||
text-decoration: none;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
tr td a.title small {
|
|
||||||
background-color: var(--accent-3);
|
|
||||||
border-radius: 4px;
|
|
||||||
float: right
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=search]::-webkit-search-cancel-button {
|
|
||||||
-webkit-appearance: searchfield-cancel-button;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title-col {
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title-col a {
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
.exists-False {
|
|
||||||
opacity: 0.1;
|
|
||||||
filter: grayscale(100%);
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link rel="stylesheet" href="{% static 'bootstrap.min.css' %}">
|
<link rel="stylesheet" href="{% static 'bootstrap.min.css' %}">
|
||||||
<link rel="stylesheet" href="{% static 'jquery.dataTables.min.css' %}" />
|
<link rel="stylesheet" href="{% static 'jquery.dataTables.min.css' %}" />
|
||||||
{% block extra_head %}
|
{% block extra_head %}
|
||||||
|
@ -247,38 +34,49 @@
|
||||||
<base href="{% url 'Home' %}">
|
<base href="{% url 'Home' %}">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<div id="container">
|
||||||
<div class="header-top container-fluid">
|
<div id="header">
|
||||||
<div class="row nav">
|
<div id="branding">
|
||||||
<div class="col-sm-2">
|
<h1 id="site-name">
|
||||||
<a href="{% url 'public-index' %}" class="header-archivebox" title="Last updated: {{updated}}">
|
<a href="{% url 'public-index' %}" class="header-archivebox" title="Last updated: {{updated}}">
|
||||||
<img src="{% static 'archive.png' %}" alt="Logo" />
|
<img src="{% static 'archive.png' %}" alt="Logo" style="height: 30px"/>
|
||||||
ArchiveBox: Index
|
ArchiveBox
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</h1>
|
||||||
<div class="col-sm-10" style="text-align: right">
|
</div>
|
||||||
<a href="/add/">Add Links</a> |
|
<div id="user-tools">
|
||||||
<a href="/admin/core/snapshot/">Admin</a> |
|
<a href="/add/">➕ Add</a> /
|
||||||
<a href="https://github.com/ArchiveBox/ArchiveBox/wiki">Docs</a>
|
<a href="/">Snapshots</a> /
|
||||||
</div>
|
<a href="/admin/">Admin</a> /
|
||||||
|
<a href="https://github.com/ArchiveBox/ArchiveBox/wiki">Docs</a>
|
||||||
|
{% if user.is_authenticated %}
|
||||||
|
|
||||||
|
User
|
||||||
|
<strong>{% firstof user.get_short_name user.get_username %}</strong>
|
||||||
|
{% if user.has_usable_password %}
|
||||||
|
<a href="{% url 'admin:password_change' %}">Change password</a> /
|
||||||
|
{% endif %}
|
||||||
|
<a href="{% url 'admin:logout' %}">Log out</a>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
<div id="content" class="flex">
|
||||||
{% block body %}
|
{% block body %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<br>
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
<br />
|
<br />
|
||||||
<center>
|
<center>
|
||||||
<small>
|
<small>
|
||||||
Archive created using <a href="https://github.com/ArchiveBox/ArchiveBox" title="Github">ArchiveBox</a> version
|
Archive created using <a href="https://github.com/ArchiveBox/ArchiveBox" title="Github">ArchiveBox</a> version
|
||||||
<a href="https://github.com/ArchiveBox/ArchiveBox/releases" title="Releases">v{{VERSION}}</a>.
|
<a href="https://github.com/ArchiveBox/ArchiveBox/releases" title="Releases">v{{VERSION}}</a>.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
{{FOOTER_INFO}}
|
{{FOOTER_INFO}}
|
||||||
</small>
|
</small>
|
||||||
</center>
|
</center>
|
||||||
<br />
|
<br />
|
||||||
</footer>
|
</footer>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -2,13 +2,21 @@
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<br>
|
<div id="toolbar">
|
||||||
<form action="{% url 'public-index' %}" method="get">
|
<form id="changelist-search" action="{% url 'public-index' %}" method="get">
|
||||||
<input name="q" type="text" placeholder="Search...">
|
<div>
|
||||||
<button type="submit">Search</button>
|
<label for="searchbar"><img src="/static/admin/img/search.svg" alt="Search"></label>
|
||||||
<button onclick="location.href='{% url 'public-index' %}'" type="button">
|
<input type="text" size="40" name="q" value="" id="searchbar" autofocus placeholder="Title, URL, or content...".>
|
||||||
Reload Index</button>
|
<input type="submit" value="Search" style="height: 36px; padding-top: 6px; margin: 8px"/>
|
||||||
</form>
|
<input type="button"
|
||||||
|
value="♺"
|
||||||
|
title="Refresh..."
|
||||||
|
onclick="location.href='{% url 'public-index' %}'"
|
||||||
|
style="background-color: rgba(121, 174, 200, 0.8); height: 30px; font-size: 0.8em; margin-top: 12px; padding-top: 6px; float:right">
|
||||||
|
</input>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
<table id="table-bookmarks">
|
<table id="table-bookmarks">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -10,13 +10,29 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="archive/{{link.timestamp}}/{{link.canonical_outputs.wget_path}}" title="{{link.title}}">
|
<a href="archive/{{link.timestamp}}/{{link.canonical_outputs.wget_path}}" title="{{link.title}}">
|
||||||
<span data-title-for="{{link.url}}" data-archived="{{link.is_archived}}">{{link.title|default:'Loading...'}}</span>
|
<span data-title-for="{{link.url}}" data-archived="{{link.is_archived}}">{{link.title|default:'Loading...'}}</span>
|
||||||
<small style="float:right">{% if link.tags_str != None %} {{link.tags_str|default:''}} {% else %} {{ link.tags|default:'' }} {% endif %}</small>
|
<span class="tags" style="background-color: #79aec8">
|
||||||
|
<a href="#">
|
||||||
|
<span class="tag">
|
||||||
|
{% if link.tags_str != None %}
|
||||||
|
{{link.tags_str|default:''}}
|
||||||
|
{% else %}
|
||||||
|
{{ link.tags|default:'' }}
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="archive/{{link.timestamp}}/index.html">📄
|
<a href="archive/{{link.timestamp}}/index.html">📄
|
||||||
<span data-number-for="{{link.url}}" title="Fetching any missing files...">{% if link.icons %} {{link.icons}} {% else %} {{ link.num_outputs}} {% endif %}<img src="{% static 'spinner.gif' %}" class="files-spinner" decoding="async"/></span>
|
<span data-number-for="{{link.url}}" title="Fetching any missing files...">
|
||||||
|
{% if link.icons %}
|
||||||
|
{{link.icons}}
|
||||||
|
{% else %}
|
||||||
|
{{link.num_outputs}} <img src="{% static 'spinner.gif' %}" class="files-spinner" decoding="async"/>
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align:left"><a href="{{link.url}}">{{link.url}}</a></td>
|
<td style="text-align:left"><a href="{{link.url}}">{{link.url}}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
header {
|
||||||
|
font-family: "Roboto","Lucida Grande","DejaVu Sans","Bitstream Vera Sans",Verdana,Arial,sans-serif;
|
||||||
|
font-size: 13px;
|
||||||
|
color: white;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
.header-top {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
.dashboard #content {
|
.dashboard #content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-right: 0px;
|
margin-right: 0px;
|
||||||
|
@ -60,3 +70,21 @@ ul#id_depth {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
animation: spin 2s linear infinite;
|
animation: spin 2s linear infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
textarea, select {
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 2px solid #004882;
|
||||||
|
box-shadow: 4px 4px 4px rgba(0,0,0,0.02);
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
select option:not(:checked) {
|
||||||
|
border: 1px dashed rgba(10,200,20,0.12);
|
||||||
|
}
|
||||||
|
select option:checked {
|
||||||
|
border: 1px solid green;
|
||||||
|
background-color: green;
|
||||||
|
color: green;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue