Skip to content

Commit

Permalink
Merge branch 'feat/information-updates' into 'main'
Browse files Browse the repository at this point in the history
Improve usability of the site

See merge request cangjie/cangjie.pages.freedesktop.org!28
  • Loading branch information
Mathieu Bridon committed Aug 6, 2024
2 parents d877fda + dde5197 commit 92cfdd6
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 6 deletions.
13 changes: 13 additions & 0 deletions _includes/breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div id="breadcrumbs">
<div class="inner">
{% assign crumbs = page.url | remove:'/index.html' | split: '/' %}
<a href="/">Home</a>
{% for crumb in crumbs offset: 1 %}
{% if forloop.last %}
/ {{ page.title }}
{% else %}
/ <a href="{% assign crumb_limit = forloop.index | plus: 1 %}{% for crumb in crumbs limit: crumb_limit %}{{ crumb | append: '/' | replace:'without-plugin/','without-plugins/' }}{% endfor %}">{{ crumb | replace:'-',' ' | remove:'.html' | capitalize }}</a>
{% endif %}
{% endfor %}
</div>
</div>
1 change: 0 additions & 1 deletion _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
target="_blank">View on Freedesktop.org</a>

<a href="{{ site.url }}/"><h1 id="project_title">Project Cangjie 全倉頡中文輸入</h1></a>

<nav id="main_nav">
<a class="{% if page.name == 'home' %}active{% endif %}"
href="{{ site.url }}/">Home</a>
Expand Down
19 changes: 17 additions & 2 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,32 @@
<title>{{ page.title }} | {{ site.name }}</title>
</head>

<body>
<body
{% if page.classname %}
class="{{ page.classname }}"
{% endif %}>
>

{% include header.html %}
{% include header.html %}

{% if page.project %}
{% include header_project.html %}
{% endif %}

{% if page.dir != "/" %}
<div id="breadcrumbs_wrap" class="outer">
{% include breadcrumbs.html %}
</div>
{% endif %}

<!-- MAIN CONTENT -->
<div id="main_content_wrap" class="outer">

<section id="main_content" class="inner">
{% if page.title %}
<h1 id="page_title">{{ page.title }}</h1>
{% endif %}

{{ content }}
</section>
</div>
Expand Down
5 changes: 2 additions & 3 deletions index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
layout: default
title: Project Cangjie
title: Welcome to Project Cangjie
name: home
classname: page-home
---

## Welcome to Project Cangjie

<img src="{{ site.url }}/images/cangjie-without-codes.png"
alt="Project Cangjie - CC-By-SA - Jacqueline Wong and Mathieu Bridon"
title="Project Cangjie - CC-By-SA - Jacqueline Wong and Mathieu Bridon"
Expand Down
19 changes: 19 additions & 0 deletions stylesheets/cangjians.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,22 @@ img {
img#cangjie_home {
box-shadow: 0 0;
}

#project_title {
font-family: 'Lucida Grande', 'Calibri', Helvetica, Arial, sans-serif;
letter-spacing: -1px;
}

#breadcrumbs_wrap {
background-color: rgba(220, 220, 220, 1);
}

#page_title {
margin-bottom: 1em;
}

.page-home #page_title {
border-bottom: rgba(0, 0, 0, 0.15) 1px solid;
margin-bottom: 0.1em;
padding-bottom: 0.2em;
}

0 comments on commit 92cfdd6

Please sign in to comment.