├── site ├── content │ ├── .keep │ ├── about.md │ └── post │ │ ├── first.md │ │ └── second.md ├── data │ └── .keep ├── static │ ├── .keep │ ├── images │ │ ├── logo.png │ │ └── cover.jpg │ └── admin │ │ ├── index.html │ │ └── config.yml ├── themes │ └── hugo-theme-casper │ │ ├── .gitignore │ │ ├── images │ │ ├── tn.png │ │ ├── screen.png │ │ └── screenshot.png │ │ ├── static │ │ ├── fonts │ │ │ ├── Genericons.eot │ │ │ ├── Genericons.ttf │ │ │ ├── Genericons.woff │ │ │ ├── genericons.css │ │ │ └── example.html │ │ ├── js │ │ │ ├── index.js │ │ │ └── jquery.fitvids.js │ │ └── css │ │ │ ├── nav.css │ │ │ └── screen.css │ │ ├── data │ │ └── authors │ │ │ └── example.yml │ │ ├── archetypes │ │ └── default.md │ │ ├── layouts │ │ ├── partials │ │ │ ├── pagination.html │ │ │ ├── disqus.html │ │ │ ├── suggestions.html │ │ │ ├── footer.html │ │ │ ├── author.html │ │ │ ├── navigation.html │ │ │ ├── twitter_card.html │ │ │ ├── share.html │ │ │ ├── li.html │ │ │ └── header.html │ │ ├── page │ │ │ ├── list.html │ │ │ ├── cover.html │ │ │ └── single.html │ │ ├── _default │ │ │ ├── list.html │ │ │ └── single.html │ │ ├── 404.html │ │ └── index.html │ │ ├── theme.toml │ │ ├── LICENSE.md │ │ └── README.md └── config.toml ├── .gitignore ├── src ├── js │ └── app.js └── css │ └── imports │ └── reset.css ├── .babelrc ├── netlify.toml ├── npm-shrinkwrap.json ├── background.png.webloc ├── webpack.conf.js ├── package.json ├── gulpfile.babel.js ├── .eslintrc └── README.md /site/content/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /site/data/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /site/static/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | .DS_Store 4 | -------------------------------------------------------------------------------- /src/js/app.js: -------------------------------------------------------------------------------- 1 | // JS Goes here - ES6 supported 2 | -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/.gitignore: -------------------------------------------------------------------------------- 1 | tmp 2 | .DS_Store -------------------------------------------------------------------------------- /src/css/imports/reset.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-size: 16px; 3 | } 4 | -------------------------------------------------------------------------------- /site/static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdougie/casper-cms-template/HEAD/site/static/images/logo.png -------------------------------------------------------------------------------- /site/static/images/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdougie/casper-cms-template/HEAD/site/static/images/cover.jpg -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015"], 3 | "plugins": [ 4 | "syntax-object-rest-spread", 5 | "transform-object-rest-spread" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | command = "npm run build" 3 | publish = "dist" 4 | 5 | [context.deploy-preview] 6 | command = "npm run build-preview" 7 | -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdougie/casper-cms-template/HEAD/site/themes/hugo-theme-casper/images/tn.png -------------------------------------------------------------------------------- /npm-shrinkwrap.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "graceful-fs": { 4 | "version": "4.2.2" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/images/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdougie/casper-cms-template/HEAD/site/themes/hugo-theme-casper/images/screen.png -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdougie/casper-cms-template/HEAD/site/themes/hugo-theme-casper/images/screenshot.png -------------------------------------------------------------------------------- /site/content/about.md: -------------------------------------------------------------------------------- 1 | +++ 2 | date = "2016-09-09T10:15:23-04:00" 3 | draft = false 4 | title = "about" 5 | 6 | +++ 7 | 8 | ## This is where our page Markdown content lives. -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/static/fonts/Genericons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdougie/casper-cms-template/HEAD/site/themes/hugo-theme-casper/static/fonts/Genericons.eot -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/static/fonts/Genericons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdougie/casper-cms-template/HEAD/site/themes/hugo-theme-casper/static/fonts/Genericons.ttf -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/data/authors/example.yml: -------------------------------------------------------------------------------- 1 | name: "John Doe" 2 | bio: "The most generic man in the world" 3 | location: "Normal, Il" 4 | website: "http://example.com" 5 | -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/static/fonts/Genericons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdougie/casper-cms-template/HEAD/site/themes/hugo-theme-casper/static/fonts/Genericons.woff -------------------------------------------------------------------------------- /background.png.webloc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | URL 6 | https://github.com/bdougie/blog/blob/live-blog/source/images/background.png 7 | 8 | 9 | -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/archetypes/default.md: -------------------------------------------------------------------------------- 1 | +++ 2 | date = "2014-07-11T10:54:24+02:00" 3 | draft = false 4 | title = "Post title" 5 | slug = "post-title" 6 | tags = ["tag1","tag2"] 7 | image = "" 8 | comments = true # set false to hide Disqus 9 | share = true # set false to hide share buttons 10 | menu= "" # set "main" to add this content to the main menu 11 | author = "" 12 | +++ -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/layouts/partials/pagination.html: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /site/static/admin/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Content Manager 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/theme.toml: -------------------------------------------------------------------------------- 1 | name = "Casper" 2 | license = "MIT" 3 | licenselink = "https://github.com/vjeantet/hugo-theme-casper/blob/master/LICENSE.md" 4 | description = "Casper theme from Ghost Foundation" 5 | homepage = "http://vjeantet.fr/" 6 | tags = ["blog"] 7 | features = ["disqus", "google analytics","share"] 8 | min_version=0.14 9 | 10 | [author] 11 | name = "Valere JEANTET" 12 | homepage = "http://vjeantet.fr" 13 | 14 | [original] 15 | name = "Casper" 16 | homepage = "https://github.com/TryGhost/Casper" 17 | repo = "https://github.com/TryGhost/Casper" 18 | -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/layouts/partials/disqus.html: -------------------------------------------------------------------------------- 1 | {{ if ne .Params.comments false}} 2 | {{ if .Site.DisqusShortname }} 3 |
4 | 13 | 14 | {{ end }} 15 | {{ end }} 16 | -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/layouts/partials/suggestions.html: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | {{ if .Site.Params.customFooterPartial }} 12 | {{ partial .Site.Params.customFooterPartial . }} 13 | {{ end }} 14 | 15 | 16 | -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/layouts/partials/author.html: -------------------------------------------------------------------------------- 1 | {{ if not .Params.noauthor }} 2 | {{$author := index .Site.Data.authors (or .Params.author .Site.Params.author)}} 3 | {{$authorname := or $author.name .Site.Params.author }} 4 | {{$authorbio := or $author.bio .Site.Params.bio }} 5 | {{$authorlocation := or $author.location .Site.Params.authorlocation }} 6 | {{$authorwebsite := or $author.website .Site.Params.authorwebsite }} 7 |
8 |

{{$authorname}}

9 | {{if $authorbio}} 10 |

{{$authorbio}}

11 | {{else}} 12 |

Read more posts by this author.

13 | {{end}} 14 |
15 | {{with $authorlocation}}{{.}}{{end}} 16 | {{with $authorwebsite}}{{.}}{{end}} 17 |
18 |
19 | {{end}} 20 | -------------------------------------------------------------------------------- /webpack.conf.js: -------------------------------------------------------------------------------- 1 | import webpack from "webpack"; 2 | import path from "path"; 3 | 4 | export default { 5 | module: { 6 | loaders: [ 7 | { 8 | test: /\.((png)|(eot)|(woff)|(woff2)|(ttf)|(svg)|(gif))(\?v=\d+\.\d+\.\d+)?$/, 9 | loader: "file?name=/[hash].[ext]" 10 | }, 11 | {test: /\.json$/, loader: "json-loader"}, 12 | { 13 | loader: "babel", 14 | test: /\.js?$/, 15 | exclude: /node_modules/, 16 | query: {cacheDirectory: true} 17 | } 18 | ] 19 | }, 20 | 21 | plugins: [ 22 | new webpack.ProvidePlugin({ 23 | "fetch": "imports?this=>global!exports?global.fetch!whatwg-fetch" 24 | }) 25 | ], 26 | 27 | context: path.join(__dirname, "src"), 28 | entry: { 29 | app: ["./js/app"] 30 | }, 31 | output: { 32 | path: path.join(__dirname, "dist/"), 33 | publicPath: "/", 34 | filename: "[name].js" 35 | }, 36 | externals: [/^vendor\/.+\.js$/] 37 | }; 38 | -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/layouts/partials/navigation.html: -------------------------------------------------------------------------------- 1 | 19 | {{else}} 20 | Subscribe 21 | {{end}} 22 | 23 | 24 | -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/layouts/partials/twitter_card.html: -------------------------------------------------------------------------------- 1 | {{ $baseUrl := .Site.BaseURL }} 2 | 3 | {{ if .IsPage }} 4 | {{ with .Params.image }} 5 | 6 | 7 | 8 | {{ else }} 9 | 10 | {{ end }} 11 | {{ else }} 12 | 13 | 14 | {{ end }} 15 | 16 | 17 | 18 | 19 | {{ with .Site.Params.social.twitter }} 20 | 21 | {{ end }} 22 | -------------------------------------------------------------------------------- /site/static/admin/config.yml: -------------------------------------------------------------------------------- 1 | backend: 2 | name: github 3 | repo: owner/repository # Path to your Github repository 4 | branch: master # Branch to update (master by default) 5 | 6 | publish_mode: editorial_workflow 7 | 8 | media_folder: "site/static/img/blog" # Folder where user uploaded files should go 9 | public_folder: "/img/blog" 10 | 11 | collections: # A list of collections the CMS should be able to edit 12 | - name: "blog" # Used in routes, ie.: /admin/collections/:slug/edit 13 | label: "Blog" # Used in the UI, ie.: "New Post" 14 | folder: "site/content/post" # The path to the folder where the documents are stored 15 | create: true # Allow users to create new documents in this collection 16 | fields: # The fields each document in this collection have 17 | - {label: "Title", name: "title", widget: "string", tagname: "h1"} 18 | - {label: "Body", name: "body", widget: "markdown"} 19 | - {label: "Publish Date", name: "date", widget: "datetime"} 20 | -------------------------------------------------------------------------------- /site/config.toml: -------------------------------------------------------------------------------- 1 | baseurl = "/" 2 | languageCode = "en-us" 3 | title = "Casper Theme" 4 | theme = "hugo-theme-casper" 5 | disqusShortname = "spf13" 6 | # Enable Google Analytics by inserting your tracking code 7 | googleAnalytics = "" 8 | # Define how many posts should appear on a site 9 | paginate = 10 10 | canonifyurls = true 11 | 12 | [params] 13 | description = "this is my description" 14 | cover = "images/cover.jpg" 15 | author = "Valère JEANTET" 16 | authorlocation = "Paris, France" 17 | authorwebsite = "http://vjeantet.fr" 18 | bio= "my bio" 19 | logo = "images/logo.png" 20 | googleAnalyticsUserID = "UA-79101-12" 21 | # Optional RSS-Link, if not provided it defaults to the standard index.xml 22 | RSSLink = "http://feeds.feedburner.com/..." 23 | githubName = "vjeantet" 24 | twitterName = "vjeantet" 25 | # facebookName = "" 26 | # linkedinName = "" 27 | # set true if you are not proud of using Hugo (true will hide the footer note "Proudly published with HUGO.....") 28 | hideHUGOSupport = false 29 | [params.social] 30 | twitter = "your_twitter" 31 | -------------------------------------------------------------------------------- /site/content/post/first.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2016-12-22T20:04:40.407Z 3 | title: First Post 4 | --- 5 | Tristique integer nulla, velit orci elementum posuere odit urna amet, vel est amet etiam pharetra curabitur. Risus feugiat pharetra sit dui tempor sed, malesuada metus, ut sociis elementum, placerat dolor curabitur velit. Fermentum nulla, lacus volutpat, et neque suscipit vel nisl at, suspendisse sed consectetuer in. Donec ut tellus massa, ipsum placerat tincidunt, nam nunc amet sit aenean, eleifend porttitor non fermentum. Wisi ultricies ante nec ac dignissim, in neque suscipit eu blandit et, quis imperdiet. Nulla massa velit turpis condimentum, sed vel leo magna dolor at vivamus, lorem metus odio euismod. Libero non leo. Vestibulum lacus iaculis rutrum sagittis ac, a purus, egestas turpis nulla posuere ut sed lacinia, tellus suspendisse massa et nostra. Nascetur hac, ipsum cum, sem eros, tellus suspendisse non. Netus pretium. Auctor integer ut quis urna vestibulum quis, vivamus ligula dictum vel, et amet auctor donec interdum sagittis, fusce mollis sociosqu sem aptent nullam, eu enim hymenaeos et. Ridiculus fusce interdum, vitae volutpat pulvinar mauris netus. 6 | -------------------------------------------------------------------------------- /site/content/post/second.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2016-09-09T10:24:16-04:00 3 | title: Second Post 4 | --- 5 | 6 | 7 | Tristique integer nulla, velit orci elementum posuere odit urna amet, vel est amet etiam pharetra curabitur. Risus feugiat pharetra sit dui tempor sed, malesuada metus, ut sociis elementum, placerat dolor curabitur velit. Fermentum nulla, lacus volutpat, et neque suscipit vel nisl at, suspendisse sed consectetuer in. Donec ut tellus massa, ipsum placerat tincidunt, nam nunc amet sit aenean, eleifend porttitor non fermentum. Wisi ultricies ante nec ac dignissim, in neque suscipit eu blandit et, quis imperdiet. Nulla massa velit turpis condimentum, sed vel leo magna dolor at vivamus, lorem metus odio euismod. Libero non leo. Vestibulum lacus iaculis rutrum sagittis ac, a purus, egestas turpis nulla posuere ut sed lacinia, tellus suspendisse massa et nostra. Nascetur hac, ipsum cum, sem eros, tellus suspendisse non. Netus pretium. Auctor integer ut quis urna vestibulum quis, vivamus ligula dictum vel, et amet auctor donec interdum sagittis, fusce mollis sociosqu sem aptent nullam, eu enim hymenaeos et. Ridiculus fusce interdum, vitae volutpat pulvinar mauris netus. 8 | 9 | -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 YOUR_NAME_HERE 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | 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, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/layouts/partials/share.html: -------------------------------------------------------------------------------- 1 | {{ if ne .Params.share false}} 2 |
3 |

Share this {{ if .Type }}{{.Type}}{{else}}post{{end}}

4 | 6 | 7 | 8 | 10 | 11 | 12 | 14 | 15 | 16 | 18 | 19 | 20 |
21 | {{end}} 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "victor-hugo", 3 | "version": "1.0.0", 4 | "description": "Victor Hugo is a Hugo boilerplate for creating truly epic websites!", 5 | "main": "index.js", 6 | "scripts": { 7 | "hugo": "gulp hugo", 8 | "webpack": "gulp webpack", 9 | "build": "gulp build", 10 | "build-preview": "gulp build-preview", 11 | "start": "gulp server", 12 | "lint": "eslint src", 13 | "preshrinkwrap": "git checkout -- npm-shrinkwrap.json", 14 | "postshrinkwrap": "git checkout -- npm-shrinkwrap.json" 15 | }, 16 | "author": "", 17 | "license": "MIT", 18 | "dependencies": { 19 | "autoprefixer": "^6.3.7", 20 | "babel-eslint": "^6.1.2", 21 | "babel-loader": "^6.2.4", 22 | "babel-plugin-syntax-object-rest-spread": "^6.13.0", 23 | "babel-plugin-transform-class-properties": "^6.10.2", 24 | "babel-plugin-transform-object-assign": "^6.8.0", 25 | "babel-plugin-transform-object-rest-spread": "^6.8.0", 26 | "babel-preset-es2015": "^6.9.0", 27 | "babel-register": "^6.11.6", 28 | "browser-sync": "^2.13.0", 29 | "css-loader": "^0.23.1", 30 | "eslint": "^3.1.1", 31 | "eslint-plugin-import": "^1.11.1", 32 | "exports-loader": "^0.6.3", 33 | "file-loader": "^0.9.0", 34 | "gulp": "^3.9.1", 35 | "gulp-babel": "^6.1.2", 36 | "gulp-postcss": "^6.1.1", 37 | "gulp-util": "^3.0.7", 38 | "imports-loader": "^0.6.5", 39 | "postcss-cssnext": "^2.7.0", 40 | "postcss-import": "^8.1.2", 41 | "postcss-loader": "^0.9.1", 42 | "url-loader": "^0.5.7", 43 | "webpack": "^1.13.1", 44 | "whatwg-fetch": "^1.0.0" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/layouts/partials/li.html: -------------------------------------------------------------------------------- 1 | {{ $baseurl := .Site.BaseURL }} 2 |
3 |
4 |

{{ .Title }}

5 |
6 |
7 |

{{ .Summary }} »

8 |
9 | 37 |
38 | -------------------------------------------------------------------------------- /gulpfile.babel.js: -------------------------------------------------------------------------------- 1 | import gulp from "gulp"; 2 | import cp from "child_process"; 3 | import gutil from "gulp-util"; 4 | import postcss from "gulp-postcss"; 5 | import cssImport from "postcss-import"; 6 | import cssnext from "postcss-cssnext"; 7 | import BrowserSync from "browser-sync"; 8 | import webpack from "webpack"; 9 | import webpackConfig from "./webpack.conf"; 10 | 11 | const browserSync = BrowserSync.create(); 12 | const hugoBin = "hugo"; 13 | const defaultArgs = ["-d", "../dist", "-s", "site", "-v"]; 14 | 15 | gulp.task("hugo", (cb) => buildSite(cb)); 16 | gulp.task("hugo-preview", (cb) => buildSite(cb, ["--buildDrafts", "--buildFuture"])); 17 | 18 | gulp.task("build", ["css", "js", "hugo"]); 19 | gulp.task("build-preview", ["css", "js", "hugo-preview"]); 20 | 21 | gulp.task("css", () => ( 22 | gulp.src("./src/css/*.css") 23 | .pipe(postcss([cssnext(), cssImport({from: "./src/css/main.css"})])) 24 | .pipe(gulp.dest("./dist/css")) 25 | .pipe(browserSync.stream()) 26 | )); 27 | 28 | gulp.task("js", (cb) => { 29 | const myConfig = Object.assign({}, webpackConfig); 30 | 31 | webpack(myConfig, (err, stats) => { 32 | if (err) throw new gutil.PluginError("webpack", err); 33 | gutil.log("[webpack]", stats.toString({ 34 | colors: true, 35 | progress: true 36 | })); 37 | browserSync.reload(); 38 | cb(); 39 | }); 40 | }); 41 | 42 | gulp.task("server", ["hugo", "css", "js"], () => { 43 | browserSync.init({ 44 | server: { 45 | baseDir: "./dist" 46 | } 47 | }); 48 | gulp.watch("./src/js/**/*.js", ["js"]); 49 | gulp.watch("./src/css/**/*.css", ["css"]); 50 | gulp.watch("./site/**/*", ["hugo"]); 51 | }); 52 | 53 | function buildSite(cb, options) { 54 | const args = options ? defaultArgs.concat(options) : defaultArgs; 55 | 56 | return cp.spawn(hugoBin, args, {stdio: "inherit"}).on("close", () => { 57 | browserSync.reload(); 58 | cb(); 59 | }); 60 | } 61 | -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/static/js/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Main JS file for Casper behaviours 3 | */ 4 | 5 | /* globals jQuery, document */ 6 | (function ($, undefined) { 7 | "use strict"; 8 | 9 | var $document = $(document); 10 | 11 | $document.ready(function () { 12 | 13 | var $postContent = $(".post-content"); 14 | $postContent.fitVids(); 15 | 16 | $(".scroll-down").arctic_scroll(); 17 | 18 | $(".menu-button[href='#'], .nav-cover, .nav-close").on("click", function(e){ 19 | e.preventDefault(); 20 | $("body").toggleClass("nav-opened nav-closed"); 21 | }); 22 | 23 | }); 24 | 25 | // Arctic Scroll by Paul Adam Davis 26 | // https://github.com/PaulAdamDavis/Arctic-Scroll 27 | $.fn.arctic_scroll = function (options) { 28 | 29 | var defaults = { 30 | elem: $(this), 31 | speed: 500 32 | }, 33 | 34 | allOptions = $.extend(defaults, options); 35 | 36 | allOptions.elem.click(function (event) { 37 | event.preventDefault(); 38 | var $this = $(this), 39 | $htmlBody = $('html, body'), 40 | offset = ($this.attr('data-offset')) ? $this.attr('data-offset') : false, 41 | position = ($this.attr('data-position')) ? $this.attr('data-position') : false, 42 | toMove; 43 | 44 | if (offset) { 45 | toMove = parseInt(offset); 46 | $htmlBody.stop(true, false).animate({scrollTop: ($(this.hash).offset().top + toMove) }, allOptions.speed); 47 | } else if (position) { 48 | toMove = parseInt(position); 49 | $htmlBody.stop(true, false).animate({scrollTop: toMove }, allOptions.speed); 50 | } else { 51 | $htmlBody.stop(true, false).animate({scrollTop: ($(this.hash).offset().top) }, allOptions.speed); 52 | } 53 | }); 54 | 55 | }; 56 | })(jQuery); 57 | -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/layouts/page/list.html: -------------------------------------------------------------------------------- 1 | {{ partial "header.html" . }} 2 | {{ $baseurl := .Site.BaseURL }} 3 | 4 | {{if .Params.cover}} 5 | {{if or (eq (substr .Params.cover 0 7) "http://") (eq (substr .Params.cover 0 8) "https://")}} 6 |
7 | {{ else }} 8 |
9 | {{ end }} 10 | {{else if .Site.Params.cover}} 11 | {{if or (eq (substr .Site.Params.cover 0 7) "http://") (eq (substr .Site.Params.cover 0 8) "https://")}} 12 |
13 | {{ else }} 14 |
15 | {{ end }} 16 | {{else}} 17 |
18 | {{end}} 19 | 33 |
34 |
35 |

{{.Title}}

36 |

37 | {{if .Params.description}} 38 | {{.Params.description}} 39 | {{end}} 40 |

41 |
42 |
43 |
44 | 45 |
46 | {{ $paginator := .Paginator }} 47 | 48 |
49 | {{ partial "pagination.html" $paginator }} 50 |
51 | 52 | {{ range $index, $page := $paginator.Pages }} 53 | {{ partial "li.html" . }} 54 | {{ end }} 55 | 56 | {{ partial "pagination.html" $paginator }} 57 |
58 | 59 | 60 | 61 | {{ partial "footer.html" . }} -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{ partial "header.html" . }} 2 | {{ $baseurl := .Site.BaseURL }} 3 | 4 | {{if .Params.cover}} 5 | {{if or (eq (substr .Params.cover 0 7) "http://") (eq (substr .Params.cover 0 8) "https://")}} 6 |
7 | {{ else }} 8 |
9 | {{ end }} 10 | {{else if .Site.Params.cover}} 11 | {{if or (eq (substr .Site.Params.cover 0 7) "http://") (eq (substr .Site.Params.cover 0 8) "https://")}} 12 |
13 | {{ else }} 14 |
15 | {{ end }} 16 | {{else}} 17 |
18 | {{end}} 19 | 33 |
34 |
35 |

{{.Title}}

36 |

37 | {{if .Params.description}} 38 | {{.Params.description}} 39 | {{end}} 40 |

41 |
42 |
43 |
44 | 45 |
46 | {{ $paginator := .Paginator }} 47 | 48 |
49 | {{ partial "pagination.html" $paginator }} 50 |
51 | 52 | {{ range $index, $page := $paginator.Pages }} 53 | {{ partial "li.html" . }} 54 | {{ end }} 55 | 56 | {{ partial "pagination.html" $paginator }} 57 |
58 | 59 | 60 | 61 | {{ partial "footer.html" . }} -------------------------------------------------------------------------------- /site/themes/hugo-theme-casper/layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ partial "header.html" . }} 2 | {{ $baseurl := .Site.BaseURL }} 3 | 4 | {{if .Params.image}} 5 | {{if or (eq (substr .Params.image 0 7) "http://") (eq (substr .Params.image 0 8) "https://")}} 6 |
7 | {{ else }} 8 |
9 | {{ end }} 10 |