Browse Source

Templates, yet again

imwald
Nuša Pukšič 3 months ago
parent
commit
fff45f71fd
  1. 1
      templates/components/SearchComponent.html.twig
  2. 52
      templates/feedback/form.html.twig
  3. 4
      templates/pages/search.html.twig

1
templates/components/SearchComponent.html.twig

@ -26,7 +26,6 @@ @@ -26,7 +26,6 @@
{% if not is_granted('IS_AUTHENTICATED_FULLY') %}
<div class="notice info mb-5">
<p>Log in to search articles.</p>
<small>Currently only available on desktop.</small>
</div>
{% endif %}

52
templates/feedback/form.html.twig

@ -4,31 +4,33 @@ @@ -4,31 +4,33 @@
{% block body %}
<div class="w-container mt-5">
<twig:Atoms:PageHeading heading="Feedback" tagline="Bug reports and feature requests welcome"/>
<form data-controller="nostr-single-sign" data-nostr-single-sign-event-value='{{ {
"kind": 24,
"tags": [...recipients|map(r => ["p", r]), ['client', 'Decent Newsroom']],
"content": ""
}|json_encode(constant('JSON_UNESCAPED_SLASHES')) }}'
data-nostr-single-sign-publish-url-value="/api/nostr/publish"
data-nostr-single-sign-csrf-token-value="{{ csrf_token('feedback') }}"
data-action="submit->nostr-single-sign#signAndPublish">
<div data-nostr-single-sign-target="status"></div>
<div class="mb-3">
<p>To:
{% for r in recipients %}
<twig:Molecules:UserFromNpub :ident="r" />
{% if not loop.last %}and {% endif %}
{% endfor %}
</p>
<label for="feedback-message" class="form-label">Your Message</label>
<textarea id="feedback-message" class="form-control" rows="5" required data-action="input->nostr-single-sign#preparePreview"></textarea>
</div>
<div class="actions">
<button type="submit" class="btn btn-primary" data-nostr-single-sign-target="publishButton">Send Feedback</button>
</div>
<h5 class="mt-4">Preview</h5>
<pre data-nostr-single-sign-target="computedPreview" class="bg-light p-2"></pre>
</form>
<section>
<form data-controller="nostr-single-sign" data-nostr-single-sign-event-value='{{ {
"kind": 24,
"tags": [...recipients|map(r => ["p", r]), ['client', 'Decent Newsroom']],
"content": ""
}|json_encode(constant('JSON_UNESCAPED_SLASHES')) }}'
data-nostr-single-sign-publish-url-value="/api/nostr/publish"
data-nostr-single-sign-csrf-token-value="{{ csrf_token('feedback') }}"
data-action="submit->nostr-single-sign#signAndPublish">
<div data-nostr-single-sign-target="status"></div>
<div class="mb-3">
<p>To:
{% for r in recipients %}
<twig:Molecules:UserFromNpub :ident="r" />
{% if not loop.last %}and {% endif %}
{% endfor %}
</p>
<label for="feedback-message" class="form-label">Your Message</label>
<textarea id="feedback-message" class="form-control" rows="5" required data-action="input->nostr-single-sign#preparePreview"></textarea>
</div>
<div class="actions">
<button type="submit" class="btn btn-primary" data-nostr-single-sign-target="publishButton">Send Feedback</button>
</div>
<h5 class="mt-4">Preview</h5>
<pre data-nostr-single-sign-target="computedPreview" class="bg-light p-2"></pre>
</form>
</section>
</div>
{% endblock %}

4
templates/pages/search.html.twig

@ -10,7 +10,9 @@ @@ -10,7 +10,9 @@
<p class="eyebrow">hidden gems</p>
</div>
</section>
<twig:SearchComponent />
<section>
<twig:SearchComponent />
</section>
{% endblock %}
{% block aside %}

Loading…
Cancel
Save