File size: 6,206 Bytes
aec61e4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{% extends "base.html" %}
{% block content %}
<section
  class="petition-draft-editor"
  data-draft-editor
  data-recommended="{{ 'true' if recommended else 'false' }}"
  {% if not recommended %}data-current-create="combined"{% endif %}
>
  {% if recommended %}
    <aside class="draft-recommendation">
      <div>
        <span class="draft-spark draft-wand" aria-hidden="true">
          <svg viewBox="0 0 24 24" focusable="false">
            <path d="M2,22l14-5L7,8L2,22z M12.35,16.18L5.3,18.7l2.52-7.05L12.35,16.18z"></path>
            <path d="M14.53,12.53l5.59-5.59c.49-.49,1.28-.49,1.77,0l.59.59,1.06-1.06-.59-.59c-1.07-1.07-2.82-1.07-3.89,0l-5.59,5.59,1.06,1.06z"></path>
            <path d="M10.06,6.88l-.59.59,1.06,1.06.59-.59c1.07-1.07,1.07-2.82,0-3.89l-.59-.59-1.06,1.07.59.59c.48.48.48,1.28,0,1.76z"></path>
            <path d="M17.06,11.88l-1.59,1.59,1.06,1.06,1.59-1.59c.49-.49,1.28-.49,1.77,0l1.61,1.61,1.06-1.06-1.61-1.61c-1.08-1.07-2.82-1.07-3.89,0z"></path>
            <path d="M15.06,5.88l-3.59,3.59,1.06,1.06,3.59-3.59c1.07-1.07,1.07-2.82,0-3.89l-1.59-1.59-1.06,1.06,1.59,1.59c.48.49.48,1.29,0,1.77z"></path>
          </svg>
        </span>
        <p><strong>Here’s your recommended draft!</strong> <span>Make sure it reflects your concerns, personal story, and the relevant facts.</span></p>
        <button type="button" data-start-scratch>Or start from scratch</button>
      </div>
    </aside>
  {% endif %}

  <div class="draft-editor-card">
    <div class="draft-title-panel">
      <div class="draft-title-inner">
        <span class="draft-accent" aria-hidden="true"></span>
        <label for="draft-title">Petition title</label>
        <textarea id="draft-title" name="ask" rows="2" placeholder="Your unique title" data-draft-title></textarea>
      </div>
    </div>

    <div class="draft-body-panel">
      <div class="draft-editor-inner">
        <div class="draft-media-actions">
          <button type="button" data-generate-image>
            <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
              <path d="M19 3H5a2 2 0 0 0-2 2v14h18V5a2 2 0 0 0-2-2Zm0 14H5V5h14v12Zm-9-2 2.5-3 2 2.5L17 11l2 4H7l3-4 2 2.5L10 15Zm-1-5a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"></path>
            </svg>
            Make new image
          </button>
          <label>
            <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
              <path d="M11 16h2V8h3l-4-4-4 4h3v8Zm-6 3h14v-5h2v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5h2v5Z"></path>
            </svg>
            Use my photo
            <input type="file" accept="image/*" data-photo-input>
          </label>
        </div>
        <p class="draft-media-helper">You can make 2 more images, or upload your own</p>

        <h2>The Issue</h2>
        <div class="draft-rich-editor">
          <div class="draft-toolbar" role="toolbar" aria-label="Text formatting">
            <button type="button" aria-label="Bold" data-editor-command="bold"><strong>B</strong></button>
            <button type="button" aria-label="Italic" data-editor-command="italic"><em>I</em></button>
            <button type="button" aria-label="Numbered list" data-editor-command="insertOrderedList">
              <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M9 6h12v2H9V6Zm0 5h12v2H9v-2Zm0 5h12v2H9v-2ZM3 5h3v4H5V6H3V5Zm0 6h3v1.5L4.5 14H6v1H3v-1.5L4.5 12H3v-1Zm0 5h3v5H3v-1h2v-1H3v-1h2v-1H3v-1Z"></path></svg>
            </button>
            <button type="button" aria-label="Bullet list" data-editor-command="insertUnorderedList">
              <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 6.5A1.5 1.5 0 1 0 4 9a1.5 1.5 0 0 0 0-3Zm0 5A1.5 1.5 0 1 0 4 14a1.5 1.5 0 0 0 0-3Zm0 5A1.5 1.5 0 1 0 4 19a1.5 1.5 0 0 0 0-3ZM8 7h13v2H8V7Zm0 5h13v2H8v-2Zm0 5h13v2H8v-2Z"></path></svg>
            </button>
            <button type="button" aria-label="Insert/edit link" data-editor-command="createLink">
              <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M10.6 13.4a1 1 0 0 1 0-1.4l2.8-2.8a3 3 0 1 1 4.2 4.2l-2.1 2.1-1.4-1.4 2.1-2.1a1 1 0 0 0-1.4-1.4L12 13.4a1 1 0 0 1-1.4 0Zm2.8-2.8a1 1 0 0 1 0 1.4l-2.8 2.8a1 1 0 0 0 1.4 1.4l2.1-2.1 1.4 1.4-2.1 2.1a3 3 0 1 1-4.2-4.2l2.8-2.8a1 1 0 0 1 1.4 0Z"></path></svg>
            </button>
            <button type="button" aria-label="Add video" data-editor-video>
              <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 4h18v16H3V4Zm2 2v12h14V6H5Zm5 3 5 3-5 3V9Z"></path></svg>
            </button>
            <button type="button" aria-label="Add image" data-editor-image>
              <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 4h18v16H3V4Zm2 2v10l4-4 3 3 2-2 5 5V6H5Zm3 5a2 2 0 1 1 0-4 2 2 0 0 1 0 4Z"></path></svg>
            </button>
            <button type="button" aria-label="Formatting help" data-editor-help>
              <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16Zm-.1-5.2h1.8V17h-1.8v-2.2ZM12 7a3 3 0 0 1 2.2 5c-.8.8-1.3 1.1-1.3 2h-1.8c0-1.6.8-2.3 1.6-3.1.4-.4.6-.8.6-1.3A1.3 1.3 0 0 0 12 8.3c-.8 0-1.3.5-1.5 1.2l-1.7-.6A3.2 3.2 0 0 1 12 7Z"></path></svg>
            </button>
          </div>
          <textarea
            class="draft-body-input"
            aria-label="The Issue"
            data-draft-body
          ></textarea>
        </div>

        <aside class="draft-unsaved draft-unsaved-current">
          <div>
            <strong>This is an unsaved draft</strong>
            <span>Keep going to publish and share!</span>
          </div>
          <button type="button" data-preview-draft>Preview my petition</button>
        </aside>
        <button class="draft-scratch-bottom" type="button" data-start-scratch>Or start from scratch</button>
      </div>
    </div>
  </div>

  <div class="draft-action-tray">
    <div class="draft-action-width">
      <div class="draft-actions">
        <button class="draft-back" type="button" data-draft-back><span>Back</span></button>
        <button class="draft-continue" type="button" data-draft-continue><span>Continue</span></button>
      </div>
    </div>
  </div>
  <p class="sr-only">{{ helper_disclosure }}</p>
</section>
{% endblock %}