Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: highlight code snippets #17

Merged
merged 4 commits into from
Jul 24, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
<style>
.o-a {overflow-x: auto;}
.mw-800p {max-width: 800px; margin: auto;}
.bg-gray-700 {background-color: #4A5568;}
.hide-scrollbar {-ms-overflow-style: none; scrollbar-width: none;}
.hide-scrollbar::-webkit-scrollbar {display: none;}
muety marked this conversation as resolved.
Show resolved Hide resolved
pre {margin-top: auto; margin-bottom: auto;}
</style>
</head>
<body class="text-center pt-1">
Expand All @@ -66,7 +70,10 @@ <h1><a href="https://github.com/brentvollebregt/hit-counter">Hit Counter</a></h1

<h2 class="mt-4">Get the Image for the Page It's On</h2>
<p class="my-1">If you want to get the hit count image for a page you can edit and you want to count, add this line:</p>
<p id="standard" class="text-primary my-0 o-a">&lt;img src="<script>host()</script>/count/tag.svg" alt="Hits"&gt;</p>
<div class="bg-gray-700 mw-100 rounded py-2 px-4" style="display: inline-block">
<pre class="hide-scrollbar"><code class="text-white">&lt;img src="<script>host()</script>/count/tag.svg" alt="Hits"&gt;</code></pre>
</div>
muety marked this conversation as resolved.
Show resolved Hide resolved
<div></div>
muety marked this conversation as resolved.
Show resolved Hide resolved
<button type="button" class="btn btn-outline-primary mt-3" onclick="copyContentOf('standard')">Copy HTML Snippet</button>

<h2 class="mt-4">Generate SVG Code For A Different Website</h2>
Expand All @@ -87,9 +94,15 @@ <h2 class="mt-4">Generate SVG Code For A Different Website</h2>
<img id="resultImage" src="" alt="Selected Hit Counter">
</div>
<p class="text-muted my-1">Image Tag</p>
<p id="resultImageTag" class="text-primary my-0 o-a"></p>
<div class="bg-gray-700 mw-100 rounded py-2 px-4" style="display: inline-block">
<pre class="hide-scrollbar"><code class="text-white" id="resultImageTag"></code></pre>
</div>
<div></div>
<p class="text-muted my-1">Markdown</p>
<p id="resultMarkdown" class="text-primary my-0 o-a"></p>
<div class="bg-gray-700 mw-100 rounded py-2 px-4" style="display: inline-block">
<pre class="hide-scrollbar"><code class="text-white" id="resultMarkdown"></code></pre>
</div>
<div></div>
<button type="button" class="btn btn-outline-primary mt-3" onclick="copyContentOf('resultImageTag')">Copy Image Tag</button>
<button type="button" class="btn btn-outline-primary mt-3" onclick="copyContentOf('resultMarkdown')">Copy Markdown</button>

Expand Down