Beautify html

This commit is contained in:
Mike JS. Choi 2018-05-10 15:18:24 -05:00
parent f01b1877f2
commit 110985aa9a
10 changed files with 108 additions and 121 deletions

View File

@ -1,5 +1,4 @@
{% if site.google_analytics_id %} {% if site.google_analytics_id %}
<script> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new
@ -9,5 +8,4 @@
ga('create', '{{ site.google_analytics_id }}', 'auto'); ga('create', '{{ site.google_analytics_id }}', 'auto');
ga('send', 'pageview'); ga('send', 'pageview');
</script> </script>
{% endif %} {% endif %}

View File

@ -1,18 +1,17 @@
<script> <script>
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables */
/** var disqus_config = function () {
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables */
var disqus_config = function () {
this.page.url = {{ page.url }}; // Replace PAGE_URL with your page's canonical URL variable this.page.url = {{ page.url }}; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = {{ page.id }}; // Replace PAGE_IDENTIFIER with your page's unique identifier variable this.page.identifier = {{ page.id }}; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
}; };
(function() { // DON'T EDIT BELOW THIS LINE (function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script'); var d = document, s = d.createElement('script');
s.src = 'https://{{ site.disqus_id }}.disqus.com/embed.js'; s.src = 'https://{{ site.disqus_id }}.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date()); s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s); (d.head || d.body).appendChild(s);
})(); })();
</script> </script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>

View File

@ -2,10 +2,8 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}</title> <title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}"> <meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<link href='https://fonts.googleapis.com/css?family=Roboto+Mono|Roboto:300,400,900,400italic' rel='stylesheet' type='text/css'> <link href='https://fonts.googleapis.com/css?family=Roboto+Mono|Roboto:300,400,900,400italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}"> <link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}"> <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">

View File

@ -1,6 +1,5 @@
<header class="c-page__header"> <header class="c-page__header">
<h1><code>{{ site.title}}</code></h1> <h1><code>{{ site.title}}</code></h1>
{% if page.title == 'Home' %} {% if page.title == 'Home' %}
<h1>{{ site.description }}</h1> <h1>{{ site.description }}</h1>
{% endif %} {% endif %}

View File

@ -1,7 +1,6 @@
--- ---
layout: page layout: page
--- ---
<article class="c-article"> <article class="c-article">
<header class="c-article__header"> <header class="c-article__header">
<h1 class="c-article__title">{{ page.title }}</h1> <h1 class="c-article__title">{{ page.title }}</h1>

View File

@ -6,18 +6,15 @@ layout: page
<h1 class="c-article__title">{{ page.title }}</h1> <h1 class="c-article__title">{{ page.title }}</h1>
<p class="c-article__time"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time></p> <p class="c-article__time"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time></p>
</header> </header>
<!-- Post Tags --> <!-- Post Tags -->
<ul class="c-tags"> <ul class="c-tags">
{% for tag in page.tags %} {% for tag in page.tags %}
<li class="c-tag">{{ tag }}</li> <li class="c-tag">{{ tag }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
<div class="c-article__main"> <div class="c-article__main">
{{ content }} {{ content }}
</div> </div>
<!-- Previous / Next Buttons --> <!-- Previous / Next Buttons -->
<div class="pagenav"> <div class="pagenav">
{% if page.previous.url %} {% if page.previous.url %}
@ -35,7 +32,6 @@ layout: page
</div> </div>
{% endif %} {% endif %}
</div> </div>
<!-- Disqus comments view --> <!-- Disqus comments view -->
{% if page.comments != false and site.disqus_id %} {% if page.comments != false and site.disqus_id %}
<div class="post-disqus"> <div class="post-disqus">

View File

@ -2,12 +2,10 @@
layout: page layout: page
title: Home title: Home
--- ---
<section class="c-archives"> <section class="c-archives">
{% for post in site.posts %} {% for post in site.posts %}
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
{% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %} {% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
{% if forloop.first %} {% if forloop.first %}
<h2 class="c-archives__year" id="{{ this_year }}-ref">{{this_year}}</h2> <h2 class="c-archives__year" id="{{ this_year }}-ref">{{this_year}}</h2>
<ul class="c-archives__list"> <ul class="c-archives__list">
@ -24,10 +22,10 @@ title: Home
</ul> </ul>
{% else %} {% else %}
{% if this_year != next_year %} {% if this_year != next_year %}
</ul> </ul>
<h2 class="c-archives__year" id="{{ next_year }}-ref">{{next_year}}</h2> <h2 class="c-archives__year" id="{{ next_year }}-ref">{{next_year}}</h2>
<ul class="c-archives__list"> <ul class="c-archives__list">
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</section> </section>