Compare commits
3 Commits
5abbf367ab
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ff1f6a2aa | |||
| 4fa225900f | |||
| a4fe70de60 |
@@ -41,7 +41,7 @@
|
||||
<p class="center"><a href="{{ url_for('loginlogout.lost_password') }}"> Mouarf j'ai perdu mon mot de passe </a> </p>
|
||||
<button class="btn btn-default btn-primary" type="submit"> Login </button>
|
||||
</form>
|
||||
{% if list_post %}
|
||||
{% if list_posts %}
|
||||
<h2> Les derniers articles de blog sur le serveur </h2>
|
||||
<div class="list-articles" >
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<article>
|
||||
<header>
|
||||
<h3> {{ article.title }} </h3>
|
||||
<h5> par <a href="/blog/{{ article.author }}/">/{{ article.author }}</a> </h5>
|
||||
<h5> par <a href="/blog/{{ article.author }}/">{{ article.author }}</a> </h5>
|
||||
<br/>
|
||||
<small> Créé le : {{ article.creation_date }} </small> <br/>
|
||||
{% if article.last_updated %}
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
<a href="/blog/{{ author }}/rss.xml"> S'abonner au flux RSS </a>
|
||||
<div class="articles">
|
||||
<a href="/blog/{{ author }}/rss.xml"> S'abonner au fl RSS </a>
|
||||
{% for post in posts %}
|
||||
|
||||
<h2 class="index"> {{ post.title }} </h2>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
|
||||
<div class="articles">
|
||||
<a href="/blog/rss.xml"> S'abonner au flux RSS </a>
|
||||
<a href="/blog/rss.xml"> Suivre ce blog par RSS </a>
|
||||
{% for post in posts %}
|
||||
|
||||
<h2 class="index"> {{ post.title }}</h2>
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
{% if token %}
|
||||
<h3> Votre lien d'inscription en cours: </h3>
|
||||
|
||||
<a href="{{ url_invitation }}">
|
||||
<a href="{{ url_invitation }}" id="copy-link">
|
||||
{{ url_invitation }}
|
||||
</a> <button class="ghost" onclick="navigator.clipboard.writeText('"{{ url_invitation }}');" > Copier le lien </button>
|
||||
</a> <button class="ghost" onclick="copyLinkToClipboard()" > Copier le lien </button>
|
||||
|
||||
|
||||
<p> ou faîtes scanner ce qrcode :)</p>
|
||||
@@ -35,7 +35,22 @@
|
||||
<a href="/gen_token/">
|
||||
<button type="submit" id="tada" class="btn btn btn-success"> Créer un nouveau lien </button></a>
|
||||
|
||||
<script>
|
||||
|
||||
function copyLinkToClipboard(){
|
||||
|
||||
elt = document.getElementById("copy-link");
|
||||
try {
|
||||
console.log(elt.outerText);
|
||||
navigator.clipboard.writeText(elt.outerText);
|
||||
} catch (error)
|
||||
{
|
||||
console.error (error.message)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ def edit(title):
|
||||
cursor.execute("""SELECT title, subtitle, category, content, status FROM Blog_posts WHERE title=? AND author=?""", (title, user))
|
||||
oldpost = cursor.fetchone()
|
||||
conn.close()
|
||||
post = dict(title=oldpost[0], subtitle=oldpost[1], categoory=oldpost[2], content=oldpost[3], status=oldpost[4])
|
||||
post = dict(title=oldpost[0], subtitle=oldpost[1], category=oldpost[2], content=oldpost[3], status=oldpost[4])
|
||||
return render_template('edit_article.html',
|
||||
section='Post-it',
|
||||
oldpost=post)
|
||||
@@ -223,7 +223,7 @@ def viewuser(author):
|
||||
posts=[dict(title=post[0], subtitle=post[1], creation_date=post[2], last_updated=post[3], author=post[4], status=post[5])] + posts
|
||||
|
||||
|
||||
return render_template('index_author_blog.html', section='Blog', posts=posts, author=author)
|
||||
return render_template('index_blog.html', section='Blog', posts=posts, author=author)
|
||||
|
||||
@blog.route('/blog/<author>/rss.xml', methods=['GET'])
|
||||
def viewauthorrss(author):
|
||||
|
||||
@@ -237,7 +237,7 @@ def blog_theme(author):
|
||||
if os.path.isfile(os.path.join(DOSSIER_PERSO, user,'blog.css')):
|
||||
return send_file(os.path.join(DOSSIER_PERSO, user, 'blog.css'), mimetype='text/css')
|
||||
else:
|
||||
return send_file("/static/blog.css", mimetype='text/css')
|
||||
return send_file("static/blog.css", mimetype='text/css')
|
||||
|
||||
@filesupload.route('/theme.min.css')
|
||||
def theme():
|
||||
|
||||
Reference in New Issue
Block a user