Skip to content
Snippets Groups Projects
Commit 927f87c2 authored by Régis Witz's avatar Régis Witz
Browse files

:lipstick: rajoute la possibilité d'utiliser le theme ananke

https://github.com/theNewDynamic/gohugo-theme-ananke
parent ec0d6da7
Branches
No related merge requests found
Showing
with 507 additions and 0 deletions
{{ with partialCached "func/style/GetMainCSS" "style/GetMainCSS" }}
<link rel="stylesheet" href="{{ .RelPermalink }}" >
{{ end }}
{{ range site.Params.custom_css }}
{{ with partialCached "func/style/GetResource" . . }}{{ else }}
<link rel="stylesheet" href="{{ relURL (.) }}">
{{ end }}
{{ end }}
\ No newline at end of file
{{ $socials := where (partialCached "func/socials/Get" "socials/Get") "follow" "!=" false }}
<div class="ananke-socials">
{{ range $socials }}
<a href="{{ .url }}" target="_blank" class="{{ .name }} ananke-social-link link-transition stackoverflow link dib z-999 pt3 pt0-l {{ cond (eq $.Site.Language.LanguageDirection "rtl") "ml1" "mr1" }}" title="{{ .label }} link" rel="noopener" aria-label="follow on {{ .label }}——Opens in a new window">
{{ with .icon }}
<span class="icon">{{ . }}</span>
{{ else }}
{{ .label }}
{{ end }}
{{- partial "new-window-icon.html" . -}}
</a>
{{ end }}
</div>
{{ $title := .Title }}
{{ $url := printf "%s" .Permalink | absLangURL }}
{{ $facebook_href := printf "https://www.facebook.com/sharer.php?u=%s" $url }}
{{ $twitter_href := printf "https://twitter.com/share?url=%s&text=%s" $url $title }}
{{ with site.Social.twitter }}
{{ $twitter_href = printf "%s&via=%s" $twitter_href . }}
{{ end }}
{{ $linkedin_href := printf "https://www.linkedin.com/shareArticle?mini=true&url=%s&title=%s" $url $title }}
{{ $hrefs := dict "facebook" $facebook_href "twitter" $twitter_href "linkedin" $linkedin_href }}
{{ $services := where (partialCached "func/socials/Get" "socials/Get") "share" true }}
{{ if not ($.Param "disable_share") }}
<div id="sharing" class="mt3 ananke-socials">
{{ range $service := $services }}
{{ $href := index $hrefs .name }}
<a href="{{ $href }}" class="ananke-social-link {{ .name }} no-underline" aria-label="share on {{ .label }}">
{{ with .icon }}
<span class="icon"> {{ . }}</span>
{{ end }}
</a>
{{ end }}
</div>
{{ end }}
{{ partial "func/warn" `You are currently using 'partial "summary-with-image"' in your project templates.
You should replace it with '.Render "summary-with-image"' as the use of this partial will be deprecated in future releases.
More info here: https://github.com/theNewDynamic/gohugo-theme-ananke/releases/tag/v2.8.1` }}
{{ $featured_image := partial "func/GetFeaturedImage.html" . }}
<article class="bb b--black-10">
<div class="db pv4 ph3 ph0-l no-underline dark-gray">
<div class="flex flex-column flex-row-ns">
{{ if $featured_image }}
{{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}}
{{ $featured_image := (trim $featured_image "/") | absURL }}
<div class="{{ cond (eq $.Site.Language.LanguageDirection "rtl") "pl3-ns" "pr3-ns" }} mb4 mb0-ns w-100 w-40-ns">
<a href="{{.RelPermalink}}" class="db grow">
<img src="{{ $featured_image }}" class="img" alt="image from {{ .Title }}">
</a>
</div>
{{ end }}
<div class="blah w-100{{ if $featured_image }} w-60-ns {{ cond (eq $.Site.Language.LanguageDirection "rtl") "pr3-ns" "pl3-ns" }}{{ end }}">
<h1 class="f3 fw1 athelas mt0 lh-title">
<a href="{{.RelPermalink}}" class="color-inherit dim link">
{{ .Title }}
</a>
</h1>
<div class="f6 f5-l lh-copy nested-copy-line-height nested-links">
{{ .Summary }}
</div>
<a href="{{.RelPermalink}}" class="ba b--moon-gray bg-light-gray br2 color-inherit dib f7 hover-bg-moon-gray link mt2 ph2 pv1">{{ $.Param "read_more_copy" | default (i18n "readMore") }}</a>
{{/* TODO: add author
<p class="f6 lh-copy mv0">By {{ .Author }}</p> */}}
</div>
</div>
</div>
</article>
{{ partial "func/warn" `You are currently using 'partial "summary"' in your project templates.
You should replace it with '.Render "summary"' as the use of this partial will be deprecated in future releases.
More info here: https://github.com/theNewDynamic/gohugo-theme-ananke/releases/tag/v2.8.1` }}
<div class="relative w-100 mb4 bg-white nested-copy-line-height">
<div class="bg-white mb3 pa4 gray overflow-hidden">
<span class="f6 db">{{ humanize .Section }}</span>
<h1 class="f3 near-black">
<a href="{{ .RelPermalink }}" class="link black dim">
{{ .Title }}
</a>
</h1>
<div class="nested-links f5 lh-copy nested-copy-line-height">
{{ .Summary }}
</div>
</div>
</div>
<svg {{ with .size }} height="{{ . }}" {{ end }} style="enable-background:new 0 0 1000 1000;" version="1.1" viewBox="0 0 1000 1000" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" >
<path d="M598 128h298v298h-86v-152l-418 418-60-60 418-418h-152v-86zM810 810v-298h86v298c0 46-40 86-86 86h-596c-48 0-86-40-86-86v-596c0-46 38-86 86-86h298v86h-298v596h596z" style="fill-rule:evenodd;clip-rule:evenodd;"/>
</svg>
<svg{{ with .size }} height="{{ . }}" {{ end }} style="enable-background:new 0 0 32 32;" version="1.1" viewBox="0 0 32 32"
width="{{ .size }}" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path
d="m 15.433,1.91 c 7.726455,0 14,6.265147 14,14 0,7.726455 -6.265147,14 -14,14 -7.7264547,0 -14,-6.265147 -14,-14 0,-7.7264547 6.265147,-14 14,-14 z m 3.031794,6.2483503 c 0.260348,2.2003597 1.486502,3.5104977 3.611277,3.6448707 v 2.469107 c -1.234553,0.117576 -2.317936,-0.285543 -3.577684,-1.041392 v 4.619076 c 0,5.878824 -6.407918,7.709658 -8.9778045,3.5021 -1.6544691,-2.70426 -0.6382724,-7.466107 4.6694665,-7.65087 v 2.611877 c -0.40312,0.06719 -0.831434,0.167967 -1.226155,0.30234 -1.184163,0.394721 -1.847631,1.15057 -1.662868,2.469106 0.361128,2.527895 4.997001,3.275345 4.610678,-1.662867 V 8.1667487 h 2.561488 z"
style="fill-rule:evenodd;clip-rule:evenodd;"/>
</svg>
<ul class="pa0">
{{ range .Params.tags }}
<li class="list di">
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}" class="link f5 grow no-underline br-pill ba ph3 pv2 mb2 dib black sans-serif">
{{- . -}}
</a>
</li>
{{ end }}
</ul>
{{ define "main" }}
{{/*
This template is the same as the default and is here to demonstrate that if you have a content directory called "post" you can create a layouts directory, just for that section.
*/}}
<article class="pa3 pa4-ns nested-copy-line-height">
<section class="cf ph3 ph5-l pv3 pv4-l f4 tc-l center measure-wide lh-copy {{ $.Param "text_color" | default "mid-gray" }}">
{{ .Content }}
</section>
<aside class="flex-ns flex-wrap justify-around mt5">
{{ range .Paginator.Pages }}
<div class="relative w-100 w-30-l mb4 bg-white">
{{ .Render "summary" }}
</div>
{{ end }}
</aside>
{{ template "_internal/pagination.html" . }}
</article>
{{ end }}
<div class="mb3 pa4 {{ $.Param "text_color" | default "mid-gray" }} overflow-hidden">
{{ if .Date }}
<div class="f6">
{{ .Date | time.Format (default "January 2, 2006" .Site.Params.date_format) }}
</div>
{{ end }}
<h1 class="f3 near-black">
<a href="{{ .RelPermalink }}" class="link black dim">
{{ .Title }}
</a>
</h1>
<div class="nested-links f5 lh-copy nested-copy-line-height">
{{ .Summary }}
</div>
</div>
User-agent: *
# robotstxt.org - if ENV production variable is false robots will be disallowed.
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
Allow: /
Sitemap: {{.Site.BaseURL}}/sitemap.xml
{{ else }}
Disallow: /
{{ end }}
{{ $.Scratch.Add "labelClasses" "f6 b db mb1 mt3 sans-serif mid-gray" }}
{{ $.Scratch.Add "inputClasses" "w-100 f5 pv3 ph3 bg-light-gray bn" }}
<form class="black-80 sans-serif" accept-charset="UTF-8" action="{{ .Get "action" }}" method="POST" role="form">
<label class="{{ $.Scratch.Get "labelClasses" }}" for="name">{{ i18n "yourName" }}</label>
<input type="text" id="name" name="name" class="{{ $.Scratch.Get "inputClasses" }}" required placeholder=" " aria-labelledby="name"/>
<label class="{{ $.Scratch.Get "labelClasses" }}" for="email">{{ i18n "emailAddress" }}</label>
<input type="email" id="email" name="email" class="{{ $.Scratch.Get "inputClasses" }}" required placeholder=" " aria-labelledby="email"/>
<div class="requirements f6 gray glow i ph3 overflow-hidden">
{{ i18n "emailRequiredNote" }}
</div>
<label class="{{ $.Scratch.Get "labelClasses" }}" for="message">{{ i18n "message" }}</label>
<textarea id="message" name="message" class="{{ $.Scratch.Get "inputClasses" }} h4" aria-labelledby="message"></textarea>
<input class="db w-100 mv2 white pa3 bn hover-shadow hover-bg-black bg-animate bg-black" type="submit" value="{{ i18n "send" }}" />
</form>
{
"author": "budparr",
"bugs": {
"url": "https://github.com/theNewDynamic/gohugo-theme-ananke/issues"
},
"comments": {
"dependencies": {},
"devDependencies": {
"auto-changelog": "project",
"cssnano": "project",
"postcss-cli": "project",
"postcss-cssnext": "project",
"tachyons": "project"
}
},
"dependencies": {},
"description": "Theme Ananke",
"devDependencies": {
"auto-changelog": "^1.16.1",
"cssnano": "^3.10.0",
"postcss-cli": "^7.1.0",
"postcss-cssnext": "^2.10.0",
"tachyons": "^4.9.1"
},
"homepage": "https://github.com/theNewDynamic/gohugo-theme-ananke#readme",
"keywords": [
"hugo",
"gohugo"
],
"license": "MIT",
"main": "index.js",
"name": "gohugo-theme-ananke",
"repository": {
"type": "git",
"url": "git+https://github.com/theNewDynamic/gohugo-theme-ananke.git"
},
"scripts": {
"version": "auto-changelog -p --template keepachangelog --commit-limit 0 \u0026\u0026 git add CHANGELOG.md"
},
"version": "2.7.0"
}
\ No newline at end of file
{
"author": "budparr",
"bugs": {
"url": "https://github.com/theNewDynamic/gohugo-theme-ananke/issues"
},
"comments": {
"dependencies": {},
"devDependencies": {
"auto-changelog": "project",
"cssnano": "project",
"postcss-cli": "project",
"postcss-cssnext": "project",
"tachyons": "project"
}
},
"dependencies": {},
"description": "Theme Ananke",
"devDependencies": {
"auto-changelog": "^1.16.1",
"cssnano": "^3.10.0",
"postcss-cli": "^7.1.0",
"postcss-cssnext": "^2.10.0",
"tachyons": "^4.9.1"
},
"homepage": "https://github.com/theNewDynamic/gohugo-theme-ananke#readme",
"keywords": [
"hugo",
"gohugo"
],
"license": "MIT",
"main": "index.js",
"name": "gohugo-theme-ananke",
"repository": {
"type": "git",
"url": "git+https://github.com/theNewDynamic/gohugo-theme-ananke.git"
},
"scripts": {
"version": "auto-changelog -p --template keepachangelog --commit-limit 0 \u0026\u0026 git add CHANGELOG.md",
"deploy": " cd exampleSite; hugo;"
},
"version": "2.7.0"
}
\ No newline at end of file
stackbitVersion: ~0.2.39
ssgName: custom
publishDir: exampleSite/public
buildCommand: cd exampleSite && hugo --gc --baseURL "/" --themesDir ../.. && cd ..
uploadDir: uploads
staticDir: exampleSite/static
pagesDir: exampleSite/content
dataDir: exampleSite
models:
config:
type: data
label: Config
file: config.toml
fields:
- type: string
name: title
label: Title
required: true
- type: string
name: baseURL
label: Base URL
description: Hostname (and path) to the root
hidden: false
- type: string
name: languageCode
label: Language Code
hidden: true
- type: string
name: MetaDataFormat
label: MetaDataFormat
hidden: true
- type: string
name: DefaultContentLanguage
label: DefaultContentLanguage
hidden: true
- type: string
name: themesDir
label: Themes Directory
hidden: true
- type: string
name: theme
label: Theme Name
hidden: true
- type: string
name: SectionPagesMenu
label: Main Section
hidden: false
- type: number
name: Paginate
label: Paginate Per Page
hidden: false
- type: boolean
name: enableRobotsTXT
label: Enable Robots
hidden: true
- type: string
name: googleAnalytics
label: Google Analytics ID
- type: object
name: sitemap
label: sitemap
hidden: true
fields:
- type: string
name: changefreq
label: changefreq
- type: number
subtype: float
name: priority
label: priority
- type: string
name: filename
label: filename
- type: object
name: params
label: Params
description: Site parameters
required: true
fields:
- type: string
name: featured_image
label: Logo
- type: string
name: favicon
label: Favicon
- type: string
name: description
label: Description
- type: string
name: description
label: Description
- type: string
name: facebook
label: Facebook
- type: string
name: stackoverflow
label: StackOverflow
- type: string
name: twitter
label: Twitter
- type: string
name: instagram
label: Instagram
- type: string
name: youtube
label: Youtube
- type: string
name: github
label: Github
- type: string
name: gitlab
label: Gitlab
- type: string
name: linkedin
label: Linkedin
- type: string
name: mastodon
label: Mastodon
- type: string
name: slack
label: Slack
- type: string
name: background_color_class
label: background_color_class
- type: number
name: recent_posts_number
label: recent_posts_number
home:
type: page
label: Home
file: _index.md
hideContent: false
singleInstance: true
layout: index.html
fields:
- type: string
name: title
label: Title
description: The title of the page.
required: true
- type: image
name: featured_image
label: Featured Image
description: Image displayed at in the pages intro section
- type: string
name: description
label: Description
- type: string
name: layout
label: layout
basicpage:
type: page
label: Basic Page
match: "*.md"
exclude: _index.md
layout: page/single.html
fields:
- type: string
name: title
label: Title
description: The title of the page.
- type: string
name: type
label: type
default: page
- type: boolean
name: omit_header_text
label: omit_header_text
description: The title of the page.
- type: image
name: featured_image
label: Featured Image
description: Image displayed at in the pages intro section
- type: string
name: description
label: Description
- type: enum
name: menu
label: Menu
options:
- label: Main Menu
value: main
type: object
section:
type: page
label: Section
match: "*/_index.md"
layout: _default/list.html
fields:
- type: string
name: title
label: Title
description: The title of the page.
- type: image
name: featured_image
label: Featured Image
description: Image displayed at in the pages intro section
- type: string
name: description
label: Description
- type: date
name: date
label: Date
- type: enum
name: menu
label: menu
default: main
options:
- label: main
value: main
post:
type: page
label: Posts
folder: post
exclude: _index.md
layout: _default/single.html
fields:
- type: string
name: title
label: Title
- type: date
name: date
label: Date
- type: image
name: featured_image
label: Featured Image
description: Image displayed at in the pages intro section
- type: string
name: description
label: Description
- type: enum
name: tags
label: tags
- type: boolean
name: draft
label: Draft
themes/ananke/static/images/gohugo-default-sample-hero-image.jpg

276 KiB

# theme.toml template for a Hugo theme
# See https://github.com/spf13/hugoThemes#themetoml for an example
name = "Ananke Gohugo Theme"
license = "MIT"
licenselink = "https://github.com/theNewDynamic/gohugo-theme-ananke/blob/master/LICENSE.md"
description = "A Base theme for building full featured Hugo sites"
homepage = "https://github.com/theNewDynamic/gohugo-theme-ananke"
tags = ["website", "starter", "responsive", "Disqus", "blog", "Tachyons", "Multilingual", "Stackbit"]
features = ["posts", "shortcodes", "related content", "comments"]
min_version = "0.84.0"
[author]
name = "theNewDynamic"
homepage = "https://www.thenewdynamic.com/"
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment