mirror of
https://github.com/seigler/dash-website
synced 2025-07-26 23:06:09 +00:00
Blog section
The blog is driven by the _posts directory nested in each language.
This commit is contained in:
parent
8374114bc0
commit
01c297d5e7
18 changed files with 166 additions and 11 deletions
|
@ -1,4 +1,8 @@
|
|||
perry:
|
||||
name: Perry Woodin
|
||||
twitter: PerryWoodin
|
||||
image: /assets/img/perry_sm.jpg
|
||||
image: /assets/img/perry_sm.jpg
|
||||
tungfa:
|
||||
name: tungfa
|
||||
twitter:
|
||||
image:
|
|
@ -176,6 +176,9 @@ pages:
|
|||
youtube-btn: Dash YouTube
|
||||
|
||||
# Need some Dash - get content from get-dash ^^
|
||||
blog:
|
||||
title: The Digital Cash Blog
|
||||
description: The Digital Cash Blog
|
||||
|
||||
|
||||
nav:
|
||||
|
|
8
_i18n/en/_posts/README.md
Normal file
8
_i18n/en/_posts/README.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
To create a new post, all you need to do is create a file in the _posts directory. How you name files in this folder is important. Jekyll requires blog post files to be named according to the following format:
|
||||
|
||||
YEAR-MONTH-DAY-title.MARKUP
|
||||
Where YEAR is a four-digit number, MONTH and DAY are both two-digit numbers, and MARKUP is the file extension representing the format used in the file. For example, the following are examples of valid post filenames:
|
||||
|
||||
2011-12-31-new-years-eve-is-awesome.md
|
||||
2011-12-31-new-years-eve-is-awesome.html
|
||||
2012-09-12-how-to-write-a-blog.textile
|
12
_i18n/en/blog/header.html
Normal file
12
_i18n/en/blog/header.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<div id="header">
|
||||
|
||||
<!-- Navigation -->
|
||||
{% include nav-desktop.html logo-color="blue" %}
|
||||
|
||||
<!-- Hero content -->
|
||||
<div class="page-info">
|
||||
<h1 class="content">{% t pages.blog.title %}</h1>
|
||||
<p class="content">{% t pages.blog.description %}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
10
_i18n/es/blog/header.html
Normal file
10
_i18n/es/blog/header.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<div id="hero">
|
||||
|
||||
<!-- Navigation -->
|
||||
{% include nav-desktop.html %}
|
||||
|
||||
<!-- Hero content -->
|
||||
<h1 class="content">{% t pages.blog.title %}</h1>
|
||||
<p class="content">{% t pages.blog.description %}</p>
|
||||
|
||||
</div>
|
|
@ -1,8 +1,5 @@
|
|||
{% if page.author %}
|
||||
<div class="author">
|
||||
<div class="divider">
|
||||
<img src="/assets/images/divider-logo-mark.png">
|
||||
</div>
|
||||
{% assign author = site.data.people[page.author] %}
|
||||
<img src="{{ author.image }}" class="author-icon img-circle"><br />
|
||||
<a rel="author"
|
||||
|
|
|
@ -12,8 +12,17 @@
|
|||
|
||||
{% capture basenav %}{{ base }}{% if site.lang != "en" %}/{{ site.lang }}{% endif %}{% endcapture %}
|
||||
|
||||
<!--
|
||||
To change the logo color, pass the parameter in the include.
|
||||
include nav-desktop.html logo-color="blue"
|
||||
-->
|
||||
{% assign logo-color = 'white' %}
|
||||
{% if include.logo-color %}
|
||||
{% assign logo-color = include.logo-color %}
|
||||
{% endif %}
|
||||
|
||||
<div id="top" class="content">
|
||||
<a href="#"><img src="{{ base }}/assets/img/logo-white.png" alt="Dash" class="logo"></a>
|
||||
<a href="#"><img src="{{ base }}/assets/img/logo-{{ logo-color }}.png" alt="Dash" class="logo"></a>
|
||||
|
||||
<nav class="desktop">
|
||||
<ul class="menu">
|
||||
|
@ -21,8 +30,8 @@
|
|||
<li><a href="{{ basenav }}/get-dash/">{% t nav.get-dash %}</a></li>
|
||||
<li><a href="{{ basenav }}/participate/">{% t nav.participate %}</a></li>
|
||||
<li><a href="{{ basenav }}/currency/">{% t nav.currency %}</a></li>
|
||||
<li><a href="{{ basenav }}/community">{% t nav.community %}</a></li>
|
||||
<li><a href="{{ basenav }}">{% t nav.blog %}</a></li>
|
||||
<li><a href="{{ basenav }}/community/">{% t nav.community %}</a></li>
|
||||
<li><a href="{{ basenav }}/blog/">{% t nav.blog %}</a></li>
|
||||
<li><a href="{{ basenav }}">{% t nav.project %}</a></li>
|
||||
|
||||
<li><a href="{{ base }}{{ page.url }}">{% t global.english %}</a></li>
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
<li><a href="{{ basenav }}/get-dash/">{% t nav.get-dash %}</a></li>
|
||||
<li><a href="{{ basenav }}/participate/">{% t nav.participate %}</a></li>
|
||||
<li><a href="{{ basenav }}/currency/">{% t nav.currency %}</a></li>
|
||||
<li><a href="{{ basenav }}/community">{% t nav.community %}</a></li>
|
||||
<li><a href="{{ basenav }}">{% t nav.blog %}</a></li>
|
||||
<li><a href="{{ basenav }}/community/">{% t nav.community %}</a></li>
|
||||
<li><a href="{{ basenav }}/blog/">{% t nav.blog %}</a></li>
|
||||
<li><a href="{{ basenav }}">{% t nav.project %}</a></li>
|
||||
|
||||
<li><a href="{{ base }}{{ page.url }}">{% t global.english %}</a></li>
|
||||
|
|
10
_includes/pagination_navigation.html
Normal file
10
_includes/pagination_navigation.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!-- Pagination links -->
|
||||
<div class="pagination">
|
||||
{% if paginator.previous_page %}
|
||||
<a href="{{ paginator.previous_page_path }}" class="previous">« Previous</a>
|
||||
{% endif %}
|
||||
<span class="page_number ">Page {{ paginator.page }} of {{ paginator.total_pages }}</span>
|
||||
{% if paginator.next_page %}
|
||||
<a href="{{ paginator.next_page_path }}" class="next">Next »</a>
|
||||
{% endif %}
|
||||
</div>
|
21
_includes/pagination_navigation_all.html
Normal file
21
_includes/pagination_navigation_all.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
{% if paginator.total_pages > 1 %}
|
||||
<div class="pagination">
|
||||
{% if paginator.previous_page %}
|
||||
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">« Prev</a>
|
||||
{% endif %}
|
||||
|
||||
{% for page in (1..paginator.total_pages) %}
|
||||
{% if page == paginator.page %}
|
||||
<em>{{ page }}</em>
|
||||
{% elsif page == 1 %}
|
||||
<a href="/blog">{{ page }}</a>
|
||||
{% else %}
|
||||
<a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if paginator.next_page %}
|
||||
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Next »</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
|
@ -49,7 +49,6 @@
|
|||
</div>
|
||||
|
||||
<script src="{{ base }}/assets/js/full-menu.js"></script>
|
||||
}
|
||||
|
||||
<script>
|
||||
function windowPopup(url, width, height) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
To create a new post, all you need to do is create a file in the _posts directory. How you name files in this folder is important. Jekyll requires blog post files to be named according to the following format:
|
||||
To create a new post, all you need to do is create a file in the _i18n/[language]/_posts directory. How you name files in this folder is important. Jekyll requires blog post files to be named according to the following format:
|
||||
|
||||
YEAR-MONTH-DAY-title.MARKUP
|
||||
Where YEAR is a four-digit number, MONTH and DAY are both two-digit numbers, and MARKUP is the file extension representing the format used in the file. For example, the following are examples of valid post filenames:
|
||||
|
|
45
_sass/_header.scss
Normal file
45
_sass/_header.scss
Normal file
|
@ -0,0 +1,45 @@
|
|||
#header {
|
||||
text-align: left;
|
||||
color: $white;
|
||||
padding: 1px 0;
|
||||
|
||||
#top {
|
||||
border-bottom: 1px solid $blue;
|
||||
text-align: left;
|
||||
.logo {
|
||||
width: 180px;
|
||||
height: auto;
|
||||
display: inline-block;
|
||||
}
|
||||
nav {
|
||||
float: right;
|
||||
text-align: right;
|
||||
margin-bottom: 5px;
|
||||
li {
|
||||
display: inline;
|
||||
margin-left: 20px;
|
||||
a {
|
||||
color: $blue;
|
||||
text-decoration: none;
|
||||
font-size: 12px;
|
||||
font-family: 'montserratregular';
|
||||
&:hover {
|
||||
color: lighten($blue, 25);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.page-info {
|
||||
background-color: #fff;
|
||||
}
|
||||
h1 {
|
||||
color: $blue;
|
||||
text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
p {
|
||||
color: $blue;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
}
|
|
@ -72,6 +72,7 @@ a.blog_link {
|
|||
@import "home";
|
||||
@import "interior";
|
||||
@import "post";
|
||||
@import "header";
|
||||
|
||||
@import "1024";
|
||||
@import "768";
|
||||
|
|
BIN
assets/img/logo-blue.png
Normal file
BIN
assets/img/logo-blue.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
assets/img/placeholder-full-image.jpg
Normal file
BIN
assets/img/placeholder-full-image.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 62 KiB |
BIN
assets/img/placeholder-news-post.jpg
Normal file
BIN
assets/img/placeholder-news-post.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
36
blog/index.html
Normal file
36
blog/index.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
layout: default
|
||||
title: pages.blog.title
|
||||
description: pages.blog.description
|
||||
---
|
||||
|
||||
{% tf blog/header.html %}
|
||||
|
||||
<div class="content post">
|
||||
<div class="single-col">
|
||||
|
||||
{% include pagination_navigation_all.html %}
|
||||
|
||||
{% for post in paginator.posts %}
|
||||
<!-- limit:4 -->
|
||||
<div class="feature">
|
||||
{% if post.image %}
|
||||
<img src="{{ post.image }}" class="preview">
|
||||
{% endif %}
|
||||
|
||||
<h2><a href="{{ post.url }}">{{ post.title }}</a></h2>
|
||||
|
||||
<p><em>{{ post.date | date: "%b %d, %Y" }}</em><br />{{ post.excerpt | strip_html | truncatewords: 50 }}</p>
|
||||
|
||||
</div>
|
||||
<span class="clear"></span>
|
||||
|
||||
<div class="divider">
|
||||
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% include pagination_navigation_all.html %}
|
||||
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue