Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Huzaifa.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Nathan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Tega.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 12 additions & 9 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ timezone: Asia/Shanghai
# jekyll-seo-tag settings › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
# ↓ --------------------------

title: Chirpy # the main title
title: QuizRUs # the main title

tagline: A text-focused Jekyll theme # it will display as the subtitle

Expand Down Expand Up @@ -147,7 +147,8 @@ pwa:
deny_paths:
# - "/example" # URLs match `<SITE_URL>/example/*` will not be cached by the PWA

paginate: 10
# Remove or comment out the paginate setting
# paginate: 10

# The base URL of your site
baseurl: ""
Expand All @@ -174,14 +175,16 @@ collections:
defaults:
- scope:
path: "" # An empty string here means all files in the project
type: posts
type: pages
values:
layout: post
comments: true # Enable comments in posts.
toc: true # Display TOC column in posts.
# DO NOT modify the following parameter unless you are confident enough
# to update the code of all other post links in this project.
permalink: /posts/:title/
layout: page
comments: false
toc: false
title: Project Overview # Rename Home to Project Overview
- scope:
path: _posts # Exclude posts from the homepage
values:
layout: none
- scope:
path: _drafts
values:
Expand Down
2 changes: 1 addition & 1 deletion _data/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ layout:
# The tabs of sidebar
tabs:
# format: <filename_without_extension>: <value>
home: Home
home: Project Preview
categories: Categories
tags: Tags
archives: Archives
Expand Down
2 changes: 1 addition & 1 deletion _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}">
<a href="{{ '/' | relative_url }}" class="nav-link">
<i class="fa-fw fas fa-home"></i>
<span>{{ site.data.locales[include.lang].tabs.home | upcase }}</span>
<span>PROJECT PREVIEW</span>
</a>
</li>
<!-- the real tabs -->
Expand Down
2 changes: 1 addition & 1 deletion _layouts/category.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{% include lang.html %}

<div id="page-category">
<div id="page-video-tutorial">
<h1 class="ps-lg-2">
<i class="far fa-folder-open fa-fw text-muted"></i>
{{ page.title }}
Expand Down
142 changes: 27 additions & 115 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,118 +5,30 @@

{% include lang.html %}

{% assign all_pinned = site.posts | where: 'pin', 'true' %}
{% assign all_normal = site.posts | where_exp: 'item', 'item.pin != true and item.hidden != true' %}

{% assign posts = '' | split: '' %}

<!-- Get pinned posts on current page -->

{% assign visible_start = paginator.page | minus: 1 | times: paginator.per_page %}
{% assign visible_end = visible_start | plus: paginator.per_page %}

{% if all_pinned.size > visible_start %}
{% if all_pinned.size > visible_end %}
{% assign pinned_size = paginator.per_page %}
{% else %}
{% assign pinned_size = all_pinned.size | minus: visible_start %}
{% endif %}

{% for i in (visible_start..all_pinned.size) limit: pinned_size %}
{% assign posts = posts | push: all_pinned[i] %}
{% endfor %}
{% else %}
{% assign pinned_size = 0 %}
{% endif %}

<!-- Get normal posts on current page -->

{% assign normal_size = paginator.posts | size | minus: pinned_size %}

{% if normal_size > 0 %}
{% if pinned_size > 0 %}
{% assign normal_start = 0 %}
{% else %}
{% assign normal_start = visible_start | minus: all_pinned.size %}
{% endif %}

{% assign normal_end = normal_start | plus: normal_size | minus: 1 %}

{% for i in (normal_start..normal_end) %}
{% assign posts = posts | push: all_normal[i] %}
{% endfor %}
{% endif %}

<div id="post-list" class="flex-grow-1 px-xl-1">
{% for post in posts %}
<article class="card-wrapper card">
<a href="{{ post.url | relative_url }}" class="post-preview row g-0 flex-md-row-reverse">
{% assign card_body_col = '12' %}

{% if post.image %}
{% assign src = post.image.path | default: post.image %}
{% unless src contains '//' %}
{% assign src = post.media_subpath | append: '/' | append: src | replace: '//', '/' %}
{% endunless %}

{% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %}

{% assign lqip = null %}

{% if post.image.lqip %}
{% capture lqip %}lqip="{{ post.image.lqip }}"{% endcapture %}
{% endif %}

<div class="col-md-5">
<img src="{{ src }}" alt="{{ alt }}" {{ lqip }}>
</div>

{% assign card_body_col = '7' %}
{% endif %}

<div class="col-md-{{ card_body_col }}">
<div class="card-body d-flex flex-column">
<h1 class="card-title my-2 mt-md-0">{{ post.title }}</h1>

<div class="card-text content mt-0 mb-3">
<p>{% include post-description.html %}</p>
</div>

<div class="post-meta flex-grow-1 d-flex align-items-end">
<div class="me-auto">
<!-- posted date -->
<i class="far fa-calendar fa-fw me-1"></i>
{% include datetime.html date=post.date lang=lang %}

<!-- categories -->
{% if post.categories.size > 0 %}
<i class="far fa-folder-open fa-fw me-1"></i>
<span class="categories">
{% for category in post.categories %}
{{ category }}
{%- unless forloop.last -%},{%- endunless -%}
{% endfor %}
</span>
{% endif %}
</div>

{% if post.pin %}
<div class="pin ms-1">
<i class="fas fa-thumbtack fa-fw"></i>
<span>{{ site.data.locales[lang].post.pin_prompt }}</span>
</div>
{% endif %}
</div>
<!-- .post-meta -->
</div>
<!-- .card-body -->
</div>
</a>
</article>
{% endfor %}
</div>
<!-- #post-list -->

{% if paginator.total_pages > 1 %}
{% include post-paginator.html %}
{% endif %}
{% comment %}
This layout is used for the homepage.
{% endcomment %}
<!DOCTYPE html>
<html lang="{{ site.lang }}">
<head>
{% include head.html %}
<title>Project Overview</title>
</head>
<body>
<div class="container">
<header>
<h1>Project Overview</h1>
</header>
<main id="main">
{% assign main_page = site.pages | where: "path", "main-page.md" | first %}
{% if main_page %}
{{ main_page.content }}
{% else %}
<p>Main page content not found.</p>
{% endif %}
</main>
<!-- Remove Recently Updated and Trending Tags sections -->
</div>
{% include footer.html %}
</body>
</html>
57 changes: 0 additions & 57 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,6 @@ <h1 data-toc-skip>{{ page.title }}</h1>
{% endif %}

<div class="post-meta text-muted">
<!-- published date -->
<span>
{{ site.data.locales[lang].post.posted }}
{% include datetime.html date=page.date tooltip=true lang=lang %}
</span>

<!-- lastmod date -->
{% if page.last_modified_at and page.last_modified_at != page.date %}
<span>
{{ site.data.locales[lang].post.updated }}
{% include datetime.html date=page.last_modified_at tooltip=true lang=lang %}
</span>
{% endif %}

{% if page.image %}
{% capture src %}src="{{ page.image.path | default: page.image }}"{% endcapture %}
{% capture class %}class="preview-img{% if page.image.no_bg %}{{ ' no-bg' }}{% endif %}"{% endcapture %}
Expand All @@ -52,49 +38,6 @@ <h1 data-toc-skip>{{ page.title }}</h1>
{%- endif -%}
</div>
{% endif %}

<div class="d-flex justify-content-between">
<!-- author(s) -->
<span>
{% if page.author %}
{% assign authors = page.author %}
{% elsif page.authors %}
{% assign authors = page.authors %}
{% endif %}

{{ site.data.locales[lang].post.written_by }}

<em>
{% if authors %}
{% for author in authors %}
{% if site.data.authors[author].url -%}
<a href="{{ site.data.authors[author].url }}">{{ site.data.authors[author].name }}</a>
{%- else -%}
{{ site.data.authors[author].name }}
{%- endif %}
{% unless forloop.last %}{{ '</em>, <em>' }}{% endunless %}
{% endfor %}
{% else %}
<a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>
{% endif %}
</em>
</span>

<div>
<!-- pageviews -->
{% if site.pageviews.provider and site.analytics[site.pageviews.provider].id %}
<span>
<em id="pageviews">
<i class="fas fa-spinner fa-spin small"></i>
</em>
{{ site.data.locales[lang].post.pageview_measure }}
</span>
{% endif %}

<!-- read time -->
{% include read-time.html content=content prompt=true lang=lang %}
</div>
</div>
</div>
</header>

Expand Down
2 changes: 1 addition & 1 deletion _layouts/tags.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# All the Tags of posts.
---

<div id="tags" class="d-flex flex-wrap mx-xl-2">
<div id="Our Team" class="d-flex flex-wrap mx-xl-2">
{% assign tags = '' | split: '' %}
{% for t in site.tags %}
{% assign tags = tags | push: t[0] %}
Expand Down
Loading
Loading