{% extends 'base.html' %}

{% block title %}
Import followed titles
{% endblock %}

{% block head %}
<style>
input[type=file] {
  border: 2px solid black;
  border-radius: var(--border-radius);
  margin: 1rem 0;
}

.message {
  color: red;
}
</style>
{% endblock %}

{% block content %}
<h1>Importing from Tachiyomi</h1>

<form method="POST" enctype="multipart/form-data" class="upload-form">
  <p>Go to <b>Settings > Backup > Create backup</b>, then upload the generated json file here:</p>
  <input type="file" name="tachiyomi"><br>
  {{ ibutton(text='Submit') }}
</form>

{% with messages = get_flashed_messages() %}
  {% for message in messages %}
  <p class="message">{{ message }}</p>
  {% endfor %}
{% endwith %}

{% endblock %}
