forked from kitian616/jekyll-TeXt-theme
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new layout articles, componnets refactor
- Loading branch information
Showing
24 changed files
with
396 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
--- | ||
layout: page | ||
--- | ||
|
||
{%- assign _page_articles_data_source = page.articles.data_source | default: layout.articles.data_source -%} | ||
|
||
{%- if _page_articles_data_source -%} | ||
{%- assign _keys = _page_articles_data_source | split: '.' -%} | ||
{%- endif -%} | ||
|
||
{%- assign _articles = nil -%} | ||
{%- for _key in _keys -%} | ||
{%- if forloop.first -%} | ||
{%- case _key -%} | ||
{%- when 'site' -%} | ||
{%- assign _articles = site -%} | ||
{%- when 'page' -%} | ||
{%- assign _articles = page -%} | ||
{%- when 'layout' -%} | ||
{%- assign _articles = layout -%} | ||
{%- when 'paginator' -%} | ||
{%- assign _articles = paginator -%} | ||
{%- endcase -%} | ||
{%- else -%} | ||
{%- assign _articles = _articles[_key] -%} | ||
{%- endif -%} | ||
{%- endfor -%} | ||
|
||
{%- assign _type = page.articles.type | default: layout.articles.type -%} | ||
|
||
{%- if _articles -%} | ||
|
||
<div class="layout--articles"> | ||
|
||
{%- if _type == 'grid' -%} | ||
{%- if page.articles.size == 'sm' -%} | ||
{%- include article-list.html articles=_articles type='grid' size='sm' -%} | ||
{%- else -%} | ||
{%- include article-list.html articles=_articles type='grid' -%} | ||
{%- endif -%} | ||
|
||
{%- elsif _type == 'brief' -%} | ||
{%- include snippets/assign.html | ||
target=site.data.variables.default.page.articles.show_info | ||
source0=layout.articles.show_info source1=page.articles.show_info -%} | ||
{%- assign _show_info = __return -%} | ||
|
||
{%- include article-list.html articles=_articles type='brief' show_info=_show_info -%} | ||
|
||
{%- else -%} | ||
{%- include snippets/assign.html | ||
target=site.data.variables.default.page.articles.show_cover | ||
source0=layout.articles.show_cover source1=page.articles.show_cover -%} | ||
{%- assign _show_cover = __return -%} | ||
|
||
{%- include snippets/assign.html | ||
target=site.data.variables.default.page.articles.show_excerpt | ||
source0=layout.articles.show_excerpt source1=page.articles.show_excerpt -%} | ||
{%- assign _show_excerpt = __return -%} | ||
|
||
{%- include snippets/assign.html | ||
target=site.data.variables.default.page.articles.show_readmore | ||
source0=layout.articles.show_readmore source1=page.articles.show_readmore -%} | ||
{%- assign _show_readmore = __return -%} | ||
|
||
{%- include snippets/assign.html | ||
target=site.data.variables.default.page.articles.show_info | ||
source0=layout.articles.show_info source1=page.articles.show_info -%} | ||
{%- assign _show_info = __return -%} | ||
|
||
{%- assign _article_type = page.articles.article_type | default: layout.articles.article_type -%} | ||
{%- assign _cover_size = page.articles.cover_size | default: layout.articles.cover_size -%} | ||
{%- assign _excerpt_type = page.articles.excerpt_type | default: layout.articles.excerpt_type -%} | ||
|
||
{%- include article-list.html articles=_articles type='common' | ||
article_type=_article_type | ||
show_cover=_show_cover cover_size=_cover_size | ||
show_excerpt=_show_excerpt excerpt_type=_excerpt_type | ||
show_readmore=_show_readmore show_info=_show_info -%} | ||
|
||
{%- endif -%} | ||
|
||
</div> | ||
{%- endif -%} | ||
|
||
{{ content }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
@mixin text-light { | ||
color: $text-color-theme-light; | ||
h1, h2, h3 { | ||
color: $text-color-theme-light-d; | ||
} | ||
h4, h5 { | ||
color: $text-color-theme-light; | ||
} | ||
h6 { | ||
color: $text-color-theme-light-l; | ||
} | ||
a:not(.button) { | ||
@include link-colors($text-color-theme-light, $main-color-1); | ||
} | ||
} | ||
@mixin text-dark { | ||
color: $text-color-theme-dark; | ||
h1, h2, h3 { | ||
color: $text-color-theme-dark-d; | ||
} | ||
h4, h5 { | ||
color: $text-color-theme-dark; | ||
} | ||
h6 { | ||
color: $text-color-theme-dark-l; | ||
} | ||
a:not(.button) { | ||
@include link-colors($text-color-theme-dark, $main-color-1); | ||
} | ||
} | ||
|
||
.text--light { | ||
@include text-light(); | ||
} | ||
.text--dark { | ||
@include text-dark(); | ||
} |
Oops, something went wrong.