Skip to content

Commit

Permalink
view source & breakdown scss
Browse files Browse the repository at this point in the history
  • Loading branch information
RoboMico committed Sep 23, 2024
1 parent 873575d commit 10f71ae
Show file tree
Hide file tree
Showing 12 changed files with 319 additions and 287 deletions.
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ description: >- # used by seo meta and the atom feed
# Fill in the protocol & hostname for your site.
# e.g. 'https://username.github.io', note that it does not end with a '/'.
url: "https://robomico.cn"
repo_url: https://github.com/RoboMico/robomico.cn

github:
username: RoboMico # change to your github username
Expand Down
7 changes: 6 additions & 1 deletion _data/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ ncm: "Netease Cloud Music"

spoiler-summary: "Click to Unfold"

buttons:
view-source: "View the Source Code of This Page"
switch-theme: "Switch Light/Dark Theme"
switch-language: "Switch Language"

contacts:
bilibili: Bilibili
twitter: Twitter (x.com)
Expand Down Expand Up @@ -62,7 +67,7 @@ copyright:
Except where otherwise noted, the contents on this site are licensed
under the Creative Commons Attribution 4.0 International (CC BY 4.0) License by the author.
meta: Modified from the :THEME theme for :PLATFORM.
meta: Built with :PLATFORM and using modified :THEME theme.

not_found:
statement: Sorry, we've misplaced that URL or it's pointing to something that doesn't exist.
Expand Down
7 changes: 6 additions & 1 deletion _data/locales/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ ncm: "网易云音乐"

spoiler-summary: "点击展开"

buttons:
view-source: "查看本页面源代码"
switch-theme: "切换明暗主题"
switch-language: "切换语言"

contacts:
bilibili: 哔哩哔哩
twitter: Twitter (x.com)
Expand Down Expand Up @@ -61,7 +66,7 @@ copyright:
verbose: >-
除非另有说明,本网站上的内容均由作者按照知识共享署名 4.0 国际 (CC BY 4.0) 许可协议进行授权。
meta: 本站采用 :PLATFORM,主题基于 :THEME 魔改
meta: 本站采用 :PLATFORM 打造,主题使用 :THEME 修改版

not_found:
statement: 抱歉,我们放错了该 URL,或者它指向了不存在的内容。
Expand Down
4 changes: 2 additions & 2 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<footer>
<div aria-label="Site Info" class="
d-flex flex-column justify-content-center text-muted
flex-lg-row justify-content-lg-between align-items-lg-center pb-lg-3
flex-lg-row justify-content-lg-between align-items-lg-center footer-padding
">
<p>
{{- '©' }}
Expand Down Expand Up @@ -43,7 +43,7 @@
</p>
</div>
<div class="d-flex flex-column justify-content-center text-muted
flex-lg-row justify-content-lg-between align-items-lg-center pb-lg-3">
flex-lg-row justify-content-lg-between align-items-lg-center footer-padding">
<p>
<a href="{% include get-url-in-lang.html lang=lang url="/privacy-policy" %}">{{ site.data.locales[include.lang].footer-links.privacy }}</a>
|
Expand Down
2 changes: 1 addition & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

<!-- Bootstrap -->
{% unless jekyll.environment == 'production' %}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
{% endunless %}

<!-- Theme style -->
Expand Down
21 changes: 19 additions & 2 deletions _includes/topbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
alt="avatar"
style="border-radius: 50% !important;"
onerror="this.style.display='none'">
{{ site.title }}
<div id="title-name">{{ site.title }}</div>
</div>
<div id="topbar-navbar">
{% for entry in site.data.navbar %}
Expand Down Expand Up @@ -87,18 +87,35 @@
</nav>
</div>
<div id="topbar-options">
<a
type="button"
class="btn btn-link nav-link"
aria-label="View Source"
id="view-source"
data-bs-toggle="tooltip"
data-bs-placement="bottom"
data-bs-original-title="{{ site.data.locales[lang].buttons.view-source }}"
href="{{ site.repo_url }}/tree/main/{{ page.path }}?plain=1">
<i class="fa-solid fa-code"></i>
</a>
<button
type="button"
class="btn btn-link nav-link"
aria-label="Switch Mode"
id="mode-toggle">
id="mode-toggle"
data-bs-toggle="tooltip"
data-bs-placement="bottom"
data-bs-original-title="{{ site.data.locales[lang].buttons.switch-theme }}">
<i class="fas fa-adjust"></i>
</button>
<a
type="button"
class="btn btn-link nav-link"
aria-label="Switch Language"
id="lang-toggle"
data-bs-toggle="tooltip"
data-bs-placement="bottom"
data-bs-original-title="{{ site.data.locales[lang].buttons.switch-language }}"
href="{% include get-url-switch-lang.html lang=lang url=page.url %}"
data-proofer-ignore>
<i class="fa-solid fa-language"></i>
Expand Down
4 changes: 2 additions & 2 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div id="main-wrapper" class="d-flex justify-content-center">
<div class="container d-flex flex-column px-xxl-5">
<div class="row flex-grow-1">
<main aria-label="Main Content" class="col-12 col-lg-11 col-xl-9 px-md-4">
<main aria-label="Main Content" class="col-12 col-lg-11 col-xl-9 px-md-4 ovrd-full-width">
{% if layout.refactor or layout.layout == 'default' %}
{% include refactor-content.html content=content lang=lang %}
{% else %}
Expand All @@ -49,7 +49,7 @@

<div class="row">
<!-- tail -->
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-md-4">
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-md-4 ovrd-full-width">
{% for _include in layout.tail_includes %}
{% assign _include_path = _include | append: '.html' %}
{% include {{ _include_path }} lang=lang %}
Expand Down
2 changes: 1 addition & 1 deletion _posts/2024-01-16-hello-world-zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: 新博客上线啦!
date: 2024-01-16 00:24:12 +0800
categories: [通知]
categories: [公告]
tags: [中文]
lang: zh-CN
description: 欢迎来到我的新博客网站。
Expand Down
2 changes: 1 addition & 1 deletion _posts/2024-02-08-new-domain-zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: 本站已启用新域名!
date: 2024-02-08 17:20:26 +0800
categories: [通知]
categories: [公告]
tags: [中文]
lang: zh-CN
description: 就是这个:blog.robomico.cn
Expand Down
Loading

0 comments on commit 10f71ae

Please sign in to comment.