better pdf using headless chrome
This commit is contained in:
parent
16e207000f
commit
7f0934ac14
7 changed files with 143 additions and 26 deletions
|
|
@ -3,16 +3,16 @@
|
|||
{% block title %}Another Example{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Example</h2>
|
||||
<h2 class='text-gray-400 font-bold text-2xl'>Example</h2>
|
||||
<p>
|
||||
{{ data.message }}
|
||||
</p>
|
||||
|
||||
<h3>Items</h3>
|
||||
<p>
|
||||
<h3 class='mt-4 text-gray-400 font-bold text-xl'>Items</h3>
|
||||
<p class='text-gray-300 my-4'>
|
||||
there are {{ data.get('items', [])|length }} items in the list
|
||||
</p>
|
||||
<ul>
|
||||
<ul class='list-disc ml-8'>
|
||||
{% for item in data.get('items', []) %}
|
||||
<li>{{ item }}</li>
|
||||
{% endfor %}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,9 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}FastAPI Dynamic Response{% endblock %}</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link href="/static/app.css" rel="stylesheet">
|
||||
<!-- <link href="/static/app.css" rel="stylesheet"> -->
|
||||
<link href="http://localhost:8000/static/app.css" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
<body class="bg-gray-900 text-gray-200 min-h-screen flex flex-col">
|
||||
<header class="bg-gray-800 p-4">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue