Skip to content

Commit

Permalink
Use relative_url
Browse files Browse the repository at this point in the history
  • Loading branch information
luost26 committed Jul 17, 2024
1 parent 5504554 commit d4a9c9d
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 23 deletions.
4 changes: 2 additions & 2 deletions _data/navigation.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pages:
- name: Home
url: ./
url: /
- name: Publications
url: publications
url: /publications
12 changes: 7 additions & 5 deletions _data/profile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ secondary_name: ""
navbar_name: "Your Name"

positions:
- '<span class="no-break"><img src="assets/images/badges/PKU_red.png" alt="Peking University" class="inline-badge"/></span> B.S., Peking University (2021)'
- name: Position without logo
- logo: /assets/images/badges/PKU_red.png
name: B.S., Peking University (2021)

email: "[email protected]"
# cv_link: link-to-your-cv-file
gscholar: your_google_scholar_id
github: your_github_id
twitter: your_twitter_id
# wechat_qrcode: assets/images/etc/wechat.jpg
# wechat_qrcode: /assets/images/etc/wechat.jpg
# wechat_prompt: >-
# Please tell me your <strong>name</strong> and <strong>affiliation</strong> (current or past) when adding my wechat. Thanks!
# linkedin: your-linked-in-id
Expand All @@ -21,19 +23,19 @@ short_bio: >-
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
portrait_url: assets/images/photos/portrait.jpg
portrait_url: /assets/images/photos/portrait.jpg
portrait_caption: >-
Photo by Manja Vitolic on Unsplash.
education:
- name: Peking University
logo: assets/images/badges/PKU_red.png
logo: /assets/images/badges/PKU_red.png
position: B.S. in Computer Science
date: Sep. 2017 - Jul. 2021

# experience:
# - name: Peking University
# logo: assets/images/badges/PKU_red.png
# logo: /assets/images/badges/PKU_red.png
# position: Research Intern
# date: Sep. 2019 - Jul. 2021

Expand Down
4 changes: 2 additions & 2 deletions _includes/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<ul class="navbar-nav ml-auto">
{% for item in site.data.navigation.pages %}
<li class="nav-item {% if item.name == page.navbar_title %}active{% endif %}">
<a class="nav-link" href="{{ item.url }}">{{ item.name }}
{% if item.url == page.url %}<span class="sr-only">(current)</span>{% endif %}
<a class="nav-link" href="{{ item.url | relative_url }}">{{ item.name }}
{% if item.name == page.navbar_title %}<span class="sr-only">(current)</span>{% endif %}
</a>
</li>
{% endfor %}
Expand Down
4 changes: 2 additions & 2 deletions _includes/widgets/experience_card.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h6>Education</h6>
<ul class="list-unstyled mb-1">
{% for item in site.data.profile.education %}
<li class="media mb-1">
<img src="{{ item.logo }}" alt="{{ item.name }}" style="width: 18px;" class="mr-1 mt-1">
<img src="{{ item.logo | relative_url }}" alt="{{ item.name }}" style="width: 18px;" class="mr-1 mt-1">
<div class="media-body">
<p class="my-0">{{ item.name }}</p>
<p class="small my-0">{{ item.dept }}</p>
Expand Down Expand Up @@ -45,7 +45,7 @@ <h6>Experience</h6>
<ul class="list-unstyled mb-1">
{% for item in site.data.profile.experience %}
<li class="media mb-1">
<img src="{{ item.logo }}" alt="{{ item.name }}" style="width: 18px;" class="mr-1 mt-1">
<img src="{{ item.logo | relative_url }}" alt="{{ item.name }}" style="width: 18px;" class="mr-1 mt-1">
<div class="media-body">
<p class="my-0">{{ item.name }}</p>
<p class="small my-0">{{ item.dept }}</p>
Expand Down
7 changes: 5 additions & 2 deletions _includes/widgets/profile_card.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
<p class="h1 font-weight-normal">{{ site.data.profile.primary_name }} <small>{{ site.data.profile.secondary_name }}</small></p>
<p class="text-profile-position">
{% for position in site.data.profile.positions %}
{{ position }}<br/>
{% if position.logo -%}
<img src="{{ position.logo | relative_url }}" alt="Logo" class="inline-badge"/>
{%- endif %}
{{ position.name }}<br/>
{% endfor %}
</p>
<p class="text-profile-bio">
Expand All @@ -21,7 +24,7 @@
<div class="col-md-auto d-none d-md-block">
<figure class="figure">
<img
src="{{ site.data.profile.portrait_url }}"
src="{{ site.data.profile.portrait_url | relative_url }}"
class="figure-img img-fluid img-thumbnail"
style="height: 200px;"
data-toggle="tooltip"
Expand Down
6 changes: 3 additions & 3 deletions _includes/widgets/publication_item.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="row no-gutters border-bottom border-gray">
{%- if item.cover -%}
<div class="col-md-3 col-xl-2 mb-md-0 p-md-3">
<img data-src="{{ item.cover }}" alt="{{ item.title }}" class="lazy w-100 rounded-sm" src="assets/images/empty_300x200.png">
<img data-src="{{ item.cover | relative_url }}" alt="{{ item.title }}" class="lazy w-100 rounded-sm" src="{{ '/assets/images/empty_300x200.png' | relative_url }}">
</div>
<div class="col-md-9 col-xl-10 p-3 pl-md-0">
{%- else -%}
Expand All @@ -30,9 +30,9 @@ <h5 class="mt-0 mb-1 font-weight-normal">{{ item.title }}</h5>

<div class="card w-100 d-md-none border-top-0 border-right-0 border-left-0 rounded-0" style="overflow-y: scroll;">
{%- if item.cover -%}
<img data-src="{{ item.cover }}" alt="{{ item.title }}" class="lazy card-img w-100" src="assets/images/empty_300x200.png">
<img data-src="{{ item.cover | relative_url }}" alt="{{ item.title }}" class="lazy card-img w-100" src="{{ '/assets/images/empty_300x200.png' | relative_url }}">
{%- else -%}
<img alt="{{ item.title }}" class="w-100 rounded-sm" src="assets/images/empty_300x200.png">
<img alt="{{ item.title }}" class="w-100 rounded-sm" src="{{ '/assets/images/empty_300x200.png' | relative_url }}">
{%- endif -%}
<div class="card-img-overlay d-flex align-items-start flex-column" style="background-color: rgba(255, 255, 255, 0.85);">
<div class="mb-auto"></div>
Expand Down
4 changes: 2 additions & 2 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&family=Raleway:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/global.css">
<link rel="stylesheet" href="{{ '/assets/css/global.css' | relative_url }}">
</head>
<body class="bg-light" {{ page.body_attr }}>
{% include navbar.html %}
Expand All @@ -29,6 +29,6 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/js/bootstrap.min.js" integrity="sha512-XKa9Hemdy1Ui3KSGgJdgMyYlUg1gM+QhL6cnlyTe2qzMCYm4nAZ1PsVerQzTTXzonUR+dmswHqgJPuwCq1MaAg==" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/github-buttons/2.14.2/buttons.min.js" integrity="sha512-OYwZx04hKFeFNYrWxIyo3atgGpb+cxU0ENWBZs72X7T9U+NoHPM1ftUn/Mfw7dRDXrqWA6M1wBg6z6fGE32aeA==" crossorigin="anonymous"></script>
<script src="assets/js/common.js"></script>
<script src="{{ '/assets/js/common.js' | relative_url }}"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion _layouts/prompt.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&family=Raleway:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/global.css">
<link rel="stylesheet" href="{{ '/assets/css/global.css' | relative_url }}">
</head>
<style type="text/css">
.container {
Expand Down
2 changes: 1 addition & 1 deletion _publications/2023/2023-pub-example-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub: "Nature Communications"
pub_date: "2023"
abstract: >-
Photo by Thomas Renaud on Unsplash. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
cover: assets/images/covers/cover1.jpg
cover: /assets/images/covers/cover1.jpg
authors:
- Your Name*
- Robert White*
Expand Down
2 changes: 1 addition & 1 deletion _publications/2023/2023-pub-example-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub_date: "2023"
abstract: >-
Photo by Dessy Dimcheva on Unsplash. Viverra nibh cras pulvinar mattis nunc sed. Quam quisque id diam vel quam elementum pulvinar etiam. Ac felis donec et odio pellentesque. Ligula ullamcorper malesuada proin libero nunc consequat interdum varius sit. A pellentesque sit amet porttitor eget. Magna fermentum iaculis eu non diam phasellus vestibulum lorem sed.
cover: assets/images/covers/cover2.jpg
cover: /assets/images/covers/cover2.jpg
authors:
- Charles Green (MIT)*
- John Doe*
Expand Down
2 changes: 1 addition & 1 deletion _publications/2023/2023-pub-example-no-cover.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub_date: "2023"

abstract: >-
Massa ultricies mi quis hendrerit dolor magna. Arcu non odio euismod lacinia at quis risus sed. Et tortor at risus viverra. Enim neque volutpat ac tincidunt. Dictum varius duis at consectetur lorem donec.
# cover: assets/images/covers/cover3.jpg
# cover: /assets/images/covers/cover3.jpg
authors:
- Your Name
- James Wang
Expand Down
2 changes: 1 addition & 1 deletion _publications/2024/2024-pub-example-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub_date: "2024"

abstract: >-
Photo by Pineapple Supply Co. on Unsplash. Massa ultricies mi quis hendrerit dolor magna. Arcu non odio euismod lacinia at quis risus sed. Et tortor at risus viverra. Enim neque volutpat ac tincidunt. Dictum varius duis at consectetur lorem donec.
cover: assets/images/covers/cover3.jpg
cover: /assets/images/covers/cover3.jpg
authors:
- Your Name
- James Wang
Expand Down

0 comments on commit d4a9c9d

Please sign in to comment.