Skip to content

Commit

Permalink
feat: style for home and post list pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ourai committed Mar 22, 2023
1 parent ae671b5 commit 8eca91a
Show file tree
Hide file tree
Showing 7 changed files with 434 additions and 9 deletions.
Binary file added src/jekyll/_assets/images/theme/banners/blog.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
85 changes: 85 additions & 0 deletions src/jekyll/_assets/stylesheets/local/pages/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
@import "../../helper";

.Homepage {
&-header {
position: relative;
z-index: 1;
overflow: hidden;
padding: 96px 20px;
text-align: center;
background-color: #fff;

h1 {
margin-top: 0;
margin-bottom: .3em;
font-size: 10rem;
font-weight: 700;
}
}

&-slogan {
font-size: 2.5rem;
}

&-body {
&:before {
content: "\0020";
display: block;
height: 0;
@include box-shadow(0 2px 2px 0 rgba(0, 0, 0, .1), 0 1px 5px 3px rgba(0, 0, 0, .1));
}
}
}

.GetStarted {
$height: 46px;

margin-top: 56px;
margin-bottom: 0;

a {
display: inline-block;
padding: 0 30px;
font-weight: 400;
line-height: $height;
border-radius: $height;
color: #fff;
background-color: #337ab7;

&:hover {
text-decoration: none;
background-color: #0871ab;
}
}

.fa {
margin-left: .5em;
}
}

.FeatureList {
max-width: 960px;
margin: 0 auto;
padding: 52px 0;
font-size: 14px;
@include pie-clearfix;

&-item {
float: left;
padding: 18px 36px;

h3 {
margin: 0;
font-size: 18px;
}

p {
margin: 12px 0 0;
color: #555;
}

@media (min-width: $screen-sm-min) {
width: percentage(1 / 3);
}
}
}
161 changes: 161 additions & 0 deletions src/jekyll/_assets/stylesheets/theme/pages/posts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
@import "../../helper";

.MainCategories {
margin: {
top: -15px;
bottom: 1.5em;
}

li {
min-width: percentage(1 / 3);

a {
padding: 30px 20px;
}

@media all and (max-width: $screen-xs-max) {
+ li {
margin-top: 7.5px;
}

a {
padding: {
top: 20px;
bottom: 20px;
}
}
}
}
}

.ArticleList {
padding-bottom: 1.5em;
}

.ArticleList-summary {
p {
margin-bottom: 15px;

span {
font-size: 20px;
}
}
}

.ArticleList-archives {
margin-top: 0 !important;
padding-left: 0;
list-style-type: none;
font: {
size: 22px;
style: italic;
}
@include pie-clearfix;

a {
display: block;
margin: {
right: -15px;
left: -15px;
}
padding: 10px 15px;
border-radius: 6px;
text-decoration: none;
font-weight: normal;

span {
display: block;
color: #888;
font: {
size: 14px;
style: normal;
weight: 300;
}

.fa {
margin-right: 1em;
}
}

&:hover {
background-color: #0871ab;

&,
* {
color: #fff !important;
}
}
}
}

.ArticleList-hotCategories {
> div {
margin: {
right: -15px;
left: -15px;
}
}

ul {
list-style: none inside none;
padding-left: 0;
}

li {
a {
display: block;
background-color: #eee;
border: 1px solid #a6a6a6;
border-radius: 6px;
padding: 10px 15px;
font: {
size: 18px;
weight: 400;
}
color: #333;
text-decoration: none;

span {
display: block;
margin-top: 5px;
font: {
size: 12px;
weight: 300;
}
color: #888;
}
}

@media all and (max-width: $screen-xs-max) {
+ li {
margin-top: 10px;
}
}
}
}

.Widget--hotCategories {
p {
margin-bottom: 10px;

a,
span {
margin: 0 .3em;
font: {
size: 16px;
weight: bold;
}
}

span {
font-style: italic;
text-decoration: underline;
}
}

ul {
list-style-position: inside;
margin-bottom: 0;
padding-left: 5px;
}
}
3 changes: 1 addition & 2 deletions src/jekyll/_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
title: Lime
description: A simple, readable Jekyll theme.
description: 一个简朴、易读、响应式的网站主题。
keywords:
tagline: A simple, readable Jekyll theme.

baseurl: /lime

Expand Down
27 changes: 27 additions & 0 deletions src/jekyll/_pages/guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,30 @@ permalink: /guides/
---

本主题由[欧雷](https://linxoid.com/ourai/?utm_source=ourai.github.io/lime){:target="_blank"}{:rel="external "}于 2015 年开始设计与开发,并在个人网站「[欧雷流](https://ourai.ws/?utm_source=ourai.github.io/lime){:target="_blank"}{:rel="external "}」上使用多年;在设计时以提高阅读体验和保持简洁风格为最高原则,体现个性在其次。

## 依赖

除了具体的静态网站生成器之外,本主题构建在以下技术与服务之上——

### 源码

- 内容结构
- [Markdown](https://www.markdownguide.org/){:target="_blank"}{:rel="external "}([kramdown](https://kramdown.gettalong.org/){:target="_blank"}{:rel="external "})
- [HTML](https://developer.mozilla.org/en-US/docs/Web/HTML){:target="_blank"}{:rel="external "}
- 界面样式
- [Sass](https://sass-lang.com/){:target="_blank"}{:rel="external "}(SCSS)
- [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS){:target="_blank"}{:rel="external "}
- 交互脚本
- [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript){:target="_blank"}{:rel="external "}
- [CoffeeScript](https://coffeescript.org/){:target="_blank"}{:rel="external "}

### 辅助

- [Bootstrap v3.3.6](https://getbootstrap.com/docs/3.3/){:target="_blank"}{:rel="external "}
- [Font Awesome v4.7](https://fontawesome.com/v4/icons/){:target="_blank"}{:rel="external "}

### 社交

- [LinXoid](https://linxoid.com/){:target="_blank"}{:rel="external "}
- [Disqus](https://disqus.com/){:target="_blank"}{:rel="external "} & [DisqusJS](https://disqusjs.skk.moe/){:target="_blank"}{:rel="external "}
- [Share.js](https://github.com/overtrue/share.js){:target="_blank"}{:rel="external "}
34 changes: 27 additions & 7 deletions src/jekyll/_pages/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@
---
layout: default
css:
- local/pages/index
permalink: index.html
---

{% include header.html %}
<main class="Page-content" style="height: 100%;">
<div style="height: calc(100% - 271px); display: flex; align-items: center; justify-content: center; text-align: center;">
<div>
<h1 style="margin-top: 0; margin-bottom: .3em; font-size: 10rem; font-weight: 700;">{{ site.title }}</h1>
<p style="margin-bottom: 0; font-size: 2.5rem;">{{ site.tagline }}</p>
</div>
</div>
<main class="Page-content">
<article class="Homepage">
<header class="Homepage-header">
<h1>{{ site.title }}</h1>
<p class="Homepage-slogan">{{ site.tagline | default: site.description }}</p>
<p class="GetStarted"><a href="{{ '/guides/' | prepend: site.baseurl | prepend: site.url }}">开始了解<i class="fa fa-long-arrow-right"></i></a></p>
</header>
<section class="Homepage-body">
<h2 class="sr-only">特色</h2>
<div class="FeatureList">
<div class="FeatureList-item">
<h3>体验优先</h3>
<p>以提高阅读体验和保持简洁风格为最高原则,体现个性在其次。</p>
</div>
<div class="FeatureList-item">
<h3>应用广泛</h3>
<p>可用于博客、个人网站、API 文档站等以内容为主的网站。</p>
</div>
<div class="FeatureList-item">
<h3>多种支持</h3>
<p>除了提供核心的样式与交互外,还支持 Jekyll、Hexo 等主流静态网站生成器。</p>
</div>
</div>
</section>
</article>
</main>
{% include footer.html %}
Loading

0 comments on commit 8eca91a

Please sign in to comment.