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

Add page margins and social icons in footer #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*.gem
.DS_Store
.bundle
.sass-cache
_sass
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The repository has _sass directory for the theme.

_site
Gemfile.lock
13 changes: 12 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
title: whiteglass theme
author: Yous
description: Minimal, responsive Jekyll theme for hackers.
baseurl: "/whiteglass" # the subpath of your site, e.g. /blog
baseurl: "/" # the subpath of your site, e.g. /blog
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for the demo site of this theme, so please revert the change.

url: "https://yous.github.io" # the base hostname & protocol for your site, e.g. http://example.com
lang: en
timezone: UTC
Expand Down Expand Up @@ -72,3 +72,14 @@ jekyll-archives:
permalinks:
category: /categories/:name/
tag: /tags/:name/

footer_links:
- title: Twitter
url: https://twitter.com/username
icon: fab fa-twitter-square
- title: YouTube
url: https://www.youtube.com/channelURL
icon: fab fa-youtube-square
- title: Feed
url: feed.xml
icon: fas fa-rss-square
1 change: 1 addition & 0 deletions _includes/fonts.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css?family=Bitter:400,400i,700" rel="stylesheet">
<script src="https://use.fontawesome.com/releases/v5.0.12/js/all.js"></script>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be included only when site.footer_links exists. Also the script has been updated:

Suggested change
<script src="https://use.fontawesome.com/releases/v5.0.12/js/all.js"></script>
{% if site.footer_links %}<script defer src="https://use.fontawesome.com/releases/v5.8.2/js/all.js" integrity="sha384-DJ25uNYET2XCl5ZF++U8eNxPWqcKohUUBUpKGlNLMchM7q4Wjg2CUpjHLaL8yYPH" crossorigin="anonymous"></script>{% endif %}

16 changes: 15 additions & 1 deletion _includes/footer_content.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,18 @@
{% if site.feed and site.feed.path %}
{% assign feed_path = site.feed.path %}
{% endif %}
&copy; {{ site.author }} - Powered by <a href="https://jekyllrb.com">Jekyll</a> &amp; <a href="https://github.com/yous/whiteglass">whiteglass</a> - Subscribe via <a href="{{ feed_path | absolute_url }}">RSS</a>

{% if site.footer_links %}
<div class="social-icons">
{% for footer_link in site.footer_links %}
{% if footer_link.url contains "://" %}
{% assign url = footer_link.url %}
{% else %}
{% assign url = footer_link.url | relative_url %}
{% endif %}
<a class="social-icon" href="{{ url }}"><i class="{{ footer_link.icon | default: 'fas fa-link' }} fa-2x" title="{{ footer_link.title }}"></i></a>
{% endfor %}
</div>
{% endif %}

&copy; {{ site.time | date: '%Y' }} {{ site.author }} - Powered by <a href="https://jekyllrb.com">Jekyll</a> &amp; <a href="https://github.com/yous/whiteglass">whiteglass</a> - Subscribe via <a href="{{ feed_path | absolute_url }}">RSS</a>
10 changes: 9 additions & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@
{% assign title = page.title | default: site.title | escape %}
{% assign canonical = page.url | replace:'index.html','' | absolute_url %}
{% assign description = page.description | default: page.excerpt | default: site.description | strip_html | normalize_whitespace | escape %}
<title>{{ title }}</title>

<title>
{% if page.title == "Home" %}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The index.html doesn't have page.title. So the logic would be:

<title>
  {% if page.title %}
    {{ page.title | escape }} &middot; {{ site.title | escape }}
  {% else %}
    {{ site.title | escape }}
  {% endif %}
</title>

{{ site.title }}
{% else %}
{{ page.title }} &middot; {{ site.title }}
{% endif %}
</title>

<meta name="description" content="{{ description }}">
{% if page.keywords %}
{% if page.keywords.first %}
Expand Down
19 changes: 17 additions & 2 deletions _sass/whiteglass/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/
.site-header {
min-height: 56px;
border-bottom: 1px solid #eee;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, but I removed the borders intentionally.


// Positioning context for the mobile navigation icon
position: relative;
Expand Down Expand Up @@ -49,17 +50,31 @@
}



Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this.

/**
* Site footer
*/
.site-footer {
padding: $spacing-unit 0;
padding: 15px 0 30px;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the padding looks okay when the pagination is enabled.

font-size: 15px;
color: $grey-color;
text-align: center;
border-top: 1px solid #eee;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the border please.

}

.social-icons {
text-align: center;
margin-bottom: 0.5em;
}

.social-icon {
display: inline-block;
padding: 0 0.25em;

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

&,
&:visited {
color: $grey-color-dark;
}
}


/**
Expand Down