annotate app/views/pastes/new.html.erb @ 469:68231013b01b bootstrap-4

Now with more bootstrap than ever
author nanaya <me@nanaya.pro>
date Sun, 23 Feb 2020 22:25:50 +0900
parents b2991317d4d7
children c8e2f6b22527
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
398
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
1 <% provide :title, t(".title") %>
402
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
2
398
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
3 <%= form_for @paste do |f| %>
379
2ad092e60975 [mq]: new-design
nanaya <me@myconan.net>
parents: 306
diff changeset
4 <%= render "shared/filter_spam" %>
398
851432f21603 Nope, failing at redesigning.
nanaya <me@myconan.net>
parents: 395
diff changeset
5
469
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
6 <div class="form-group">
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
7 <%= f.text_area :paste,
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
8 autofocus: true,
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
9 class: "form-control paste-paste js-paste-paste #{error_class f.object, :paste}",
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
10 rows: 20
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
11 %>
2
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
12 </div>
189
b4b7a29b70f6 Initial work for paste deletion.
Edho Arief <edho@myconan.net>
parents: 56
diff changeset
13
402
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
14
469
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
15 <div class="row"><div class="col-12">
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
16 <button type="button" class="btn btn-secondary ml-auto d-block js-paste-preview-md">
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
17 <%= t(".preview_md") %>
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
18 </button>
403
e0626046579a Rearrange stuff.
nanaya <me@myconan.net>
parents: 402
diff changeset
19 </div></div>
e0626046579a Rearrange stuff.
nanaya <me@myconan.net>
parents: 402
diff changeset
20
469
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
21 <div class="form-group row">
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
22 <%= f.label :key, t('.deletion_key'), class: 'col-sm-2 col-form-label' %>
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
23
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
24 <div class="col-auto">
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
25 <%= f.text_field :key,
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
26 autocomplete: 'off',
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
27 class: "form-control #{error_class f.object, :key}"
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
28 %>
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
29 </div>
424
967233b26404 Fix styling for md size
nanaya <me@myconan.net>
parents: 417
diff changeset
30 </div>
402
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
31
469
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
32 <div class="form-group row">
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
33 <label class="col-sm-2 col-form-label pt-0">
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
34 <%= t(".privacy.label") %>
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
35 </label>
379
2ad092e60975 [mq]: new-design
nanaya <me@myconan.net>
parents: 306
diff changeset
36
469
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
37 <div class="col-sm-10">
424
967233b26404 Fix styling for md size
nanaya <me@myconan.net>
parents: 417
diff changeset
38 <% paste_privacy_options.each do |label, value| %>
469
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
39 <label class="custom-control custom-radio mb-0">
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
40 <%= f.radio_button :is_private, value, class: 'custom-control-input' %>
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
41
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
42 <span class="custom-control-label">
424
967233b26404 Fix styling for md size
nanaya <me@myconan.net>
parents: 417
diff changeset
43 <%= t(".privacy.#{label}") %>
469
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
44 </span>
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
45 </label>
424
967233b26404 Fix styling for md size
nanaya <me@myconan.net>
parents: 417
diff changeset
46 <% end %>
379
2ad092e60975 [mq]: new-design
nanaya <me@myconan.net>
parents: 306
diff changeset
47 </div>
424
967233b26404 Fix styling for md size
nanaya <me@myconan.net>
parents: 417
diff changeset
48 </div>
417
080dd141898c Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents: 410
diff changeset
49
469
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
50 <div class="form-group row">
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
51 <%= f.label :language, class: 'col-sm-2 col-form-label' %>
417
080dd141898c Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents: 410
diff changeset
52
469
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
53 <div class="col-auto">
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
54 <%= f.select :language, [], { prompt: t(".language_none") }, class: 'custom-select' %>
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
55 </div>
424
967233b26404 Fix styling for md size
nanaya <me@myconan.net>
parents: 417
diff changeset
56 </div>
379
2ad092e60975 [mq]: new-design
nanaya <me@myconan.net>
parents: 306
diff changeset
57
424
967233b26404 Fix styling for md size
nanaya <me@myconan.net>
parents: 417
diff changeset
58 <div class="form-group">
967233b26404 Fix styling for md size
nanaya <me@myconan.net>
parents: 417
diff changeset
59 <%= f.button :class => "btn btn-primary" %>
403
e0626046579a Rearrange stuff.
nanaya <me@myconan.net>
parents: 402
diff changeset
60
424
967233b26404 Fix styling for md size
nanaya <me@myconan.net>
parents: 417
diff changeset
61 <%= link_to t(".clear"), "#", :class => "btn btn-danger js-paste-clear" %>
967233b26404 Fix styling for md size
nanaya <me@myconan.net>
parents: 417
diff changeset
62 </div>
2
42de15334db1 Added the pastes.
Edho Arief <edho@myconan.net>
parents:
diff changeset
63 <% end %>
402
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
64
409
130dc1054fd2 Fix styling.
nanaya <me@myconan.net>
parents: 408
diff changeset
65 <div class="modal fade js-paste-preview-md-modal" tabindex="-1" role="dialog">
402
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
66 <div class="modal-dialog" role="document">
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
67 <div class="modal-content">
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
68 <div class="modal-body js-paste-preview-md-box">
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
69 </div>
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
70 <div class="modal-footer">
469
68231013b01b Now with more bootstrap than ever
nanaya <me@nanaya.pro>
parents: 434
diff changeset
71 <button type="button" class="btn btn-secondary" data-dismiss="modal">
408
f3cdc83b87b4 Add about.
nanaya <me@myconan.net>
parents: 407
diff changeset
72 <%= t("buttons.close") %>
402
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
73 </button>
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
74 </div>
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
75 </div>
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
76 </div>
a18e19139f57 Markdown preview \o/
nanaya <me@myconan.net>
parents: 398
diff changeset
77 </div>