modern-fluent 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +52 -0
- data/_includes/footer.html +8 -0
- data/_includes/head.html +9 -0
- data/_includes/header.html +3 -0
- data/_includes/nav.html +14 -0
- data/_layouts/about.html +24 -0
- data/_layouts/default.html +11 -0
- data/_layouts/home.html +45 -0
- data/_layouts/page.html +5 -0
- data/_layouts/post.html +27 -0
- data/_sass/about.scss +8 -0
- data/_sass/categories.scss +3 -0
- data/_sass/footer.scss +9 -0
- data/_sass/header.scss +36 -0
- data/_sass/home.scss +50 -0
- data/_sass/modern-fluent.scss +23 -0
- data/_sass/page.scss +3 -0
- data/_sass/post.scss +26 -0
- data/_sass/search.scss +14 -0
- data/assets/css/main.scss +6 -0
- data/assets/icons/left arrow.svg +41 -0
- data/assets/icons/right arrow.svg +41 -0
- data/assets/images/profile.png +0 -0
- data/assets/images/profile.svg +1 -0
- data/assets/js/carousel.js +157 -0
- data/assets/js/home.js +21 -0
- data/assets/js/simple-search.js +6 -0
- data/assets/json/search.json +16 -0
- metadata +114 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8c6cd0500476f25a563411fb1324bddef09164ecddfbcb7c7b9c0372411aa946
|
4
|
+
data.tar.gz: 60ab22e9408fc21523f5b135cff71841d70b399f05b79c31e7ef5347eae2fd98
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8f711855c3cc0780eaa59a8a75ba37ccea55f1e354ebd250996d7371bb12a55420e7025e608a996b183a2f638c44ecb6e7d0b5b47f64f481c639e412a0dee681
|
7
|
+
data.tar.gz: 4129f1c0719423b6b6a8144f55068e39b6ec671c526dd2a43c6d563214db9734e7ce57bae46fbb96fc97c093626acfa3175b3a54d38a9d6509cae21ce06ea2d3
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 Yongjun
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# modern-fluent
|
2
|
+
|
3
|
+
Welcome to your new Jekyll theme! In this directory, you'll find the files you need to be able to package up your theme into a gem. Put your layouts in `_layouts`, your includes in `_includes`, your sass files in `_sass` and any other assets in `assets`.
|
4
|
+
|
5
|
+
To experiment with this code, add some sample content and run `bundle exec jekyll serve` – this directory is setup just like a Jekyll site!
|
6
|
+
|
7
|
+
TODO: Delete this and the text above, and describe your gem
|
8
|
+
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
Add this line to your Jekyll site's `Gemfile`:
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
gem "modern-fluent"
|
16
|
+
```
|
17
|
+
|
18
|
+
And add this line to your Jekyll site's `_config.yml`:
|
19
|
+
|
20
|
+
```yaml
|
21
|
+
theme: modern-fluent
|
22
|
+
```
|
23
|
+
|
24
|
+
And then execute:
|
25
|
+
|
26
|
+
$ bundle
|
27
|
+
|
28
|
+
Or install it yourself as:
|
29
|
+
|
30
|
+
$ gem install modern-fluent
|
31
|
+
|
32
|
+
## Usage
|
33
|
+
|
34
|
+
TODO: Write usage instructions here. Describe your available layouts, includes, sass and/or assets.
|
35
|
+
|
36
|
+
## Contributing
|
37
|
+
|
38
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hello. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
39
|
+
|
40
|
+
## Development
|
41
|
+
|
42
|
+
To set up your environment to develop this theme, run `bundle install`.
|
43
|
+
|
44
|
+
Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
|
45
|
+
|
46
|
+
When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
|
47
|
+
To add a custom directory to your theme-gem, please edit the regexp in `modern-fluent.gemspec` accordingly.
|
48
|
+
|
49
|
+
## License
|
50
|
+
|
51
|
+
The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
52
|
+
right arrow Icons made by Google (CC BY 3.0)
|
data/_includes/head.html
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
<head>
|
2
|
+
<!-- Title, description, author -->
|
3
|
+
{%- capture _page_title -%}
|
4
|
+
{%- if page.title -%}{{- page.title | append: ' | ' -}}{%- endif -%}
|
5
|
+
{{- site.title | default: "Untitled Website" -}}
|
6
|
+
{%- if site.subtitle -%}{{- site.subtitle | prepend: ' - ' -}}{%- endif -%}
|
7
|
+
{%- endcapture -%}
|
8
|
+
<link rel="stylesheet" href="{{'assets/css/main.css' | relative_url -}}" />
|
9
|
+
</head>
|
data/_includes/nav.html
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
<nav>
|
2
|
+
<div id="carousel">
|
3
|
+
{% assign links = site.data.nav %}
|
4
|
+
{% for link in links %}
|
5
|
+
{% if page.url contains link.url %}
|
6
|
+
{% assign class = 'active' %}
|
7
|
+
{% endif %}
|
8
|
+
<span class="slide">
|
9
|
+
<a href="{{ site.url }}{{ site.baseurl }}{{ link.url }}">
|
10
|
+
{{link.title}}</a>
|
11
|
+
</span>
|
12
|
+
{%endfor%}
|
13
|
+
</div>
|
14
|
+
</nav>
|
data/_layouts/about.html
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
<div class ="about">
|
5
|
+
<h1>About</h1>
|
6
|
+
<table>
|
7
|
+
<tr>
|
8
|
+
<td rowspan="4"><img src = "{{site.profilepic | relative_url -}}"></td>
|
9
|
+
</tr>
|
10
|
+
<tr>
|
11
|
+
<td></td>
|
12
|
+
<td>{{site.author}}</td>
|
13
|
+
</tr>
|
14
|
+
<tr>
|
15
|
+
<td></td>
|
16
|
+
<td>{{site.email}}</td>
|
17
|
+
</tr>
|
18
|
+
<tr>
|
19
|
+
<td></td>
|
20
|
+
<td>{{site.github}}</td>
|
21
|
+
</tr>
|
22
|
+
</table>
|
23
|
+
{{ content }}
|
24
|
+
</div>
|
data/_layouts/home.html
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
---
|
2
|
+
title: Home
|
3
|
+
layout: default
|
4
|
+
---
|
5
|
+
<div class='home'>
|
6
|
+
<!-- This loops through the paginated posts -->
|
7
|
+
{% for post in paginator.posts %}
|
8
|
+
<a href="{{ post.url }}">
|
9
|
+
<div class='post'>
|
10
|
+
<h2>{{ post.title }}</h2>
|
11
|
+
<div class='dc'>
|
12
|
+
<div class="content">
|
13
|
+
{{ post.excerpt | strip_html | strip_newlines | truncatewords: 45 }}
|
14
|
+
</div>
|
15
|
+
<div class="date">{{ post.date | date: '%F'}}<br>{{ post.date | date: '%Z'}}</div>
|
16
|
+
</div>
|
17
|
+
</div></a>
|
18
|
+
{% endfor %}
|
19
|
+
|
20
|
+
{% if paginator.total_pages > 1 %}
|
21
|
+
<div class="pagination">
|
22
|
+
{% if paginator.previous_page %}
|
23
|
+
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}"><img src="/assets/icons/left arrow.svg" alt="Preview"></a>
|
24
|
+
{% else %}
|
25
|
+
|
26
|
+
{% endif %}
|
27
|
+
|
28
|
+
{% for page in (1..paginator.total_pages) %}
|
29
|
+
{% if page == paginator.page %}
|
30
|
+
<div class='underline'>{{ page }}</div>
|
31
|
+
{% elsif page == 1 %}
|
32
|
+
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
|
33
|
+
{% else %}
|
34
|
+
<a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
|
35
|
+
{% endif %}
|
36
|
+
{% endfor %}
|
37
|
+
|
38
|
+
{% if paginator.next_page %}
|
39
|
+
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}"> <img src="/assets/icons/right arrow.svg" alt="Next"></a>
|
40
|
+
{% else %}
|
41
|
+
|
42
|
+
{% endif %}
|
43
|
+
</div>
|
44
|
+
{% endif %}
|
45
|
+
</div>
|
data/_layouts/page.html
ADDED
data/_layouts/post.html
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
|
5
|
+
<div class="post-categories">
|
6
|
+
{% if post %}
|
7
|
+
{% assign categories = post.categories %}
|
8
|
+
{% else %}
|
9
|
+
{% assign categories = page.categories %}
|
10
|
+
{% endif %}
|
11
|
+
<h1>{{page.title}}</h1>
|
12
|
+
{% for category in categories %}
|
13
|
+
<a href="{{site.baseurl}}/categories/#{{category|slugize}}">{{category}}</a>
|
14
|
+
{% unless forloop.last %}, {% endunless %}
|
15
|
+
{% endfor %}
|
16
|
+
</div>
|
17
|
+
<div class ="post">
|
18
|
+
{{ content }}
|
19
|
+
</div>
|
20
|
+
<div class="Previous-next">
|
21
|
+
{% if page.previous.url %}
|
22
|
+
<a class="previous" href="{{page.previous.url}}">« {{page.previous.title}}</a>
|
23
|
+
{% endif %}
|
24
|
+
{% if page.next.url %}
|
25
|
+
<a class="next" href="{{page.next.url}}">{{page.next.title}} »</a>
|
26
|
+
{% endif %}
|
27
|
+
</div>
|
data/_sass/about.scss
ADDED
data/_sass/footer.scss
ADDED
data/_sass/header.scss
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
header{
|
2
|
+
font-size: 40px;
|
3
|
+
margin:8px;
|
4
|
+
}
|
5
|
+
nav{
|
6
|
+
$carousel-width: 100px;
|
7
|
+
$carousel-height: 50px;
|
8
|
+
|
9
|
+
position: relative;
|
10
|
+
|
11
|
+
font-size:20px;
|
12
|
+
|
13
|
+
#carousel {
|
14
|
+
display: flex;
|
15
|
+
width: 10000px;
|
16
|
+
position: relative;
|
17
|
+
transform: translateX(0px);
|
18
|
+
margin: 4px;
|
19
|
+
.slide {
|
20
|
+
cursor: pointer;
|
21
|
+
float: left;
|
22
|
+
flex-direction: column;
|
23
|
+
vertical-align: middle;
|
24
|
+
text-align: center;
|
25
|
+
|
26
|
+
a{
|
27
|
+
text-decoration:none;
|
28
|
+
color: black;
|
29
|
+
margin:8px;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
.transition {
|
34
|
+
transition: .7s;
|
35
|
+
}
|
36
|
+
}
|
data/_sass/home.scss
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
.home{
|
2
|
+
margin: 12px;
|
3
|
+
text-align: left;
|
4
|
+
.post{
|
5
|
+
h2{
|
6
|
+
margin-bottom: 0px;
|
7
|
+
}
|
8
|
+
.dc{
|
9
|
+
display: flex;
|
10
|
+
flex-direction: row;
|
11
|
+
.date{
|
12
|
+
color: grey;
|
13
|
+
float: right;
|
14
|
+
}
|
15
|
+
.content{
|
16
|
+
flex: 1;
|
17
|
+
float: right;
|
18
|
+
color:black;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
|
24
|
+
.pagination {
|
25
|
+
margin: 12px 0px 8px 0px;
|
26
|
+
text-align: center;
|
27
|
+
.pageno, em,a, span{
|
28
|
+
width: 28px;
|
29
|
+
height: 32px;
|
30
|
+
display: inline-block;
|
31
|
+
margin: 0px 8px 0px 8px;
|
32
|
+
padding: 0px 8px 0px 8px;
|
33
|
+
}
|
34
|
+
img{
|
35
|
+
vertical-align: middle;
|
36
|
+
width: 20px;
|
37
|
+
height: 20px;
|
38
|
+
}
|
39
|
+
.underline{
|
40
|
+
display: inline-block;
|
41
|
+
width: 28px;
|
42
|
+
margin: 0px 8px 0px 8px;
|
43
|
+
border-bottom: 4px solid var(--accent-color);
|
44
|
+
}
|
45
|
+
a:hover {
|
46
|
+
background-color: #f1f1f1;
|
47
|
+
color: #333;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
:root{
|
3
|
+
--accent-color: hsl(39, 100%, 50%);
|
4
|
+
--accent-color-light: hsl(39, 100%, 60%);
|
5
|
+
--accent-color-dark: hsl(39, 100%, 40%);
|
6
|
+
}
|
7
|
+
@import url(//fonts.googleapis.com/earlyaccess/notosanskr.css);
|
8
|
+
body{
|
9
|
+
font-family:"Segoe UI", "Noto Sans KR", sans-serif !important;
|
10
|
+
max-width:900px;
|
11
|
+
margin: 0 auto;
|
12
|
+
|
13
|
+
a:link {text-decoration: none; color: var(--accent-color);}
|
14
|
+
a:visited {text-decoration: none; color: var(--accent-color-dark);}
|
15
|
+
a:active {text-decoration: none; color: var(--accent-color);}
|
16
|
+
a:hover {text-decoration: underline; color: var(--accent-color-light);}
|
17
|
+
}
|
18
|
+
@import "about","categories","footer","header","page","post","search", "home";
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
data/_sass/page.scss
ADDED
data/_sass/post.scss
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
.post{
|
2
|
+
margin: auto;
|
3
|
+
blockquote{
|
4
|
+
background-color: lightgray;
|
5
|
+
padding: 12px;
|
6
|
+
}
|
7
|
+
pre, code{
|
8
|
+
@import url("//cdn.jsdelivr.net/gh/wan2land/d2coding/d2coding-full.css");
|
9
|
+
background-color: lightgray;
|
10
|
+
font-family: 'D2Coding', monospace;
|
11
|
+
}
|
12
|
+
pre{
|
13
|
+
overflow: scroll;
|
14
|
+
}
|
15
|
+
table{
|
16
|
+
margin: 4px;
|
17
|
+
border-collapse: collapse;
|
18
|
+
td {
|
19
|
+
padding: 10px;
|
20
|
+
text-align: center;
|
21
|
+
}
|
22
|
+
tbody tr:nth-child(2n), th {
|
23
|
+
background-color: lightgrey;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
data/_sass/search.scss
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
+
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5
|
+
width="306px" height="306px" viewBox="0 0 306 306" style="enable-background:new 0 0 306 306;" xml:space="preserve">
|
6
|
+
<g>
|
7
|
+
<g id="chevron-left">
|
8
|
+
<polygon points="247.35,35.7 211.65,0 58.65,153 211.65,306 247.35,270.3 130.05,153 "/>
|
9
|
+
</g>
|
10
|
+
</g>
|
11
|
+
<g>
|
12
|
+
</g>
|
13
|
+
<g>
|
14
|
+
</g>
|
15
|
+
<g>
|
16
|
+
</g>
|
17
|
+
<g>
|
18
|
+
</g>
|
19
|
+
<g>
|
20
|
+
</g>
|
21
|
+
<g>
|
22
|
+
</g>
|
23
|
+
<g>
|
24
|
+
</g>
|
25
|
+
<g>
|
26
|
+
</g>
|
27
|
+
<g>
|
28
|
+
</g>
|
29
|
+
<g>
|
30
|
+
</g>
|
31
|
+
<g>
|
32
|
+
</g>
|
33
|
+
<g>
|
34
|
+
</g>
|
35
|
+
<g>
|
36
|
+
</g>
|
37
|
+
<g>
|
38
|
+
</g>
|
39
|
+
<g>
|
40
|
+
</g>
|
41
|
+
</svg>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
+
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5
|
+
width="306px" height="306px" viewBox="0 0 306 306" style="enable-background:new 0 0 306 306;" xml:space="preserve">
|
6
|
+
<g>
|
7
|
+
<g id="chevron-right">
|
8
|
+
<polygon points="94.35,0 58.65,35.7 175.95,153 58.65,270.3 94.35,306 247.35,153 "/>
|
9
|
+
</g>
|
10
|
+
</g>
|
11
|
+
<g>
|
12
|
+
</g>
|
13
|
+
<g>
|
14
|
+
</g>
|
15
|
+
<g>
|
16
|
+
</g>
|
17
|
+
<g>
|
18
|
+
</g>
|
19
|
+
<g>
|
20
|
+
</g>
|
21
|
+
<g>
|
22
|
+
</g>
|
23
|
+
<g>
|
24
|
+
</g>
|
25
|
+
<g>
|
26
|
+
</g>
|
27
|
+
<g>
|
28
|
+
</g>
|
29
|
+
<g>
|
30
|
+
</g>
|
31
|
+
<g>
|
32
|
+
</g>
|
33
|
+
<g>
|
34
|
+
</g>
|
35
|
+
<g>
|
36
|
+
</g>
|
37
|
+
<g>
|
38
|
+
</g>
|
39
|
+
<g>
|
40
|
+
</g>
|
41
|
+
</svg>
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M3 5v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2zm12 4c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zm-9 8c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1H6v-1z"/><path d="M0 0h24v24H0z" fill="none"/></svg>
|
@@ -0,0 +1,157 @@
|
|
1
|
+
var window = document.getElementById('window'),
|
2
|
+
carousel = document.getElementById('carousel');
|
3
|
+
|
4
|
+
function slide(wrapper, items) {
|
5
|
+
var posX1 = 0,
|
6
|
+
posX2 = 0,
|
7
|
+
posInitial,
|
8
|
+
posFinal,
|
9
|
+
threshold = 100,
|
10
|
+
slides = items.getElementsByClassName('slide'),
|
11
|
+
slidesLength = slides.length,
|
12
|
+
slideSize = items.getElementsByClassName('slide')[0].offsetWidth;
|
13
|
+
|
14
|
+
initOrder();
|
15
|
+
|
16
|
+
// Mouse events
|
17
|
+
items.onmousedown = dragStart;
|
18
|
+
|
19
|
+
// Touch events
|
20
|
+
items.addEventListener('touchstart', dragStart);
|
21
|
+
items.addEventListener('touchend', dragEnd);
|
22
|
+
items.addEventListener('touchmove', dragAction);
|
23
|
+
|
24
|
+
// Transition events
|
25
|
+
//items.addEventListener('transitionend', checkIndex);
|
26
|
+
|
27
|
+
function dragStart(e) {
|
28
|
+
e = e || window.event;
|
29
|
+
e.preventDefault();
|
30
|
+
posInitial = e.screenX;
|
31
|
+
|
32
|
+
if (e.type == 'touchstart') {
|
33
|
+
posX1 = e.touches[0].screenX;
|
34
|
+
} else {
|
35
|
+
posX1 = e.screenX;
|
36
|
+
document.onmousemove = dragAction;
|
37
|
+
document.onmouseup = dragEnd;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
function dragAction(e) {
|
42
|
+
e = e || window.event;
|
43
|
+
|
44
|
+
if (e.type == 'touchmove') {
|
45
|
+
posX2 = posX1 - e.touches[0].screenX;
|
46
|
+
posX1 = e.touches[0].screenX;
|
47
|
+
} else {
|
48
|
+
posX2 = posX1 - e.screenX;
|
49
|
+
posX1 = e.screenX;
|
50
|
+
}
|
51
|
+
var itemsX = Number(getTranslateX(items));
|
52
|
+
posX2 = itemsX - posX2;
|
53
|
+
items.style.transform = "translateX(" + posX2 + "px)";
|
54
|
+
}
|
55
|
+
|
56
|
+
function dragEnd(e) {
|
57
|
+
if (e.type == 'touchend') {
|
58
|
+
posFinal = e.touches[0].screenX;
|
59
|
+
}
|
60
|
+
else {
|
61
|
+
posFinal = e.screenX;
|
62
|
+
}
|
63
|
+
if (posFinal - posInitial < -threshold) {
|
64
|
+
shiftSlide(-1);
|
65
|
+
} else if (posFinal - posInitial > threshold) {
|
66
|
+
shiftSlide(1);
|
67
|
+
} else {
|
68
|
+
shiftSlide(0);
|
69
|
+
}
|
70
|
+
|
71
|
+
document.onmouseup = null;
|
72
|
+
document.onmousemove = null;
|
73
|
+
}
|
74
|
+
|
75
|
+
function shiftSlide(dir) {
|
76
|
+
items.classList.add('transition');
|
77
|
+
|
78
|
+
if (items.classList.contains('transition')) {
|
79
|
+
items.style.transform = "translateX(" + (dir * slideSize) + "px)";
|
80
|
+
if (dir == 1) {
|
81
|
+
changeOrder(1);
|
82
|
+
} else if (dir == -1) {
|
83
|
+
changeOrder(-1);
|
84
|
+
}
|
85
|
+
else {
|
86
|
+
}
|
87
|
+
items.classList.remove('transition');
|
88
|
+
items.style.transform = "translateX(0px)";
|
89
|
+
}
|
90
|
+
|
91
|
+
allowShift = false;
|
92
|
+
}
|
93
|
+
|
94
|
+
function getTranslateX(element) {
|
95
|
+
// Suppose the transformed element is called "cover".
|
96
|
+
computedStyle = window.getComputedStyle(element, null); // "null" means this is not a pesudo style.
|
97
|
+
// You can retrieve the CSS3 matrix string by the following method.
|
98
|
+
var matrix = computedStyle.getPropertyValue('transform');
|
99
|
+
|
100
|
+
// Parse this string to obtain different attributes of the matrix.
|
101
|
+
// This regexp matches anything looks like this: anything(1, 2, 3, 4, 5, 6);
|
102
|
+
// Hence it matches both matrix strings:
|
103
|
+
// 2d: matrix(1,2,3,4,5,6)
|
104
|
+
// 3d: matrix3d(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16);
|
105
|
+
var matrixPattern = /^\w*\((((-?\d+)|(-?\d*\.-?\d+)),\s*)*((-?\d+)|(-?\d*\.-?\d+))\)/i;
|
106
|
+
var matrixValue = [];
|
107
|
+
if (matrixPattern.test(matrix)) { // When it satisfy the pattern.
|
108
|
+
var matrixCopy = matrix.replace(/^\w*\(/, '').replace(')', '');
|
109
|
+
matrixValue = matrixCopy.split(/\s*,\s*/);
|
110
|
+
}
|
111
|
+
return matrixValue[4];
|
112
|
+
}
|
113
|
+
|
114
|
+
function initOrder() {
|
115
|
+
var now = window.location.href;
|
116
|
+
var i, count = 0;
|
117
|
+
for (i = 0; i < slidesLength; i++) {
|
118
|
+
slides[i].style.order = i;
|
119
|
+
}
|
120
|
+
for (i = 0; i < slidesLength; i++) {
|
121
|
+
if (now == slides[i].getElementsByTagName('a')[0].getAttribute('href')) {
|
122
|
+
break;
|
123
|
+
}
|
124
|
+
count = count + 1;
|
125
|
+
}
|
126
|
+
slides[count].getElementsByTagName('a')[0].style.color = 'darkorange';
|
127
|
+
changeOrder(-count);
|
128
|
+
|
129
|
+
}
|
130
|
+
|
131
|
+
function changeOrder(dir) {
|
132
|
+
//css order로 바꾸기
|
133
|
+
var order = [];
|
134
|
+
var i;
|
135
|
+
for (i = 0; i < slidesLength; i++) {
|
136
|
+
order[i] = Number(slides[i].style.getPropertyValue('order'));
|
137
|
+
}
|
138
|
+
for (i = 0; i < slidesLength; i++) {
|
139
|
+
if (dir > 0) {
|
140
|
+
order[i] = order[i] + dir - slidesLength;
|
141
|
+
}
|
142
|
+
else {
|
143
|
+
order[i] = order[i] + dir;
|
144
|
+
}
|
145
|
+
if (order[i] < 0) {
|
146
|
+
order[i] = order[i] + slidesLength;
|
147
|
+
}
|
148
|
+
}
|
149
|
+
console.log(order);
|
150
|
+
for (i = 0; i < slidesLength; i++) {
|
151
|
+
slides[i].style.order = order[i];
|
152
|
+
}
|
153
|
+
}
|
154
|
+
}
|
155
|
+
slide(window, carousel);
|
156
|
+
|
157
|
+
|
data/assets/js/home.js
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
var post = document.getElementById('post');
|
2
|
+
|
3
|
+
postTransform(items){
|
4
|
+
items.onmousedown = clickStart;
|
5
|
+
items.addEventListener('touchstart', clickStart);
|
6
|
+
items.addEventListener('touchend', clickEnd);
|
7
|
+
var posX1;
|
8
|
+
function clickStart(e){
|
9
|
+
e = e || window.event;
|
10
|
+
e.preventDefault();
|
11
|
+
posInitial = e.clientX;
|
12
|
+
if (e.type == 'touchstart') {
|
13
|
+
posX1 = e.touches[0].clientX;
|
14
|
+
}
|
15
|
+
items.style.transform = "none";
|
16
|
+
}
|
17
|
+
function clickEnd(e){
|
18
|
+
items.style.transform = "none";
|
19
|
+
}
|
20
|
+
}
|
21
|
+
postTransform(post);
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/*!
|
2
|
+
* Simple-Jekyll-Search v1.7.2 (https://github.com/christian-fei/Simple-Jekyll-Search)
|
3
|
+
* Copyright 2015-2018, Christian Fei
|
4
|
+
* Licensed under the MIT License.
|
5
|
+
*/
|
6
|
+
!function(){"use strict";var f={load:function w(t,e){var n=function r(){return window.XMLHttpRequest?new window.XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")}();n.open("GET",t,!0),n.onreadystatechange=function i(e,n){return function(){if(4===e.readyState&&200===e.status)try{n(null,JSON.parse(e.responseText))}catch(t){n(t,null)}}}(n,e),n.send()}};(function y(t){if(!function e(t){return!!t&&"undefined"!=typeof t.required&&t.required instanceof Array}(t))throw new Error("-- OptionsValidator: required options missing");if(!(this instanceof y))return new y(t);var r=t.required;this.getRequiredOptions=function(){return r},this.validate=function(e){var n=[];return r.forEach(function(t){"undefined"==typeof e[t]&&n.push(t)}),n}});var n=function g(t,e){var n=e.length,r=t.length;if(n<r)return!1;if(r===n)return t===e;t:for(var i=0,o=0;i<r;i++){for(var u=t.charCodeAt(i);o<n;)if(e.charCodeAt(o++)===u)continue t;return!1}return!0},e=new function t(){this.matches=function(t,e){return n(e.toLowerCase(),t.toLowerCase())}};var r=new function O(){this.matches=function(e,t){return!!e&&(e=e.trim().toLowerCase(),(t=t.trim().toLowerCase()).split(" ").filter(function(t){return 0<=e.indexOf(t)}).length===t.split(" ").length)}};var l={put:function z(t){if(c(t))return s(t);if(function e(t){return Boolean(t)&&"[object Array]"===Object.prototype.toString.call(t)}(t))return function i(t){var e=[];a();for(var n=0,r=t.length;n<r;n++)c(t[n])&&e.push(s(t[n]));return e}(t);return undefined},clear:a,search:function S(t){return t?function a(t,e,n,r){for(var i=[],o=0;o<t.length&&i.length<r.limit;o++){var u=d(t[o],e,n,r);u&&i.push(u)}return i}(o,t,u.searchStrategy,u).sort(u.sort):[]},setOptions:function q(t){(u=t||{}).fuzzy=t.fuzzy||!1,u.limit=t.limit||10,u.searchStrategy=t.fuzzy?e:r,u.sort=t.sort||i}};function i(){return 0}var o=[],u={};function a(){return o.length=0,o}function c(t){return Boolean(t)&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return o.push(t),o}function d(t,e,n,r){for(var i in t)if(!p(t[i],r.exclude)&&n.matches(t[i],e))return t}function p(t,e){for(var n=!1,r=0,i=(e=e||[]).length;r<i;r++){var o=e[r];!n&&new RegExp(t).test(o)&&(n=!0)}return n}u.fuzzy=!1,u.limit=10,u.searchStrategy=u.fuzzy?e:r,u.sort=i;var h={compile:function j(r){return m.template.replace(m.pattern,function(t,e){var n=m.middleware(e,r[e],m.template);return void 0!==n?n:r[e]||t})},setOptions:function C(t){m.pattern=t.pattern||m.pattern,m.template=t.template||m.template,"function"==typeof t.middleware&&(m.middleware=t.middleware)}},m={};m.pattern=/\{(.*?)\}/g,m.template="",m.middleware=function(){};var v={merge:function L(t,e){var n={};for(var r in t)n[r]=t[r],"undefined"!=typeof e[r]&&(n[r]=e[r]);return n},isJSON:function M(t){try{return!!(t instanceof Object&&JSON.parse(JSON.stringify(t)))}catch(e){return!1}}};!function(t){var o={searchInput:null,resultsContainer:null,json:[],success:Function.prototype,searchResultTemplate:'<li><a href="{url}" title="{desc}">{title}</a></li>',templateMiddleware:Function.prototype,sortMiddleware:function(){return 0},noResultsText:"No results found",limit:10,fuzzy:!1,exclude:[]},n=["searchInput","resultsContainer","json"],r=function y(e){if(!function n(t){return!!t&&"undefined"!=typeof t.required&&t.required instanceof Array}(e))throw new Error("-- OptionsValidator: required options missing");if(!(this instanceof y))return new y(e);var r=e.required;this.getRequiredOptions=function(){return r},this.validate=function(e){var n=[];return r.forEach(function(t){"undefined"==typeof e[t]&&n.push(t)}),n}}({required:n});function i(t){o.success(t),l.put(t),function e(){o.searchInput.addEventListener("keyup",function(t){(function e(t){return-1===[13,16,20,37,38,39,40,91].indexOf(t)})(t.which)&&(u(),c(t.target.value))})}()}function u(){o.resultsContainer.innerHTML=""}function a(t){o.resultsContainer.innerHTML+=t}function c(t){(function e(t){return t&&0<t.length})(t)&&(u(),function i(t,e){var n=t.length;if(0===n)return a(o.noResultsText);for(var r=0;r<n;r++)t[r].query=e,a(h.compile(t[r]))}(l.search(t),t))}function s(t){throw new Error("SimpleJekyllSearch --- "+t)}t.SimpleJekyllSearch=function(t){return 0<r.validate(t).length&&s("You must specify the following required options: "+n),o=v.merge(o,t),h.setOptions({template:o.searchResultTemplate,middleware:o.templateMiddleware}),l.setOptions({fuzzy:o.fuzzy,limit:o.limit,sort:o.sortMiddleware}),v.isJSON(o.json)?i(o.json):function e(n){f.load(n,function(t,e){t&&s("failed to get JSON ("+n+")"),i(e)})}(o.json),{search:c}}}(window)}();
|
@@ -0,0 +1,16 @@
|
|
1
|
+
---
|
2
|
+
---
|
3
|
+
[
|
4
|
+
{% for post in site.posts %}
|
5
|
+
{
|
6
|
+
|
7
|
+
"title" : "{{ post.title | strip_html | escape }}",
|
8
|
+
"url" : "{{ site.baseurl }}{{ post.url }}",
|
9
|
+
"category" : "{{post.categories | join: ', '}}",
|
10
|
+
"tags" : "{{ post.tags | join: ', ' }}",
|
11
|
+
"date" : "{{ post.date }}",
|
12
|
+
"discription" : "{{post.description | strip_html | strip_newlines | escape }}"
|
13
|
+
|
14
|
+
} {% unless forloop.last %},{% endunless %}
|
15
|
+
{% endfor %}
|
16
|
+
]
|
metadata
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: modern-fluent
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Yongjun
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-01-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: jekyll
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.16'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.16'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '12.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '12.0'
|
55
|
+
description:
|
56
|
+
email:
|
57
|
+
- 24871665+Yongjun042@users.noreply.github.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- LICENSE.txt
|
63
|
+
- README.md
|
64
|
+
- _includes/footer.html
|
65
|
+
- _includes/head.html
|
66
|
+
- _includes/header.html
|
67
|
+
- _includes/nav.html
|
68
|
+
- _layouts/about.html
|
69
|
+
- _layouts/default.html
|
70
|
+
- _layouts/home.html
|
71
|
+
- _layouts/page.html
|
72
|
+
- _layouts/post.html
|
73
|
+
- _sass/about.scss
|
74
|
+
- _sass/categories.scss
|
75
|
+
- _sass/footer.scss
|
76
|
+
- _sass/header.scss
|
77
|
+
- _sass/home.scss
|
78
|
+
- _sass/modern-fluent.scss
|
79
|
+
- _sass/page.scss
|
80
|
+
- _sass/post.scss
|
81
|
+
- _sass/search.scss
|
82
|
+
- assets/css/main.scss
|
83
|
+
- assets/icons/left arrow.svg
|
84
|
+
- assets/icons/right arrow.svg
|
85
|
+
- assets/images/profile.png
|
86
|
+
- assets/images/profile.svg
|
87
|
+
- assets/js/carousel.js
|
88
|
+
- assets/js/home.js
|
89
|
+
- assets/js/simple-search.js
|
90
|
+
- assets/json/search.json
|
91
|
+
homepage: http://yongjun042.github.io
|
92
|
+
licenses:
|
93
|
+
- MIT
|
94
|
+
metadata: {}
|
95
|
+
post_install_message:
|
96
|
+
rdoc_options: []
|
97
|
+
require_paths:
|
98
|
+
- lib
|
99
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - ">="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '0'
|
109
|
+
requirements: []
|
110
|
+
rubygems_version: 3.0.3
|
111
|
+
signing_key:
|
112
|
+
specification_version: 4
|
113
|
+
summary: modern-fluent inspired theme
|
114
|
+
test_files: []
|