-
-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix invalid HTML and improve UX
- Loading branch information
Showing
6 changed files
with
182 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,54 @@ | ||
{% extends "layout.html" %} | ||
{% block content %} | ||
<section class="section" id="chat"> | ||
<div class="columns"> | ||
<div class="column is-three-quarters"> | ||
<div class="box"> | ||
<template id="message"> | ||
<div><strong class="username">Kévin</strong>: <span class="msg"></span></div> | ||
</template> | ||
<div id="messages"></div> | ||
<section class="section" id="chat"> | ||
<div class="columns"> | ||
<div class="column is-three-quarters"> | ||
<div class="box"> | ||
<template id="message"> | ||
<div><strong class="username">Kévin</strong>: <span class="msg"></span></div> | ||
</template> | ||
<div id="messages"></div> | ||
|
||
<form> | ||
<div class="field has-addons"> | ||
<div class="control is-expanded"> | ||
<input name="message" placeholder="Your message..." autocomplete="off" required class="input is-small is-fullwidth"> | ||
</div> | ||
<div class="control"> | ||
<button class="button is-primary is-small">Post</button> | ||
</div> | ||
<form> | ||
<div class="field has-addons"> | ||
<div class="control is-expanded"> | ||
<input name="message" placeholder="Your message..." autocomplete="off" required | ||
class="input is-small is-fullwidth"> | ||
</div> | ||
</form> | ||
</div> | ||
<div class="control"> | ||
<button class="button is-primary is-small">Post</button> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
|
||
<div class="column"> | ||
<div class="panel"> | ||
<p class="panel-heading">Online</p> | ||
|
||
<template id="online-user"> | ||
<div class="panel-block"> | ||
<span class="panel-icon"> | ||
<i class="fas fa-user" aria-hidden="true"></i> | ||
</span> | ||
<span class="username"></span> | ||
</div> | ||
</template> | ||
<div class="column"> | ||
<div class="panel"> | ||
<p class="panel-heading">Online</p> | ||
|
||
<div class="panel-block is-active"> | ||
<template id="online-user"> | ||
<div class="panel-block"> | ||
<span class="panel-icon"> | ||
<i class="fas fa-smile" aria-hidden="true"></i> | ||
<i class="fas fa-user" aria-hidden="true"></i> | ||
</span> | ||
<span id="username" title="This is you"></span> | ||
<span class="username"></span> | ||
</div> | ||
</template> | ||
|
||
<div id="user-list"></div> | ||
<div class="panel-block is-active"> | ||
<span class="panel-icon"> | ||
<i class="fas fa-smile" aria-hidden="true"></i> | ||
</span> | ||
<span id="username" title="This is you"></span> | ||
</div> | ||
|
||
<div id="user-list"></div> | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
</section> | ||
|
||
<script type="application/json" id="config"> | ||
{{ config|tojson|safe }} | ||
</script> | ||
<script src="/static/chat.js"></script> | ||
<script type="application/json" id="config">{{ config|tojson|safe }}</script> | ||
<script src="/static/chat.js"></script> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
{% extends "layout.html" %} | ||
{% block content %} | ||
<section class="section has-text-centered"> | ||
<h1 class="title">Join the chat</h1> | ||
<form method="POST" action="{{ url_for('chat') }}"> | ||
<div class="field is-grouped is-grouped-centered"> | ||
<div class="control has-icons-left"> | ||
<input name="username" placeholder="Username" size="20" required class="input"> | ||
<span class="icon is-small is-left"> | ||
<i class="fas fa-smile"></i> | ||
</span> | ||
</div> | ||
<div class="control"> | ||
<button class="button is-primary">Join!</button> | ||
</div> | ||
<section class="section has-text-centered"> | ||
<h1 class="title">Join the chat</h1> | ||
<form method="POST" action="{{ url_for('chat') }}"> | ||
<div class="field is-grouped is-grouped-centered"> | ||
<div class="control has-icons-left"> | ||
<input name="username" placeholder="Username" size="20" required class="input"> | ||
<span class="icon is-small is-left"> | ||
<i class="fas fa-smile"></i> | ||
</span> | ||
</div> | ||
</form> | ||
</section> | ||
<div class="control"> | ||
<button class="button is-primary">Join!</button> | ||
</div> | ||
</div> | ||
</form> | ||
</section> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,40 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>A chat using Mercure</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="/static/app.css"> | ||
</head> | ||
|
||
<body> | ||
<div class="hero is-light is-small"> | ||
<div class="hero-body has-text-centered"> | ||
<div class="container"> | ||
<div class="column is-three-fifths is-offset-one-fifth"> | ||
<h1 class="title"> | ||
<a href="https://mercure.rocks"><img src="https://mercure.rocks/static/logo.svg" alt="Mercure"></a> | ||
</h1> | ||
<h2 class="subtitle">Demo Chat App (<a href="https://github.com/dunglas/mercure/tree/master/examples/chat">sources</a>)</h2> | ||
</div> | ||
</div> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>A chat using Mercure</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css" | ||
crossorigin="anonymous"> | ||
<link rel="stylesheet" href="/static/app.css"> | ||
</head> | ||
|
||
<body> | ||
<div class="hero is-light is-small"> | ||
<div class="hero-body has-text-centered"> | ||
<div class="container"> | ||
<div class="column is-three-fifths is-offset-one-fifth"> | ||
<h1 class="title"> | ||
<a href="https://mercure.rocks"><img src="https://mercure.rocks/static/logo.svg" alt="Mercure"></a> | ||
</h1> | ||
<h2 class="subtitle">Demo Chat App (<a | ||
href="https://github.com/dunglas/mercure/tree/master/examples/chat">sources</a>)</h2> | ||
</div> | ||
</div> | ||
<main role="main" class="container">{% block content %}{% endblock %}</main> | ||
<footer class="footer"> | ||
<div class="content has-text-centered"> | ||
<p> | ||
This is a demo chat using <a href="https://mercure.rocks">Mercure</a>.<br><a href="https://github.com/dunglas/mercure/tree/master/examples/chat">Source code</a> | ||
</p> | ||
</div> | ||
</footer> | ||
</body> | ||
</div> | ||
</div> | ||
<main role="main" class="container">{% block content %}{% endblock %}</main> | ||
<footer class="footer"> | ||
<div class="content has-text-centered"> | ||
<p> | ||
This is a demo chat using <a href="https://mercure.rocks">Mercure</a>.<br><a | ||
href="https://github.com/dunglas/mercure/tree/master/examples/chat">Source code</a> | ||
</p> | ||
</div> | ||
</footer> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
h1 { | ||
margin-top: 15px; | ||
.hero { | ||
margin-bottom: 15px; | ||
} | ||
|
||
.hero img { | ||
width: 40%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.