Skip to content

Commit

Permalink
v2.0.0-beta (#171)
Browse files Browse the repository at this point in the history
* A brand new design

* Add share

* Style optimized

* v2.0.0-beta

* Update
  • Loading branch information
g1eny0ung authored Feb 1, 2021
1 parent e4de25c commit 0fc1ce1
Show file tree
Hide file tree
Showing 36 changed files with 480 additions and 511 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
Because of the site rewriting, I started to calculate the version again.

## [2.0.0-beta] - 2021.01.31

- New `header` component
- At the same time, remove some clutter or repetitive elements
- Deprecate `categoriesLimitInHeader` param
- Replace `headerBottomText` param to `footerBottomText`
- Improve semantic HTML tags
- Add share buttons in post page

## [1.6.0] - 2021.01.30

- Process term name with humanize | title
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
![Hugo min version](https://img.shields.io/badge/hugo--min--version-0.57.2-important)
![GitHub](https://img.shields.io/github/license/g1eny0ung/hugo-theme-dream)

- [The next version is out](#the-next-version-is-out)
- [Note After v1.1.0](#note-after-v110)
- [Major update in 2019-11-10](#major-update-in-2019-11-10)
- [Intro](#intro)
Expand All @@ -12,6 +13,16 @@
- [Example](#example)
- [Publish](#publish)

## The next version is out

> If you still want to use the old version, you can check out the branch to `release-1.6`.
The new version brings some new design elements and bug fixes. When it stabilizes, it will be released as `v2.0.0`.

All changes will be committed to the `master` branch. You can check the screenshot below to see the rough interface changes.

For more detail, please refer to the [Release v2.0.0-beta](https://github.com/g1eny0ung/hugo-theme-dream/releases/tag/v2.0.0-beta)

## Note After v1.1.0

> It's needed to set the **`about`** folder to **`Headless Bundle`**.
Expand Down
11 changes: 11 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
![Hugo min version](https://img.shields.io/badge/hugo--min--version-0.57.2-important)
![GitHub](https://img.shields.io/github/license/g1eny0ung/hugo-theme-dream)

- [The next version is out](#the-next-version-is-out)
- [Note After v1.1.0](#note-after-v110)
- [Major update in 2019-11-10](#major-update-in-2019-11-10)
- [Intro](#intro)
Expand All @@ -12,6 +13,16 @@
- [Example](#example)
- [Publish](#publish)

## The next version is out

> If you still want to use the old version, you can check out the branch to `release-1.6`.
The new version brings some new design elements and bug fixes. When it stabilizes, it will be released as `v2.0.0`.

All changes will be committed to the `master` branch. You can check the screenshot below to see the rough interface changes.

For more detail, please refer to the [Release v2.0.0-beta](https://github.com/g1eny0ung/hugo-theme-dream/releases/tag/v2.0.0-beta)

## Note After v1.1.0

> It's needed to set the **`about`** folder to **`Headless Bundle`**.
Expand Down
24 changes: 18 additions & 6 deletions docs/params-configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@

```toml
[params]
background = "#ccc"
background = "#fff"
backgroundImage = "/me/background.jpg"
linkColor = "seagreen"

# dark mode
defaultDark = true
# defaultDark = true
backgroundDark = "black"
backgroundImageDark = "/me/background-dark.jpg"
darkLinkColor = "darkseagreen"
darkNav = true
dark404 = true
# darkNav = true
# dark404 = true

images = [""]

Expand All @@ -23,8 +23,10 @@
avatar = "/me/yy.jpg"
headerTitle = "g1eny0ung 的博客"
motto = "与其感慨路难行,不如马上出发。"
categoriesLimitInHeader = 6
# headerBottomText = ""
# categoriesLimitInHeader = 6 # deprecated
# headerBottomText = "" # deprecated

# footerBottomText = ""

rss = true

Expand Down Expand Up @@ -152,12 +154,22 @@ Used in Header.

### `categoriesLimitInHeader = 6`

> Deprecated. Only available before `v2.0.0`
Limit the number of categories displayed in the header, the default is **6**.

### `# headerBottomText = ""`

> Deprecated. Only available before `v2.0.0`
Add text at the bottom of the header, support html. This is usually used as a description of the website information.

### `# footerBottomText = ""`

> Only available after `v2.0.0`
Add text at the bottom of the footer, support html. This is usually used as a description of the website information.

### `rss = true`

Enable RSS.
Expand Down
12 changes: 7 additions & 5 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ theme = "hugo-theme-dream"
# enableRobotsTXT = true

[params]
background = "black"
background = "#f7f7f7"
# backgroundImage = "/me/background.jpg"
linkColor = "seagreen"

Expand All @@ -22,16 +22,18 @@ theme = "hugo-theme-dream"
# backgroundDark = "black"
# backgroundImageDark = "/me/background-dark.jpg"
# darkLinkColor = "darkseagreen"
darkNav = true
dark404 = true
# darkNav = true
# dark404 = true

author = "Yue Yang"
# description = ""
avatar = "/img/avatar.jpg"
# headerTitle = ""
motto = "Motto"
# categoriesLimitInHeader = 6
# headerBottomText = ""
# categoriesLimitInHeader = 6 # deprecated
# headerBottomText = "" # deprecated

# footerBottomText = ""

# rss = true

Expand Down
Binary file modified images/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/tn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions layouts/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ <h1 class="ui header">
<div class="sub header">Don't worry though, click the button below to wake up.</div>
</h1>
<p>
<button class="ui button" onclick="window.location.href = '/'">{{ i18n "backToHome" }}</button>
<button class="ui secondary button" onclick="window.location.href = '/'">{{ i18n "backToHome" }}</button>
</p>
{{ else if .Site.Params.dark404 }}
<h1 class="ui inverted header">
Oops ... You are lost in dream.
Oops...You are lost in dream.
<div class="sub header">Don't worry though, click the button below to wake up.</div>
</h1>
<p>
Expand All @@ -25,7 +25,7 @@ <h1 class="ui header">
<div class="sub header">Don't worry though, click the button below to wake up.</div>
</h1>
<p>
<button class="ui button" onclick="window.location.href = '/'">{{ i18n "backToHome" }}</button>
<button class="ui secondary button" onclick="window.location.href = '/'">{{ i18n "backToHome" }}</button>
</p>
{{ end }}
</div>
Expand Down
32 changes: 24 additions & 8 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
<title>{{ block "title" . }} {{- T "home" -}} {{ end }} | {{ .Site.Title }}</title>

{{ partial "head.html" . }}

{{ block "css" . }} {{ end }}
{{ range .Site.Params.Advanced.customCSS -}}
<link rel="stylesheet" href="{{ . | relURL }}" />
{{- end }}

{{ range .Site.Params.Advanced.customCSS }}
<link rel="stylesheet" href="{{ . | relURL }}" />
{{ end }}
</head>

<body class="default">
Expand All @@ -20,6 +22,20 @@
<section class="front">
<div class="dream-max-width">
{{ block "main" . }} {{ end }}

<footer class="ui basic center aligned segment" style="background-color: transparent;">
{{ if .Site.Params.siteStartYear }}
<p>© {{ if eq now.Year .Site.Params.siteStartYear }}{{ now.Year }}{{ else }}{{ .Site.Params.siteStartYear }} - {{ now.Year }}{{ end }} {{ .Site.Title }}</p>
{{ else }}
<p>© {{ now.Year }} {{ .Site.Title }}</p>
{{ end }}

<p>Powered by <a href="https://gohugo.io/" target="_blank">Hugo</a> with theme <a href="https://github.com/g1eny0ung/hugo-theme-dream" target="_blank">Dream</a>.</p>

{{ if .Site.Params.footerBottomText }}
<p>{{ .Site.Params.footerBottomText | safeHTML }}</p>
{{ end }}
</footer>
</div>
</section>
<section class="back">
Expand All @@ -34,15 +50,15 @@
{{ block "js" . }} {{ end }}

{{ if .Site.Params.enableSearch }}
{{ partial "search.html" . }}
{{ partial "search.html" . }}
{{ end }}

{{ range .Site.Params.Advanced.customJS -}}
<script src="{{ . | relURL }}"></script>
{{- end }}
{{ range .Site.Params.Advanced.customJS }}
<script src="{{ . | relURL }}"></script>
{{ end }}

{{ if .Site.GoogleAnalytics }}
{{ template "_internal/google_analytics_async.html" . }}
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
</body>
</html>
19 changes: 10 additions & 9 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
{{ define "title" }}
{{- if or (eq .Data.Singular "tag") (eq .Data.Singular "category") -}}
{{ .Data.Term }}
{{ .Data.Term }}
{{- end -}}
{{ end }}

{{ define "main"}}
<div class="ui centered relaxed grid dream-grid">
<div class="sixteen wide mobile eight wide tablet eight wide computer four wide large screen four wide widescreen column dream-column">
{{ partial "header.html" . }}
</div>

{{ partial "header.html" . }}

<div class="ui relaxed grid dream-grid">
{{ $paginator := .Paginate .Pages }}
{{ range $paginator.Pages }}
<div class="sixteen wide mobile eight wide tablet eight wide computer four wide large screen four wide widescreen column dream-column">
{{ .Render "summary" }}
</div>
<div class="sixteen wide mobile eight wide tablet eight wide computer four wide large screen four wide widescreen column dream-column">
{{ .Render "summary" }}
</div>
{{ end }}

{{ if or $paginator.HasPrev $paginator.HasNext }}
<div class="sixteen wide mobile eight wide tablet eight wide computer four wide large screen four wide widescreen column dream-column">
{{ partial "paginator.html" (dict "paginator" $paginator "Site" .Site) }}
{{ partial "paginator.html" (dict "paginator" $paginator) }}
</div>
{{ end }}
</div>
{{ end }}

Expand Down
Loading

0 comments on commit 0fc1ce1

Please sign in to comment.