Update index.html
Browse files- index.html +68 -9
index.html
CHANGED
|
@@ -3,26 +3,85 @@
|
|
| 3 |
<head>
|
| 4 |
<title>Convertisseur Markdown</title>
|
| 5 |
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
table {
|
| 7 |
-
border-collapse: collapse;
|
|
|
|
|
|
|
| 8 |
}
|
|
|
|
| 9 |
th, td {
|
| 10 |
-
border: 1px solid
|
|
|
|
|
|
|
| 11 |
}
|
| 12 |
</style>
|
| 13 |
-
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
| 14 |
</head>
|
| 15 |
<body>
|
| 16 |
-
<
|
| 17 |
-
|
| 18 |
-
<button onclick="convertir()">Convertir</button>
|
| 19 |
-
<div id="preview"></div>
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
<script>
|
| 22 |
function convertir() {
|
| 23 |
-
var markdownText = document.getElementById(
|
| 24 |
var html = marked.parse(markdownText);
|
| 25 |
-
document.getElementById(
|
| 26 |
}
|
| 27 |
</script>
|
| 28 |
</body>
|
|
|
|
| 3 |
<head>
|
| 4 |
<title>Convertisseur Markdown</title>
|
| 5 |
<style>
|
| 6 |
+
body {
|
| 7 |
+
font-family: 'Arial', sans-serif;
|
| 8 |
+
display: flex;
|
| 9 |
+
flex-direction: column;
|
| 10 |
+
align-items: center;
|
| 11 |
+
min-height: 100vh;
|
| 12 |
+
background-color: #f0f2f5; /* Fond gris clair */
|
| 13 |
+
margin: 0;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
.container {
|
| 17 |
+
background-color: white;
|
| 18 |
+
border-radius: 8px;
|
| 19 |
+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
| 20 |
+
padding: 20px;
|
| 21 |
+
width: 80%;
|
| 22 |
+
max-width: 800px;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
h1 {
|
| 26 |
+
text-align: center;
|
| 27 |
+
color: #333; /* Gris foncé */
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
textarea, #preview {
|
| 31 |
+
width: 100%;
|
| 32 |
+
height: 200px;
|
| 33 |
+
padding: 10px;
|
| 34 |
+
border: 1px solid #ddd;
|
| 35 |
+
border-radius: 4px;
|
| 36 |
+
resize: vertical;
|
| 37 |
+
font-family: monospace;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
button {
|
| 41 |
+
background-color: #007bff; /* Bleu primaire */
|
| 42 |
+
color: white;
|
| 43 |
+
padding: 10px 20px;
|
| 44 |
+
border: none;
|
| 45 |
+
border-radius: 4px;
|
| 46 |
+
cursor: pointer;
|
| 47 |
+
margin-top: 10px;
|
| 48 |
+
transition: background-color 0.3s ease; /* Effet de survol */
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
button:hover {
|
| 52 |
+
background-color: #0069d9; /* Bleu plus foncé au survol */
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
table {
|
| 56 |
+
border-collapse: collapse;
|
| 57 |
+
width: 100%;
|
| 58 |
+
margin-top: 10px;
|
| 59 |
}
|
| 60 |
+
|
| 61 |
th, td {
|
| 62 |
+
border: 1px solid #ddd;
|
| 63 |
+
padding: 8px;
|
| 64 |
+
text-align: left;
|
| 65 |
}
|
| 66 |
</style>
|
|
|
|
| 67 |
</head>
|
| 68 |
<body>
|
| 69 |
+
<div class="container">
|
| 70 |
+
<h1>Convertisseur Markdown</h1>
|
|
|
|
|
|
|
| 71 |
|
| 72 |
+
<textarea id="markdown"></textarea>
|
| 73 |
+
|
| 74 |
+
<button onclick="convertir()">Convertir en HTML</button>
|
| 75 |
+
|
| 76 |
+
<div id="preview"></div>
|
| 77 |
+
</div>
|
| 78 |
+
|
| 79 |
+
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
| 80 |
<script>
|
| 81 |
function convertir() {
|
| 82 |
+
var markdownText = document.getElementById("markdown").value;
|
| 83 |
var html = marked.parse(markdownText);
|
| 84 |
+
document.getElementById("preview").innerHTML = html;
|
| 85 |
}
|
| 86 |
</script>
|
| 87 |
</body>
|