mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-01 18:27:18 +00:00
adjust to template changes in pdoc 10 (#5132)
This commit is contained in:
parent
f85c64401b
commit
2d2a9f3c52
2 changed files with 15 additions and 6 deletions
|
|
@ -1,3 +1,9 @@
|
|||
{% block style %}{% endblock %}
|
||||
{% block body %}{% endblock %}
|
||||
{% filter minify_css %}
|
||||
{% block style %}
|
||||
<style>/*! theme.css */{% include "theme.css" %}</style>
|
||||
<style>/*! content.css */{% include "content.css" %}</style>
|
||||
<style>.pdoc h1 { margin-bottom: 1em; }</style>
|
||||
{% endblock %}
|
||||
{% endfilter %}
|
||||
{% block content %}{% endblock %}
|
||||
<div class="pdoc" style="margin-top: 4rem">{% block attribution %}{% endblock %}</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{% extends "default/module.html.jinja2" %}
|
||||
{% block nav %}{% endblock %}
|
||||
{% block style_layout %}{% endblock %}
|
||||
{% block style_pygments %}{% endblock %}
|
||||
{#
|
||||
To document all event hooks, we do a bit of hackery:
|
||||
1. scripts/api-events.py auto-generates generated/events.py.
|
||||
|
|
@ -12,8 +9,14 @@ To document all event hooks, we do a bit of hackery:
|
|||
{% if module.name == "events" %}
|
||||
{% macro module_name() %}
|
||||
{% endmacro %}
|
||||
{% macro class(cls) %}
|
||||
<div class="attr class">
|
||||
{{ headerlink(cls) }}
|
||||
<span class="name">{{ cls.qualname.replace("Events", " Events") }}</span>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
{% macro view_source(doc) %}
|
||||
{% if doc.type != "module" %}
|
||||
{% if doc.type == "function" %}
|
||||
{{ default_view_source(doc) }}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue