commit f5391008e64e8fffcca380fd64f459d6a20aa2d1 Author: Wilfried OLLIVIER Date: Sun Sep 3 18:13:29 2017 +0200 Bootstrap \o/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..38e4e40 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "beautifulhugo"] + path = beautifulhugo + url = https://github.com/halogenica/beautifulhugo.git diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..9afdefc --- /dev/null +++ b/Readme.md @@ -0,0 +1,19 @@ +# Blog + +## Tools + +* Hugo : https://gohugo.io +* Blog theme : https://github.com/halogenica/beautifulhugo +* pygments (python package) for syntax coloration + +## Run, check + + hugo server -D + +## Generate + + # in order to add git commit on blog pages + EXPORT GIT_COMMIT_SHA=`git rev-parse --verify HEAD` + EXPORT GIT_COMMIT_SHA_SHORT=`git rev-parse --short HEAD` + # gen blog inside ./static folder + hugo diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..f5a9e45 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .TranslationBaseName "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/beautifulhugo b/beautifulhugo new file mode 160000 index 0000000..b760205 --- /dev/null +++ b/beautifulhugo @@ -0,0 +1 @@ +Subproject commit b760205613cde1527fff49f8d1a3587fe9e6cedc diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..a1e8462 --- /dev/null +++ b/config.toml @@ -0,0 +1,35 @@ +baseurl = "https://blog.papey.fr" +DefaultContentLanguage = "en" +title = "import {} from 'blog';" +theme = "beautifulhugo" +metaDataFormat = "yaml" +pygmentsUseClasses = true +pygmentCodeFences = true + +[Params] + subtitle = "Articles about stuff I use or build…" + logo = "img/avatar-icon.png" + favicon = "img/favicon.ico" + commit = true + rss = true + comments = false + +[Author] + name = "Wilfried OLLIVIER" + website = "papey.fr" + email = "wollivier@fdn.fr" + github = "papey" + twitter = "MarcelMonfort" + stackoverflow = "users/7925197/papey" + spotify = "MarcelMonfort" + telegram = "@P4p3y" + +[[menu.main]] + name = "Blog" + url = "" + weight = 1 + +[[menu.main]] + name = "Tags" + url = "tags" + weight = 3 diff --git a/themes/beautifulhugo/.gitattributes b/themes/beautifulhugo/.gitattributes new file mode 100644 index 0000000..bdb0cab --- /dev/null +++ b/themes/beautifulhugo/.gitattributes @@ -0,0 +1,17 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/themes/beautifulhugo/.gitignore b/themes/beautifulhugo/.gitignore new file mode 100644 index 0000000..81b9599 --- /dev/null +++ b/themes/beautifulhugo/.gitignore @@ -0,0 +1,50 @@ +# Themes directory of example site; ignored so that we can clone the repo +# inside the themes directory and test the example site with "hugo server". +exampleSite/themes/ + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# Vim swap files +*.swp + +# ========================= +# Operating System Files +# ========================= + +# OSX +# ========================= + +.DS_Store +.AppleDouble +.LSOverride + +# Thumbnails +._* + +# Files that might appear on external disk +.Spotlight-V100 +.Trashes + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk diff --git a/themes/beautifulhugo/LICENSE b/themes/beautifulhugo/LICENSE new file mode 100644 index 0000000..7787b8f --- /dev/null +++ b/themes/beautifulhugo/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Original work Copyright (c) 2015 Dean Attali +Modified work Copyright (c) 2017 Michael Romero + +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. diff --git a/themes/beautifulhugo/README.md b/themes/beautifulhugo/README.md new file mode 100644 index 0000000..25d97f4 --- /dev/null +++ b/themes/beautifulhugo/README.md @@ -0,0 +1,67 @@ +# Beautiful Hugo - A port of Beautiful Jekyll Theme + +![Beautiful Hugo Theme Screenshot](https://github.com/halogenica/beautifulhugo/blob/master/images/screenshot.png) + +## Installation + + $ mkdir themes + $ cd themes + $ git clone https://github.com/halogenica/beautifulhugo.git beautifulhugo + +See [the Hugo documentation](http://gohugo.io/themes/installing/) for more information. + +## Extra Features + +### Responsive + +This theme is designed to look great on both large-screen and small-screen (mobile) devices. + +### Syntax highlighting + +This theme has support for both server side and client side highlighting. + +#### Server side syntax highlighting + +Use the `highlight` shortcode (with Pygments), +see [the Hugo documentation](http://gohugo.io/extras/highlighting/) for more information. + +To use this feature install Pygments (`pip install Pygments`) and add `pygmentsuseclasses = true` to your `config.toml`. + +#### Client side syntax highlighting + +Use triple backticks ( ``` ) or triple tilde ( ~~~ ) around code blocks. + +Client side highlighting does not require pygments to be installed. + +### Disqus support + +To use this feature, uncomment and fill out the `disqusShortname` parameter in `config.toml`. + +### Google Analytics + +To add Google Analytics, simply sign up to [Google Analytics](http://www.google.com/analytics/) to obtain your Google Tracking ID, and add this tracking ID to the `googleAnalytics` parameter in `config.toml`. + +### Commit SHA on the footer + +If the source of your site is in a Git repo, the SHA corresponding to the commit the site is built from can be shown on the footer. To do so, two environment variables have to be set (`GIT_COMMIT_SHA` and `GIT_COMMIT_SHA_SHORT`) and parameter `commit` has to be defined in the config file: + +``` +[Params] + commit = "https://github.com///tree/" +``` + +This can be achieved by running the next command prior to calling Hugo: + +``` + GIT_COMMIT_SHA=`git rev-parse --verify HEAD` GIT_COMMIT_SHA_SHORT=`git rev-parse --short HEAD` +``` + +See at [xor-gate/xor-gate.org](https://github.com/xor-gate/xor-gate.org) an example of how to add it to a continuous integration system. + +## About + +This is a port of the Jekyll theme [Beautiful Jekyll](http://deanattali.com/beautiful-jekyll/) by [Dean Attali](http://deanattali.com/aboutme#contact). It supports most of the features of the original theme. + +## License + +MIT Licensed, see [LICENSE](https://github.com/halogenica/Hugo-BeautifulHugo/blob/master/LICENSE). diff --git a/themes/beautifulhugo/archetypes/default.md b/themes/beautifulhugo/archetypes/default.md new file mode 100644 index 0000000..489804b --- /dev/null +++ b/themes/beautifulhugo/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .TranslationBaseName "-" " " | title }}" +date: {{ .Date }} +subtitle: "" +tags: [] +--- diff --git a/themes/beautifulhugo/beautifulhugo b/themes/beautifulhugo/beautifulhugo new file mode 120000 index 0000000..9e9bbc4 --- /dev/null +++ b/themes/beautifulhugo/beautifulhugo @@ -0,0 +1 @@ +./beautifulhugo \ No newline at end of file diff --git a/themes/beautifulhugo/data/beautifulhugo/social.toml b/themes/beautifulhugo/data/beautifulhugo/social.toml new file mode 100644 index 0000000..3e31996 --- /dev/null +++ b/themes/beautifulhugo/data/beautifulhugo/social.toml @@ -0,0 +1,125 @@ +[[social_icons]] +id = "email" +url = "mailto:%s" +title = "Email me" +icon = "fa-envelope" + +[[social_icons]] +id = "facebook" +url = "https://www.facebook.com/%s" +title = "Facebook" +icon = "fa-facebook" + +[[social_icons]] +id = "googleplus" +url = "https://plus.google.com/%s" +title = "Google+" +icon = "fa-google-plus" + +[[social_icons]] +id = "github" +url = "https://github.com/%s" +title = "GitHub" +icon = "fa-github" + +[[social_icons]] +id = "gitlab" +url = "https://gitlab.com/%s" +title = "GitLab" +icon = "fa-gitlab" + +[[social_icons]] +id = "twitter" +url = "https://twitter.com/%s" +title = "Twitter" +icon = "fa-twitter" + +[[social_icons]] +id = "reddit" +url = "https://reddit.com/u/%s" +title = "Reddit" +icon = "fa-reddit-alien" + +[[social_icons]] +id = "linkedin" +url = "https://linkedin.com/in/%s" +title = "LinkedIn" +icon = "fa-linkedin" + +[[social_icons]] +id = "xing" +url = "https://www.xing.com/profile/%s" +title = "Xing" +icon = "fa-xing" + +[[social_icons]] +id = "stackoverflow" +url = "https://stackoverflow.com/%s" +title = "StackOverflow" +icon = "fa-stack-overflow" + +[[social_icons]] +id = "snapchat" +url = "https://www.snapchat.com/add/%s" +title = "Snapchat" +icon = "fa-snapchat-ghost" + +[[social_icons]] +id = "instagram" +url = "https://www.instagram.com/%s" +title = "Instagram" +icon = "fa-instagram" + +[[social_icons]] +id = "youtube" +url = "https://www.youtube.com/%s" +title = "Youtube" +icon = "fa-youtube" + +[[social_icons]] +id = "soundcloud" +url = "https://soundcloud.com/%s" +title = "SoundCloud" +icon = "fa-soundcloud" + +[[social_icons]] +id = "spotify" +url = "https://open.spotify.com/user/%s" +title = "Spotify" +icon = "fa-spotify" + +[[social_icons]] +id = "bandcamp" +url = "https://%s.bandcamp.com/" +title = "Bandcamp" +icon = "fa-bandcamp" + +[[social_icons]] +id = "itchio" +url = "https://itch.io/profile/%s" +title = "Itch.io" +icon = "fa-gamepad" + +[[social_icons]] +id = "keybase" +url = "https://keybase.io/%s" +title = "Keybase" +icon = "fa-key" + +[[social_icons]] +id = "vk" +url = "https://vk.com/%s" +title = "VK" +icon = "fa-vk" + +[[social_icons]] +id = "paypal" +url = "https://paypal.me/%s" +title = "PayPal" +icon = "fa-paypal" + +[[social_icons]] +id = "telegram" +url = "https://telegram.me/%s" +title = "Telegram" +icon = "fa-telegram" diff --git a/themes/beautifulhugo/exampleSite/config.toml b/themes/beautifulhugo/exampleSite/config.toml new file mode 100644 index 0000000..9d73640 --- /dev/null +++ b/themes/beautifulhugo/exampleSite/config.toml @@ -0,0 +1,92 @@ +baseurl = "https://username.github.io" +DefaultContentLanguage = "en" +#DefaultContentLanguage = "ja" +title = "Beautiful Hugo" +theme = "beautifulhugo" +metaDataFormat = "yaml" +pygmentsUseClasses = true +pygmentCodeFences = true +#disqusShortname = "XXX" +#googleAnalytics = "XXX" + +[Params] + subtitle = "Build a beautiful and simple website in minutes" + logo = "img/avatar-icon.png" + favicon = "img/favicon.ico" + dateFormat = "January 2, 2006" + commit = false + rss = true + comments = true +# gcse = "012345678901234567890:abcdefghijk" # Get your code from google.com/cse. Make sure to go to "Look and Feel" and change Layout to "Full Width" and Theme to "Classic" + +#[[Params.bigimg]] +# src = "img/triangle.jpg" +# desc = "Triangle" +#[[Params.bigimg]] +# src = "img/sphere.jpg" +# desc = "Sphere" +#[[Params.bigimg]] +# src = "img/hexagon.jpg" +# desc = "Hexagon" + +[Author] + name = "Some Person" + website = "yourwebsite.com" + email = "youremail@domain.com" + facebook = "username" + googleplus = "+username" # or xxxxxxxxxxxxxxxxxxxxx + github = "username" + gitlab = "username" + twitter = "username" + reddit = "username" + linkedin = "username" + xing = "username" + stackoverflow = "users/XXXXXXX/username" + snapchat = "username" + instagram = "username" + youtube = "user/username" # or channel/channelname + soundcloud = "username" + spotify = "username" + bandcamp = "username" + itchio = "username" + vk = "username" + paypal = "username" + telegram = "username" + +[[menu.main]] + name = "Blog" + url = "" + weight = 1 + +[[menu.main]] + name = "About" + url = "page/about/" + weight = 3 + +[[menu.main]] + identifier = "samples" + name = "Samples" + weight = 2 + +[[menu.main]] + parent = "samples" + name = "Big Image Sample" + url = "post/2017-03-07-bigimg-sample" + weight = 1 + +[[menu.main]] + parent = "samples" + name = "Math Sample" + url = "post/2017-03-05-math-sample" + weight = 2 + +[[menu.main]] + parent = "samples" + name = "Code Sample" + url = "post/2016-03-08-code-sample" + weight = 3 + +[[menu.main]] + name = "Tags" + url = "tags" + weight = 3 diff --git a/themes/beautifulhugo/exampleSite/content/_index.md b/themes/beautifulhugo/exampleSite/content/_index.md new file mode 100644 index 0000000..cc3b464 --- /dev/null +++ b/themes/beautifulhugo/exampleSite/content/_index.md @@ -0,0 +1,2 @@ +## Front Page Content +`beautifulhugo` supports content on your front page. Edit `/content/_index.md` to change what appears here. Delete `/content/_index.md` if you don't want any content here. \ No newline at end of file diff --git a/themes/beautifulhugo/exampleSite/content/page/about.md b/themes/beautifulhugo/exampleSite/content/page/about.md new file mode 100644 index 0000000..ee61a99 --- /dev/null +++ b/themes/beautifulhugo/exampleSite/content/page/about.md @@ -0,0 +1,16 @@ +--- +title: About me +subtitle: Why you'd want to go on a date with me +comments: false +--- + +My name is Inigo Montoya. I have the following qualities: + +- I rock a great mustache +- I'm extremely loyal to my family + +What else do you need? + +### my history + +To be honest, I'm having some trouble remembering right now, so why don't you just watch [my movie](http://en.wikipedia.org/wiki/The_Princess_Bride_%28film%29) and it will answer **all** your questions. \ No newline at end of file diff --git a/themes/beautifulhugo/exampleSite/content/post/2015-01-04-first-post.md b/themes/beautifulhugo/exampleSite/content/post/2015-01-04-first-post.md new file mode 100644 index 0000000..4d4cf45 --- /dev/null +++ b/themes/beautifulhugo/exampleSite/content/post/2015-01-04-first-post.md @@ -0,0 +1,6 @@ +--- +title: First post! +date: 2015-01-05 +--- + +This is my first post, how exciting! \ No newline at end of file diff --git a/themes/beautifulhugo/exampleSite/content/post/2015-01-15-pirates.md b/themes/beautifulhugo/exampleSite/content/post/2015-01-15-pirates.md new file mode 100644 index 0000000..f2f8f08 --- /dev/null +++ b/themes/beautifulhugo/exampleSite/content/post/2015-01-15-pirates.md @@ -0,0 +1,6 @@ +--- +title: Pirates arrrr +date: 2015-01-15 +--- + +Piracy is typically an act of robbery or criminal violence at sea. The term can include acts committed on land, in the air, or in other major bodies of water or on a shore. It does not normally include crimes committed against persons traveling on the same vessel as the perpetrator (e.g. one passenger stealing from others on the same vessel). The term has been used throughout history to refer to raids across land borders by non-state agents. \ No newline at end of file diff --git a/themes/beautifulhugo/exampleSite/content/post/2015-01-19-soccer.md b/themes/beautifulhugo/exampleSite/content/post/2015-01-19-soccer.md new file mode 100644 index 0000000..82889be --- /dev/null +++ b/themes/beautifulhugo/exampleSite/content/post/2015-01-19-soccer.md @@ -0,0 +1,11 @@ +--- +title: Soccer +subtitle: Best sport ever! +date: 2015-01-19 +--- + +From Wikipedia: + +Association football, more commonly known as football or soccer,[2] is a sport played between two teams of eleven players with a spherical ball. It is played by 250 million players in over 200 countries, making it the world's most popular sport.[3][4][5][6] The game is played on a rectangular field with a goal at each end. The object of the game is to score by getting the ball into the opposing goal. + +The goalkeepers are the only players allowed to touch the ball with their hands or arms while it is in play and then only in their penalty area. Outfield players mostly use their feet to strike or pass the ball, but may use their head or torso to strike the ball instead. The team that scores the most goals by the end of the match wins. If the score is level at the end of the game, either a draw is declared or the game goes into extra time and/or a penalty shootout depending on the format of the competition. The Laws of the Game were originally codified in England by The Football Association in 1863. Association football is governed internationally by the International Federation of Association Football (FIFA; French: Fédération Internationale de Football Association) which organises a World Cup every four years.[7] \ No newline at end of file diff --git a/themes/beautifulhugo/exampleSite/content/post/2015-01-27-dear-diary.md b/themes/beautifulhugo/exampleSite/content/post/2015-01-27-dear-diary.md new file mode 100644 index 0000000..bed5417 --- /dev/null +++ b/themes/beautifulhugo/exampleSite/content/post/2015-01-27-dear-diary.md @@ -0,0 +1,6 @@ +--- +title: Dear diary +date: 2015-01-27 +--- + +What is it with that Mary girl? Dragging me to school every day. As if I had a choice. What you don't hear in those nursery rhymes is that she starves me if I don't go to school with her; it's the only way I can stay alive! I'm thinking about being adopted by Little Bo Peep, sure I may get lost, but anything is better than being with Mary and those little brats at school (shudder, shudder). \ No newline at end of file diff --git a/themes/beautifulhugo/exampleSite/content/post/2015-02-13-hamlet-monologue.md b/themes/beautifulhugo/exampleSite/content/post/2015-02-13-hamlet-monologue.md new file mode 100644 index 0000000..48dd133 --- /dev/null +++ b/themes/beautifulhugo/exampleSite/content/post/2015-02-13-hamlet-monologue.md @@ -0,0 +1,41 @@ +--- +title: To be +subtitle: ... or not to be? +date: 2015-02-13 +--- + +To be, or not to be--that is the question: +Whether 'tis nobler in the mind to suffer +The slings and arrows of outrageous fortune +Or to take arms against a sea of troubles +And by opposing end them. To die, to sleep-- +No more--and by a sleep to say we end +The heartache, and the thousand natural shocks +That flesh is heir to. 'Tis a consummation +Devoutly to be wished. To die, to sleep-- +To sleep--perchance to dream: ay, there's the rub, +For in that sleep of death what dreams may come +When we have shuffled off this mortal coil, +Must give us pause. There's the respect +That makes calamity of so long life. +For who would bear the whips and scorns of time, +Th' oppressor's wrong, the proud man's contumely +The pangs of despised love, the law's delay, +The insolence of office, and the spurns +That patient merit of th' unworthy takes, +When he himself might his quietus make +With a bare bodkin? Who would fardels bear, +To grunt and sweat under a weary life, +But that the dread of something after death, +The undiscovered country, from whose bourn +No traveller returns, puzzles the will, +And makes us rather bear those ills we have +Than fly to others that we know not of? +Thus conscience does make cowards of us all, +And thus the native hue of resolution +Is sicklied o'er with the pale cast of thought, +And enterprise of great pitch and moment +With this regard their currents turn awry +And lose the name of action. -- Soft you now, +The fair Ophelia! -- Nymph, in thy orisons +Be all my sins remembered. \ No newline at end of file diff --git a/themes/beautifulhugo/exampleSite/content/post/2015-02-20-test-markdown.md b/themes/beautifulhugo/exampleSite/content/post/2015-02-20-test-markdown.md new file mode 100644 index 0000000..8ef8cbf --- /dev/null +++ b/themes/beautifulhugo/exampleSite/content/post/2015-02-20-test-markdown.md @@ -0,0 +1,35 @@ +--- +title: Test markdown +subtitle: Each post also has a subtitle +date: 2015-02-20 +tags: ["example", "markdown"] +--- + +You can write regular [markdown](http://markdowntutorial.com/) here and Jekyll will automatically convert it to a nice webpage. I strongly encourage you to [take 5 minutes to learn how to write in markdown](http://markdowntutorial.com/) - it'll teach you how to transform regular text into bold/italics/headings/tables/etc. + +**Here is some bold text** + +## Here is a secondary heading + +Here's a useless table: + +| Number | Next number | Previous number | +| :------ |:--- | :--- | +| Five | Six | Four | +| Ten | Eleven | Nine | +| Seven | Eight | Six | +| Two | Three | One | + + +How about a yummy crepe? + +![Crepe](http://s3-media3.fl.yelpcdn.com/bphoto/cQ1Yoa75m2yUFFbY2xwuqw/348s.jpg) + +Here's a code chunk with syntax highlighting: + +```javascript +var foo = function(x) { + return(x + 5); +} +foo(3) +``` diff --git a/themes/beautifulhugo/exampleSite/content/post/2015-02-26-flake-it-till-you-make-it.md b/themes/beautifulhugo/exampleSite/content/post/2015-02-26-flake-it-till-you-make-it.md new file mode 100644 index 0000000..895ff58 --- /dev/null +++ b/themes/beautifulhugo/exampleSite/content/post/2015-02-26-flake-it-till-you-make-it.md @@ -0,0 +1,14 @@ +--- +title: Flake it till you make it +subtitle: Excerpt from Soulshaping by Jeff Brown +date: 2015-02-26 +bigimg: [{src: "/img/path.jpg", desc: "Path"}] +--- + +Under what circumstances should we step off a path? When is it essential that we finish what we start? If I bought a bag of peanuts and had an allergic reaction, no one would fault me if I threw it out. If I ended a relationship with a woman who hit me, no one would say that I had a commitment problem. But if I walk away from a seemingly secure route because my soul has other ideas, I am a flake? + +The truth is that no one else can definitively know the path we are here to walk. It’s tempting to listen—many of us long for the omnipotent other—but unless they are genuine psychic intuitives, they can’t know. All others can know is their own truth, and if they’ve actually done the work to excavate it, they will have the good sense to know that they cannot genuinely know anyone else’s. Only soul knows the path it is here to walk. Since you are the only one living in your temple, only you can know its scriptures and interpretive structure. + +At the heart of the struggle are two very different ideas of success—survival-driven and soul-driven. For survivalists, success is security, pragmatism, power over others. Success is the absence of material suffering, the nourishing of the soul be damned. It is an odd and ironic thing that most of the material power in our world often resides in the hands of younger souls. Still working in the egoic and material realms, they love the sensations of power and focus most of their energy on accumulation. Older souls tend not to be as materially driven. They have already played the worldly game in previous lives and they search for more subtle shades of meaning in this one—authentication rather than accumulation. They are often ignored by the culture at large, although they really are the truest warriors. + +A soulful notion of success rests on the actualization of our innate image. Success is simply the completion of a soul step, however unsightly it may be. We have finished what we started when the lesson is learned. What a fear-based culture calls a wonderful opportunity may be fruitless and misguided for the soul. Staying in a passionless relationship may satisfy our need for comfort, but it may stifle the soul. Becoming a famous lawyer is only worthwhile if the soul demands it. It is an essential failure if you are called to be a monastic this time around. If you need to explore and abandon ten careers in order to stretch your soul toward its innate image, then so be it. Flake it till you make it. \ No newline at end of file diff --git a/themes/beautifulhugo/exampleSite/content/post/2016-03-08-code-sample.md b/themes/beautifulhugo/exampleSite/content/post/2016-03-08-code-sample.md new file mode 100644 index 0000000..af4514a --- /dev/null +++ b/themes/beautifulhugo/exampleSite/content/post/2016-03-08-code-sample.md @@ -0,0 +1,42 @@ +--- +title: Code Sample +subtitle: Using Hugo or Pygments +date: 2016-03-08 +tags: ["example", "code"] +--- + +The following are two code samples using syntax highlighting. + + + +The following is a code sample using triple backticks ( ``` ) code fencing provided in Hugo. This is client side highlighting and does not require any special installation. + +```javascript + var num1, num2, sum + num1 = prompt("Enter first number") + num2 = prompt("Enter second number") + sum = parseInt(num1) + parseInt(num2) // "+" means "add" + alert("Sum = " + sum) // "+" means combine into a string +``` + + +The following is a code sample using the "highlight" shortcode provided in Hugo. This is server side highlighting and requires Python and Pygments to be installed. + +{{< highlight javascript >}} + var num1, num2, sum + num1 = prompt("Enter first number") + num2 = prompt("Enter second number") + sum = parseInt(num1) + parseInt(num2) // "+" means "add" + alert("Sum = " + sum) // "+" means combine into a string +{{}} + + +And here is the same code with line numbers: + +{{< highlight javascript "linenos=inline">}} + var num1, num2, sum + num1 = prompt("Enter first number") + num2 = prompt("Enter second number") + sum = parseInt(num1) + parseInt(num2) // "+" means "add" + alert("Sum = " + sum) // "+" means combine into a string +{{}} diff --git a/themes/beautifulhugo/exampleSite/content/post/2017-03-05-math-sample.md b/themes/beautifulhugo/exampleSite/content/post/2017-03-05-math-sample.md new file mode 100644 index 0000000..8ecf666 --- /dev/null +++ b/themes/beautifulhugo/exampleSite/content/post/2017-03-05-math-sample.md @@ -0,0 +1,49 @@ +--- +title: Math Sample +subtitle: Using KaTeX +date: 2017-03-05 +tags: ["example", "math"] +--- + +KaTeX can be used to generate complex math formulas server-side. + +$$ +\phi = \frac{(1+\sqrt{5})}{2} = 1.6180339887\cdots +$$ + +Additional details can be found on [GitHub](https://github.com/Khan/KaTeX) or on the [Wiki](http://tiddlywiki.com/plugins/tiddlywiki/katex/). + + +### Example 1 + +If the text between $$ contains newlines it will rendered in display mode: +``` +$$ +f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi +$$ +``` +$$ +f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi +$$ + + +### Example 2 +``` +$$ +\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } } +$$ +``` +​​$$ +\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } } +$$ +​​ + +### Example 3 +``` +$$ +1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \quad\quad \text{for }\lvert q\rvert<1. +$$ +``` +$$ +1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \quad\quad \text{for }\lvert q\rvert<1. +$$ diff --git a/themes/beautifulhugo/exampleSite/content/post/2017-03-07-bigimg-sample.md b/themes/beautifulhugo/exampleSite/content/post/2017-03-07-bigimg-sample.md new file mode 100644 index 0000000..754d999 --- /dev/null +++ b/themes/beautifulhugo/exampleSite/content/post/2017-03-07-bigimg-sample.md @@ -0,0 +1,40 @@ +--- +title: Big Image Sample +subtitle: Using Multiple Images +date: 2017-03-07 +tags: ["example", "bigimg"] +bigimg: [{src: "/img/triangle.jpg", desc: "Triangle"}, {src: "/img/sphere.jpg", desc: "Sphere"}, {src: "/img/hexagon.jpg", desc: "Hexagon"}] +--- + +The image banners at the top of the page are refered to as "bigimg" in this theme. They are optional, and one more more can be specified. If more than one is specified, the images rotate every 10 seconds. In the front matter, bigimgs are specified using an array of hashes. + + + +A single bigimg can be specified in the front matter by the following YAML: +``` +bigimg: [{src: "/img/triangle.jpg", desc: "Triangle"}] +``` + +Multiple bigimgs can be specified in the front matter by the following YAML: +``` +bigimg: [{src: "/img/triangle.jpg", desc: "Triangle"}, + {src: "/img/sphere.jpg", desc: "Sphere"}, + {src: "/img/hexagon.jpg", desc: "Hexagon"}] +``` + +Also note that the description field is optional, and images could instead be specified by: +``` +bigimg: [{src: "/img/triangle.jpg"}, + {src: "/img/sphere.jpg"}, + {src: "/img/hexagon.jpg"}] +``` + +The above YAML array of hashes were written in "flow" style. However when generating a new page or post with `hugo new post/mypost.md`, hugo may interpret the archetype for bigimg in the default YAML style. Defining multiple bigimg's complete with descriptions in this style would be specified by: +``` +bigimg: +- {src: "/img/triangle.jpg", desc: "Triangle"} +- {src: "/img/sphere.jpg", desc: "Sphere"} +- {src: "/img/hexagon.jpg", desc: "Hexagon"} +``` + +Additional information can be found [in this YAML tutorial](https://rhnh.net/2011/01/31/yaml-tutorial/). \ No newline at end of file diff --git a/themes/beautifulhugo/exampleSite/content/post/2017-03-20-photoswipe-gallery-sample.md b/themes/beautifulhugo/exampleSite/content/post/2017-03-20-photoswipe-gallery-sample.md new file mode 100644 index 0000000..3daf172 --- /dev/null +++ b/themes/beautifulhugo/exampleSite/content/post/2017-03-20-photoswipe-gallery-sample.md @@ -0,0 +1,37 @@ +--- +title: Photoswipe Gallery Sample +subtitle: Making a Gallery +date: 2017-03-20 +tags: ["example", "photoswipe"] +--- + +Beautiful Hugo adds a few custom shortcodes created by [Li-Wen Yip](https://www.liwen.id.au/heg/) and [Gert-Jan van den Berg](https://github.com/GjjvdBurg/HugoPhotoSwipe) for making galleries with [PhotoSwipe](http://photoswipe.com) . + +{{< gallery caption-effect="fade" >}} + {{< figure thumb="-thumb" link="/img/hexagon.jpg" >}} + {{< figure thumb="-thumb" link="/img/sphere.jpg" caption="Sphere" >}} + {{< figure thumb="-thumb" link="/img/triangle.jpg" caption="Triangle" alt="This is a long comment about a triangle" >}} +{{< /gallery >}} + + +## Example +The above gallery was created using the following shortcodes: +``` +{{}} + {{}} + {{}} + {{}} +{{}} +``` + +## Usage +For full details please see the [hugo-easy-gallery GitHub](https://github.com/liwenyip/hugo-easy-gallery/) page. Basic usages from above are: + +- Create a gallery with open and close tags `{{}}` and `{{}}` +- `{{}}` will use `image.jpg` for thumbnail and lightbox +- `{{}}` will use `thumb.jpg` for thumbnail and `image.jpg` for lightbox +- `{{}}` will use `image-small.jpg` for thumbnail and `image.jpg` for lightbox +- All the [features/parameters](https://gohugo.io/extras/shortcodes) of Hugo's built-in `figure` shortcode work as normal, i.e. src, link, title, caption, class, attr (attribution), attrlink, alt +- `{{}}` will fade in captions for all figures in this gallery instead of the default slide-up behavior +- Many gallery styles for captions and hover effects exist; view the [hugo-easy-gallery GitHub](https://github.com/liwenyip/hugo-easy-gallery/) for all options +- Note that this theme will load the photoswipe gallery theme and scripts by default, no need to load photoswipe on your individual pages \ No newline at end of file diff --git a/themes/beautifulhugo/exampleSite/layouts/partials/footer_custom.html b/themes/beautifulhugo/exampleSite/layouts/partials/footer_custom.html new file mode 100644 index 0000000..dc5320b --- /dev/null +++ b/themes/beautifulhugo/exampleSite/layouts/partials/footer_custom.html @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/themes/beautifulhugo/exampleSite/layouts/partials/head_custom.html b/themes/beautifulhugo/exampleSite/layouts/partials/head_custom.html new file mode 100644 index 0000000..77b1ef4 --- /dev/null +++ b/themes/beautifulhugo/exampleSite/layouts/partials/head_custom.html @@ -0,0 +1,18 @@ + + + \ No newline at end of file diff --git a/themes/beautifulhugo/exampleSite/static/.gitkeep b/themes/beautifulhugo/exampleSite/static/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/themes/beautifulhugo/i18n/de.yaml b/themes/beautifulhugo/i18n/de.yaml new file mode 100644 index 0000000..c2823d8 --- /dev/null +++ b/themes/beautifulhugo/i18n/de.yaml @@ -0,0 +1,39 @@ +# Content +- id: dateFormat + translation: "02.01.2006" +- id: postedOnDate + translation: "Gepostet am {{ .Count }}" +- id: translationsLabel + translation: "Andere Sprachen: " +- id: translationsSeparator + translation: ", " +- id: readMore + translation: "Mehr" +- id: olderPosts + translation: "Ältere Posts" +- id: newerPosts + translation: "Neuere Posts" +- id: previousPost + translation: "Letzter Post" +- id: nextPost + translation: "Nächster Post" + +# 404 page +- id: pageNotFound + translation: "Ups, diese Seite existiert nicht. (404 Error)" + +# Footer +- id: poweredBy # Accepts HTML + translation: 'Hugo v{{ .Hugo.Version }} powered  •  Theme by Beautiful Jekyll adapted to Beautiful Hugo' + +# Navigation +- id: toggleNavigation + translation: "Navigation" +- id: languageSwitcherLabel + translation: "Sprache" +- id: gcseLabelShort + translation: "Suche" +- id: gcseLabelLong + translation: "Suche {{ .Site.Title }}" +- id: gcseClose + translation: "Schließen" diff --git a/themes/beautifulhugo/i18n/en.yaml b/themes/beautifulhugo/i18n/en.yaml new file mode 100644 index 0000000..64c2f7b --- /dev/null +++ b/themes/beautifulhugo/i18n/en.yaml @@ -0,0 +1,40 @@ +# Content +- id: dateFormat + translation: "January 2, 2006" +- id: postedOnDate + translation: "Posted on {{ .Count }}" +- id: translationsLabel + translation: "Other languages: " +- id: translationsSeparator + translation: ", " +- id: readMore + translation: "Read More" +- id: olderPosts + translation: "Older Posts" +- id: newerPosts + translation: "Newer Posts" +- id: previousPost + translation: "Previous Post" +- id: nextPost + translation: "Next Post" + +# 404 page +- id: pageNotFound + translation: "Whoops, this page doesn't exist. Move along. (404 error)" + +# Footer +- id: poweredBy # Accepts HTML + translation: 'Hugo v{{ .Hugo.Version }} powered  •  Theme by Beautiful Jekyll adapted to Beautiful Hugo' + +# Navigation +- id: toggleNavigation + translation: "Toggle navigation" +- id: languageSwitcherLabel + translation: "Language" +- id: gcseLabelShort + translation: "Search" +- id: gcseLabelLong + translation: "Search {{ .Site.Title }}" +- id: gcseClose + translation: "Close" + diff --git a/themes/beautifulhugo/i18n/ja.yaml b/themes/beautifulhugo/i18n/ja.yaml new file mode 100644 index 0000000..c7c77b2 --- /dev/null +++ b/themes/beautifulhugo/i18n/ja.yaml @@ -0,0 +1,38 @@ +# Content +- id: dateFormat + translation: "2006年1月2日" +- id: postedOnDate + translation: "{{ .Count }}に投稿" +- id: translationsLabel + translation: "翻訳:" +- id: translationsSeparator + translation: "・" +- id: readMore + translation: "続きを読む" +- id: olderPosts + translation: "古いページ" +- id: newerPosts + translation: "新しいページ" +- id: previousPost + translation: "前ページ" +- id: nextPost + translation: "次ページ" + +# 404 page +- id: pageNotFound + translation: "おっと、このページが存在しない。他にあたってください。(404エラー)" + +# Footer +- id: poweredBy # Accepts HTML + translation: '起動力にHugo v{{ .Hugo.Version }}  •  テーマにBeautiful Jekyllに基づいているBeautiful Hugo' + +# Navigation +- id: toggleNavigation + translation: "メニューを切り替え" +- id: gcseLabelShort + translation: "検索" +- id: gcseLabelLong + translation: "{{ .Site.Title }}を検索" +- id: gcseClose + translation: "閉じる" + diff --git a/themes/beautifulhugo/i18n/ru.yaml b/themes/beautifulhugo/i18n/ru.yaml new file mode 100644 index 0000000..deeaecf --- /dev/null +++ b/themes/beautifulhugo/i18n/ru.yaml @@ -0,0 +1,40 @@ +# Content +- id: dateFormat + translation: "Январь 2, 2006" +- id: postedOnDate + translation: "Опубликовано {{ .Count }}" +- id: translationsLabel + translation: "Другие языки: " +- id: translationsSeparator + translation: ", " +- id: readMore + translation: "Далее" +- id: olderPosts + translation: "Предыдущие записи" +- id: newerPosts + translation: "Новые записи" +- id: previousPost + translation: "Предыдущий" +- id: nextPost + translation: "Следующий" + +# 404 page +- id: pageNotFound + translation: "Уууупс, страница не найдена. Поищите ещё. (ошибка 404)" + +# Footer +- id: poweredBy # Accepts HTML + translation: 'На базе Hugo v{{ .Hugo.Version }}  •  Тема Beautiful Hugo на базе Beautiful Jekyll' + +# Navigation +- id: toggleNavigation + translation: "Навигация" +- id: languageSwitcherLabel + translation: "Язык" +- id: gcseLabelShort + translation: "Поиск" +- id: gcseLabelLong + translation: "Поиск по {{ .Site.Title }}" +- id: gcseClose + translation: "Закрыть" + diff --git a/themes/beautifulhugo/i18n/zh.yaml b/themes/beautifulhugo/i18n/zh.yaml new file mode 100644 index 0000000..9c44558 --- /dev/null +++ b/themes/beautifulhugo/i18n/zh.yaml @@ -0,0 +1,40 @@ +# Content +- id: dateFormat + translation: "January 2, 2006" +- id: postedOnDate + translation: "发表于 {{ .Count }}" +- id: translationsLabel + translation: "其它语言: " +- id: translationsSeparator + translation: ", " +- id: readMore + translation: "阅读全文" +- id: olderPosts + translation: "下一页" +- id: newerPosts + translation: "上一页" +- id: previousPost + translation: "前一篇" +- id: nextPost + translation: "后一篇" + +# 404 page +- id: pageNotFound + translation: "啊哦,这篇文章不存在。 (404 错误)" + +# Footer +- id: poweredBy # Accepts HTML + translation: '由 Hugo v{{ .Hugo.Version }} 强力驱动  •  主题 Beautiful Hugo 移植自 Beautiful Jekyll' + +# Navigation +- id: toggleNavigation + translation: "切换导航" +- id: languageSwitcherLabel + translation: "语言" +- id: gcseLabelShort + translation: "搜索" +- id: gcseLabelLong + translation: "搜索 {{ .Site.Title }}" +- id: gcseClose + translation: "关闭" + diff --git a/themes/beautifulhugo/images/screenshot.png b/themes/beautifulhugo/images/screenshot.png new file mode 100644 index 0000000..0d68a8a Binary files /dev/null and b/themes/beautifulhugo/images/screenshot.png differ diff --git a/themes/beautifulhugo/images/tn.png b/themes/beautifulhugo/images/tn.png new file mode 100644 index 0000000..97904cc Binary files /dev/null and b/themes/beautifulhugo/images/tn.png differ diff --git a/themes/beautifulhugo/layouts/404.html b/themes/beautifulhugo/layouts/404.html new file mode 100644 index 0000000..9fbcb45 --- /dev/null +++ b/themes/beautifulhugo/layouts/404.html @@ -0,0 +1,11 @@ +{{ define "header" }}{{ end }} +{{ define "main" }} +
+
+

{{ i18n "pageNotFound" }}

+
+ +
+
+{{ end }} + diff --git a/themes/beautifulhugo/layouts/_default/baseof.html b/themes/beautifulhugo/layouts/_default/baseof.html new file mode 100644 index 0000000..13923d9 --- /dev/null +++ b/themes/beautifulhugo/layouts/_default/baseof.html @@ -0,0 +1,11 @@ + + + {{ partial "head.html" . }} + + {{ partial "nav.html" . }} + {{ block "header" . }}{{ partial "header.html" . }}{{ end }} + {{ block "main" . }}{{ end }} + {{ partial "footer.html" . }} + + + diff --git a/themes/beautifulhugo/layouts/_default/list.html b/themes/beautifulhugo/layouts/_default/list.html new file mode 100644 index 0000000..6d2141a --- /dev/null +++ b/themes/beautifulhugo/layouts/_default/list.html @@ -0,0 +1,80 @@ +{{ define "header" }} +
+
+
+
+
+
+

{{ if .Data.Singular }}#{{ end }}{{ .Title }}

+
+
+
+
+
+
+
+{{ end }} +{{ define "main" }} +
+
+
+ {{ with .Content }} +
+ {{.}} +
+ {{ end }} +
+ {{ range .Paginator.Pages }} + + {{ end }} +
+ {{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }} + + {{ end }} +
+
+
+{{ end }} + diff --git a/themes/beautifulhugo/layouts/_default/single.html b/themes/beautifulhugo/layouts/_default/single.html new file mode 100644 index 0000000..1fddbe8 --- /dev/null +++ b/themes/beautifulhugo/layouts/_default/single.html @@ -0,0 +1,33 @@ +{{ define "main" }} +
+
+
+
+ {{ .Content }} +
+ + + + {{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (.Site.Params.comments)) }} + {{ if .Site.DisqusShortname }} +
+ {{ template "_internal/disqus.html" . }} +
+ {{ end }} + {{ end }} + +
+
+
+{{ end }} diff --git a/themes/beautifulhugo/layouts/_default/terms.html b/themes/beautifulhugo/layouts/_default/terms.html new file mode 100644 index 0000000..3a8a692 --- /dev/null +++ b/themes/beautifulhugo/layouts/_default/terms.html @@ -0,0 +1,14 @@ +{{ define "main" }} + {{ $data := .Data }} +
+ +
+{{ end }} + diff --git a/themes/beautifulhugo/layouts/index.html b/themes/beautifulhugo/layouts/index.html new file mode 100644 index 0000000..18bfff8 --- /dev/null +++ b/themes/beautifulhugo/layouts/index.html @@ -0,0 +1,63 @@ +{{ define "main" }} +
+
+
+ {{ with .Content }} +
+ {{.}} +
+ {{ end }} + +
+ {{ $pag := .Paginate (where .Data.Pages "Type" "post") }} + {{ range $pag.Pages }} + + {{ end }} +
+ + {{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }} + + {{ end }} +
+
+
+{{ end }} + diff --git a/themes/beautifulhugo/layouts/partials/disqus.html b/themes/beautifulhugo/layouts/partials/disqus.html new file mode 100644 index 0000000..8029525 --- /dev/null +++ b/themes/beautifulhugo/layouts/partials/disqus.html @@ -0,0 +1,7 @@ +{{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (.Site.Params.comments)) }} + {{ if .Site.DisqusShortname }} +
+ {{ template "_internal/disqus.html" . }} +
+ {{ end }} +{{ end }} \ No newline at end of file diff --git a/themes/beautifulhugo/layouts/partials/footer.html b/themes/beautifulhugo/layouts/partials/footer.html new file mode 100644 index 0000000..ade2d31 --- /dev/null +++ b/themes/beautifulhugo/layouts/partials/footer.html @@ -0,0 +1,82 @@ +
+
+
+
+ + + +

+ {{ i18n "poweredBy" . | safeHTML }} + {{ with .Site.Params.commit }} • [{{ getenv "GIT_COMMIT_SHA_SHORT" }}]{{ end }} +

+
+
+
+
+ + + + + + + + + + + + + +{{ if .Site.Params.gcse }} + +{{ end }} + +{{- partial "footer_custom.html" . }} diff --git a/themes/beautifulhugo/layouts/partials/footer_custom.html b/themes/beautifulhugo/layouts/partials/footer_custom.html new file mode 100644 index 0000000..af173b5 --- /dev/null +++ b/themes/beautifulhugo/layouts/partials/footer_custom.html @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/themes/beautifulhugo/layouts/partials/head.html b/themes/beautifulhugo/layouts/partials/head.html new file mode 100644 index 0000000..18de0c2 --- /dev/null +++ b/themes/beautifulhugo/layouts/partials/head.html @@ -0,0 +1,52 @@ + + + + + +{{- with .Title | default .Site.Title }} + {{ . }} + + +{{- end }} +{{- with .Description | default .Params.subtitle | default .Summary }} + + + +{{- end }} + +{{- with .Site.Params.favicon }} + +{{- end -}} + +{{- with .Params.share_img | default .Params.image | default .Site.Params.logo }} + + +{{- end }} + +{{- with .Site.Author.twitter }} + + +{{- end }} +{{- with .Site.Params.fb_app_id }} + +{{- end }} + + + + + {{ .Hugo.Generator -}} + + + + + + + + + + + +{{- partial "head_custom.html" . }} +{{- partial "load-photoswipe-theme.html" . }} +{{ template "_internal/google_analytics_async.html" . }} + diff --git a/themes/beautifulhugo/layouts/partials/head_custom.html b/themes/beautifulhugo/layouts/partials/head_custom.html new file mode 100644 index 0000000..3d012e4 --- /dev/null +++ b/themes/beautifulhugo/layouts/partials/head_custom.html @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/themes/beautifulhugo/layouts/partials/header.html b/themes/beautifulhugo/layouts/partials/header.html new file mode 100644 index 0000000..2b1e43b --- /dev/null +++ b/themes/beautifulhugo/layouts/partials/header.html @@ -0,0 +1,70 @@ +{{ if .IsHome }} + {{ $.Scratch.Set "title" .Site.Title }} + {{ if .Site.Params.subtitle }}{{ $.Scratch.Set "subtitle" .Site.Params.subtitle }}{{ end }} + {{ if .Site.Params.bigimg }}{{ $.Scratch.Set "bigimg" .Site.Params.bigimg }}{{ end }} +{{ else }} + {{ $.Scratch.Set "title" .Title }} + {{ if .Params.subtitle }}{{ $.Scratch.Set "subtitle" .Params.subtitle }}{{ end }} + {{ if .Params.bigimg }}{{ $.Scratch.Set "bigimg" .Params.bigimg }}{{ end }} +{{ end }} +{{ $bigimg := $.Scratch.Get "bigimg" }} + +{{ if or $bigimg ($.Scratch.Get "title") }} + {{ if $bigimg }} +
+ {{ end }} + +
+ {{ if $bigimg }} +
+ {{ $subtitle := $.Scratch.Get "subtitle" }} +
+
+
+
+

{{ with $.Scratch.Get "title" }}{{.}}{{ else }}
{{ end }}

+ {{ if $subtitle }} + {{ if eq .Type "page" }} +
+ {{ $subtitle }} + {{ else }} +

{{ $subtitle }}

+ {{ end }} + {{ end }} + {{ if eq .Type "post" }} + {{ partial "post_meta.html" . }} + {{ end }} +
+
+
+
+ +
+ {{end}} +
+ {{ $subtitle := $.Scratch.Get "subtitle" }} +
+
+
+
+

{{ with $.Scratch.Get "title" }}{{.}}{{ else }}
{{ end }}

+ {{ if $subtitle }} + {{ if eq .Type "page" }} +
+ {{ $subtitle }} + {{ else }} +

{{ $subtitle }}

+ {{ end }} + {{ end }} + {{ if eq .Type "post" }} + {{ partial "post_meta.html" . }} + {{ end }} +
+
+
+
+
+
+{{ else }} +
+{{ end }} diff --git a/themes/beautifulhugo/layouts/partials/load-photoswipe-theme.html b/themes/beautifulhugo/layouts/partials/load-photoswipe-theme.html new file mode 100644 index 0000000..73aa919 --- /dev/null +++ b/themes/beautifulhugo/layouts/partials/load-photoswipe-theme.html @@ -0,0 +1,59 @@ + + + + + + + + + \ No newline at end of file diff --git a/themes/beautifulhugo/layouts/partials/nav.html b/themes/beautifulhugo/layouts/partials/nav.html new file mode 100644 index 0000000..3d18c1e --- /dev/null +++ b/themes/beautifulhugo/layouts/partials/nav.html @@ -0,0 +1,96 @@ + + + +{{ if isset .Site.Params "gcse" }} + +{{ end }} diff --git a/themes/beautifulhugo/layouts/partials/post_meta.html b/themes/beautifulhugo/layouts/partials/post_meta.html new file mode 100644 index 0000000..4a1e679 --- /dev/null +++ b/themes/beautifulhugo/layouts/partials/post_meta.html @@ -0,0 +1,11 @@ + + diff --git a/themes/beautifulhugo/layouts/partials/translation_link.html b/themes/beautifulhugo/layouts/partials/translation_link.html new file mode 100644 index 0000000..1f9a817 --- /dev/null +++ b/themes/beautifulhugo/layouts/partials/translation_link.html @@ -0,0 +1,2 @@ +{{ default .Lang .Site.Language.LanguageName }} + diff --git a/themes/beautifulhugo/layouts/shortcodes/figure.html b/themes/beautifulhugo/layouts/shortcodes/figure.html new file mode 100644 index 0000000..b8dcbc9 --- /dev/null +++ b/themes/beautifulhugo/layouts/shortcodes/figure.html @@ -0,0 +1,29 @@ + + +{{- if not ($.Page.Scratch.Get "figurecount") }}{{ end }} +{{- $.Page.Scratch.Add "figurecount" 1 -}} + +{{- $thumb := .Get "src" | default (printf "%s." (.Get "thumb") | replace (.Get "link") ".") }} +
+
+
+ +
+ {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr")}} +
+ {{- with .Get "title" }}

{{.}}

{{ end }} + {{- if or (.Get "caption") (.Get "attr")}} +

+ {{- .Get "caption" -}} + {{- with .Get "attrlink"}}{{ .Get "attr" }}{{ else }}{{ .Get "attr"}}{{ end -}} +

+ {{- end }} +
+ {{- end }} + {{ with .Get "link" | default (.Get "src") }}{{ end }} +
+
\ No newline at end of file diff --git a/themes/beautifulhugo/layouts/shortcodes/gallery.html b/themes/beautifulhugo/layouts/shortcodes/gallery.html new file mode 100644 index 0000000..bd74f8b --- /dev/null +++ b/themes/beautifulhugo/layouts/shortcodes/gallery.html @@ -0,0 +1,40 @@ + + +{{- if not ($.Page.Scratch.Get "figurecount") }}{{ end }} +{{- $.Page.Scratch.Add "figurecount" 1 }} + \ No newline at end of file diff --git a/themes/beautifulhugo/static/css/highlight.min.css b/themes/beautifulhugo/static/css/highlight.min.css new file mode 100644 index 0000000..77ff6fa --- /dev/null +++ b/themes/beautifulhugo/static/css/highlight.min.css @@ -0,0 +1 @@ +.hljs{display:block;overflow-x:auto;padding:0.5em;background:#f9f9f9;-webkit-text-size-adjust:none}.hljs,.hljs-subst,.hljs-tag .hljs-title,.nginx .hljs-title{color:black}.hljs-string,.hljs-title,.hljs-constant,.hljs-parent,.hljs-tag .hljs-value,.hljs-rule .hljs-value,.hljs-preprocessor,.hljs-pragma,.hljs-name,.haml .hljs-symbol,.ruby .hljs-symbol,.ruby .hljs-symbol .hljs-string,.hljs-template_tag,.django .hljs-variable,.smalltalk .hljs-class,.hljs-addition,.hljs-flow,.hljs-stream,.bash .hljs-variable,.pf .hljs-variable,.apache .hljs-tag,.apache .hljs-cbracket,.tex .hljs-command,.tex .hljs-special,.erlang_repl .hljs-function_or_atom,.asciidoc .hljs-header,.markdown .hljs-header,.coffeescript .hljs-attribute{color:#800}.smartquote,.hljs-comment,.hljs-annotation,.diff .hljs-header,.hljs-chunk,.asciidoc .hljs-blockquote,.markdown .hljs-blockquote{color:#888}.hljs-number,.hljs-date,.hljs-regexp,.hljs-literal,.hljs-hexcolor,.smalltalk .hljs-symbol,.smalltalk .hljs-char,.go .hljs-constant,.hljs-change,.lasso .hljs-variable,.makefile .hljs-variable,.asciidoc .hljs-bullet,.markdown .hljs-bullet,.asciidoc .hljs-link_url,.markdown .hljs-link_url{color:#080}.hljs-label,.hljs-javadoc,.ruby .hljs-string,.hljs-decorator,.hljs-filter .hljs-argument,.hljs-localvars,.hljs-array,.hljs-attr_selector,.hljs-important,.hljs-pseudo,.hljs-pi,.haml .hljs-bullet,.hljs-doctype,.hljs-deletion,.hljs-envvar,.hljs-shebang,.apache .hljs-sqbracket,.nginx .hljs-built_in,.tex .hljs-formula,.erlang_repl .hljs-reserved,.hljs-prompt,.asciidoc .hljs-link_label,.markdown .hljs-link_label,.vhdl .hljs-attribute,.clojure .hljs-attribute,.asciidoc .hljs-attribute,.lasso .hljs-attribute,.coffeescript .hljs-property,.hljs-phony{color:#88f}.hljs-keyword,.hljs-id,.hljs-title,.hljs-built_in,.css .hljs-tag,.hljs-javadoctag,.hljs-phpdoc,.hljs-dartdoc,.hljs-yardoctag,.smalltalk .hljs-class,.hljs-winutils,.bash .hljs-variable,.pf .hljs-variable,.apache .hljs-tag,.hljs-type,.hljs-typename,.tex .hljs-command,.asciidoc .hljs-strong,.markdown .hljs-strong,.hljs-request,.hljs-status{font-weight:bold}.asciidoc .hljs-emphasis,.markdown .hljs-emphasis{font-style:italic}.nginx .hljs-built_in{font-weight:normal}.coffeescript .javascript,.javascript .xml,.lasso .markup,.tex .hljs-formula,.xml .javascript,.xml .vbscript,.xml .css,.xml .hljs-cdata{opacity:0.5} diff --git a/themes/beautifulhugo/static/css/hugo-easy-gallery.css b/themes/beautifulhugo/static/css/hugo-easy-gallery.css new file mode 100644 index 0000000..a2c5b32 --- /dev/null +++ b/themes/beautifulhugo/static/css/hugo-easy-gallery.css @@ -0,0 +1,157 @@ +/* +Put this file in /static/css/hugo-easy-gallery.css +Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/ +*/ + + +/* +Grid Layout Styles +*/ +.gallery { + overflow: hidden; + margin: 10px; + max-width: 768px; +} +.gallery .box { + float: left; + position: relative; + /* Default: 1 tile wide */ + width: 100%; + padding-bottom: 100%; +} +@media only screen and (min-width : 365px) { + /* Tablet view: 2 tiles */ + .gallery .box { + width: 50%; + padding-bottom: 50%; + } +} +@media only screen and (min-width : 480px) { + /* Small desktop / ipad view: 3 tiles */ + .gallery .box { + width: 33.3%; + padding-bottom: 33.3%; /* */ + } +} +@media only screen and (min-width : 9999px) { + /* Medium desktop: 4 tiles */ + .box { + width: 25%; + padding-bottom: 25%; + } +} + +/* +Transition styles +*/ +.gallery.hover-transition figure, +.gallery.hover-effect-zoom .img, +.gallery:not(.caption-effect-appear) figcaption, +.fancy-figure:not(.caption-effect-appear) figcaption { + -webkit-transition: all 0.3s ease-in-out; + -moz-transition: all 0.3s ease-in-out; + -o-transition: all 0.3s ease-in-out; + transition: all 0.3s ease-in-out; +} +/* +figure styles +*/ +figure { + position:relative; /* purely to allow absolution positioning of figcaption */ + overflow: hidden; +} +.gallery figure { + position: absolute; + left: 5px; + right: 5px; + top: 5px; + bottom: 5px; +} +.gallery.hover-effect-grow figure:hover { + transform: scale(1.05); +} +.gallery.hover-effect-shrink figure:hover { + transform: scale(0.95); +} +.gallery.hover-effect-slidedown figure:hover { + transform: translateY(5px); +} +.gallery.hover-effect-slideup figure:hover { + transform: translateY(-5px); +} + +/* +img / a styles +*/ + +.gallery .img { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + background-size: cover; + background-position: 50% 50%; + background-repeat: no-repeat; +} +.gallery.hover-effect-zoom figure:hover .img { + transform: scale(1.05); +} +.gallery img { + display: none; /* only show the img if not inside a gallery */ +} +figure a { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; +} + +/* +figcaption styles +*/ +.gallery figcaption, +.fancy-figure figcaption { + position: absolute; + bottom: 0; + left: 0; + right: 0; + background: #000; + color: #FFF; + text-align: center; + font-size: 75%; /* change this if you want bigger text */ + background: rgba(0, 0, 0, 0.5); + opacity: 1; +} +.gallery.caption-position-none figcaption, +.fancy-figure.caption-position-none figcaption { + display: none; +} +.gallery.caption-position-center figcaption, +.fancy-figure.caption-position-center figcaption { + top: 0; + padding: 40% 5px; +} +.gallery.caption-position-bottom figcaption, +.fancy-figure.caption-position-bottom figcaption { + padding: 5px; +} +.gallery.caption-effect-fade figure:not(:hover) figcaption, +.gallery.caption-effect-appear figure:not(:hover) figcaption, +.fancy-figure.caption-effect-fade figure:not(:hover) figcaption, +.fancy-figure.caption-effect-appear figure:not(:hover) figcaption { + background: rgba(0, 0, 0, 0); + opacity: 0; +} +.gallery.caption-effect-slide.caption-position-bottom figure:not(:hover) figcaption, +.fancy-figure.caption-effect-slide.caption-position-bottom figure:not(:hover) figcaption { + margin-bottom: -100%; +} +.gallery.caption-effect-slide.caption-position-center figure:not(:hover) figcaption, +.fancy-figure.caption-effect-slide.caption-position-center figure:not(:hover) figcaption { + top: 100%; +} +figcaption p { + margin: auto; /* override style in theme */ +} diff --git a/themes/beautifulhugo/static/css/main-minimal.css b/themes/beautifulhugo/static/css/main-minimal.css new file mode 100644 index 0000000..6baca79 --- /dev/null +++ b/themes/beautifulhugo/static/css/main-minimal.css @@ -0,0 +1,13 @@ +.main-content { + padding-bottom: 50px; +} + +footer.footer-min { + position: fixed; + bottom: 0; + width: 100%; + padding: 3px; + background-color: #f5f5f5; + border-top: 1px solid #eeeeee; + text-align: center; +} \ No newline at end of file diff --git a/themes/beautifulhugo/static/css/main.css b/themes/beautifulhugo/static/css/main.css new file mode 100644 index 0000000..681ec9f --- /dev/null +++ b/themes/beautifulhugo/static/css/main.css @@ -0,0 +1,709 @@ +/* --- General --- */ + +body { + font-family: 'Lora', 'Times New Roman', serif; + font-size: 18px; + color: #404040; + position: relative; + background: #FFF; + display: flex; + flex-flow: column; + height: 100vh; +} +.container[role=main] { + margin-bottom:50px; + flex: 1 0 auto; +} +p { + line-height: 1.5; + margin: 30px 0; +} +p a { + /* text-decoration: underline */ + color: #008AFF; +} +h1,h2,h3,h4,h5,h6 { + font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-weight: 800; +} +a { + color: #008AFF; +} +a:hover, +a:focus { + color: #0085a1; +} +blockquote { + color: #808080; + font-style: italic; +} +blockquote p:first-child { + margin-top: 0; +} +hr.small { + max-width: 100px; + margin: 15px auto; + border-width: 4px; + border-color: inherit; + border-radius: 3px; +} + +.main-content { + padding-top: 80px; +} +@media only screen and (min-width: 768px) { + .main-content { + padding-top: 130px; + } +} + +.main-explain-area { + font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; + padding: 15px inherit; +} + +.hideme { + display: none; +} + +::-moz-selection { + color: white; + text-shadow: none; + background: #0085a1; +} +::selection { + color: white; + text-shadow: none; + background: #0085a1; +} +img::selection { + color: white; + background: transparent; +} +img::-moz-selection { + color: white; + background: transparent; +} + +img { + display: block; + margin: auto; + max-width: 100%; +} + +.disqus-comments { + margin-top: 30px; +} + +@media only screen and (min-width: 768px) { + .disqus-comments { + margin-top: 40px; + } +} + +/* --- Navbar --- */ + +.navbar-custom { + background: #F5F5F5; + border-bottom: 1px solid #EAEAEA; + font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; +} + +.navbar-custom .nav li a { + text-transform: uppercase; + font-size: 12px; + letter-spacing: 1px; +} + +.navbar-custom .navbar-brand, +.navbar-custom .nav li a { + font-weight: 800; + color: #404040; +} + +.navbar-custom .navbar-brand:hover, +.navbar-custom .navbar-brand:focus , +.navbar-custom .nav li a:hover, +.navbar-custom .nav li a:focus { + color: #0085a1; +} + +.navbar-custom .navbar-brand-logo { + padding-top: 0; + -webkit-transition: padding .5s ease-in-out; + -moz-transition: padding .5s ease-in-out; + transition: padding .5s ease-in-out; +} +.navbar-custom .navbar-brand-logo img { + height: 50px; + -webkit-transition: height .5s ease-in-out; + -moz-transition: height .5s ease-in-out; + transition: height .5s ease-in-out; +} +.navbar-custom.top-nav-short .navbar-brand-logo { + padding-top: 5px; +} +.navbar-custom.top-nav-short .navbar-brand-logo img { + height: 40px; +} + +@media only screen and (min-width: 768px) { + .navbar-custom { + padding: 20px 0; + -webkit-transition: background .5s ease-in-out,padding .5s ease-in-out; + -moz-transition: background .5s ease-in-out,padding .5s ease-in-out; + transition: background .5s ease-in-out,padding .5s ease-in-out; + } + + .navbar-custom.top-nav-short { + padding: 0; + } +} + +.navbar-custom .avatar-container { + opacity: 1; + position: absolute; + -webkit-transition: opacity 0.5s ease-in-out; + -moz-transition: opacity 0.5s ease-in-out; + transition: opacity 0.5s ease-in-out; + left: 50%; + width: 50px; + margin-top: -25px; +} +.navbar-custom .avatar-container .avatar-img-border { + width: 100%; + border-radius: 50%; + margin-left: -50%; + display: inline-block; + box-shadow: 0 0 8px rgba(0, 0, 0, .8); + -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .8); + -moz-box-shadow: 0 0 8px rgba(0, 0, 0, .8); +} +.navbar-custom .avatar-container .avatar-img { + width: 100%; + border-radius: 50%; + display: block; +} + +.navbar-custom.top-nav-short .avatar-container{ + opacity: 0; +} + +.navbar-custom.top-nav-expanded .avatar-container { + display: none; +} + +@media only screen and (min-width: 768px) { + .navbar-custom .avatar-container { + width: 100px; + margin-top: -50px; + } + + .navbar-custom .avatar-container .avatar-img-border { + width: 100%; + box-shadow: 1px 1px 2px rgba(0, 0, 0, .8); + -webkit-box-shadow: 1px 1px 2px rgba(0, 0, 0, .8); + -moz-box-shadow: 1px 1px 2px rgba(0, 0, 0, .8); + } + + .navbar-custom .avatar-container .avatar-img { + width: 100%; + } +} + +/* Multi-level navigation links */ +.navbar-custom .nav .navlinks-container { + position: relative; +} +.navbar-custom .nav .navlinks-parent:after { + content: " \25BC"; +} +.navbar-custom .nav .navlinks-children { + width: 100%; + display: none; + word-break: break-word; +} +.navbar-custom .nav .navlinks-container .navlinks-children a { + display: block; + padding: 10px; + padding-left: 30px; + background: #f5f5f5; + text-decoration: none !important; + border-width: 0 1px 1px 1px; + font-weight: normal; +} +@media only screen and (max-width: 767px) { + .navbar-custom .nav .navlinks-container.show-children { + background: #eee; + } + .navbar-custom .nav .navlinks-container.show-children .navlinks-children { + display: block; + } +} +@media only screen and (min-width: 768px) { + .navbar-custom .nav .navlinks-container { + text-align: center; + } + .navbar-custom .nav .navlinks-container:hover { + background: #eee; + } + .navbar-custom .nav .navlinks-container:hover .navlinks-children { + display: block; + } + .navbar-custom .nav .navlinks-children { + position: absolute; + } + .navbar-custom .nav .navlinks-container .navlinks-children a { + padding-left: 10px; + border: 1px solid #eaeaea; + border-width: 0 1px 1px; + } +} + +/* --- Footer --- */ + +footer { + padding: 30px 0; + background: #F5F5F5; + border-top: 1px #EAEAEA solid; + margin-top: auto; + font-size: 14px; +} + +footer a { + color: #404040; +} + +footer .list-inline { + margin: 0; + padding: 0; +} +footer .copyright { + font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; + text-align: center; + margin-bottom: 0; +} +footer .theme-by { + text-align: center; + margin: 10px 0 0; +} + +@media only screen and (min-width: 768px) { + footer { + padding: 50px 0; + } + footer .footer-links { + font-size: 18px; + } + footer .copyright { + font-size: 16px; + } +} + +/* --- Post preview --- */ + +.post-preview { + padding: 20px 0; + border-bottom: 1px solid #eee; +} + +@media only screen and (min-width: 768px) { + .post-preview { + padding: 35px 0; + } +} + +.post-preview:last-child { + border-bottom: 0; +} + +.post-preview a { + text-decoration: none; + color: #404040; +} + +.post-preview a:focus, +.post-preview a:hover { + text-decoration: none; + color: #0085a1; +} + +.post-preview .post-title { + font-size: 30px; + margin-top: 0; +} +.post-preview .post-subtitle { + margin: 0; + font-weight: 300; + margin-bottom: 10px; +} +.post-preview .post-meta, +.post-heading .post-meta { + color: #808080; + font-size: 18px; + font-style: italic; + margin: 0 0 10px; +} +.post-preview .post-meta a, +.post-heading .post-meta a { + color: #404040; + text-decoration: none; +} +.post-preview .post-entry { + font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; +} +.post-entry-container { + display: inline-block; + width: 100%; +} +.post-entry { + width: 100%; +} +.post-image { + float: right; + height: 192px; + width: 192px; + margin-top: -35px; + filter: grayscale(90%); +} +.post-image:hover { + filter: grayscale(0%); +} +.post-image img { + border-radius: 100px; + height: 192px; + width: 192px; +} +.post-preview .post-read-more { + font-weight: 800; + float: right; +} + +@media only screen and (min-width: 768px) { + .post-preview .post-title { + font-size: 36px; + } +} + +/* --- Tags --- */ + +.blog-tags { + font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; + color: #999; + font-size: 15px; + margin-bottom: 30px; +} + +.blog-tags a { + color: #008AFF; + text-decoration: none; + padding: 0px 5px; +} + +.blog-tags a:hover { + border-radius: 2px; + color: #008AFF; + background-color: #CCC; +} + +.post-preview .blog-tags { + margin-top: 5px; + margin-bottom: 0; +} + +@media only screen and (min-width: 768px) { + .post-preview .blog-tags { + margin-top: 10px; + } +} + +@media only screen and (max-width: 500px) { + .post-image, .post-image img { + height: 100px; + width: 100px; + } + + .post-image { + width: 100%; + text-align: center; + margin-top: 0; + float: left; + } +} +/* --- Post and page headers --- */ + +.intro-header { + margin: 80px 0 20px; + position: relative; +} +.intro-header.big-img { + background: no-repeat center center; + -webkit-background-size: cover; + -moz-background-size: cover; + background-size: cover; + -o-background-size: cover; + margin-top: 51px; /* The small navbar is 50px tall + 1px border */ + margin-bottom: 35px; +} +.intro-header.big-img .big-img-transition { + position: absolute; + width: 100%; + height: 100%; + opacity: 0; + background: no-repeat center center; + -webkit-background-size: cover; + -moz-background-size: cover; + background-size: cover; + -o-background-size: cover; + -webkit-transition: opacity 1s linear; + -moz-transition: opacity 1s linear; + transition: opacity 1s linear; +} +.intro-header .page-heading { + text-align: center; +} +.intro-header.big-img .page-heading, +.intro-header.big-img .post-heading { + padding: 100px 0; + color: #FFF; + text-shadow: 1px 1px 3px #000; +} +.intro-header .page-heading h1 { + margin-top: 0; + font-size: 50px; +} +.intro-header .post-heading h1 { + margin-top: 0; + font-size: 35px; +} +.intro-header .page-heading .page-subheading, +.intro-header .post-heading .post-subheading { + font-size: 27px; + line-height: 1.1; + display: block; + font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-weight: 300; + margin: 10px 0 0; +} +.intro-header .post-heading .post-subheading { + margin-bottom: 20px; +} +.intro-header.big-img .page-heading .page-subheading, +.intro-header.big-img .post-heading .post-subheading { + font-weight: 400; +} +.intro-header.big-img .page-heading hr { + box-shadow: 1px 1px 3px #000; + -webkit-box-shadow: 1px 1px 3px #000; + -moz-box-shadow: 1px 1px 3px #000; +} +.intro-header.big-img .post-heading .post-meta { + color: #EEE; +} +.intro-header.big-img .img-desc { + background: rgba(30, 30, 30, 0.6); + position: absolute; + padding: 5px 10px; + font-size: 11px; + color: #EEE; + font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; + right: 0; + bottom: 0; + display: none; +} +@media only screen and (min-width: 768px) { + .intro-header { + margin-top: 130px; + } + .intro-header.big-img { + margin-top: 91px; /* Full navbar is small navbar + 20px padding on each side when expanded */ + } + .intro-header.big-img .page-heading, + .intro-header.big-img .post-heading { + padding: 150px 0; + } + .intro-header .page-heading h1 { + font-size: 80px; + } + .intro-header .post-heading h1 { + font-size: 50px; + } + .intro-header.big-img .img-desc { + font-size: 14px; + } +} + +.header-section.has-img .no-img { + margin-top: 0; + background: #FCFCFC; + margin: 0 0 40px; + padding: 20px 0; + box-shadow: 0 0 5px #AAA; +} +/* Many phones are 320 or 360px, so make sure images are a proper aspect ratio in those cases */ +.header-section.has-img .intro-header.no-img { + display: none; +} +@media only screen and (max-width: 365px) { + .header-section.has-img .intro-header.no-img { + display: block; + } + .intro-header.big-img { + width: 100%; + height: 220px; + } + .intro-header.big-img .page-heading, + .intro-header.big-img .post-heading { + display: none; + } + .header-section.has-img .big-img { + margin-bottom: 0; + } +} +@media only screen and (max-width: 325px) { + .intro-header.big-img { + height: 200px; + } +} + +.caption { + text-align: center; + font-size: 14px; + padding: 10px; + font-style: italic; + margin: 0; + display: block; + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; +} + +/* --- Pager --- */ + +.pager li a { + font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; + text-transform: uppercase; + font-size: 14px; + font-weight: 800; + letter-spacing: 1px; + padding: 10px 5px; + background: #FFF; + border-radius: 0; + color: #404040; +} +@media only screen and (min-width: 768px) { + .pager li a { + padding: 15px 25px; + } +} +.pager li a:hover, +.pager li a:focus { + color: #FFF; + background: #0085a1; + border: 1px solid #0085a1; +} + +.pager { + margin: 10px 0 0; +} + +.pager.blog-pager { + margin-top: 0; +} + +@media only screen and (min-width: 768px) { + .pager.blog-pager { + margin-top: 10px; + } +} + +/* --- Tables --- */ + +table { + padding: 0; +} +table tr { + border-top: 1px solid #cccccc; + background-color: #ffffff; + margin: 0; + padding: 0; +} +table tr:nth-child(2n) { + background-color: #f8f8f8; +} +table tr th { + font-weight: bold; + border: 1px solid #cccccc; + text-align: left; + margin: 0; + padding: 6px 13px; +} +table tr td { + border: 1px solid #cccccc; + text-align: left; + margin: 0; + padding: 6px 13px; +} +table tr th :first-child, +table tr td :first-child { + margin-top: 0; +} +table tr th :last-child, +table tr td :last-child { + margin-bottom: 0; +} + +/* --- Code blocks --- */ + +pre { + font-size: 16px; + line-height: 1.5em; +} +pre code { + white-space: pre; +} +pre.highlight, .highlight > pre, td.code pre { + background: #FAFAFA; + background-image: linear-gradient(#F9F9F9 50%, #FDFDFD 50%); + background-repeat: repeat; + background-size: 3em 3em; + background-position: 0px 10px; + border-left: 7px solid #444; +} +code table, code table td, code table th, code table tbody, code table tr, +td.gutter pre { + padding: 0; + border: none; + background-color: #fff; +} +.highlight > pre { + padding: 0; +} +td.code pre { + border-width: 0 0 0 2px; + border-style: solid; + border-color: #444; + border-radius: 0; +} +td.gutter { + padding-top: 3px; +} + +/* --- Social media sharing section --- */ + +#social-share-section { + margin-bottom: 30px; +} + +/* --- Google Custom Search Engine Popup --- */ +#modalSearch table tr, #modalSearch table tr td, #modalSearch table tr th { + border:none; +} +.reset-box-sizing, .reset-box-sizing *, .reset-box-sizing *:before, .reset-box-sizing *:after, .gsc-inline-block { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +input.gsc-input, .gsc-input-box, .gsc-input-box-hover, .gsc-input-box-focus, .gsc-search-button { + box-sizing: content-box; + line-height: normal; +} diff --git a/themes/beautifulhugo/static/css/pygment_highlights.css b/themes/beautifulhugo/static/css/pygment_highlights.css new file mode 100644 index 0000000..015cf7c --- /dev/null +++ b/themes/beautifulhugo/static/css/pygment_highlights.css @@ -0,0 +1,66 @@ +/* .highlight { background: #ffffff; } */ +/* .highlight pre { background-color: #fff; font-size: 16px } */ +.highlight .c { color: #999988; font-style: italic } /* Comment */ +.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.highlight .k { font-weight: bold } /* Keyword */ +.highlight .o { font-weight: bold } /* Operator */ +.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ +.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ +.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #aa0000 } /* Generic.Error */ +.highlight .gh { color: #999999 } /* Generic.Heading */ +.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ +.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #555555 } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #aaaaaa } /* Generic.Subheading */ +.highlight .gt { color: #aa0000 } /* Generic.Traceback */ +.highlight .kc { font-weight: bold } /* Keyword.Constant */ +.highlight .kd { font-weight: bold } /* Keyword.Declaration */ +.highlight .kp { font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #009999 } /* Literal.Number */ +.highlight .s { color: #d14 } /* Literal.String */ +.highlight .na { color: #008080 } /* Name.Attribute */ +.highlight .nb { color: #0086B3 } /* Name.Builtin */ +.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ +.highlight .no { color: #008080 } /* Name.Constant */ +.highlight .ni { color: #800080 } /* Name.Entity */ +.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ +.highlight .nn { color: #555555 } /* Name.Namespace */ +.highlight .nt { color: #000080 } /* Name.Tag */ +.highlight .nv { color: #008080 } /* Name.Variable */ +.highlight .ow { font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mf { color: #009999 } /* Literal.Number.Float */ +.highlight .mh { color: #009999 } /* Literal.Number.Hex */ +.highlight .mi { color: #009999 } /* Literal.Number.Integer */ +.highlight .mo { color: #009999 } /* Literal.Number.Oct */ +.highlight .sb { color: #d14 } /* Literal.String.Backtick */ +.highlight .sc { color: #d14 } /* Literal.String.Char */ +.highlight .sd { color: #d14 } /* Literal.String.Doc */ +.highlight .s2 { color: #d14 } /* Literal.String.Double */ +.highlight .se { color: #d14 } /* Literal.String.Escape */ +.highlight .sh { color: #d14 } /* Literal.String.Heredoc */ +.highlight .si { color: #d14 } /* Literal.String.Interpol */ +.highlight .sx { color: #d14 } /* Literal.String.Other */ +.highlight .sr { color: #009926 } /* Literal.String.Regex */ +.highlight .s1 { color: #d14 } /* Literal.String.Single */ +.highlight .ss { color: #990073 } /* Literal.String.Symbol */ +.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #008080 } /* Name.Variable.Class */ +.highlight .vg { color: #008080 } /* Name.Variable.Global */ +.highlight .vi { color: #008080 } /* Name.Variable.Instance */ +.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ + +/* Make line numbers unselectable: excludes line numbers from copy-paste user ops */ +.highlight .lineno {color:rgba(0,0,0,0.3);padding: 0 10px;-webkit-user-select: none;-moz-user-select: none; -o-user-select: none;} +.lineno::-moz-selection {background-color: transparent;} /* Mozilla specific */ +.lineno::selection {background-color: transparent;} /* Other major browsers */ diff --git a/themes/beautifulhugo/static/img/404-southpark.jpg b/themes/beautifulhugo/static/img/404-southpark.jpg new file mode 100644 index 0000000..354eb12 Binary files /dev/null and b/themes/beautifulhugo/static/img/404-southpark.jpg differ diff --git a/themes/beautifulhugo/static/img/avatar-favicon.png b/themes/beautifulhugo/static/img/avatar-favicon.png new file mode 100644 index 0000000..e567046 Binary files /dev/null and b/themes/beautifulhugo/static/img/avatar-favicon.png differ diff --git a/themes/beautifulhugo/static/img/avatar-icon.png b/themes/beautifulhugo/static/img/avatar-icon.png new file mode 100644 index 0000000..a150efb Binary files /dev/null and b/themes/beautifulhugo/static/img/avatar-icon.png differ diff --git a/themes/beautifulhugo/static/img/favicon.ico b/themes/beautifulhugo/static/img/favicon.ico new file mode 100644 index 0000000..523bc99 Binary files /dev/null and b/themes/beautifulhugo/static/img/favicon.ico differ diff --git a/themes/beautifulhugo/static/img/favicon.ico.zip b/themes/beautifulhugo/static/img/favicon.ico.zip new file mode 100644 index 0000000..8c6f17e Binary files /dev/null and b/themes/beautifulhugo/static/img/favicon.ico.zip differ diff --git a/themes/beautifulhugo/static/img/hexagon-thumb.jpg b/themes/beautifulhugo/static/img/hexagon-thumb.jpg new file mode 100644 index 0000000..2572be9 Binary files /dev/null and b/themes/beautifulhugo/static/img/hexagon-thumb.jpg differ diff --git a/themes/beautifulhugo/static/img/hexagon.jpg b/themes/beautifulhugo/static/img/hexagon.jpg new file mode 100644 index 0000000..cf244bb Binary files /dev/null and b/themes/beautifulhugo/static/img/hexagon.jpg differ diff --git a/themes/beautifulhugo/static/img/path.jpg b/themes/beautifulhugo/static/img/path.jpg new file mode 100644 index 0000000..5855c09 Binary files /dev/null and b/themes/beautifulhugo/static/img/path.jpg differ diff --git a/themes/beautifulhugo/static/img/sphere-thumb.jpg b/themes/beautifulhugo/static/img/sphere-thumb.jpg new file mode 100644 index 0000000..fa5e2ee Binary files /dev/null and b/themes/beautifulhugo/static/img/sphere-thumb.jpg differ diff --git a/themes/beautifulhugo/static/img/sphere.jpg b/themes/beautifulhugo/static/img/sphere.jpg new file mode 100644 index 0000000..820cf7e Binary files /dev/null and b/themes/beautifulhugo/static/img/sphere.jpg differ diff --git a/themes/beautifulhugo/static/img/triangle-thumb.jpg b/themes/beautifulhugo/static/img/triangle-thumb.jpg new file mode 100644 index 0000000..8eb0761 Binary files /dev/null and b/themes/beautifulhugo/static/img/triangle-thumb.jpg differ diff --git a/themes/beautifulhugo/static/img/triangle.jpg b/themes/beautifulhugo/static/img/triangle.jpg new file mode 100644 index 0000000..2dfbcec Binary files /dev/null and b/themes/beautifulhugo/static/img/triangle.jpg differ diff --git a/themes/beautifulhugo/static/js/bootstrap.js b/themes/beautifulhugo/static/js/bootstrap.js new file mode 100644 index 0000000..4139b6f --- /dev/null +++ b/themes/beautifulhugo/static/js/bootstrap.js @@ -0,0 +1,2306 @@ +/*! + * Bootstrap v3.3.2 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +if (typeof jQuery === 'undefined') { + throw new Error('Bootstrap\'s JavaScript requires jQuery') +} + ++function ($) { + 'use strict'; + var version = $.fn.jquery.split(' ')[0].split('.') + if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) { + throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher') + } +}(jQuery); + +/* ======================================================================== + * Bootstrap: transition.js v3.3.2 + * http://getbootstrap.com/javascript/#transitions + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) + // ============================================================ + + function transitionEnd() { + var el = document.createElement('bootstrap') + + var transEndEventNames = { + WebkitTransition : 'webkitTransitionEnd', + MozTransition : 'transitionend', + OTransition : 'oTransitionEnd otransitionend', + transition : 'transitionend' + } + + for (var name in transEndEventNames) { + if (el.style[name] !== undefined) { + return { end: transEndEventNames[name] } + } + } + + return false // explicit for ie8 ( ._.) + } + + // http://blog.alexmaccaw.com/css-transitions + $.fn.emulateTransitionEnd = function (duration) { + var called = false + var $el = this + $(this).one('bsTransitionEnd', function () { called = true }) + var callback = function () { if (!called) $($el).trigger($.support.transition.end) } + setTimeout(callback, duration) + return this + } + + $(function () { + $.support.transition = transitionEnd() + + if (!$.support.transition) return + + $.event.special.bsTransitionEnd = { + bindType: $.support.transition.end, + delegateType: $.support.transition.end, + handle: function (e) { + if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) + } + } + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: alert.js v3.3.2 + * http://getbootstrap.com/javascript/#alerts + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // ALERT CLASS DEFINITION + // ====================== + + var dismiss = '[data-dismiss="alert"]' + var Alert = function (el) { + $(el).on('click', dismiss, this.close) + } + + Alert.VERSION = '3.3.2' + + Alert.TRANSITION_DURATION = 150 + + Alert.prototype.close = function (e) { + var $this = $(this) + var selector = $this.attr('data-target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 + } + + var $parent = $(selector) + + if (e) e.preventDefault() + + if (!$parent.length) { + $parent = $this.closest('.alert') + } + + $parent.trigger(e = $.Event('close.bs.alert')) + + if (e.isDefaultPrevented()) return + + $parent.removeClass('in') + + function removeElement() { + // detach from parent, fire event then clean up data + $parent.detach().trigger('closed.bs.alert').remove() + } + + $.support.transition && $parent.hasClass('fade') ? + $parent + .one('bsTransitionEnd', removeElement) + .emulateTransitionEnd(Alert.TRANSITION_DURATION) : + removeElement() + } + + + // ALERT PLUGIN DEFINITION + // ======================= + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.alert') + + if (!data) $this.data('bs.alert', (data = new Alert(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + var old = $.fn.alert + + $.fn.alert = Plugin + $.fn.alert.Constructor = Alert + + + // ALERT NO CONFLICT + // ================= + + $.fn.alert.noConflict = function () { + $.fn.alert = old + return this + } + + + // ALERT DATA-API + // ============== + + $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: button.js v3.3.2 + * http://getbootstrap.com/javascript/#buttons + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // BUTTON PUBLIC CLASS DEFINITION + // ============================== + + var Button = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, Button.DEFAULTS, options) + this.isLoading = false + } + + Button.VERSION = '3.3.2' + + Button.DEFAULTS = { + loadingText: 'loading...' + } + + Button.prototype.setState = function (state) { + var d = 'disabled' + var $el = this.$element + var val = $el.is('input') ? 'val' : 'html' + var data = $el.data() + + state = state + 'Text' + + if (data.resetText == null) $el.data('resetText', $el[val]()) + + // push to event loop to allow forms to submit + setTimeout($.proxy(function () { + $el[val](data[state] == null ? this.options[state] : data[state]) + + if (state == 'loadingText') { + this.isLoading = true + $el.addClass(d).attr(d, d) + } else if (this.isLoading) { + this.isLoading = false + $el.removeClass(d).removeAttr(d) + } + }, this), 0) + } + + Button.prototype.toggle = function () { + var changed = true + var $parent = this.$element.closest('[data-toggle="buttons"]') + + if ($parent.length) { + var $input = this.$element.find('input') + if ($input.prop('type') == 'radio') { + if ($input.prop('checked') && this.$element.hasClass('active')) changed = false + else $parent.find('.active').removeClass('active') + } + if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') + } else { + this.$element.attr('aria-pressed', !this.$element.hasClass('active')) + } + + if (changed) this.$element.toggleClass('active') + } + + + // BUTTON PLUGIN DEFINITION + // ======================== + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.button') + var options = typeof option == 'object' && option + + if (!data) $this.data('bs.button', (data = new Button(this, options))) + + if (option == 'toggle') data.toggle() + else if (option) data.setState(option) + }) + } + + var old = $.fn.button + + $.fn.button = Plugin + $.fn.button.Constructor = Button + + + // BUTTON NO CONFLICT + // ================== + + $.fn.button.noConflict = function () { + $.fn.button = old + return this + } + + + // BUTTON DATA-API + // =============== + + $(document) + .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + Plugin.call($btn, 'toggle') + e.preventDefault() + }) + .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { + $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: carousel.js v3.3.2 + * http://getbootstrap.com/javascript/#carousel + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // CAROUSEL CLASS DEFINITION + // ========================= + + var Carousel = function (element, options) { + this.$element = $(element) + this.$indicators = this.$element.find('.carousel-indicators') + this.options = options + this.paused = + this.sliding = + this.interval = + this.$active = + this.$items = null + + this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this)) + + this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element + .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) + .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) + } + + Carousel.VERSION = '3.3.2' + + Carousel.TRANSITION_DURATION = 600 + + Carousel.DEFAULTS = { + interval: 5000, + pause: 'hover', + wrap: true, + keyboard: true + } + + Carousel.prototype.keydown = function (e) { + if (/input|textarea/i.test(e.target.tagName)) return + switch (e.which) { + case 37: this.prev(); break + case 39: this.next(); break + default: return + } + + e.preventDefault() + } + + Carousel.prototype.cycle = function (e) { + e || (this.paused = false) + + this.interval && clearInterval(this.interval) + + this.options.interval + && !this.paused + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) + + return this + } + + Carousel.prototype.getItemIndex = function (item) { + this.$items = item.parent().children('.item') + return this.$items.index(item || this.$active) + } + + Carousel.prototype.getItemForDirection = function (direction, active) { + var activeIndex = this.getItemIndex(active) + var willWrap = (direction == 'prev' && activeIndex === 0) + || (direction == 'next' && activeIndex == (this.$items.length - 1)) + if (willWrap && !this.options.wrap) return active + var delta = direction == 'prev' ? -1 : 1 + var itemIndex = (activeIndex + delta) % this.$items.length + return this.$items.eq(itemIndex) + } + + Carousel.prototype.to = function (pos) { + var that = this + var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) + + if (pos > (this.$items.length - 1) || pos < 0) return + + if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" + if (activeIndex == pos) return this.pause().cycle() + + return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos)) + } + + Carousel.prototype.pause = function (e) { + e || (this.paused = true) + + if (this.$element.find('.next, .prev').length && $.support.transition) { + this.$element.trigger($.support.transition.end) + this.cycle(true) + } + + this.interval = clearInterval(this.interval) + + return this + } + + Carousel.prototype.next = function () { + if (this.sliding) return + return this.slide('next') + } + + Carousel.prototype.prev = function () { + if (this.sliding) return + return this.slide('prev') + } + + Carousel.prototype.slide = function (type, next) { + var $active = this.$element.find('.item.active') + var $next = next || this.getItemForDirection(type, $active) + var isCycling = this.interval + var direction = type == 'next' ? 'left' : 'right' + var that = this + + if ($next.hasClass('active')) return (this.sliding = false) + + var relatedTarget = $next[0] + var slideEvent = $.Event('slide.bs.carousel', { + relatedTarget: relatedTarget, + direction: direction + }) + this.$element.trigger(slideEvent) + if (slideEvent.isDefaultPrevented()) return + + this.sliding = true + + isCycling && this.pause() + + if (this.$indicators.length) { + this.$indicators.find('.active').removeClass('active') + var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) + $nextIndicator && $nextIndicator.addClass('active') + } + + var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" + if ($.support.transition && this.$element.hasClass('slide')) { + $next.addClass(type) + $next[0].offsetWidth // force reflow + $active.addClass(direction) + $next.addClass(direction) + $active + .one('bsTransitionEnd', function () { + $next.removeClass([type, direction].join(' ')).addClass('active') + $active.removeClass(['active', direction].join(' ')) + that.sliding = false + setTimeout(function () { + that.$element.trigger(slidEvent) + }, 0) + }) + .emulateTransitionEnd(Carousel.TRANSITION_DURATION) + } else { + $active.removeClass('active') + $next.addClass('active') + this.sliding = false + this.$element.trigger(slidEvent) + } + + isCycling && this.cycle() + + return this + } + + + // CAROUSEL PLUGIN DEFINITION + // ========================== + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.carousel') + var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) + var action = typeof option == 'string' ? option : options.slide + + if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) + if (typeof option == 'number') data.to(option) + else if (action) data[action]() + else if (options.interval) data.pause().cycle() + }) + } + + var old = $.fn.carousel + + $.fn.carousel = Plugin + $.fn.carousel.Constructor = Carousel + + + // CAROUSEL NO CONFLICT + // ==================== + + $.fn.carousel.noConflict = function () { + $.fn.carousel = old + return this + } + + + // CAROUSEL DATA-API + // ================= + + var clickHandler = function (e) { + var href + var $this = $(this) + var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 + if (!$target.hasClass('carousel')) return + var options = $.extend({}, $target.data(), $this.data()) + var slideIndex = $this.attr('data-slide-to') + if (slideIndex) options.interval = false + + Plugin.call($target, options) + + if (slideIndex) { + $target.data('bs.carousel').to(slideIndex) + } + + e.preventDefault() + } + + $(document) + .on('click.bs.carousel.data-api', '[data-slide]', clickHandler) + .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler) + + $(window).on('load', function () { + $('[data-ride="carousel"]').each(function () { + var $carousel = $(this) + Plugin.call($carousel, $carousel.data()) + }) + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: collapse.js v3.3.2 + * http://getbootstrap.com/javascript/#collapse + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // COLLAPSE PUBLIC CLASS DEFINITION + // ================================ + + var Collapse = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, Collapse.DEFAULTS, options) + this.$trigger = $(this.options.trigger).filter('[href="#' + element.id + '"], [data-target="#' + element.id + '"]') + this.transitioning = null + + if (this.options.parent) { + this.$parent = this.getParent() + } else { + this.addAriaAndCollapsedClass(this.$element, this.$trigger) + } + + if (this.options.toggle) this.toggle() + } + + Collapse.VERSION = '3.3.2' + + Collapse.TRANSITION_DURATION = 350 + + Collapse.DEFAULTS = { + toggle: true, + trigger: '[data-toggle="collapse"]' + } + + Collapse.prototype.dimension = function () { + var hasWidth = this.$element.hasClass('width') + return hasWidth ? 'width' : 'height' + } + + Collapse.prototype.show = function () { + if (this.transitioning || this.$element.hasClass('in')) return + + var activesData + var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing') + + if (actives && actives.length) { + activesData = actives.data('bs.collapse') + if (activesData && activesData.transitioning) return + } + + var startEvent = $.Event('show.bs.collapse') + this.$element.trigger(startEvent) + if (startEvent.isDefaultPrevented()) return + + if (actives && actives.length) { + Plugin.call(actives, 'hide') + activesData || actives.data('bs.collapse', null) + } + + var dimension = this.dimension() + + this.$element + .removeClass('collapse') + .addClass('collapsing')[dimension](0) + .attr('aria-expanded', true) + + this.$trigger + .removeClass('collapsed') + .attr('aria-expanded', true) + + this.transitioning = 1 + + var complete = function () { + this.$element + .removeClass('collapsing') + .addClass('collapse in')[dimension]('') + this.transitioning = 0 + this.$element + .trigger('shown.bs.collapse') + } + + if (!$.support.transition) return complete.call(this) + + var scrollSize = $.camelCase(['scroll', dimension].join('-')) + + this.$element + .one('bsTransitionEnd', $.proxy(complete, this)) + .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) + } + + Collapse.prototype.hide = function () { + if (this.transitioning || !this.$element.hasClass('in')) return + + var startEvent = $.Event('hide.bs.collapse') + this.$element.trigger(startEvent) + if (startEvent.isDefaultPrevented()) return + + var dimension = this.dimension() + + this.$element[dimension](this.$element[dimension]())[0].offsetHeight + + this.$element + .addClass('collapsing') + .removeClass('collapse in') + .attr('aria-expanded', false) + + this.$trigger + .addClass('collapsed') + .attr('aria-expanded', false) + + this.transitioning = 1 + + var complete = function () { + this.transitioning = 0 + this.$element + .removeClass('collapsing') + .addClass('collapse') + .trigger('hidden.bs.collapse') + } + + if (!$.support.transition) return complete.call(this) + + this.$element + [dimension](0) + .one('bsTransitionEnd', $.proxy(complete, this)) + .emulateTransitionEnd(Collapse.TRANSITION_DURATION) + } + + Collapse.prototype.toggle = function () { + this[this.$element.hasClass('in') ? 'hide' : 'show']() + } + + Collapse.prototype.getParent = function () { + return $(this.options.parent) + .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') + .each($.proxy(function (i, element) { + var $element = $(element) + this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) + }, this)) + .end() + } + + Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) { + var isOpen = $element.hasClass('in') + + $element.attr('aria-expanded', isOpen) + $trigger + .toggleClass('collapsed', !isOpen) + .attr('aria-expanded', isOpen) + } + + function getTargetFromTrigger($trigger) { + var href + var target = $trigger.attr('data-target') + || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 + + return $(target) + } + + + // COLLAPSE PLUGIN DEFINITION + // ========================== + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.collapse') + var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) + + if (!data && options.toggle && option == 'show') options.toggle = false + if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + var old = $.fn.collapse + + $.fn.collapse = Plugin + $.fn.collapse.Constructor = Collapse + + + // COLLAPSE NO CONFLICT + // ==================== + + $.fn.collapse.noConflict = function () { + $.fn.collapse = old + return this + } + + + // COLLAPSE DATA-API + // ================= + + $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { + var $this = $(this) + + if (!$this.attr('data-target')) e.preventDefault() + + var $target = getTargetFromTrigger($this) + var data = $target.data('bs.collapse') + var option = data ? 'toggle' : $.extend({}, $this.data(), { trigger: this }) + + Plugin.call($target, option) + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: dropdown.js v3.3.2 + * http://getbootstrap.com/javascript/#dropdowns + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // DROPDOWN CLASS DEFINITION + // ========================= + + var backdrop = '.dropdown-backdrop' + var toggle = '[data-toggle="dropdown"]' + var Dropdown = function (element) { + $(element).on('click.bs.dropdown', this.toggle) + } + + Dropdown.VERSION = '3.3.2' + + Dropdown.prototype.toggle = function (e) { + var $this = $(this) + + if ($this.is('.disabled, :disabled')) return + + var $parent = getParent($this) + var isActive = $parent.hasClass('open') + + clearMenus() + + if (!isActive) { + if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { + // if mobile we use a backdrop because click events don't delegate + $('