Skip to content

Commit

Permalink
Merge pull request #1 from image-rs/projects
Browse files Browse the repository at this point in the history
Add projects listing and page skeletons
  • Loading branch information
HeroicKatora authored Apr 22, 2019
2 parents e13cfa3 + 35260e0 commit e3433c0
Show file tree
Hide file tree
Showing 11 changed files with 214 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.bundle
Gemfile.lock
_site
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
The main site of `image-rs` at <www.image-rs.org>.

## Contributing

Any member of the organization is welcome to contribute to the site, not only
collaborators. The main branch that is served over `www.image-rs.org` should
only be changed through PRs with at least one review, regardless of the author.
Major changes to the structure or look should gather some feedback over a week
but at least three days (so that one is a work day).

Most pressing issues:

* Design the pages instead of relying on a rather unstructured default look.
* Establish a system for tags and categories
* Evaluate how to present the individual projects under the organization. Each
projects could have one dedicated maintainer on its project page.

## Serving locally

For basic usage, follow [the official Github guide][GHGuide]. If you are not
comfortable giving `sudo` to the `bundler` commands just for this project (i.e.
this is not your main project or you created a project related account to
confine access, ...) like me then you can also do:

1. Create some local directory used to hold the installed gems. I use
`GEM_HOME=~/.local/lib/gems` to mirror the root tree that would otherwise be used.
2. > `bundle install --path $GEM_HOME`
3. Invoke jekyll through `bundle` as well
> `bundle exec jekyll serve`

[GHGuide]: https://help.github.com/en/articles/setting-up-your-github-pages-site-locally-with-jekyll
6 changes: 5 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
theme: jekyll-theme-slate
theme: jekyll-theme-slate
collections:
summaries:
projects:
output: true
49 changes: 49 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="{{ site.lang | default: "en-US" }}">

<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,maximum-scale=2">
<link rel="stylesheet" type="text/css" media="screen" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">

{% seo %}
</head>

<body>

<!-- HEADER -->
<div id="header_wrap" class="outer">
<header class="inner">
<a id="forkme_banner" href="{{ site.github.repository_url }}">View on GitHub</a>

<h1 id="project_title">{{ site.title | default: site.github.repository_name }}</h1>
<h2 id="project_tagline">{{ site.description | default: site.github.project_tagline }}</h2>

{% if site.show_downloads %}
<section id="downloads">
<a class="zip_download_link" href="{{ site.github.zip_url }}">Download this project as a .zip file</a>
<a class="tar_download_link" href="{{ site.github.tar_url }}">Download this project as a tar.gz file</a>
</section>
{% endif %}
</header>
</div>

<!-- MAIN CONTENT -->
<div id="main_content_wrap" class="outer">
<main id="main_content" class="inner-wide">
{{ content }}
</main>
</div>

<!-- FOOTER -->
<div id="footer_wrap" class="outer">
<footer class="inner">
{% if site.github.is_project_page %}
<p class="copyright">{{ site.title | default: site.github.repository_name }} maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a></p>
{% endif %}
<p>Published with <a href="https://pages.github.com">GitHub Pages</a></p>
</footer>
</div>
</body>
</html>
29 changes: 29 additions & 0 deletions _layouts/project.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
layout: default
---

<div>
<nav class="external-sites">
{% if page.github %}
<p><a href="{{ page.github }}">Repository</a></p>
{% endif %}
{% if page.crates_io %}
<p><a href="{{ page.crates_io }}" rel=external>
<img alt="Crates.io" src="{{ page.crates_io_badge }}" style="max-width: 100%;"/>
</a></p>
{% endif %}
{% if page.docs %}
<p><a href="{{ page.docs }}" rel=external>
<img alt="Documentation" src="{{ page.docs_badge }}" style="max-width: 100%;"/>
</a></p>
{% endif %}
</nav>

<h1 class="post-title">
{{ page.title }}
</h1>

<main class="post-content">
{{ content }}
</main>
</div>
12 changes: 12 additions & 0 deletions _projects/image.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: project
name: "image"
weight: 1000
crates_io: "https://crates.io/crates/image"
crates_io_badge: "https://img.shields.io/crates/v/image.svg"
github: "https://github.com/image-rs/image"
docs: "https://docs.rs/image"
docs_badge: "https://docs.rs/image/badge.svg"
---

The `image` project.
6 changes: 6 additions & 0 deletions _summaries/image.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
name: "image"
---

Aggregates major image formats into a coherent interface for reading, writing
and editing.
61 changes: 61 additions & 0 deletions assets/css/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
---

@import "jekyll-theme-slate";

.inner-wide {
position: relative;
max-width: 992px;
padding: 20px 10px;
margin: 0 auto;
}

.image-rs-inline-avatar {
display: inline;
margin: 0px;
height: 1em;
vertical-align: text-bottom;
}

.post-info {
text-align: right;
font-weight: bold;
}

.subtle-link {
color: inherit;
}

a:hover {
color: #0F79D0;
text-decoration: none;
}

.project-list {
display: flex;
max-width: 300ch;
flex-wrap: wrap;
justify-content: space-between;
}

.project-list > article {
width: 45%;
max-width: 45%;
box-sizing: border-box;
}
@media screen and (max-width: 992px) {
.project-list > article {
width: 100%;
max-width: 100%;
}
}

.external-sites {
float: right;
}

.external-sites>p {
margin-top: 1px;
margin-bottom: 1px;
padding: unset;
}
15 changes: 15 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
layout: "default"
description: "Open-source, image related Rust crates."
---

<div class="project-list">
{% assign sorted_projects = site.projects | sort: "weight" | reverse %}
{% for project in sorted_projects %}
{% assign summary = site.summaries | where: "name",project.name | first %}
<article>
<h2><a href="{{ project.url }}">{{ project.name }}</a></h2>
<p>{{ summary.content }}</p>
</article>
{% endfor %}
</div>
5 changes: 0 additions & 5 deletions index.md

This file was deleted.

0 comments on commit e3433c0

Please sign in to comment.