@@ -17,58 +17,76 @@ function quick_weblog_form() {
17
17
?>
18
18
<style>
19
19
#quick-weblog {
20
- background-color: red;
21
- padding: 20px;
20
+ padding: 1em 0;
22
21
}
23
22
#quick-weblog div {
24
- border: 2px solid yellow;
25
- background-color: lightblue;
26
- padding: 20px;
23
+ padding: 0.75em 0;
24
+ }
25
+ #quick-weblog div:nth-last-child(1) {
26
+ padding-bottom: 0;
27
+ }
28
+ #quick-weblog div:nth-child(1) {
29
+ padding-top: 0;
30
+ }
31
+ #quick-weblog div label {
32
+ font-weight: 600;
33
+ }
34
+ #quick-weblog div input,
35
+ #quick-weblog div textarea,
36
+ #quick-weblog div select {
37
+ display: block;
38
+ max-width: 600px;
39
+ width: 99%;
40
+ }
41
+ #quick-weblog div input[type=submit] {
42
+ width: auto;
27
43
}
28
44
</style>
29
-
30
- <form id="quick-weblog" method="post" action="<?php echo esc_url ( admin_url ('admin-post.php ' ) ); ?> ">
31
- <div>
32
- <label for="title"><?php _e ( 'Title ' , 'quick-weblog ' ); ?> </label>
33
- <input type="text" name="title" id="title" required>
34
- </div>
35
-
36
- <div>
37
- <label for="image_url"><?php _e ( 'Image URL ' , 'quick-weblog ' ); ?> </label>
38
- <input type="text" name="image_url" id="image_url" required>
39
- </div>
40
-
41
- <div>
42
- <label for="image_description"><?php _e ( 'Image Description ' , 'quick-weblog ' ); ?> </label>
43
- <textarea name="image_description" id="image_description" required></textarea>
44
- </div>
45
-
46
- <div>
47
- <label for="quote"><?php _e ( 'Quote ' , 'quick-weblog ' ); ?> </label>
48
- <textarea name="quote" id="quote" required></textarea>
49
- </div>
50
-
51
- <div>
52
- <label for="url"><?php _e ( 'URL ' , 'quick-weblog ' ); ?> </label>
53
- <input type="text" name="url" id="url" required>
54
- </div>
55
-
56
- <div>
57
- <label for="category"><?php _e ( 'Category ' , 'quick-weblog ' ); ?> </label>
58
- <?php wp_dropdown_categories ( array ( 'name ' => 'category ' , 'orderby ' => 'name ' , 'taxonomy ' => 'category ' ) ); ?>
59
- </div>
60
-
61
- <div>
62
- <label for="tags"><?php _e ( 'Tags ' , 'quick-weblog ' ); ?> </label>
63
- <input type="text" name="tags" id="tags" required>
64
- </div>
65
-
66
- <div>
67
- <input type="hidden" name="action" value="quick_weblog_submit_form">
68
- <?php wp_nonce_field ( 'quick_weblog_submit_form ' , 'quick_weblog_form_nonce ' ); ?>
69
- <input type="submit" value="<?php _e ( 'Submit ' , 'quick-weblog ' ); ?> ">
70
- </div>
71
- </form>
45
+
46
+ <div class="card">
47
+ <form id="quick-weblog" method="post" action="<?php echo esc_url ( admin_url ('admin-post.php ' ) ); ?> ">
48
+ <div>
49
+ <label for="url"><?php _e ( 'Post URL ' , 'quick-weblog ' ); ?> </label>
50
+ <input type="text" name="url" id="url" required>
51
+ </div>
52
+
53
+ <div>
54
+ <label for="title"><?php _e ( 'Post Title ' , 'quick-weblog ' ); ?> </label>
55
+ <input type="text" name="title" id="title" required>
56
+ </div>
57
+
58
+ <div>
59
+ <label for="image_url"><?php _e ( 'Image URL ' , 'quick-weblog ' ); ?> </label>
60
+ <input type="text" name="image_url" id="image_url" required>
61
+ </div>
62
+
63
+ <div>
64
+ <label for="image_description"><?php _e ( 'Image Description ' , 'quick-weblog ' ); ?> </label>
65
+ <input type="text" name="image_description" id="image_description" required>
66
+ </div>
67
+
68
+ <div>
69
+ <label for="quote"><?php _e ( 'Quote ' , 'quick-weblog ' ); ?> </label>
70
+ <textarea name="quote" id="quote" rows="6" required></textarea>
71
+ </div>
72
+
73
+ <div>
74
+ <label for="category"><?php _e ( 'Category ' , 'quick-weblog ' ); ?> </label>
75
+ <?php wp_dropdown_categories ( array ( 'name ' => 'category ' , 'orderby ' => 'name ' , 'taxonomy ' => 'category ' , 'selected ' => 1 ) ); ?>
76
+ </div>
77
+
78
+ <div>
79
+ <label for="tags"><?php _e ( 'Tags ' , 'quick-weblog ' ); ?> </label>
80
+ <input type="text" name="tags" id="tags" required>
81
+ </div>
82
+
83
+ <div>
84
+ <input type="hidden" name="action" value="quick_weblog_submit_form">
85
+ <?php wp_nonce_field ( 'quick_weblog_submit_form ' , 'quick_weblog_form_nonce ' ); ?>
86
+ <input type="submit" value="<?php _e ( 'Submit ' , 'quick-weblog ' ); ?> ">
87
+ </div>
88
+ </form>
89
+ </div>
72
90
<?php
73
91
}
74
92
0 commit comments