Skip to content
This repository has been archived by the owner on Dec 19, 2021. It is now read-only.

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Tazeg committed Aug 10, 2018
0 parents commit 929bd99
Show file tree
Hide file tree
Showing 19 changed files with 324 additions and 0 deletions.
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2018 YOUR_NAME_HERE

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.
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# WebShot

A free blog theme for [HUGO](https://gohugo.io/), with tags, archives, last posts...

![HUGO blog theme by JeffProd.com](images/screenshot.png)

# Install

Install HUGO (<https://gohugo.io/>) then :

```
hugo new site myblog
cd myblog
git clone https://github.com/Tazeg/hugo-blog-jeffprod.git themes/jeffprod
```
In the file `config.toml` add the lines :
```
theme = "jeffprod"
[permalinks]
post = "/:year/:filename"
[taxonomies]
tag = "tags"
archive = "archives"
```

### Write blog posts

```
hugo new post/my-first-post.md
```
And edit this new file `content/post/my-first-post.md`.

### Render

```
hugo server
```
Then go to <http://localhost:1313>

### Create the web site

```
hugo
```

All files to publish are in `public/` directory.

# Donate

<https://en.jeffprod.com/donate.html>

# Credits

Background image by https://pixabay.com
2 changes: 2 additions & 0 deletions archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
+++
+++
8 changes: 8 additions & 0 deletions archetypes/post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
archives: [{{ dateFormat "2006" now }}]
tags: []
author: John SMITH
type: "article"
---
Binary file added 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 added 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.
5 changes: 5 additions & 0 deletions layouts/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ define "main" }}

Page not found...

{{ end }}
5 changes: 5 additions & 0 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ partial "header.html" . }}

{{ block "main" . }}{{ end }}

{{ partial "footer.html" . }}
19 changes: 19 additions & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{ define "main" }}

<div class="container">
<div class="columns">
<div class="column is-9">
<div class="tile is-child box">
<div class="content">
{{ .Content }}
</div>
</div>
</div>
<div class="column is-3">
{{ partial "widget-tags.html" . }}<br>
{{ partial "widget-archives.html" . }}
</div>
</div>
</div>

{{ end }}
34 changes: 34 additions & 0 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{{ define "main" }}

<div class="container">
<div class="columns">
<div class="column is-9">
<div class="tile is-child box">
<div class="content">
<h3>Welcome to my blog !</h3>
<hr>
{{ range first 5 (where .Site.Pages "Type" "article").ByPublishDate.Reverse }}
<article class="media">
<div class="media-content">
<div class="content">
<p class="title is-4"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></p>
<p class="subtitle is-size-6 has-text-grey-light">
Published at {{ .Date.Format "January 2, 2006" }} &middot;
<i class="far fa-clock"></i>&nbsp;{{.ReadingTime}} min read
</p>
<p>{{ .Summary }}...</p>
</div>
</div>
</article>
{{ end }}
</div>
</div>
</div>
<div class="column is-3">
{{ partial "widget-tags.html" . }}<br>
{{ partial "widget-archives.html" . }}
</div>
</div>
</div>

{{ end }}
16 changes: 16 additions & 0 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<br>
<footer class="footer has-background-grey-darker has-text-white">
<div class="content has-text-centered">
<p>
<span class="icon is-large"><a href="https://twitter.com/" class="mysocial"><i class="fab fa-twitter fa-3x"></i></a></span>&nbsp;&nbsp;
<span class="icon is-large"><a href="https://www.youtube.com/" class="mysocial"><i class="fab fa-youtube fa-3x"></i></a></span>&nbsp;&nbsp;
<span class="icon is-large"><a href="https://github.com/" class="mysocial"><i class="fab fa-github fa-3x"></i></a></span>&nbsp;&nbsp;
<br><br>
Copyright &copy; {{ .Site.Title }} {{ now.Format "2006"}} - Theme by <a href="https://jeffprod.com" class="mysocial">JeffProd.com</a>
</p>
</div>
</footer>

<script defer src="https://use.fontawesome.com/releases/v5.1.0/js/all.js"></script>
</body>
</html>
45 changes: 45 additions & 0 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="{{ $.Site.LanguageCode | default "en" }}">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ .Site.Title }} {{ with .Title }} | {{ . }}{{ end }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">

<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css" />
<link rel="stylesheet" href="/css/blog.css" />
</head>
<body>

<!-- nav -->
<nav class="navbar is-fixed-top" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="/">Home</a>
</div>
</nav>
<!-- /nav -->

<!-- hero -->
<section class="hero is-info is-medium">
<div class="hero-body" style="background-image: url(/img/bg-blog.jpg);">
<div class="container has-text-centered">
<br>
<h1 class="title is-size-1">
{{ if eq .Type "tags" }}
#{{ .Title }}
{{ else if eq .Type "archives" }}
Archive {{ .Title }}
{{ else }}
{{ .Title }}
{{ end }}
</h1>
{{ if eq .Type "article" }}
{{ .Date.Format "January 2, 2006" }} &middot;&nbsp;{{ .ReadingTime }} min read
{{ end }}
</div>
</div>
</section>

<br>
9 changes: 9 additions & 0 deletions layouts/partials/widget-archives.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="card">
<div class="card-content">
<h1 class="title is-5">Archives</h1>
{{ range (where .Site.Pages "Type" "article").GroupByDate "2006" }}
<a href="/archives/{{ .Key }}">{{ .Key }}</a> ({{ len .Pages }})<br>
{{ end }}
</div>
</div>

10 changes: 10 additions & 0 deletions layouts/partials/widget-tags.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div class="card">
<div class="card-content">
<h1 class="title is-5">Tags</h1>
<div class="tags">
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
<span class="tag"><a href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}">{{ $name }}</a></span>
{{ end }}
</div>
</div>
</div>
34 changes: 34 additions & 0 deletions layouts/taxonomy/archive.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{{ define "main" }}

{{ $archive := lower .Title }}
<div class="container">
<div class="columns">
<div class="column is-9">
<div class="tile is-child box">
<div class="content">
{{ range $key, $value := .Site.Taxonomies.archives }}{{ if eq $key $archive }}{{ range $value.Pages }}
<article class="media">
<div class="media-content">
<div class="content">
<p class="title is-4"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></p>
<p class="subtitle is-size-6 has-text-grey-light">
Published at {{ .Date.Format "January 2, 2006" }} &middot;
<i class="far fa-clock"></i>&nbsp;{{.ReadingTime}} min read
</p>
<p>{{ .Summary }}...</p>
</div>
</div>
</article>
<br>
{{ end }}{{ end }}{{ end }}
</div>
</div>
</div>
<div class="column is-3">
{{ partial "widget-tags.html" . }}<br>
{{ partial "widget-archives.html" . }}
</div>
</div>
</div>

{{ end }}
34 changes: 34 additions & 0 deletions layouts/taxonomy/tag.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{{ define "main" }}

{{ $tag := lower .Title }}
<div class="container">
<div class="columns">
<div class="column is-9">
<div class="tile is-child box">
<div class="content">
{{ range $key, $value := .Site.Taxonomies.tags }}{{ if eq $key $tag }}{{ range $value.Pages }}
<article class="media">
<div class="media-content">
<div class="content">
<p class="title is-4"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></p>
<p class="subtitle is-size-6 has-text-grey-light">
Published at {{ .Date.Format "January 2, 2006" }} &middot;
<i class="far fa-clock"></i>&nbsp;{{.ReadingTime}} min read
</p>
<p>{{ .Summary }}...</p>
</div>
</div>
</article>
<br>
{{ end }}{{ end }}{{ end }}
</div>
</div>
</div>
<div class="column is-3">
{{ partial "widget-tags.html" . }}<br>
{{ partial "widget-archives.html" . }}
</div>
</div>
</div>

{{ end }}
12 changes: 12 additions & 0 deletions static/css/blog.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
html,body {
font-family: 'Open Sans', sans-serif;
background: #F0F2F4;
}
.hero-body {
background-position: center;
background-size: cover;
background-repeat: no-repeat;
/* height: 200px; */
}
.mysocial { color: hsl(0, 0%, 100%);}
.mysocial:hover { color: hsl(0, 0%, 71%) }
Binary file added static/img/bg-blog.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions theme.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# theme.toml template for a Hugo theme
# See https://github.com/gohugoio/hugoThemes#themetoml for an example

name = "Jeffprod"
license = "MIT"
licenselink = "https://github.com/Tazeg/hugo-blog-jeffprod/blob/master/LICENSE"
description = "A new theme blog for HUGO built with Bulma CSS. Including archives and tags widgets."
homepage = "https://github.com/Tazeg/hugo-blog-jeffprod"
tags = ["blog","archives","theme","tags","bulma","simple","personal"]
features = []
min_version = "0.41"

[author]
name = "@JeffProd"
homepage = "https://jeffprod.com"

0 comments on commit 929bd99

Please sign in to comment.