RCS / templates /rcs_view.html
AiDeveloper1's picture
Upload 2 files
9ece835 verified
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Your RCS Cards</title>
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
color: #333;
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
.card {
border: 1px solid #ccc;
border-radius: 8px;
padding: 15px;
margin-bottom: 20px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.card img {
max-width: 100%;
height: auto;
border-radius: 4px;
}
.card h3 {
margin-top: 0;
color: #0f0f0f;
}
.card p {
margin: 10px 0;
}
.card a {
display: inline-block;
margin: 5px;
padding: 8px 16px;
background-color: #007bff;
color: white;
text-decoration: none;
border-radius: 4px;
}
.quick-replies {
margin-top: 10px;
}
.quick-replies button {
margin: 5px;
padding: 6px 12px;
background-color: #f8f9fa;
border: 1px solid #ccc;
border-radius: 4px;
cursor: pointer;
}
.quick-replies button:hover {
background-color: #e9ecef;
}
</style>
</head>
<body>
<h1>Your RCS Cards</h1>
{% for card in rich_cards %}
<div class="card">
<h3>{{ card.title }}</h3>
{% if card.media %}
<img src="{{ card.media }}" alt="Card Media">
{% endif %}
<p>{{ card.text }}</p>
<!-- {% if card.url %}
<p><a href="{{ card.url }}">Visit Page</a></p>
{% endif %} -->
{% if card.buttons %}
<div>
{% for button in card.buttons %}
{% if button.type == "weburl" %}
<a href="{{ button.payload }}">{{ button.title }}</a>
{% else %}
<a href="#" data-payload="{{ button.payload }}">{{ button.title }}</a>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% if card.quickReplies %}
<div class="quick-replies">
{% for reply in card.quickReplies %}
{% if reply.type == "postback" %}
<button data-payload="{{ reply.payload }}" data-execute="{{ reply.execute|default('') }}">{{ reply.title }}</button>
{% elif reply.type == "call" %}
<button onclick="window.location.href='tel:{{ reply.payload }}'">{{ reply.title }}</button>
{% else %}
<button>{{ reply.title }}</button>
{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
{% endfor %}
</body>
</html>