Skip to content

Commit

Permalink
upgraded bootstrap to the latest, improved headline, narrowed the nav…
Browse files Browse the repository at this point in the history
…bar bottom margin, added gemfile so local dev can be done properly, update README
  • Loading branch information
takasoft committed Mar 14, 2019
1 parent fe10ee6 commit 3288206
Show file tree
Hide file tree
Showing 30 changed files with 124 additions and 71 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
_site
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata
.DS_Store
.jekyll
.jekyll-metadata
.bundle
.sass-cache
Gemfile
Gemfile.lock
node_modules
package.json
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
<h1 class="page-title">404: Page not found</h1>
<p class="lead">It looks like this page doesn't exist.
<br>
<a href="{{ site.baseurl }}">Go back to home.</a></p>
<a href="{{ site.baseurl }}/">Go back to home.</a></p>
</div>
Empty file removed CNAME
Empty file.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Takao Shibamoto
Copyright (c) 2019 TakaSoft (https://github.com/takasoft)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,14 @@ Change `baseurl` to your repository's name.
If it is your-username.github.io then set it empty.

> There are 2 different ways that you can make changes to your blog's files:
> 1. Edit files within your new repository in the browser at gitHub.com (easiest).
> 2. Clone down your repository and make updates locally, then push them to your GitHub repository.
### Step 3) Publish your first blog post

Go to `/_posts/` and create a markdown file in this format: `year-month-day-title.md` to publish your first blog post.

### Some manual setups
### Necessary manual setup

- You have to create `<new category name>.html` with the following content in the `category` folder when you create a new category.

Expand All @@ -56,21 +55,30 @@ category: new-category-name
---
```

### Additional Tips

- set hideTnPost in post if you want to hide your post thumbnail.
- set google_analytics in _config.yml if you want to log traffic on your site.
- embed a youtube video by {% include youtubePlayer.html id="video-id" %}.

## Local Development

Install Ruby and Gem

```shell
gem install jekyll bundler
bundle install
bundle exec jekyll serve
bundle exec jekyll serve # start development server
```

## How to import from wordpress

Install "WordPress to Jekyll Exporter"
* Note: if you have changed _config.yml, you have to restart the development server

Tools -> Export to Jekyll
### How to import from wordpress

Unzip the file and copy _posts, _config.yml, wp-content, and any .md files in the root to your repo.
1. Install "WordPress to Jekyll Exporter"
2. Tools -> Export to Jekyll
3. Unzip the exported file and copy _posts, wp-content, and any .md files in the root to your repo.
4. Copy part of exported _config.yml to _config.yml

```shell
cd ./_posts
Expand Down
4 changes: 4 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ tagline: Making awesome software
description: Making awesome software
url:
baseurl: /Bootstrap-4-Jekyll-Theme
# Add this and create headline.html in _includes directory
# headline: true
# Add your google_analytics ID if you need it
# google_analytics:

# Pagination number
paginate: 10
Expand Down
23 changes: 19 additions & 4 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,24 @@
<p class="simple-footer" align="center">&copy; {{ site.time | date: '%Y' }} <a class="simple-footer" href="{{ site.baseurl }}/">{{ site.title }}</a></p>

<!-- Bootstrap JS -->
<script src="{{ site.baseurl }}/public/js/jquery-3.2.1.min.js"></script>
<script src="{{ site.baseurl }}/public/js/tether.min.js"></script>
<script src="{{ site.baseurl }}/public/js/bootstrap.min.js"></script>
<script src="{{ site.baseurl }}/system/js/jquery-3.3.1.min.js"></script>
<script src="{{ site.baseurl }}/system/js/tether-1.3.3.min.js"></script>
<script src="{{ site.baseurl }}/system/js/bootstrap-4.3.1.min.js"></script>

{% if site.google_analytics %}
<!-- Google Analytics Script -->
<script>
(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 Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview', {
'page': '{{ site.baseurl }}{{ page.url }}',
'title': '{{ page.title | replace: "'", "\\'" }}'
});
</script>
{% endif %}

</footer>
<!--/.Footer-->
9 changes: 4 additions & 5 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
</title>

<!-- CSS -->
<link rel="stylesheet" href="{{ site.baseurl }}/public/css/toc.css">
<link rel="stylesheet" href="{{ site.baseurl }}/public/css/main.css">
<link rel="stylesheet" href="{{ site.baseurl }}/public/genericons/Genericons-Neue.min.css">

<link rel="stylesheet" href="{{ site.baseurl }}/public/css/bootstrap.min.css">
<link rel="stylesheet" href="{{ site.baseurl }}/system/css/toc.css">
<link rel="stylesheet" href="{{ site.baseurl }}/system/css/main.css">
<link rel="stylesheet" href="{{ site.baseurl }}/system/genericons/Genericons-Neue.min.css">
<link rel="stylesheet" href="{{ site.baseurl }}/system/css/bootstrap-4.3.1.min.css">

<!-- Icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ site.baseurl }}/public/apple-touch-icon-144-precomposed.png">
Expand Down
15 changes: 10 additions & 5 deletions _includes/navbar.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
<nav class="navbar navbar-toggleable-md navbar-light bg-faded">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<nav class="navbar-custom navbar navbar-expand-lg navbar-light bg-faded">
<a class="navbar-brand" href="{{ site.baseurl }}/">{{ site.title }}</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="{{ site.baseurl }}/">{{ site.title }}</a>

<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="{{ site.baseurl }}/">Home <span class="sr-only">(current)</span></a>
<a class="nav-link" href="{{ site.baseurl }}/">Home <span class="sr-only">
(current)
</span></a>
</li>
{% assign pages_list = site.pages %}
{% for node in pages_list %}
{% if node.title != null %}
{% if node.layout == "page" %}
<li class="nav-item {% if page.url == node.url %}active{% endif %}">
<a class="nav-link" href="{{ site.baseurl }}{{ node.url }}">{{ node.title }}</a>
<a class="nav-link" href="{{ site.baseurl }}{{ node.url }}">
{{ node.title }}
</a>
</li>
{% endif %}
{% endif %}
Expand Down
6 changes: 5 additions & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
<div class="post">
<h1 class="post-title">{{ page.title }}</h1>
{% if page.image %}
<img src="{{ site.baseurl }}{{ page.image }}" class="postthumbnail"><br>
{% if page.hideTnPost %}
{% else %}
<img src="{{ site.baseurl }}{{ page.image }}" class="postthumbnail">
{% endif%}
<br>
{% endif %}
<span class="post-info">
<span class="post-date">
Expand Down
2 changes: 1 addition & 1 deletion about.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ permalink: /about

### Hello

This is test about page.
This is a test of about page.


49 changes: 29 additions & 20 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
title: Home
---

{% if site.headline %}
<div class="post">
{% include headline.html %}
<hr>
</div>
{% endif %}

<div class="posts">
{% for post in paginator.posts %}
<div class="post">
Expand Down Expand Up @@ -45,12 +52,20 @@ <h1 class="post-title">
<!-- Pagination -->
<nav aria-label="pagenation navbar">
<ul class="pagination justify-content-center pagination-lg">
{% if paginator.next_page %}
<li class="page-item">
<a class="page-link" href="{{ site.baseurl }}/page{{paginator.next_page}}">
<i class="genericons-neue genericons-neue-previous"></i>
</a>
</li>
{% if paginator.previous_page %}
{% if paginator.page == 2 %}
<li class="page-item">
<a class="page-link" href="{{ site.baseurl }}/">
<i class="genericons-neue genericons-neue-previous"></i>
</a>
</li>
{% else %}
<li class="page-item">
<a class="page-link" href="{{ site.baseurl }}/page{{paginator.previous_page}}">
<i class="genericons-neue genericons-neue-previous"></i>
</a>
</li>
{% endif %}
{% else %}
<li class="page-item disabled">
<a class="page-link" href="{{ site.baseurl }}/">
Expand All @@ -65,26 +80,20 @@ <h1 class="post-title">
</a>
</li>

{% if paginator.previous_page %}
{% if paginator.page == 2 %}
<li class="page-item">
<a class="page-link" href="{{ site.baseurl }}/">
<i class="genericons-neue genericons-neue-next"></i>
</a>
</li>
{% else %}
<li class="page-item">
<a class="page-link" href="{{ site.baseurl }}/page{{paginator.previous_page}}">
<i class="genericons-neue genericons-neue-next"></i>
</a>
</li>
{% endif %}
{% if paginator.next_page %}
<li class="page-item">
<a class="page-link" href="{{ site.baseurl }}/page{{paginator.next_page}}">
<i class="genericons-neue genericons-neue-next"></i>
</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="{{ site.baseurl }}/">
<i class="genericons-neue genericons-neue-next"></i>
</a>
</li>
{% endif %}


</ul>
</nav>
6 changes: 0 additions & 6 deletions public/css/bootstrap.min.css

This file was deleted.

1 change: 0 additions & 1 deletion public/css/bootstrap.min.css.map

This file was deleted.

7 changes: 0 additions & 7 deletions public/js/bootstrap.min.js

This file was deleted.

4 changes: 0 additions & 4 deletions public/js/jquery-3.2.1.min.js

This file was deleted.

1 change: 0 additions & 1 deletion public/js/tether.min.js

This file was deleted.

7 changes: 7 additions & 0 deletions system/css/bootstrap-4.3.1.min.css

Large diffs are not rendered by default.

13 changes: 11 additions & 2 deletions public/css/main.css → system/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ img.homethumbnail {
img.postthumbnail {
display: block;
margin: 0 auto;
width:100%;
max-width:600px;
width: 100%;
max-width:450px;
}

/* Meta data line below post title */
Expand Down Expand Up @@ -203,4 +203,13 @@ img.postthumbnail {
margin-left: 22rem;
margin-right: 4rem;
}
}

.google-play-badge {
max-width:300px;
}

.navbar-custom {
padding-bottom: 0px;
margin-bottom: -30px;
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions system/js/bootstrap-4.3.1.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions system/js/jquery-3.3.1.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions system/js/tether-1.3.3.min.js

Large diffs are not rendered by default.

0 comments on commit 3288206

Please sign in to comment.