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. this.page.url = {{ page.url }}; // Replace PAGE_URL with your page's canonical URL variable
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables */ this.page.identifier = {{ page.id }}; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
var disqus_config = function () { (function() { // DON'T EDIT BELOW THIS LINE
this.page.url = {{ page.url }}; // Replace PAGE_URL with your page's canonical URL variable var d = document, s = d.createElement('script');
this.page.identifier = {{ page.id }}; // Replace PAGE_IDENTIFIER with your page's unique identifier variable s.src = 'https://{{ site.disqus_id }}.disqus.com/embed.js';
}; s.setAttribute('data-timestamp', +new Date());
(function() { // DON'T EDIT BELOW THIS LINE (d.head || d.body).appendChild(s);
var d = document, s = d.createElement('script'); })();
s.src = 'https://{{ site.disqus_id }}.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(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

@ -1,4 +1,4 @@
<footer class="c-page__footer"> <footer class="c-page__footer">
<p>&copy; {{ site.author }} {{ 'now' | date: '%Y' }}</p> <p>&copy; {{ site.author }} {{ 'now' | date: '%Y' }}</p>
<p>{% if site.twitter_username %}<a href="https://twitter.com/{{ site.twitter_username }}">Twitter</a><span class="u-separate"></span>{% endif %}{% if site.github_username %}<a href="https://github.com/{{ site.github_username }}">Github</a>{% endif %}</p> <p>{% if site.twitter_username %}<a href="https://twitter.com/{{ site.twitter_username }}">Twitter</a><span class="u-separate"></span>{% endif %}{% if site.github_username %}<a href="https://github.com/{{ site.github_username }}">Github</a>{% endif %}</p>
</footer> </footer>

View File

@ -1,13 +1,11 @@
<head> <head>
<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 rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
<link href='https://fonts.googleapis.com/css?family=Roboto+Mono|Roboto:300,400,900,400italic' rel='stylesheet' type='text/css'> <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}"> <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
</head> </head>

View File

@ -1,12 +1,11 @@
<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 %} <p>
<p> <a href="{{ "/" | prepend: site.baseurl }}">Home</a><span
<a href="{{ "/" | prepend: site.baseurl }}">Home</a><span
class="u-separate"></span> <a href="{{ "/projects/" | prepend: class="u-separate"></span> <a href="{{ "/projects/" | prepend:
site.baseurl }}">Projects</a><span class="u-separate"></span> <a href="{{ "/about/" | prepend: site.baseurl }}">About</a><span class="u-separate"></span><a href="{{ "/feed.xml" | prepend: site.baseurl }}">RSS</a> site.baseurl }}">Projects</a><span class="u-separate"></span> <a href="{{ "/about/" | prepend: site.baseurl }}">About</a><span class="u-separate"></span><a href="{{ "/feed.xml" | prepend: site.baseurl }}">RSS</a>
</p> </p>
</header> </header>

View File

@ -1,14 +1,13 @@
--- ---
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>
</header> </header>
<div class="c-article__main"> <div class="c-article__main">
{{ content }} {{ content }}
</div> </div>
<footer class="c-article__footer"> <footer class="c-article__footer">
</footer> </footer>
</article> </article>

View File

@ -1,12 +1,12 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
{% include head.html %} {% include head.html %}
<body> <body>
<main class="u-container"> <main class="u-container">
{{ content }} {{ content }}
</main> </main>
{% if jekyll.environment == 'production' %} {% if jekyll.environment == 'production' %}
{% include analytics.html %} {% include analytics.html %}
{% endif %} {% endif %}
</body> </body>
</html> </html>

View File

@ -2,9 +2,9 @@
layout: default layout: default
--- ---
<div class="c-page"> <div class="c-page">
{% include header.html %} {% include header.html %}
<div class="c-page__main"> <div class="c-page__main">
{{ content }} {{ content }}
</div> </div>
{% include footer.html %} {% include footer.html %}
</div> </div>

View File

@ -2,45 +2,41 @@
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>
<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>
<!-- Previous / Next Buttons -->
<div class="pagenav">
{% if page.previous.url %}
<div class="wrapper" id="left">
<small><b>Previous</b> {{page.previous.date | date: "%b %-d, %Y"}}</small>
<br>
<a class="no-hov" href="{{ page.previous.url | prepend: site.baseurl }}">&laquo; {{page.previous.title}}</a>
</div> </div>
{% endif %}
<!-- Previous / Next Buttons --> {% if page.next.url %}
<div class="pagenav"> <div class="wrapper" id="right">
{% if page.previous.url %} <small>{{page.next.date | date: "%b %-d, %Y"}} <b>Next</b></small>
<div class="wrapper" id="left"> <br>
<small><b>Previous</b> {{page.previous.date | date: "%b %-d, %Y"}}</small> <a class="no-hov" href="{{ page.next.url | prepend: site.baseurl }}">{{page.next.title}} &raquo;</a>
<br> </div>
<a class="no-hov" href="{{ page.previous.url | prepend: site.baseurl }}">&laquo; {{page.previous.title}}</a> {% endif %}
</div> </div>
{% endif %} <!-- Disqus comments view -->
{% if page.next.url %} {% if page.comments != false and site.disqus_id %}
<div class="wrapper" id="right"> <div class="post-disqus">
<small>{{page.next.date | date: "%b %-d, %Y"}} <b>Next</b></small> <section id="disqus_thread"></section>
<br> {% include disqus.html %}
<a class="no-hov" href="{{ page.next.url | prepend: site.baseurl }}">{{page.next.title}} &raquo;</a> </div>
</div> {% endif %}
{% endif %}
</div>
<!-- Disqus comments view -->
{% if page.comments != false and site.disqus_id %}
<div class="post-disqus">
<section id="disqus_thread"></section>
{% include disqus.html %}
</div>
{% endif %}
</article> </article>

View File

@ -2,32 +2,30 @@
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">
{% endif %} {% endif %}
<li class="c-archives__item"> <li class="c-archives__item">
<h3> <h3>
<a href="{{ post.url | prepend: site.baseurl }}">{{post.title}}</a> <a href="{{ post.url | prepend: site.baseurl }}">{{post.title}}</a>
<br> <br>
<small>{{post.description}}</small> <small>{{post.description}}</small>
</h3> </h3>
<p>{{ post.date | date: "%b %-d, %Y" }}</p> <p>{{ post.date | date: "%b %-d, %Y" }}</p>
</li> </li>
{% if forloop.last %} {% if forloop.last %}
</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>