Work in blog section
- Arrange the rss feed - The articles are listed in chronological order - Test the doublon for new article
This commit is contained in:
@@ -5,7 +5,9 @@
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
|
||||
xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
|
||||
<channel>
|
||||
<atom:link href="https://{{base_url}}]/blog/{%if user %}{{ user }}/{% endif %}rss.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
<channel>
|
||||
<title> Le blog de {{ blog_name }} </title>
|
||||
<link> {{ base_url }}/blog/ </link>
|
||||
{% if blog_description %}
|
||||
@@ -16,7 +18,7 @@
|
||||
{% for post in posts %}
|
||||
<item>
|
||||
<title> {{ post.title }} </title>
|
||||
<pubdate> {% if post.last_updated %} {{ post.last_updated }} {% else %} {{ post.creation_date }} {% endif %} </pubdate>
|
||||
<pubDate> {% if post.last_updated %} {{ post.last_updated }} {% else %} {{ post.creation_date }} {% endif %} </pubDate>
|
||||
<link> {{base_url}}/{{ url_for('blog.viewArticle', username=post.author, title_id=post.title_id) }}</link>
|
||||
<guid> {{base_url}}/{{ url_for('blog.viewArticle', username=post.author, title_id=post.title_id) }} </guid>
|
||||
|
||||
|
||||
@@ -16,31 +16,49 @@
|
||||
|
||||
<form method="POST" action="{{ url_for('blog.new_article') }}" id="postform">
|
||||
|
||||
<input type="text" name="title" id="title" placeholder="Titre" class="form-control"><br />
|
||||
<input type="text" name="subtitle" id="subtitle" placeholder="Sous-titre" class="form-control"><br />
|
||||
<input type="text" name="category" id="category" placeholder="Catégories #hashtag" class="form-control"><br />
|
||||
<hr>
|
||||
<textarea id="editeurMarkdown" class="form-control" form="postform" name="content" id="content" placeholder="Contenu" style="height:20vw; margin-right:2vw;"></textarea><br />
|
||||
|
||||
<input type="text" name="title" id="title" placeholder="titre" class="form-control" value="{{ title }}"><br />
|
||||
<input type="text" name="subtitle" id="subtitle" placeholder="sous-titre" class="form-control" value="{{ subtitle }}"><br />
|
||||
<input type="text" name="category" id="category" placeholder="Catégorie" class="form-control" value="{{ category }}"><br />
|
||||
<textarea id="editeurMarkdown" class="form-control" form="postform" name="content" placeholder="Contenu" style="height:20vw;">
|
||||
{{ content }}</textarea>
|
||||
<br />
|
||||
<h3> Visibilité </h3>
|
||||
|
||||
<div class="center">
|
||||
<p> Les articles brouillons ne sont visibles que par vous même</p>
|
||||
<p> Les articles privés ne sont visibles que par les membres du serveur </p>
|
||||
<p> Les articles public sont visibles par tout le monde </p>
|
||||
|
||||
|
||||
{% if status == 'public' or status == "public_unified" %}
|
||||
<input type="radio" name="status" value="draft"> Brouillon
|
||||
<input type="radio" name="status" value="private" checked> Privé
|
||||
<input type="radio" name="status" value="public">Public<br>
|
||||
<input type="radio" name="status" value="private"> Privé
|
||||
<input type="radio" name="status" value="public" checked> Publique
|
||||
|
||||
{% elif status == 'private' or status == "private_unified" %}
|
||||
<input type="radio" name="status" value="draft"> Brouillon
|
||||
<input type="radio" name="status" value="private" checked> Privé
|
||||
<input type="radio" name="status" value="public"> Publique
|
||||
{% else %}
|
||||
<input type="radio" name="status" value="draft" checked> Brouillon
|
||||
<input type="radio" name="status" value="private"> Privé
|
||||
<input type="radio" name="status" value="public"> Publique
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
|
||||
<fieldset>
|
||||
<label>
|
||||
|
||||
<input id="blog-unified" name="blog-unified" type="checkbox" role="switch" />
|
||||
Publier cet article dans le blog général
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
<label>
|
||||
|
||||
{% if status == "private_unified" or status == "public_unified" %}
|
||||
<input id="blog-unified" name="blog-unified" type="checkbox" role="switch" checked />
|
||||
{% else %}
|
||||
<input id="blog-unified" name="blog-unified" type="checkbox" role="switch" />
|
||||
{% endif %}
|
||||
Publier cet article dans le blog général
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
<button type="submit"> Créer l'article </button>
|
||||
</form>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user