Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
mmminji committed Feb 15, 2021
1 parent d8af564 commit f5d331c
Show file tree
Hide file tree
Showing 38 changed files with 2,489 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.gem
.bundle
.sass-cache
_site
Gemfile.lock
.DS_Store
vendor
.jekyll-cache
tags
34 changes: 34 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: Page Not Found
---
<!DOCTYPE html>
<html lang="en">
<head>
{%- include head.html -%}
<style>
h2 {
font-feature-settings: "lnum";
background-color: #ddd;
width: 140px;
height: 140px;
border-radius: 100%;
display: flex;
justify-content: center;
align-items: center
}
body {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
font-size: 20px;
height: 80vh;
}
p {text-align: center; line-height: 2em;}
</style>
</head>
<body>
<h2>404</h2>
<p>Page not found.</p>
</body>
</html>
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# frozen_string_literal: true

source "https://rubygems.org"
gemspec
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2019 Samarjeet

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
223 changes: 222 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,222 @@
# mmminji.github.io
# plainwhite

Simplistic jekyll portfolio-style theme for writers.

**Demo**: [samarsault.com](https://samarsault.com)

![plainwhite theme preview](/screenshot.png)

## Installation on Github Pages

Add this line to your site's `_config.yml`:

```yaml
remote_theme: samarsault/plainwhite-jekyll
```
## Installation
Add this line to your Jekyll site's `Gemfile`:

```ruby
gem "plainwhite"
```

And add this line to your Jekyll site's `_config.yml`:

```yaml
theme: plainwhite
```

And then execute:

$ bundle

Or install it yourself as:

$ gem install plainwhite

## Usage

The "plainwhite" key in \_config.yml is used to customize the theme data.

```yaml
plainwhite:
name: Adam Denisov
tagline: Developer. Designer
date_format: "%b %-d, %Y"
social_links:
twitter: samarsault
github: samarsault
linkedIn: in/samarsault # format: locale/username
```

**Updating Placeholder Image**

The placeholder portfolio image can be replaced by the desired image by placing it as `assets/portfolio.png` in your jekyll website, or by changing the following line in `_config.yaml`

```yaml
plainwhite:
portfolio_image: "assets/portfolio.png" # the path from the base directory of the site to the image to display (no / at the start)
```

To use a different image for dark mode, e.g. with different colors that work better in dark mode, add a `portfolio_image_dark` entry in addition to the `portfolio_image`.

```yaml
plainwhite:
portfolio_image: "assets/portfolio.png"
portfolio_image_dark: "assets/portfolio_dark.png"
```

**Comments (Disqus)**

Comments on posts can be enabled by specifying your disqus_shortname under plainwhite in `_config.yml`. For example,

```yaml
plainwhite:
disqus_shortname: games
```

**Google Analytics**

It can be enabled by specifying your analytics id under plainwhite in `_config.yml`

```yaml
plainwhite:
analytics_id: "< YOUR ID >"
```

**Sitemap**

It can be toggled by the following line to under plainwhite in `_config.yml`

```yaml
plainwhite:
sitemap: true
```

**Excerpts**

Excerpts can be enabled by adding the following line to your `_config.yml`

```yaml
show_excerpts: true
```

**Layouts**

- Home
- Page
- Post

**Navigation**

Navigation can be enabled by adding the following line to your `_config.yml`

```yaml
plainwhite:
navigation:
- title: My Work
url: "/my-work"
- title: Resume
url: "/resume"
```

**Mobile**

By default, Plainwhite places the sidebar (logo, name, tagline etc.) above the content on mobile (narrow screens).
To condense it (moving some things to the bottom of the page and making the rest smaller) so it takes up less space, add the following to your `_config.yml`:

```yaml
plainwhite:
condensed_mobile:
- home
- post
- page
```

This chooses which layouts (types of page) should be condensed on mobile screens. E.g. if you want everything but the landing page to be condensed, remove `home` from the list. This option does not affect rendering on wider screens.

**Dark mode**

Dark mode can be enabled by setting the `dark_mode` flag in your `_config.yml`

The website will check the OS preferred color scheme and set the theme accordingly, the preference will then be saved in a cookie

```yaml
plainwhite:
dark_mode: true
```

![plainwhite dark theme previe](/dark.png)

**Multiline tagline**

Tagline can be multiline in this way

```yaml
plainwhite:
tagline: |
First Line.
Second Line.
Third Line.
```

**Search-bar**

Search-bar can be enabled by adding the following line to `config.yml`

```yaml
plainwhite:
search: true
```

Search is powered by [Simple-Jekyll-Search](https://github.com/christian-fei/Simple-Jekyll-Search) Jekyll plugin. A `search.json` containing post meta and contents will be generated in site root folder. Plugin JavaScript will then match for posts based on user input. More info and `search.json` customization documentation can be found in plugin repository.

**Base URL**

You can specify a custom base URL (eg. example.com/blog/) by adding the following line to `_config.yaml`. Note that there is no trailing slash on the URL.

```yaml
baseurl: "/blog"
```

**Language**

You can set the `lang` attribute of the `<html>` tag on your pages by changing the following line in `_config.yml`:

```yaml
plainwhite:
html_lang: "en"
```

[See here for a full list of available language codes](https://www.w3schools.com/tags/ref_country_codes.asp)

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/samarsault/plainwhite-jekyll. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## Development

To set up your environment to develop this theme, run `bundle install`.

Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.

When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
To add a custom directory to your theme-gem, please edit the regexp in `plainwhite.gemspec` accordingly.

## Donation
If this project help you reduce time to develop, you can give me a cup of coffee :)

[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://paypal.me/thelehhman)

## License

The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

## More themes

- [Texture](https://github.com/samarsault/texture)
61 changes: 61 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
title: Your awesome title
author: GitHub User
email: [email protected]
description: > # this means to ignore newlines until "show_exerpts:"
Write an awesome description for your new site here. You can edit this
line in _config.yml. It will appear in your document head meta (for
Google search results) and in your feed.xml site description.
show_excerpts: true # set to true to show excerpts on the homepage

# Minima date format
# refer to http://shopify.github.io/liquid/filters/date/ if you want to customize this
sass:
sass_dir: _sass
plainwhite:
name: Adam Denisov
tagline: Developer. Designer
date_format: "%b %-d, %Y"
sitemap: true # set to true to generate sitemap.xml content
search: true # set to true to enable searchbar
dark_mode: true # set to true to add dark mode toggle
portfolio_image: "assets/portfolio.png" # the path from the base directory of the site to the image to display (no / at the start)
html_lang: "en" # set the lang attribute of the <html> tag for the pages. See here for a list of codes: https://www.w3schools.com/tags/ref_country_codes.asp
condensed_mobile:
#- home
- page
- post
# generate social links in footer
social_links:
twitter: samarsault
github: samarsault
linkedIn: in/samarsault
#rss: rss
#dribbble: jekyll
#flickr: jekyll
#instagram: jekyll
#pinterest: jekyll
#youtube: jekyll
#facebook: jekyll
#soundcloud: jekyll
#telegram: jekyll
#gitlab: jekyll
#email: jekyll

# Mastodon instances
# mastodon:
# - username: jekyll
# instance: example.com
# - username: jekyll2
# instance: example.com

# If you want to link only specific pages in your header, uncomment
# this and add the path to the pages in order as they should show up
#header_pages:
# - about.md

# Build settings
theme: plainwhite

plugins:
- jekyll-seo-tag
# - jekyll-feed
10 changes: 10 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="https://fonts.googleapis.com/css?family=Merriweather:300|Raleway:400,700" rel="stylesheet">
<link rel="stylesheet" href="{{ "/assets/css/style.css" | relative_url }}">
<title>{{ page.title | default: site.title }}</title>
{% seo %}
{% if site.plainwhite.dark_mode %}
<script type="text/javascript" src="{{ "/assets/js/darkmode.js" | relative_url }}"></script>
{% endif %}
Loading

0 comments on commit f5d331c

Please sign in to comment.