mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-10-01 17:29:29 +05:30
374 lines
10 KiB
HTML
374 lines
10 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>ASCII Art Generator - MarkdownConverter</title>
|
|
<link rel="stylesheet" href="../fonts.css" />
|
|
<style>
|
|
:root {
|
|
--ci-dark-gray: #464646;
|
|
--ci-medium-gray: #9a9696;
|
|
--ci-accent: #e5461f;
|
|
--ci-light-gray: #e3e3e3;
|
|
--ci-black: #0d0b09;
|
|
--ci-white: #ffffff;
|
|
--ci-bg: #f5f5f5;
|
|
}
|
|
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Inter', system-ui, sans-serif;
|
|
background: var(--ci-bg);
|
|
color: var(--ci-dark-gray);
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.header {
|
|
background: linear-gradient(135deg, var(--ci-dark-gray) 0%, var(--ci-black) 100%);
|
|
padding: 16px 24px;
|
|
border-bottom: 3px solid var(--ci-accent);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.header h1 {
|
|
color: var(--ci-white);
|
|
font-size: 1.25rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.container {
|
|
padding: 24px;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.section {
|
|
background: var(--ci-white);
|
|
border-radius: 12px;
|
|
padding: 20px;
|
|
margin-bottom: 20px;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.section-title {
|
|
font-weight: 600;
|
|
margin-bottom: 16px;
|
|
color: var(--ci-dark-gray);
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.mode-tabs {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.mode-tab {
|
|
padding: 10px 20px;
|
|
border: 2px solid var(--ci-light-gray);
|
|
background: var(--ci-white);
|
|
border-radius: 8px;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.mode-tab:hover {
|
|
border-color: var(--ci-accent);
|
|
}
|
|
|
|
.mode-tab.active {
|
|
background: var(--ci-accent);
|
|
border-color: var(--ci-accent);
|
|
color: var(--ci-white);
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.form-label {
|
|
display: block;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
margin-bottom: 8px;
|
|
color: var(--ci-dark-gray);
|
|
}
|
|
|
|
.form-input,
|
|
.form-select,
|
|
.form-textarea {
|
|
width: 100%;
|
|
padding: 10px 14px;
|
|
border: 2px solid var(--ci-light-gray);
|
|
border-radius: 8px;
|
|
font-size: 0.875rem;
|
|
font-family: inherit;
|
|
transition: border-color 0.2s;
|
|
}
|
|
|
|
.form-input:focus,
|
|
.form-select:focus,
|
|
.form-textarea:focus {
|
|
outline: none;
|
|
border-color: var(--ci-accent);
|
|
}
|
|
|
|
.form-textarea {
|
|
min-height: 80px;
|
|
resize: vertical;
|
|
}
|
|
|
|
.preview-container {
|
|
background: var(--ci-black);
|
|
border-radius: 8px;
|
|
padding: 16px;
|
|
min-height: 200px;
|
|
max-height: 350px;
|
|
overflow: auto;
|
|
}
|
|
|
|
.preview-content {
|
|
font-family: 'JetBrains Mono', 'Fira Code', monospace;
|
|
font-size: 12px;
|
|
line-height: 1.3;
|
|
color: #00ff00;
|
|
white-space: pre;
|
|
font-feature-settings:
|
|
'liga' 0,
|
|
'calt' 0,
|
|
'dlig' 0;
|
|
}
|
|
|
|
.template-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 8px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.template-btn {
|
|
padding: 8px 12px;
|
|
border: 2px solid var(--ci-light-gray);
|
|
background: var(--ci-white);
|
|
border-radius: 6px;
|
|
font-size: 0.75rem;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.template-btn:hover {
|
|
border-color: var(--ci-accent);
|
|
background: rgba(229, 70, 31, 0.05);
|
|
}
|
|
|
|
.template-btn.active {
|
|
border-color: var(--ci-accent);
|
|
background: rgba(229, 70, 31, 0.1);
|
|
}
|
|
|
|
.footer {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 12px;
|
|
padding: 16px 24px;
|
|
background: var(--ci-white);
|
|
border-top: 1px solid var(--ci-light-gray);
|
|
position: sticky;
|
|
bottom: 0;
|
|
}
|
|
|
|
.btn {
|
|
padding: 10px 24px;
|
|
border-radius: 8px;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
border: none;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--ci-accent);
|
|
color: var(--ci-white);
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: #c93a18;
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: var(--ci-light-gray);
|
|
color: var(--ci-dark-gray);
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: #d0d0d0;
|
|
}
|
|
|
|
.mode-section {
|
|
display: none;
|
|
}
|
|
|
|
.mode-section.active {
|
|
display: block;
|
|
}
|
|
|
|
.template-category {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.template-category-title {
|
|
font-size: 0.8rem;
|
|
color: var(--ci-medium-gray);
|
|
margin-bottom: 8px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="header">
|
|
<h1>ASCII Art Generator</h1>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<div class="section">
|
|
<div class="mode-tabs">
|
|
<button class="mode-tab active" data-mode="text">Text Banner</button>
|
|
<button class="mode-tab" data-mode="box">Box/Frame</button>
|
|
<button class="mode-tab" data-mode="templates">Templates</button>
|
|
</div>
|
|
|
|
<!-- Text Banner Mode -->
|
|
<div id="text-mode" class="mode-section active">
|
|
<div class="form-group">
|
|
<label class="form-label">Text to Convert</label>
|
|
<input
|
|
type="text"
|
|
id="text-input"
|
|
class="form-input"
|
|
placeholder="Enter your text..."
|
|
maxlength="30"
|
|
/>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-label">Font</label>
|
|
<input
|
|
type="text"
|
|
id="font-search"
|
|
class="form-input"
|
|
placeholder="Search fonts…"
|
|
autocomplete="off"
|
|
/>
|
|
<select id="font-picker" class="form-select" size="8"></select>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Box/Frame Mode -->
|
|
<div id="box-mode" class="mode-section">
|
|
<div class="form-group">
|
|
<label class="form-label">Text Content</label>
|
|
<textarea
|
|
id="box-text"
|
|
class="form-textarea"
|
|
placeholder="Enter text for the box..."
|
|
></textarea>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-label">Box Style</label>
|
|
<select id="box-style" class="form-select">
|
|
<option value="single">Single Line</option>
|
|
<option value="double">Double Line</option>
|
|
<option value="rounded">Rounded</option>
|
|
<option value="bold">Bold</option>
|
|
<option value="ascii">ASCII (+|-)</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-label">Padding</label>
|
|
<input
|
|
type="number"
|
|
id="box-padding"
|
|
class="form-input"
|
|
min="0"
|
|
max="10"
|
|
value="2"
|
|
style="width: 100px"
|
|
/>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Templates Mode -->
|
|
<div id="templates-mode" class="mode-section">
|
|
<div class="template-category">
|
|
<div class="template-category-title">Arrows & Flow</div>
|
|
<div class="template-grid">
|
|
<button class="template-btn" data-template="arrow-right">Arrow Right</button>
|
|
<button class="template-btn" data-template="arrow-down">Arrow Down</button>
|
|
<button class="template-btn" data-template="decision">Decision</button>
|
|
<button class="template-btn" data-template="process">Process Flow</button>
|
|
</div>
|
|
</div>
|
|
<div class="template-category">
|
|
<div class="template-category-title">Diagrams</div>
|
|
<div class="template-grid">
|
|
<button class="template-btn" data-template="flowchart">Flowchart</button>
|
|
<button class="template-btn" data-template="sequence">Sequence</button>
|
|
<button class="template-btn" data-template="network">Network</button>
|
|
<button class="template-btn" data-template="hierarchy">Hierarchy</button>
|
|
</div>
|
|
</div>
|
|
<div class="template-category">
|
|
<div class="template-category-title">Boxes & Containers</div>
|
|
<div class="template-grid">
|
|
<button class="template-btn" data-template="header">Header</button>
|
|
<button class="template-btn" data-template="note">Note Box</button>
|
|
<button class="template-btn" data-template="warning">Warning</button>
|
|
<button class="template-btn" data-template="info">Info Box</button>
|
|
</div>
|
|
</div>
|
|
<div class="template-category">
|
|
<div class="template-category-title">Decorative</div>
|
|
<div class="template-grid">
|
|
<button class="template-btn" data-template="divider">Divider</button>
|
|
<button class="template-btn" data-template="separator">Separator</button>
|
|
<button class="template-btn" data-template="banner">Banner</button>
|
|
<button class="template-btn" data-template="checklist">Checklist</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section">
|
|
<div class="section-title">Preview</div>
|
|
<div
|
|
id="ascii-warning"
|
|
style="display: none; color: #e5461f; margin-bottom: 8px; font-size: 0.8rem"
|
|
></div>
|
|
<div class="preview-container">
|
|
<div id="preview" class="preview-content"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<button class="btn btn-secondary" id="btn-generate">Generate Preview</button>
|
|
<button class="btn btn-secondary" id="btn-copy">Copy to Clipboard</button>
|
|
<button class="btn btn-secondary" id="btn-save">Save to File</button>
|
|
<button class="btn btn-primary" id="btn-insert">Insert to Editor</button>
|
|
</div>
|
|
|
|
<script src="renderer/ascii-controller.js"></script>
|
|
</body>
|
|
</html>
|