From 29860bcb245927be6a1bb17aa1413ce0f038fbf5 Mon Sep 17 00:00:00 2001 From: Lauren Ko Date: Wed, 22 Dec 2021 17:55:10 -0600 Subject: [PATCH] New UI corrections (#687) * Fix typos. * Make ui variable available to collection page --- docs/manual/new-vue-ui.rst | 6 +++--- docs/manual/template-guide.rst | 30 +++++++++++++++--------------- docs/manual/ui-guide.rst | 10 +++++----- pywb/apps/frontendapp.py | 4 +++- 4 files changed, 26 insertions(+), 24 deletions(-) diff --git a/docs/manual/new-vue-ui.rst b/docs/manual/new-vue-ui.rst index 3b007549..f9528ab7 100644 --- a/docs/manual/new-vue-ui.rst +++ b/docs/manual/new-vue-ui.rst @@ -4,7 +4,7 @@ New Vue-based UI (Alpha) ======================== -With 2.7.0, pywb introduces a new `Vue UI `_ based system, which can be enabled to provide a more feature-representation of a web archive. +With 2.7.0, pywb introduces a new `Vue UI `_ based system, which can be enabled to provide a more feature-rich representation of a web archive. The UI consists of two parts, which can be enabled using the ``ui`` block in ``config.yaml`` @@ -58,13 +58,13 @@ Custom Logo When using the custom banner, it is possible to configure a logo by setting ``ui.logo`` to a static file. -If ommitted, the standard pywb logo will be used by default. +If omitted, the standard pywb logo will be used by default. Updating the Vue UI ------------------- -The UI is contained with the ``pywb/vueui`` directory. +The UI is contained within the ``pywb/vueui`` directory. The Vue component sources can be found in ``pywb/vueui/src``. diff --git a/docs/manual/template-guide.rst b/docs/manual/template-guide.rst index 1c008067..957c1d4f 100644 --- a/docs/manual/template-guide.rst +++ b/docs/manual/template-guide.rst @@ -49,7 +49,7 @@ Base Templates (and supporting templates) File: ``base.html`` This template includes the HTML added to all other pages, replay and non-replay. Shared JS and CSS includes can be added here. -For themeing all pywb UI, it may be useful to modify this template. +For theming all pywb UI, it may be useful to modify this template. To customize the default pywb UI across multiple pages, the following additional templates can also be overriden: @@ -101,7 +101,7 @@ Collection Page Template File: ``search.html`` -The 'collection page' template is the page rendered when no URL is specified, eg. ``http://localhost:8080/my-collection/``. +The 'collection page' template is the page rendered when no URL is specified, e.g. ``http://localhost:8080/my-collection/``. The default template renders a search page that can be used to start searching for URLs. @@ -123,19 +123,19 @@ If custom collection metadata is provided, this page will automatically show thi It is possible to also add custom metadata per-collection that will be available to the collection. -For dynamic collections, any fields placed under ``/metadata.yaml`` filed can be accessed +For dynamic collections, any fields placed in ``/metadata.yaml`` files can be accessed via the ``{{ metadata }}`` variable. -For example, if metadata file contains: +For example, if the metadata file contains: .. code:: yaml somedata: value -Accessing ``{{ metadata.somedata }}`` will resolve to ``value`` +Accessing ``{{ metadata.somedata }}`` will resolve to ``value``. -The metadata can also be added via commandline: ``wb-manager metadata myCollection --set somedata=value]`` +The metadata can also be added via commandline: ``wb-manager metadata myCollection --set somedata=value``. URL Query/Calendar Page Template @@ -151,13 +151,13 @@ The default template supports the standard pywb table view, as well as a conditi Template variables: -* ``{{ url }}`` - the URL being queried, eg. ``https://example.com/`` +* ``{{ url }}`` - the URL being queried, e.g. ``https://example.com/`` -* ``{{ prefix }}`` - the collection prefix that will be used for replay, eg. ``http://localhost:8080/my-collection/`` +* ``{{ prefix }}`` - the collection prefix that will be used for replay, e.g. ``http://localhost:8080/my-collection/`` * ``{{ ui }}`` - an optional ``ui`` dictionary from ``config.yaml``, if any -* ``{{ static_prefix }}`` - the prefix from which static files will be accessed from, eg. ``http://localhost:8080/static/`` +* ``{{ static_prefix }}`` - the prefix from which static files will be accessed from, e.g. ``http://localhost:8080/static/`` Replay and Banner Templates @@ -180,11 +180,11 @@ Template variables: * ``{{ url }}`` - the URL being replayed. -* ``{{ timestamp }}`` - the timestamp being replayed, eg. ``20211226`` in ``http://localhost:8080/pywb/20211226/mp_/https://example.com/`` +* ``{{ timestamp }}`` - the timestamp being replayed, e.g. ``20211226`` in ``http://localhost:8080/pywb/20211226/mp_/https://example.com/`` * ``{{ is_framed }}`` - true/false if currently in framed mode. -* ``{{ wb_prefix }}`` - the collection prefix, eg. ``http://localhost:8080/pywb/`` +* ``{{ wb_prefix }}`` - the collection prefix, e.g. ``http://localhost:8080/pywb/`` * ``{{ config }}`` - provides the contents of the ``config.yaml`` as a dictionary. @@ -234,7 +234,7 @@ Template variables: * ``{{ is_framed }}`` - true/false if currently in framed mode. -* ``{{ wb_prefix }}`` - the collection prefix, eg. ``http://localhost:8080/pywb/`` +* ``{{ wb_prefix }}`` - the collection prefix, e.g. ``http://localhost:8080/pywb/`` @@ -266,7 +266,7 @@ create an ``