mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
aider: Added a new style block to set the background color of blockquotes to yellow.
# Context: USER: i would like to add a new <style> block to the <head> of chat-transcript, which sets the background color of blockquotes to yellow ASSISTANT: To add a new `<style>` block to the `<head>` of `chat-transcript.html`, you can use the `{% block %}` tag to override the existing `<head>` section in the `default.html` layout. Here's how to do it: ```html _layouts/chat-transcript.html ^C KeyboardInterrupt USER: i don't want to replace the entire head. maybe add a styleoverride block to default (empty) and then use it in chat-transcript? ASSISTANT: Sure, you can add an empty `styleoverride` block in `default.html` and then override it in `chat-transcript.html`. Here's how to do it: 1. Add an empty `styleoverride` block in `default.html` inside the `<head>` section. 2. Override the `styleoverride` block in `chat-transcript.html` to add the new `<style>` block. Here are the changes: ```html _layouts/default.html <<<<<<< ORIGINAL <link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}"> {% include head-custom.html %} ======= <link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}"> {% include head-custom.html %} {% block styleoverride %}{% endblock %} >>>>>>> UPDATED ``` ```html _layouts/chat-transcript.html <<<<<<< ORIGINAL {% block content %} ======= {% block styleoverride %} <style> blockquote { background-color: yellow; } </style> {% endblock %} {% block content %} >>>>>>> UPDATED ``` Now, the `chat-transcript.html` layout will have the new `<style>` block setting the background color of blockquotes to yellow, while the `default.html` layout remains unchanged.
This commit is contained in:
parent
a06e9a7b95
commit
a2db386689
2 changed files with 9 additions and 0 deletions
|
@ -1,5 +1,13 @@
|
||||||
{% extends "default.html" %}
|
{% extends "default.html" %}
|
||||||
|
|
||||||
|
{% block styleoverride %}
|
||||||
|
<style>
|
||||||
|
blockquote {
|
||||||
|
background-color: yellow;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{{ content }}
|
{{ content }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||||
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
|
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
|
||||||
{% include head-custom.html %}
|
{% include head-custom.html %}
|
||||||
|
{% block styleoverride %}{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<a id="skip-to-content" href="#content">Skip to the content.</a>
|
<a id="skip-to-content" href="#content">Skip to the content.</a>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue