Re: [pgAdmin][RM5990]: Update the style guide on pgAdmin4 website

From: Nikhil Mohite <nikhil(dot)mohite(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin][RM5990]: Update the style guide on pgAdmin4 website
Date: 2020-08-26 07:23:24
Message-ID: CAOBg0APsOizjnj-D2dCAfwbbobwgJ4mFcjtyJEuwh3QborQiUQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Dave/Team,

Updated the implementation for the set title of the page, for this, I have
done a few changes in the flow.
1. Earlier we are using {% include %} for showing pages in the base
page (styleguide/index.html) for a style guide but in the Django template
we can't use {% block %} statement if we are adding page using "{% include
%}".
2. To overcome this issue now using {% extends %} instead of {% include
%}, For this added dynamic URL generation in views so instead of loading
"index.html" of style guide we are loading specific component HTML file
(e.g: typography.html) and that template extends the "index.html" of the
style guide.

PFA v6 patch for the same.

If required any changes please let me know.

Regards,
Nikhil Mohite.

On Tue, Aug 25, 2020 at 7:09 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:

> Hi
>
> On Tue, Aug 25, 2020 at 12:49 PM Nikhil Mohite <
> nikhil(dot)mohite(at)enterprisedb(dot)com> wrote:
>
>>
>> PFA v5 patch for the same.
>>
>> if required any updates in this please let me know.
>>
>
> Hmm, yeah - that doesn't work for me I'm afraid; it's mixing content with
> code.
>
> The titles should be defined in the HTML pages themselves. We do that
> everywhere else by including a template block like the following in the
> lowest level content:
>
> {% block title %}Contributing{% endblock %}
>
> And then in base.html:
>
> <title>{% block title %}{% endblock %}</title>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EDB: http://www.enterprisedb.com
>
>

Attachment Content-Type Size
RM_5690_v6.patch application/octet-stream 32.0 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2020-08-26 10:36:17 Re: [pgAdmin][RM5990]: Update the style guide on pgAdmin4 website
Previous Message Akshay Joshi 2020-08-26 07:05:48 Re: [pgAdmin][Patch] - Housekeeping #5332 - [Code Coverage] Improve API test cases for Tables, Columns and Constraints (Index, Foreign Key, Check, Exclusion)