-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix sticky header transition and hide site header on scroll
- Loading branch information
1 parent
875245e
commit 3a8af9e
Showing
16 changed files
with
624 additions
and
378 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,57 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# Sample workflow for building and deploying a Jekyll site to GitHub Pages | ||
|
||
name: Deploy Jekyll site to "_site" branch on GitHub Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["main"] | ||
paths: | ||
- "_site/**" # Runs only when there are changes in the 'site' directory | ||
paths-ignore: | ||
- "_site/**" | ||
pull_request: | ||
branches: ["main"] | ||
paths: | ||
paths-ignore: | ||
- "_site/**" | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: "main" | ||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.1" # Not needed with a .ruby-version file | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
cache-version: 0 # Increment this number if you need to re-download cached gems | ||
- name: Build with Jekyll | ||
# Outputs to the './_site' directory by default | ||
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" | ||
env: | ||
JEKYLL_ENV: production | ||
ruby-version: '3.0' # Ensure you use Ruby 3.0 or above | ||
bundler-cache: true # Automatically install gems and cache them | ||
|
||
- name: Print Ruby and Bundler version | ||
run: | | ||
ruby -v | ||
bundler -v | ||
- name: Build Jekyll site | ||
run: bundle exec jekyll build | ||
|
||
# Deployment job | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout main branch | ||
uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ref: "main" | ||
- name: Copy _site contents | ||
run: | | ||
cp -r _site/ Gemfile _config.yml /tmp/ | ||
git checkout -b _site | ||
rm -rf * | ||
cp -r /tmp/_site/* /tmp/Gemfile /tmp/_config.yml ./ | ||
git add --all | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git commit -m "update _site content" | ||
git push --force origin _site | ||
ruby-version: '3.0' | ||
bundler-cache: true | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: jeffreytse/[email protected] | ||
with: | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
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,95 @@ | ||
<!DOCTYPE html> | ||
<html lang=" en"><head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<link rel="stylesheet" href="/assets/css/style.css"> | ||
<script> | ||
MathJax = { | ||
tex: { | ||
inlineMath: [['$', '$'], ['\\(', '\\)']] | ||
} | ||
}; | ||
</script> | ||
<script id="MathJax-script" async | ||
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"> | ||
</script> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<link rel="shortcut icon" type="image/x-icon" href="/favicon/favicon.ico"> | ||
|
||
</head><body><header class="site-header"> | ||
<div class="wrapper"><a class="site-title" rel="author" href="/">Please-type-your-Github-name-here's Blog</a><nav class="site-nav"> | ||
<input type="checkbox" id="nav-trigger" class="nav-trigger" /> | ||
<label for="nav-trigger"> | ||
<span class="menu-icon"> | ||
<svg viewBox="0 0 18 15" width="18px" height="15px"> | ||
<path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/> | ||
</svg> | ||
</span> | ||
</label> | ||
|
||
<div class="trigger"><a class="page-link" href="/all-tags.html">Tags</a><a class="page-link" href="/archive.html">Archive</a><a class="page-link" href="/about.html">About</a></div> | ||
</nav></div> | ||
</header> | ||
<main class="page-content" aria-label="Content"> | ||
<div class="wrapper" style="text-align: justify;"> | ||
<ul id="toc" class="section-nav"> | ||
</ul> | ||
<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting"> | ||
|
||
<header class="post-header"> | ||
<h1 class="post-title p-name" itemprop="name headline">My first post</h1> | ||
|
||
<span>[ | ||
|
||
|
||
<a href="/tag/WoW"><code class="highligher-rouge"><nobr>WoW</nobr></code></a> | ||
|
||
|
||
<a href="/tag/go"><code class="highligher-rouge"><nobr>go</nobr></code></a> | ||
|
||
]</span> | ||
|
||
<br> | ||
<br> | ||
|
||
<p> | ||
Haha! This is my first post. | ||
</p> | ||
|
||
<p class="post-meta" style="font-size: 18px"><time class="dt-published" datetime="2024-01-20T00:00:00-08:00" itemprop="datePublished"> | ||
Jan 20, 2024 | ||
</time></p> | ||
</header> | ||
|
||
<hr> | ||
|
||
<div class="post-content e-content" itemprop="articleBody"> | ||
<p>###</p> | ||
|
||
</div><a class="u-url" href="/2024/01/20/My-first-post.html" hidden></a> | ||
|
||
</article> | ||
|
||
<hr> | ||
|
||
<h1><a href="https://github.com/Deep0Thinking/2nd-Minima#2.3">fake comments section</a></h1> | ||
|
||
</div> | ||
</main> | ||
|
||
</body> | ||
|
||
<script src="/assets/js/custom-styles.js"></script> | ||
|
||
</html> |
Oops, something went wrong.