diff mrjunejune/src/tools/markdown_to_html/index.css @ 184:8c74204fd362

[MD to HTML] Updated so it can be used through readme to html
author MrJuneJune <me@mrjunejune.com>
date Fri, 23 Jan 2026 22:20:35 -0800
parents 902e29c38d66
children
line wrap: on
line diff
--- a/mrjunejune/src/tools/markdown_to_html/index.css	Fri Jan 23 21:19:08 2026 -0800
+++ b/mrjunejune/src/tools/markdown_to_html/index.css	Fri Jan 23 22:20:35 2026 -0800
@@ -7,222 +7,219 @@
 body {
   line-height: 1.6;
   padding: 20px;
-  max-width: 1200px;
+  max-width: 1400px;
   margin: 0 auto;
 }
 
-button {
-  background: var(--accent);
-  color: var(--white);
-  border: none;
-  padding: 10px 20px;
-  border-radius: 4px;
-  cursor: pointer;
-  font-size: 16px;
-  margin-top: 10px;
-}
-
-.title button {
-  margin-top: 0px;
-  margin-bottom: 10px;
-}
-
-button:hover {
-  background: var(--accent-dark);
-}
-
-h1 {
-  color: var(--darkgray);
-  margin-bottom: 20px;
-}
-
-textarea {
-  width: 100%;
-  height: 700px;
-  padding: 15px;
-  background: rgb(var(--gray-light));
-  color: var(--darkgray);
-  border-radius: 4px;
-  font-family: 'Courier New', monospace;
-  font-size: 14px;
-  resize: vertical;
-}
-
-.container {
-  display: grid;
-  grid-template-columns: 1fr 1fr;
-  gap: 20px;
-  margin-top: 20px;
-}
-
-.title {
-  display: grid;
-  grid-template-columns: 1fr 1fr;
-  margin-bottom: 10px;
-}
-
-.panel {
-  background: var(--white);
-  border-radius: 8px;
-  border: 1px dotted #ccc;
-  padding: 20px;
-}
-
-#output {
-  min-height: 500px;
-  padding: 15px;
-  border: 1px solid rgb(var(--gray-light));
-  border-radius: 4px;
-  background: rgb(var(--gray-light));
-}
-
-h1, h2, h3, h4, h5, h6 {
-  margin: 20px 0 10px 0;
-  color: var(--darkgray);
-}
-
-h1 { font-size: 2em; }
-h2 { font-size: 1.5em; }
-h3 { font-size: 1.3em; }
-
-p {
-  margin: 10px 0;
-}
-
-ul, ol {
-  margin: 10px 0;
-  padding-left: 30px;
-}
-
-li {
-  margin: 5px 0;
-}
-
-code {
-  background: rgb(var(--gray-light));
-  padding: 2px 6px;
-  border-radius: 3px;
-  font-family: 'Courier New', monospace;
-  font-size: 0.9em;
-}
-
-pre {
-  background: #282c34;
-  color: #abb2bf;
-  padding: 15px;
-  border-radius: 4px;
-  overflow-x: auto;
-  margin: 10px 0;
-  text-wrap: auto;
-}
-
-pre code {
-  background: none;
-  color: inherit;
-  padding: 0;
-}
-
-blockquote {
-  border-left: 4px solid rgb(var(--gray-light));
-  padding-left: 15px;
-  margin: 10px 0;
-  color: var(--gray);
-  font-style: italic;
-}
-
-a {
-  color: var(--accent);
-  text-decoration: none;
-}
-
-a:hover {
-  text-decoration: underline;
-}
-
-hr {
-  border: none;
-  border-top: 2px solid var(--black);
-  margin: 20px 0;
-}
-
-img {
-  max-width: 100%;
-  height: auto;
-}
-
-strong {
-  font-weight: bold;
-}
-
-em {
-  font-style: italic;
-}
-
-del {
-  text-decoration: line-through;
-}
-
 .header {
   text-align: center;
   margin-bottom: 30px;
 }
 
+.header h1 {
+  color: rgb(var(--gray-dark));
+  margin-bottom: 10px;
+}
+
+.container {
+  display: grid;
+  grid-template-columns: 1fr 1fr;
+  gap: 20px;
+  height: calc(100vh - 200px);
+  min-height: 500px;
+}
+
+.panel {
+  display: flex;
+  flex-direction: column;
+  background: var(--white);
+  border-radius: 8px;
+  border: 1px solid rgba(var(--gray), 0.3);
+  padding: 15px;
+  overflow: hidden;
+}
+
+.title {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-bottom: 10px;
+  flex-shrink: 0;
+}
+
 .label {
-  font-weight: bold;
-  margin-bottom: 10px;
-  color: var(--gray);
+  font-weight: 600;
+  color: rgb(var(--gray-dark));
+  font-size: 14px;
+  text-transform: uppercase;
+  letter-spacing: 0.5px;
+}
+
+button {
+  background: var(--accent);
+  color: var(--white);
+  border: none;
+  padding: 8px 16px;
+  border-radius: 4px;
+  cursor: pointer;
+  font-size: 14px;
+  transition: background 0.2s;
+}
+
+button:hover {
+  background: var(--accent-dark);
+}
+
+/* Input textarea */
+textarea {
+  flex: 1;
+  width: 100%;
+  padding: 15px;
+  background: rgb(var(--gray-light));
+  color: rgb(var(--gray-dark));
+  border: 1px solid rgba(var(--gray), 0.3);
+  border-radius: 4px;
+  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
+  font-size: 14px;
+  line-height: 1.5;
+  resize: none;
+}
+
+textarea:focus {
+  outline: none;
+  border-color: var(--accent);
+}
+
+/* Output panel */
+#output {
+  flex: 1;
+  padding: 15px;
+  border: 1px solid rgba(var(--gray), 0.3);
+  border-radius: 4px;
+  background: var(--white);
+  color: rgb(var(--gray-dark));
+  overflow-y: auto;
+  font-size: 15px;
+}
+
+/* Markdown output styles */
+#output h1, #output h2, #output h3, #output h4, #output h5, #output h6 {
+  margin: 1em 0 0.5em 0;
+  color: rgb(var(--gray-dark));
+  line-height: 1.3;
 }
 
-.title .label {
-  margin-bottom: 0px;
+#output h1:first-child, #output h2:first-child, #output h3:first-child {
+  margin-top: 0;
+}
+
+#output h1 { font-size: 1.8em; }
+#output h2 { font-size: 1.5em; }
+#output h3 { font-size: 1.25em; }
+#output h4 { font-size: 1.1em; }
+
+#output p {
+  margin: 0.8em 0;
+}
+
+#output ul, #output ol {
+  margin: 0.8em 0;
+  padding-left: 25px;
+}
+
+#output li {
+  margin: 0.3em 0;
+}
+
+#output code {
+  background: rgb(var(--gray-light));
+  padding: 2px 6px;
+  border-radius: 3px;
+  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
+  font-size: 0.9em;
+  color: var(--accent);
+}
+
+#output pre {
+  background: var(--black);
+  color: var(--white);
+  padding: 15px;
+  border-radius: 6px;
+  overflow-x: auto;
+  margin: 1em 0;
+  line-height: 1.4;
+}
+
+#output pre code {
+  background: none;
+  color: inherit;
+  padding: 0;
 }
 
-@media (max-width: 768px) {
+#output blockquote {
+  border-left: 4px solid var(--accent);
+  padding: 10px 15px;
+  margin: 1em 0;
+  background: rgb(var(--gray-light));
+  color: rgb(var(--gray));
+  font-style: italic;
+}
+
+#output a {
+  color: var(--accent);
+  text-decoration: none;
+}
+
+#output a:hover {
+  text-decoration: underline;
+}
+
+#output hr {
+  border: none;
+  border-top: 1px solid rgb(var(--gray-light));
+  margin: 1.5em 0;
+}
+
+#output img {
+  max-width: 100%;
+  height: auto;
+  border-radius: 4px;
+}
+
+#output strong {
+  font-weight: 600;
+}
+
+#output em {
+  font-style: italic;
+}
+
+#output del {
+  text-decoration: line-through;
+  color: rgb(var(--gray));
+}
+
+/* Mobile */
+@media (max-width: 900px) {
   body {
-    padding: 10px;
-    font-size: 16px;
+    padding: 15px;
   }
 
   .container {
     grid-template-columns: 1fr;
+    height: auto;
     gap: 15px;
   }
 
-  h1 {
-    font-size: 1.75rem;
-  }
-
   .panel {
-    padding: 15px;
+    min-height: 350px;
   }
 
   textarea {
-    height: 400px;
-    font-size: 16px;
+    min-height: 300px;
   }
 
   #output {
     min-height: 300px;
-    font-size: 1rem;
   }
-
-  button {
-    font-size: 1rem;
-    padding: 12px 20px;
-    min-height: 44px;
-    width: 100%;
-  }
-
-  .title {
-    grid-template-columns: 1fr;
-    gap: 10px;
-  }
-
-  .label {
-    font-size: 1rem;
-  }
-
-  h1 { font-size: 1.75em; }
-  h2 { font-size: 1.5em; }
-  h3 { font-size: 1.25em; }
 }