Skip to content

Commit 500bcaa

Browse files
committed
Add juice theme as copy
1 parent 87c13aa commit 500bcaa

25 files changed

+1595
-0
lines changed

themes/juice/.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.idea
2+
.DS_Store
3+
public
4+
5+
.vercel

themes/juice/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Huhu
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

themes/juice/README.md

+129
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# Juice
2+
3+
<img align="right" width="150" height="150" src="/content/juice.svg">
4+
5+
**Juice** is an intuitive, elegant, and responsive Zola theme for product sites.
6+
7+
- Build for product sites
8+
- Simple and intuitive structure
9+
- Clean and elegant design
10+
- Responsive and mobile device compatible
11+
- Customize and extend friendly
12+
13+
https://juice.huhu.io
14+
15+
# Installation
16+
17+
First download this theme to your `themes` directory:
18+
19+
```bash
20+
$ cd themes
21+
$ git clone https://github.com/huhu/juice.git
22+
```
23+
24+
or add as a submodule
25+
```bash
26+
$ git submodule add https://github.com/huhu/juice themes/juice
27+
```
28+
29+
and then enable it in your `config.toml`:
30+
31+
```toml
32+
theme = "juice"
33+
```
34+
35+
# Structure
36+
37+
### Hero
38+
39+
**Juice** is designed for product websites, hence we let **hero** part fills whole of screen.
40+
You can customize your **hero** by using `hero` block in the `templates/index.html`.
41+
42+
```html
43+
{% extends "juice/templates/index.html" %}
44+
{% block hero %}
45+
<div>
46+
Your cool hero html...
47+
</div>
48+
{% endblock hero %}
49+
```
50+
51+
### Page
52+
53+
Every markdown file located in `content` directory will become a **Page**. There also will display as
54+
a navigate link on the top-right corner.
55+
You can change the frontmatter's `weight` value to sort the order (ascending order).
56+
57+
```
58+
+++
59+
title = "Changelog"
60+
description = "Changelog"
61+
weight = 2
62+
+++
63+
64+
```
65+
66+
### CSS variables
67+
68+
You can override theme variable by creating a file named `_variables.html` in your `templates` directory.
69+
70+
See the default value [here](./templates/_variables.html)
71+
72+
### Favicon
73+
The same way as changing the `hero` block in the `templates/index.html`, you can change the **favicon**.
74+
75+
```html
76+
{% extends "juice/templates/index.html" %}
77+
{% block favicon %}
78+
<link rel="icon" type="image/png" href="/favicon.ico">
79+
{% endblock favicon %}
80+
```
81+
82+
### Fonts
83+
If you changed the `--xy-font-family`-variable in `_variables.html`, you have to load the mentioned fonts in the `templates/index.html`.
84+
85+
```html
86+
{% extends "juice/templates/index.html" %}
87+
{% block fonts %}
88+
<link href="https://cdn.jsdelivr.net/npm/[email protected]/css/fork-awesome.min.css" rel="stylesheet" crossorigin="anonymous">
89+
<link href="https://fonts.googleapis.com/css2?family=Babylonica&display=swap" rel="stylesheet">
90+
{% endblock fonts %}
91+
```
92+
93+
# Configuration
94+
95+
You can customize some builtin property in `config.toml` file:
96+
97+
```toml
98+
[extra]
99+
juice_logo_name = "Juice"
100+
juice_logo_path = "juice.svg"
101+
juice_extra_menu = [
102+
{ title = "Github", link = "https://github.com/huhu/juice"}
103+
]
104+
juice_exclude_menu = [
105+
"exclude_from_nav"
106+
]
107+
repository_url = "https://github.com/huhu/juice"
108+
```
109+
110+
# Shortcodes
111+
112+
**Juice** have some builtin shortcodes available in `templates/shortcodes` directory.
113+
114+
- `issue(id)` - A shortcode to render issue url, e.g. `issue(id=1)` would render to the link `https://github.com/huhu/juice/issue/1`.
115+
116+
> The `repository_url` is required.
117+
118+
# Showcases
119+
120+
Please see the [showcases page](https://juice.huhu.io/showcases).
121+
122+
# Contributing
123+
124+
Thank you very much for considering contributing to this project!
125+
126+
We appreciate any form of contribution:
127+
128+
- New issues (feature requests, bug reports, questions, ideas, ...)
129+
- Pull requests (documentation improvements, code improvements, new features, ...)

themes/juice/config.toml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# The URL the site will be built for
2+
base_url = "/"
3+
4+
title = "Juice - An intuitive, elegant, and lightweight Zola theme for product sites."
5+
# default_language = "en"
6+
7+
# Whether to automatically compile all Sass files in the sass directory
8+
compile_sass = true
9+
10+
# Whether to build a search index to be used later on by a JavaScript library
11+
build_search_index = false
12+
13+
# Configuration of the Markdown rendering
14+
[markdown]
15+
# Whether to do syntax highlighting
16+
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
17+
highlight_code = true
18+
highlight_theme = "inspired-github"
19+
20+
[extra]
21+
juice_logo_name = "Juice"
22+
juice_logo_path = "juice.svg"
23+
juice_extra_menu = [
24+
{ title = "Github", link = "https://github.com/huhu/juice" }
25+
]
26+
# Add page titles here to exclude them from the nav section (case sensitive)
27+
juice_exclude_menu = [
28+
"exclude_from_nav"
29+
]
30+
repository_url = "https://github.com/huhu/juice"

themes/juice/content/_index.md

+177
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
+++
2+
title = "Juice"
3+
sort_by = "weight"
4+
+++
5+
6+
# Juice
7+
8+
**Juice** is an intuitive, elegant, and responsive Zola theme for product sites.
9+
10+
- Build for product sites
11+
- Simple and intuitive structure
12+
- Clean and elegant design
13+
- Responsive and mobile device compatible
14+
- Customize and extend friendly
15+
16+
# Installation
17+
18+
> **Zola** is a prerequisite. Please refer to the [Zola installation](https://www.getzola.org/documentation/getting-started/installation/) docs.
19+
20+
First download this theme to your `themes` directory:
21+
22+
```bash
23+
$ cd themes
24+
$ git clone https://github.com/huhu/juice.git
25+
```
26+
27+
or add as a submodule
28+
29+
```bash
30+
$ git submodule add https://github.com/huhu/juice themes/juice
31+
```
32+
33+
and then enable it in your `config.toml`:
34+
35+
```toml
36+
theme = "juice"
37+
```
38+
39+
# Structure
40+
41+
### Hero
42+
43+
**Juice** is designed for product websites, hence we let **hero** part fills whole of screen.
44+
You can customize your **hero** by using `hero` block in the `templates/index.html`.
45+
46+
```html
47+
{% extends "juice/templates/index.html" %} {% block hero %}
48+
<div>Your cool hero html...</div>
49+
{% endblock hero %}
50+
```
51+
52+
### Page
53+
54+
Every markdown file located in `content` directory will become a **Page**. There also will display as
55+
a navigate link on the top-right corner.
56+
You can change the frontmatter's `weight` value to sort the order (ascending order).
57+
58+
```
59+
+++
60+
title = "Changelog"
61+
description = "Changelog"
62+
weight = 2
63+
+++
64+
65+
```
66+
67+
### CSS variables
68+
69+
You can override theme variable by creating a file named `_variables.html` in your `templates` directory.
70+
71+
```html
72+
<style>
73+
:root {
74+
/* Primary theme color */
75+
--primary-color: #fed43f;
76+
/* Primary theme text color */
77+
--primary-text-color: #543631;
78+
--primary-text-color-over: #000;
79+
/* Primary theme link color */
80+
--primary-link-color: #f9bb2d;
81+
/* Secondary color: the background body color */
82+
--secondary-color: #fcfaf6;
83+
--secondary-text-color: #303030;
84+
/* Highlight text color of table of content */
85+
--toc-highlight-text-color: #d46e13;
86+
--toc-background-color: white;
87+
--code-color: #4a4a4a;
88+
--code-background-color: white;
89+
--shadow-color: #ddd;
90+
/* Font used for headers (h1 & h2) */
91+
--header-font-family: "Fira Sans", sans-serif;
92+
/* Font used for text */
93+
--text-font-family: "Fira Sans", sans-serif;
94+
}
95+
</style>
96+
```
97+
98+
### Favicon
99+
100+
The same way as changing the `hero` block in the `templates/index.html`, you can change the **favicon**.
101+
102+
```html
103+
{% extends "juice/templates/index.html" %}
104+
105+
{% block favicon %}
106+
<link rel="icon" type="image/png" href="/favicon.ico" />
107+
{% endblock favicon %}
108+
```
109+
110+
### Fonts
111+
112+
If you changed the `--xy-font-family`-variable in `_variables.html`, you have to load the mentioned fonts in the `templates/index.html`.
113+
114+
```html
115+
{% extends "juice/templates/index.html" %}
116+
117+
{% block fonts %}
118+
<link
119+
href="https://cdn.jsdelivr.net/npm/[email protected]/css/fork-awesome.min.css"
120+
rel="stylesheet"
121+
crossorigin="anonymous"
122+
/>
123+
<link
124+
href="https://fonts.googleapis.com/css2?family=Babylonica&display=swap"
125+
rel="stylesheet"
126+
/>
127+
{% endblock fonts %}
128+
```
129+
130+
### Sidebar
131+
132+
**Juice** has a sidebar on the right side of the screen. You can customize it by using `sidebar` block in the `templates/index.html`.
133+
134+
```html
135+
{% extends "juice/templates/index.html" %}
136+
137+
{% block sidebar %}
138+
<div>
139+
Your cool sidebar
140+
</div>
141+
{% endblock sidebar %}
142+
```
143+
144+
# Configuration
145+
146+
You can customize some builtin property in `config.toml` file:
147+
148+
```toml
149+
[extra]
150+
juice_logo_name = "Juice"
151+
juice_logo_path = "juice.svg"
152+
juice_extra_menu = [
153+
{ title = "Github", link = "https://github.com/huhu/juice"}
154+
]
155+
repository_url = "https://github.com/huhu/juice"
156+
```
157+
158+
# Shortcodes
159+
160+
**Juice** have some builtin shortcodes available in `templates/shortcodes` directory.
161+
162+
- `issue(id)` - A shortcode to render issue url, e.g. `issue(id=1)` would render to the link `https://github.com/huhu/juice/issue/1`.
163+
164+
> The `repository_url` is required.
165+
166+
# Showcases
167+
168+
Please see the [showcases page](/showcases).
169+
170+
# Contributing
171+
172+
Thank you very much for considering contributing to this project!
173+
174+
We appreciate any form of contribution:
175+
176+
- New issues (feature requests, bug reports, questions, ideas, ...)
177+
- Pull requests (documentation improvements, code improvements, new features, ...)

themes/juice/content/about.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
+++
2+
title = "About"
3+
description = "About"
4+
weight = 3
5+
+++
6+
7+
# Juice
8+
9+
**Juice** is an intuitive, elegant, and responsive Zola theme for product sites.
10+
Built by [Huhu.io](https://huhu.io), adopted by a several product sites.
11+
12+
# Logo
13+
14+
![](/juice.svg)
15+
16+
# Zola
17+
18+
[Zola](https://www.getzola.org) is a fast static site generator in a single binary with everything built-in.
19+
20+
21+
# Huhu.io
22+
23+
[Huhu.io](https://huhu.io) is a global community of coders dedicated to making cool stuff coders need and want.
24+
We focus on enabling the developer community by curating, incubating, and launching tools based on great ideas,
25+
providing support and funding that allows our engineers to develop what they want, the way they want.

0 commit comments

Comments
 (0)