File size: 6,528 Bytes
beb6417
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Schedule RSS Posts</title>
  <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap" rel="stylesheet">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">


  <script>
    function addRssField() {
      const container = document.getElementById('rss-container');
      const newField = document.createElement('div');
      newField.className = "input-group mb-3";
      newField.innerHTML = `
        <input type="text" class="form-control" name="rss_urls" placeholder="RSS Feed URL" required>
        <button type="button" class="btn  minus_btn" onclick="this.parentElement.remove()">
          <i class="fas fa-minus"></i></button>
      `;
      container.appendChild(newField);
    }
  </script>
  <style>
    body {
  font-family: 'Inter', sans-serif;
}
.form_section{
  padding: 50px 0px;
}

.plus_btn,
.minus_btn {
    border: none;
    background-color: #4CAF50;
    color: white;
    padding: 6px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    
}
.minus_btn{
  background-color: #dc3545;

}
.minus_btn:hover
{
  background-color: #d33241;
  color: white;
}
.plus_btn:hover
{
  background-color: #3ea141;
  color: white;
}
.form-label{
  color: #222;
}
.form .form-control,
.form select{
font-size: 15px;
color: #222;
box-shadow: none !important;
}
.form .form-control::placeholder{
font-size: 15px;
color: #999;
}
.submit_btn{
  background-color: #75b798;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 15px;
  transition: background-color 0.3s ease;

}
.submit_btn:hover{
  background-color: #70c79e;
  color: white;
}
.back_btn{
  background-color: #f8f9fa;
  color: #70c79e;
  padding: 8px 20px;
  border: 1px solid #70c79e;
  border-radius: 5px;
  cursor: pointer;
  font-size: 15px;
  transition: background-color 0.3s ease;
  margin-top: 20px;
  margin-bottom: 20px;

}
.back_btn:hover{
  background-color: #70c79f;
  color: #fff;


}
 /* loader css  */
 #ftco-loader {
            align-items: center;
            background-color: #ffffff;
            display: flex;
            height: 100vh;
            justify-content: center;
            left: 0;
            position: fixed;
            top: 0;
            width: 100%;
            z-index: 999999;
        }

        .loader {
            position: relative;
        }

        .loader .loader-box {
            display: flex;
            justify-self: center;
            align-items: center;
            margin: auto;
            transition: all 0.9s ease-in-out;
        }

        .spinner {
            width: 40px;
            height: 40px;
            border: 4px solid #000000;
            border-top-color: transparent;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

  </style>
</head>
<body class="bg-light" id="content">

    <!-- loader  -->
    <div id="ftco-loader">
      <div class="loader">
          <div class="loader-box">
              <div class="spinner"></div>
          </div>
      </div>
  </div>
<section class="form_section">
  <div class="container ">
    <h1 class="text-center mb-4">Schedule RSS Posts</h1>
    <div class="row">
        <div class="col-lg-6 mx-auto">
            <form method="POST" class="bg-white p-4 shadow rounded form">
                <div id="rss-container">
                  <label class="form-label">RSS Feed URL:</label>
                  <div class="input-group mb-3">
                    <input type="text" class="form-control" name="rss_urls" placeholder="RSS Feed URL" required>
                    <button type="button" class="btn plus_btn" onclick="addRssField()">
                      <i class="fas fa-plus"></i>
                    </button>
                  </div>
                </div>
          
                <div class="mb-3">
                  <label class="form-label">Number of Posts per Day:</label>
                  <input type="number" class="form-control" name="posts_per_day" max="15"  placeholder="Number of Posts per Day" required>
                </div>
          
                <div class="mb-3">
                  <label class="form-label">Schedule Type:</label>
                  <select class="form-select form-control" name="schedule_type">
                    <option value="daily">Daily</option>
                    <option value="weekly">Weekly (5 posts/day × 7 days)</option>
                    <option value="monthly">Monthly (5 posts/day × 30 days)</option>
                  </select>
                </div>
          
                <div class="mb-3">
                  <label class="form-label">First Post Time:</label>
                  <input type="datetime-local" class="form-control" name="first_post_time" required>
                </div>
          
                <div class="mb-3">
                  <label class="form-label">Frequency Between Posts:</label>
                  <label for="frequency" class="form-label">Enter frequency (in minutes, must be greater than 30):</label><br>
                  <input type="number" id="frequency"  class="form-control" name="frequency" min="30  " placeholder="Enter frequency in minutes">
                 
                </div>
          
                <div class="d-grid">
                  <input type="submit" class="btn submit_btn" value="Generate Posts">
                </div>
              </form>
          
              <div class="text-center mt-4">
                <a href="{{ url_for('scheduled_posts') }}" class="btn submit_btn me-2">View Scheduled Posts</a>
                <a href="{{ url_for('home') }}" class="btn back_btn">Back</a>
              </div>
        </div>
    </div>

  
  </div>


</section>
  
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
  <script>
    window.addEventListener("load", () => {
        const loader = document.getElementById("ftco-loader");
        const content = document.getElementById("content");


        setTimeout(() => {
            loader.style.display = "none";
            content.style.display = "block";
        }, 2000);
    });



</script>
</body>
</html>