Skip to content

Commit 2ad7eae

Browse files
committed
Update docs
- Add thorough Vue theming instructions - Update frameless replay banner info
1 parent ca6587c commit 2ad7eae

File tree

7 files changed

+45
-68
lines changed

7 files changed

+45
-68
lines changed

docs/manual/configuring.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,19 @@ With **framed replay**, the archived content is loaded into an iframe, and a top
1616
In this mode, the top frame url is for example, ``http://my-archive.example.com/<coll name>/http://example.com/`` while
1717
the actual content is served at ``http://my-archive.example.com/<coll name>/mp_/http://example.com/``
1818

19+
With **frameless replay**, the archived content is loaded directly. As of pywb 2.7, frameless replay is bannerless
20+
unless a custom banner is added via the ``custom_banner.html`` template.
21+
22+
23+
.. warning::
24+
pywb 2.7 introduces a breaking change around frameless replay and banners.
25+
Any custom banner intended to be used with frameless replay in pywb 2.7 and
26+
higher must be specified in the ``custom_banner.html`` template. This may
27+
require moving custom content from ``banner.html`` to the new
28+
``custom_banner.html``.
29+
30+
The default banner will no longer be served in frameless replay.
1931

20-
With **frameless replay**, the archived content is loaded directly, and a banner UI is injected into the page.
2132

2233
In this mode, the content is served directly at ``http://my-archive.example.com/<coll name>/http://example.com/``
2334

docs/manual/images/vue-banner.png

-726 KB
Loading

docs/manual/images/vue-cal.png

-1.5 MB
Loading

docs/manual/template-guide.rst

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,7 @@ File: ``query.html``
148148

149149
This template is rendered for any URL search response pages, either a single URL or more complex queries.
150150

151-
For example, the page ``http://localhost:8080/my-collection/*/https://example.com/`` will be rendered using this template.
152-
153-
The default template supports the standard pywb table view, as well as a conditional new vue-based UI. (See :ref:`new-vue-ui` for more info on the new UI)
151+
For example, the page ``http://localhost:8080/my-collection/*/https://example.com/`` will be rendered using this template, with functionality provided by a Vue application.
154152

155153
Template variables:
156154

@@ -176,8 +174,7 @@ File: ``banner.html``
176174

177175
This template is used to render the banner and is used both in framed replay and frameless replay.
178176

179-
In framed replay, the template is only rendered in the top/outer frame, while in frameless replay,
180-
it is added to every page.
177+
In framed replay, the template is only rendered in the top/outer frame, while in frameless replay, it is added to every page.
181178

182179
Template variables:
183180

@@ -195,14 +192,7 @@ Template variables:
195192

196193
* ``{{ ui }}`` - an optional ``ui`` dictionary from ``config.yaml``, if any.
197194

198-
199-
The default banner creates all UI dynamically via JS. However, a custom banner could also insert HTML to render the banner directly.
200-
201-
By default, the banner checks the ``{{ ui.vue_timeline_banner }}`` and renders the new UI or the standard default UI.
202-
203-
The default UI is created via the ``default_banner.js`` script.
204-
205-
See :ref:`new-vue-ui` for more details on the new Vue UI.
195+
The default banner creates the UI dynamically in JavaScript using Vue.
206196

207197

208198
Head Insert Template

docs/manual/ui-customization.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ UI Customization
44
.. toctree::
55

66
ui-guide
7-
new-vue-ui
7+
vue-ui
88
template-guide
99

docs/manual/ui-guide.rst

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,12 @@ Most aspects of the pywb user-interface can be customized by changing the defaul
88
This guide covers a few different options for customizing the UI.
99

1010

11-
Changing the Default Styles
12-
---------------------------
13-
14-
When using the default UI, pywb styles can be configured in ``pywb/static/default_banner.css``
15-
16-
The style definition for ``#_wb_frame_top_banner`` affects the rendering of the default banner in framed mode.
17-
18-
19-
Configuring a Logo
20-
------------------
21-
22-
An optional logo can be configured at the top-left of the default banner.
23-
24-
To enable the logo set the ``ui.logo`` property in ``config.yaml`` to point to the URL of the logo.
25-
26-
The URL can be any image URL, including a URL served from the static directory.
27-
28-
For example, to add the default pywb logo to the banner, use the following in the config, which will
29-
load the logo from ``./static/pywb-logo-sm.png``
30-
31-
.. code:: yaml
32-
33-
ui:
34-
logo: pywb-logo-sm.png
35-
36-
37-
New Vue-based UI (Alpha)
38-
------------------------
11+
New Vue-based UI
12+
----------------
3913

4014
With pywb 2.7.0, pywb includes a brand new UI which includes a visual calendar mode and a histogram-based banner.
4115

42-
See :ref:`new-vue-ui` for more information on how to enable this UI.
16+
See :ref:`vue-ui` for more information on how to enable this UI.
4317

4418

4519
Customizing UI Templates

docs/manual/new-vue-ui.rst renamed to docs/manual/vue-ui.rst

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,11 @@
1-
.. _new-vue-ui:
1+
.. _vue-ui:
22

33

4-
New Vue-based UI (Alpha)
5-
========================
4+
Vue-based UI
5+
================
66

7-
With 2.7.0, pywb introduces a new `Vue UI <https://vuejs.org/>`_ based system, which can be enabled to provide a more feature-rich representation of a web archive.
7+
With 2.7.0, pywb introduces a new `Vue UI <https://vuejs.org/>`_ based system, which provides a more feature-rich representation of a web archive.
88

9-
The UI consists of two parts, which can be enabled using the ``ui`` block in ``config.yaml``
10-
11-
.. code:: yaml
12-
13-
ui:
14-
vue_calendar_ui: true
15-
vue_timeline_banner: true
16-
17-
18-
Note: This UI is still in development and not all features are operational yet.
19-
In particular, localization switching is not yet available in the alpha version.
209

2110
Overview
2211
--------
@@ -26,20 +15,17 @@ Calendar UI
2615

2716
The new calendar UI provides a histogram and a clickable calendar representation of a web archive.
2817

29-
The calendar is rendered in place of the standard URL query page.
18+
The calendar is rendered in place of the URL query page from versions before 2.7.0.
3019

3120
.. image:: images/vue-cal.png
3221
:width: 600
3322
:alt: Calendar UI Screenshot
3423

3524

36-
To enable this UI for URL query pages, set the ``ui.vue_calendar_ui`` property to true in the ``config.yaml``
37-
38-
3925
Banner Replay UI
4026
^^^^^^^^^^^^^^^^
4127

42-
The new banner histogram allows for zooming in on captures per year as well as per month.
28+
The new banner histogram allows for zooming in on captures per year, month, week, and day.
4329

4430
Navigation preserves the different levels. The full calendar UI is also available as a dropdown by clicking the calendar icon.
4531

@@ -50,13 +36,10 @@ The new banner should allow for faster navigation across multiple captures.
5036
:alt: Calendar UI Screenshot
5137

5238

53-
To enable this UI for replay pages, set the ``ui.vue_timeline_banner`` property to true in the ``config.yaml``
54-
55-
5639
Custom Logo
5740
^^^^^^^^^^^
5841

59-
When using the custom banner, it is possible to configure a logo by setting ``ui.logo`` to a static file.
42+
It is possible to configure a custom logo by setting ``ui.logo`` in ``config.yaml`` to a static file.
6043

6144
If omitted, the standard pywb logo will be used by default.
6245

@@ -70,6 +53,25 @@ For example, to use the file ``./static/my-logo.png`` as the logo, set:
7053
logo: my-logo.png
7154
7255
56+
Banner Colors
57+
^^^^^^^^^^^^^
58+
59+
It is possible to configure the background color, text color, and button outlines of the header by setting values in the ``ui`` section of ``config.yaml``.
60+
61+
To customize the header background color, set ``ui.navbar_background_hex`` to the color's hex value, with the initial hash symbol (``#``) omitted. If omitted, ``#f8f9fa`` (Bootstrap 4's ``light``) will be used by default.
62+
63+
For example, to use the color ``#cff3ff`` as the banner color, set:
64+
65+
.. code:: yaml
66+
67+
ui:
68+
navbar_background_hex: cff3ff
69+
70+
The navbar text color can similarly be set using the ``ui.navbar_color_hex`` setting.
71+
72+
The banner's buttons default to Bootstrap 4's ``btn-outline-dark``. To use light-outlined buttons instead, set ``ui.navbar_light_buttons`` equal to any value.
73+
74+
7375
Updating the Vue UI
7476
-------------------
7577

0 commit comments

Comments
 (0)