diff options
author | cdeck3r <cdecker@outlook.de> | 2019-08-06 14:57:29 +0300 |
---|---|---|
committer | cdeck3r <cdecker@outlook.de> | 2019-08-06 14:57:29 +0300 |
commit | 6eec52857afaabbf756099a968e665ea07536bca (patch) | |
tree | 51704eea42aaaa1fcc53171704c911c95c3021ce | |
parent | f9a41ea21e278756dca238e8bc16fb6626afd655 (diff) |
Initial version of OneDly hugo theme for project documentation.
-rw-r--r-- | LICENSE.md | 2 | ||||
-rw-r--r-- | README.md | 51 | ||||
-rw-r--r-- | exampleSite/config.toml | 80 | ||||
-rw-r--r-- | layouts/_default/list.html | 2 | ||||
-rw-r--r-- | layouts/index.html | 2 | ||||
-rw-r--r-- | layouts/partials/footer.html | 13 | ||||
-rw-r--r-- | layouts/partials/head.html | 19 | ||||
-rw-r--r-- | layouts/partials/header.html | 27 | ||||
-rw-r--r-- | layouts/partials/js.html | 9 | ||||
-rw-r--r-- | layouts/partials/main.html (renamed from layouts/partials/services.html) | 6 | ||||
-rw-r--r-- | layouts/partials/nav.html | 17 | ||||
-rw-r--r-- | layouts/partials/social.html | 232 | ||||
-rw-r--r-- | static/css/landing-page.css | 5 | ||||
-rw-r--r-- | theme.toml | 12 |
14 files changed, 402 insertions, 75 deletions
@@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 YOUR_NAME_HERE +Copyright (c) 2019 Christian Decker 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 @@ -1,42 +1,49 @@ # One-Day-Only (OneDly) Project Theme -This [Hugo](http://gohugo.io) theme is for documenting One-Day-Only (OneDly) projects. The theme is based on [Github project Page](https://themes.gohugo.io/github-project-landing-page/). - - -... +This [Hugo](http://gohugo.io) theme is for documenting One-Day-Only (OneDly) projects. The theme renders a single page and is based on [Github project Page](https://themes.gohugo.io/github-project-landing-page/). # Demo -A demo can be find here [Swiftline](http://swiftline.github.io) +A demo can be find here [...](https://github.com/cdeck3r/OneDly-Theme) # Screenshot -![screenshot](https://raw.githubusercontent.com/nsomar/github-project-landing-page/master/images/screenshot.png) +![screenshot](...) + +# Notable Differences + +* Social media links as buttons at the top of the page +* Social media sharing links as buttons at the end of the page +* All posts on a single page as separated sections +* Post ordering by sec parameter, instead of date + +# Customization + +Check [config.toml](https://github.com/cdeck3r/OneDly-Theme/blob/master/exampleSite/config.toml) for available configuration. -# Costumization -Check [config.toml](https://github.com/nsomar/github-project-landing-page/blob/master/exampleSite/config.toml) for available configuration. Below is a description for each of them. -Project description appears after project name +The project name is specified as the title of the site. ``` +title = "OneDly Project" +``` + +The project description follows in the `params` section. +``` +[params] description = "Amazing project." ``` -`author_url` a link of the project author. -`project_url` link to project url -`project_documentation` link to project documentation +Other variables are +`author_name` the project author's name. +`author_url` link to the personal website of the project author. +`project_url` link to project url, e.g. the project's github repo -``` - author_url = "http://nsomar.com" - project_url = "http://github.com/swiftline/swiftline" - project_documentation = "http://swiftline.github.io/docs" +**Note:** `description` and `author_name` are put into the site's meta data for author and the site description. ``` - -`github_user_name` github author account name -`github_project_name` github project name -``` - github_project_name = "swiftline" - github_user_name = "swiftline" + author_name = "cdeck3r" + author_url = "//cdeck3r.com" + project_url = "//github.com/cdeck3r/OneDly-Theme" ``` Theme colors diff --git a/exampleSite/config.toml b/exampleSite/config.toml index e042ed5..ea5f683 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,14 +1,28 @@ -baseurl = "http://swiftline.github.io" +baseurl = "" languageCode = "en-us" -title = "Swiftline" +title = "OneDly Project" +theme = "onedly" [params] - description = "Amazing project." - author_url = "http://nsomar.com" - project_url = "http://github.com/swiftline/swiftline" - project_documentation = "http://swiftline.github.io/docs" - github_project_name = "swiftline" - github_user_name = "swiftline" + description = "One-Day-Only (OneDly) project documentation." + author_url = "http://cdeck3r.com" + author_name = "cdeck3r" + project_url = "https://github.com/cdeck3r/OneDly-Theme" + github_project_name = "OneDly" + github_user_name = "cdeck3r" + + # Sets Social Share links to appear on posts + socialShare = true + # Sets specific share to appear on posts (default behavior is to appear) + socialShareTwitter = true + socialShareGoogleplus = true + socialShareFacebook = true + socialShareReddit = true + socialShareLinkedin = true + socialShareStumbleupon = true + socialSharePinterest = true + socialShareEmail = true + first_color="#f8f8f8" first_border_color="#e7e7e7" @@ -22,3 +36,53 @@ title = "Swiftline" header_link_color="#777" header_link_hover_color="rgb(51, 51, 51)" + +# Sets Social Media icons to appear and link to your account. Value should be your +# username unless otherwise noted. These are the icons affected by socialAppearAtTop +# and socialAppearAtBottom. +[social] + # Coding Communities + github = "cdeck3r/OneDly-Theme" + gitlab = "" + stackoverflow = "" # User Number + bitbucket = "" + jsfiddle = "" + codepen = "" + # Visual Art Communities + deviantart = "" + flickr = "" + behance = "" + dribbble = "" + # Publishing Communities + wordpress = "" + medium = "" + # Professional/Business Oriented Communities + linkedin = "" + linkedin_company = "" + foursquare = "" + xing = "" + slideshare = "" + # Social Networks + facebook = "" + googleplus = "" + reddit = "" + quora = "" + youtube = "channel/UCZ5wNVV_E6AA3L3C-mvqwSA" + vimeo = "" + whatsapp = "" # WhatsApp Number + # WeChat and QQ need testing. + wechat = "" + qq = "" # User ID Number + instagram = "" + tumblr = "" + twitter = "cdeck3r" + skype = "" + snapchat = "" + pinterest = "" + telegram = "" + vine = "" + googlescholar = "" + orcid = "" + researchgate = "" + # Email + email = "info@cdeck3r.com" diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 6f3da26..a9e08f8 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,4 +1,4 @@ {{ partial "head.html" . }} {{ partial "header.html" . }} -{{ partial "services.html" . }} +{{ partial "main.html" . }} {{ partial "footer.html" . }} diff --git a/layouts/index.html b/layouts/index.html index 0a0af79..c1ccacd 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,5 +1,5 @@ {{ partial "head.html" . }} {{ partial "nav.html" . }} {{ partial "header.html" . }} -{{ partial "services.html" . }} +{{ partial "main.html" . }} {{ partial "footer.html" . }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index d4f524b..b0abc6d 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -3,12 +3,17 @@ <div class="container"> <div class="row"> <div class="col-md-8"> - <p class="copyright text-muted small">Copyright © {{ .Title }} All Rights Reserved</p> + <ul class="list-inline"> + <li> + <a class="page-scroll" href="#intro">Up</a> + </li> + </ul> + <p class="copyright text-muted small">Copyright © {{ .Title }} All Rights Reserved</p> </div> <div class="col-md-4"> - Built with <a href="http://gohugo.io">Hugo</a> and the - <a href="https://github.com/swiftline/github-project-landing-page">Github project Page</a> - theme. + Built with <a href="http://gohugo.io">Hugo</a> and the + <a href="https://github.com/cdeck3r/OneDly-Theme">OneDly project</a> + theme. </div> </div> </div> diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 08d96d5..8331f01 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -5,8 +5,15 @@ <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta name="description" content=""> - <meta name="author" content=""> + <meta name="description" content="{{ with .Description }} + {{ . }} + {{ else }} + {{if .IsPage}}{{ .Summary }} + {{ else }}{{ with .Site.Params.description }} + {{ . }} + {{ end }}{{ end }}{{ end }}"> + + <meta name="author" content=" {{ .Site.Params.author_name | default .Site.Author }} "> <base href="{{ .Site.BaseURL }}"> <title>{{ .Title }}</title> @@ -18,6 +25,14 @@ <!-- Custom Fonts --> <link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css"> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> + + <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> + <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> + <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> + <![endif]--> <style> {{ printf "%v" (partial "template.css" . ) | safeCSS }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 69e254c..ebb8c4c 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -2,28 +2,23 @@ <!-- Header --> <div class="intro-header"> - <div class="container header-container"> - + <div class="container"> <div class="row"> - <div class="intro-image col-md-4"></div> - <div class="intro-message col-md-6"> - <h1>{{ .Site.Title }}</h1> - <h3>{{ .Site.Params.description }}</h3> - - {{ if (isset .Site.Params "github_project_name") }} - {{ $user := .Site.Params.github_user_name }} - {{ $repo := .Site.Params.github_project_name }} - - <iframe class="github-btn" src="https://ghbtns.com/github-btn.html?user={{ $user }}&repo={{ $repo }}&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe> - {{ end }} + <div class="col-lg-12"> + <!-- <div class="intro-image col-md-4"></div> --> + <div class="intro-message"> + <h1>{{ .Site.Title }}</h1> + <h3>{{ .Site.Params.description }}</h3> + <hr class="intro-divider"> - <hr class="intro-divider"> + <ul class="list-inline intro-social-buttons"> + {{ partial "social" . }} + </ul> + </div> </div> </div> - </div> <!-- /.container --> - </div> <!-- /.intro-header --> </section> diff --git a/layouts/partials/js.html b/layouts/partials/js.html index 32318a0..7e6c2f4 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -1,14 +1,17 @@ <!-- jQuery Version 1.11.0 --> +<!-- <script src="/js/jquery-1.11.0.js"></script> +--> <!-- Plugin JavaScript --> +<!-- <script src="/js/jquery.easing.min.js"></script> +--> <!-- Bootstrap Core JavaScript --> +<!-- <script src="/js/bootstrap.min.js"></script> - -<!-- Custom Theme JavaScript --> -<script src="js/landing-page.js"></script> +--> {{ if isset .Site.Params "googleAnalytics" }} diff --git a/layouts/partials/services.html b/layouts/partials/main.html index 2c22c2a..cac70f7 100644 --- a/layouts/partials/services.html +++ b/layouts/partials/main.html @@ -1,13 +1,13 @@ -<section id="services"> +<section id="main"> <!-- Page Content --> - {{ range $index, $element := where .Data.Pages "Section" "in" "post" }} +{{ range $index, $element := where (.Data.Pages.ByParam "sec") "Section" "in" "post" }} {{ if modBool $index 2 }} <div class="content-section-a"> {{ else }} <div class="content-section-b"> {{ end }} - + <div class="container"> <div class="row"> diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index ee71008..ccb3199 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -14,15 +14,20 @@ <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav navbar-right"> - <li> - <a class="page-scroll" href={{ .Site.Params.project_url }}>Github</a> - </li> - <li> - <a class="page-scroll" href={{ .Site.Params.project_documentation }}>Docs</a> + {{ if isset .Site.Params "project_url" }} + <li> + <a href={{ .Site.Params.project_url }}> + Github + </a> </li> + {{ end }} + {{ if isset .Site.Params "author_url" }} <li> - <a class="page-scroll" href={{ .Site.Params.author_url }}>NSOmar</a> + <a href={{ .Site.Params.author_url }}> + {{ .Site.Params.author_name }} + </a> </li> + {{ end }} </ul> </div> <!-- /.navbar-collapse --> diff --git a/layouts/partials/social.html b/layouts/partials/social.html new file mode 100644 index 0000000..b97847a --- /dev/null +++ b/layouts/partials/social.html @@ -0,0 +1,232 @@ +<!-- Credits to https://github.com/jpescador/hugo-future-imperfect/blob/master/layouts/partials/social.html --> + +{{ with .Site.Social.github }} + <li><a href="//github.com/{{.}}" class="btn btn-default btn-lg" title="GitHub"> + <i class="fa fa-github"></i> + </a></li> +{{ end }} + + +{{ with .Site.Social.gitlab }} + <li><a href="//gitlab.com/{{.}}" title="GitLab" class="btn btn-default btn-lg"> + <i class="fa fa-gitlab"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.stackoverflow }} + <li><a href="//stackoverflow.com/users/{{.}}" title="Stack Overflow" class="btn btn-default btn-lg"> + <i class="fa fa-stack-overflow"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.bitbucket }} + <li><a href="//bitbucket.com/{{.}}" title="Bitbucket" class="btn btn-default btn-lg"> + <i class="fa fa-bitbucket"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.jsfiddle }} + <li><a href="//jsfiddle.com/{{.}}" title="JSFiddle" class="btn btn-default btn-lg"> + <i class="fa fa-jsfiddle"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.codepen }} + <li><a href="//codepen.io/{{.}}" title="CodePen" class="btn btn-default btn-lg"> + <i class="fa fa-codepen"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.deviantart }} + <li><a href="//{{.}}.deviantart.com/" title="DeviantArt" class="btn btn-default btn-lg"> + <i class="fa fa-deviantart"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.flickr }} + <li><a href="//flickr.com/photos/{{.}}" title="Flickr" class="btn btn-default btn-lg"> + <i class="fa fa-flickr"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.behance }} + <li><a href="//behance.net/{{.}}" title="Behance" class="btn btn-default btn-lg"> + <i class="fa fa-behance"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.dribbble }} + <li><a href="//dribbble.com/{{.}}" title="Dribbble" class="btn btn-default btn-lg"> + <i class="fa fa-dribbble"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.wordpress }} + <li><a href="//{{.}}.wordpress.com" title="WordPress" class="btn btn-default btn-lg"> + <i class="fa fa-wordpress"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.medium}} + <li><a href="//medium.com/@{{.}}" title="Medium" class="btn btn-default btn-lg"> + <i class="fa fa-medium"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.linkedin }} + <li><a href="//linkedin.com/in/{{.}}" title="LinkedIn" class="btn btn-default btn-lg"> + <i class="fa fa-linkedin"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.linkedin_company }} + <li><a href="//linkedin.com/company/{{.}}" title="LinkedIn Company" class="btn btn-default btn-lg"> + <i class="fa fa-linkedin"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.foursquare }} + <li><a href="//foursquare.com/{{.}}" title="Foursquare" class="btn btn-default btn-lg"> + <i class="fa fa-foursquare"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.xing }} + <li><a href="//xing.com/profile/{{.}}" title="Xing" class="btn btn-default btn-lg"> + <i class="fa fa-xing"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.slideshare }} + <li><a href="//slideshare.com/{{.}}" title="SlideShare" class="btn btn-default btn-lg"> + <i class="fa fa-slideshare"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.facebook }} + <li><a href="//facebook.com/{{.}}" title="Facebook" class="btn btn-default btn-lg"> + <i class="fa fa-facebook"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.googleplus }} + <li><a href="//plus.google.com/+{{.}}" title="Google+" class="btn btn-default btn-lg"> + <i class="fa fa-google-plus"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.reddit }} + <li><a href="//reddit.com/user/{{.}}" title="Reddit" class="btn btn-default btn-lg"> + <i class="fa fa-reddit"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.quora }} + <li><a href="//quora.com/profile/{{.}}" title="Quora" class="btn btn-default btn-lg"> + <i class="fa fa-quora"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.youtube }} + <li><a href="//youtube.com/{{.}}" title="YouTube" class="btn btn-default btn-lg"> + <i class="fa fa-youtube"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.vimeo }} + <li><a href="//vimeo.com/{{.}}" title="Vimeo" class="btn btn-default btn-lg"> + <i class="fa fa-vimeo"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.whatsapp }} + <li><a href="//api.whatsapp.com/send?phone={{.}}" title="WhatsApp" class="btn btn-default btn-lg"> + <i class="fa fa-whatsapp"></i> + </a></li> +{{ end }} + +<!-- TODO: WeChat and QQ Check --> + +{{ with .Site.Social.wechat }} + <li><a href="weixin://contacts/profile/{{.}}" title="WeChat" class="btn btn-default btn-lg"> + <i class="fa fa-weixin"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.qq }} + <li><a href="//wpa.qq.com/msgrd?v=3&uin={{.}}&site=qq&menu=yes" title="QQ" class="btn btn-default btn-lg"> + <i class="fa fa-qq"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.instagram }} + <li><a href="//instagram.com/{{.}}" title="Instagram" class="btn btn-default btn-lg"> + <i class="fa fa-instagram"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.tumblr }} + <li><a href="//{{.}}.tumblr.com" title="Tumblr" class="btn btn-default btn-lg"> + <i class="fa fa-tumblr"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.twitter }} + <li><a href="//twitter.com/{{.}}" title="Twitter" class="btn btn-default btn-lg"> + <i class="fa fa-twitter"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.skype }} + <li><a href="skype:{{.}}?userinfo" title="Skype" class="btn btn-default btn-lg"> + <i class="fa fa-skype"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.snapchat }} + <li><a href="//snapchat.com/add/{{.}}" title="snapchat" class="btn btn-default btn-lg"> + <i class="fa fa-snapchat"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.pinterest }} + <li><a href="//pinterest.com/{{.}}" title="Pinterest" class="btn btn-default btn-lg"> + <i class="fa fa-pinterest-p"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.telegram }} + <li><a href="//telegram.me/{{.}}" title="telegram" class="btn btn-default btn-lg"> + <i class="fa fa-telegram"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.vine }} + <li><a href="//vine.co/{{.}}" title="Vine" class="btn btn-default btn-lg"> + <i class="fa fa-vine"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.googlescholar }} +<li><a href="//scholar.google.com/citations?user={{.}}" title="Google Scholar"> + <i class="ai ai-google-scholar"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.orcid }} +<li><a href="//orcid.org/{{.}}" title="ORCID"> + <i class="ai ai-orcid"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.researchgate }} +<li><a href="//researchgate.net/profile/{{.}}" title="Research Gate"> + <i class="ai ai-researchgate"></i> + </a></li> +{{ end }} + +{{ with .Site.Social.email }} + <li><a href="mailto:{{.}}" title="Email" class="btn btn-default btn-lg"> + <i class="fa fa-envelope"></i> + </a></li> +{{ end }} diff --git a/static/css/landing-page.css b/static/css/landing-page.css index e5adc18..399d2e6 100644 --- a/static/css/landing-page.css +++ b/static/css/landing-page.css @@ -33,9 +33,10 @@ h6 { }
.intro-message {
- margin-top: 100px;
+ position: relative;
+ padding-top: 10%;
+ padding-bottom: 10%;
color: rgb(51, 51, 51);
- text-align: left;
}
.intro-message > h3 {
@@ -1,14 +1,14 @@ -name = "Github project Page" +name = "OneDly Project" license = "MIT" -licenselink = "https://github.com/nsomar/github-project-landing-page/blob/master/LICENSE.md" -description = "An easy to use landing page theme for github hosted project." -homepage = "https://github.com/nsomar/github-project-landing-page" -tags = ["company", "products", "landing page", "opensource"] +licenselink = "https://github.com/cdeck3r/OneDly-Theme/blob/master/LICENSE.md" +description = "Theme for documenting OneDly project." +homepage = "https://github.com/cdeck3r/OneDly-Theme" +tags = ["documentation", "landing page", "opensource"] features = ["github", "images" ] min_version= 0.1 [author] - name = "Omar Abdelhafith" + name = "Christian Decker" [original] author = "Omar Abdelhafith" |