diff --git a/Dockerfile b/Dockerfile index 10054e0..b05c145 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ RUN apt update -y RUN apt install tree less openssh-server wamerican accountsservice -y RUN useradd -rm -d /home/debian -s /bin/bash -g root -G sudo -u 1000 test RUN service ssh start -COPY . /home/debian +COPY ./enter-bash /home/debian EXPOSE 22 RUN /home/debian/deploy.sh CMD ["/usr/sbin/sshd", "-D"] \ No newline at end of file diff --git a/enter-bash/aside/questions.md b/enter-bash/aside/questions.md new file mode 100644 index 0000000..b3e9668 --- /dev/null +++ b/enter-bash/aside/questions.md @@ -0,0 +1,3 @@ +- Niveau 2 + - Qu'est-ce qu'un système d'exploitation + diff --git a/enter-bash/config.toml b/enter-bash/config.toml new file mode 100644 index 0000000..b361809 --- /dev/null +++ b/enter-bash/config.toml @@ -0,0 +1,46 @@ +baseurl = "https://devops.legaragenumerique.fr/" +contentdir = "content" +layoutdir = "layouts" +publishdir = "public" +title = "Enter Bash" +canonifyurls = true + +DefaultContentLanguage = "fr" +theme = "beautifulhugo" +metaDataFormat = "yaml" +pygmentsUseClasses = true +pygmentCodeFences = true +#disqusShortname = "XXX" +#googleAnalytics = "XXX" + +[Params] + subtitle = "Un jeu pour découvrir Bash" + logo = "img/SIGNALweb.png" + favicon = "img/LOGOweb.png" + dateFormat = "2 January 2 2006" + commit = false + rss = false + 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 = "Le Garage Numérique" + email = "contact@legaragenumerique.fr" + facebook = "garagenumeriqueparis" + gitlab = "garagenum" + twitter = "garagenumerique" + linkedin = "le-garage-num%C3%A9rique" + snapchat = "legarage_num" + instagram = "legaragenum" + + diff --git a/enter-bash/content/_index.md b/enter-bash/content/_index.md new file mode 100644 index 0000000..a9242db --- /dev/null +++ b/enter-bash/content/_index.md @@ -0,0 +1,18 @@ +Pour découvrir bash , + +démarrez un terminal et connectez-vous avec la commande suivante: +**ssh level1@bash.legaragenumerique.fr** + +``` +visiteur@mypc:~$ ssh level1@bash.legaragenumerique.fr +level1@bash.legaragenumerique.fr's password: +``` + +Écrivez le mot de passe: **knj-yhn-576**. + +Rien ne s'affiche, c'est normal, c'est pour que la personne qui regarde derrière votre épaule ne connaisse pas le nombre de caractères du mot de passe. + +Appuyez ensuite sur Entrée pour valider le mot de passe. + + + diff --git a/enter-bash/deploy.sh b/enter-bash/deploy.sh new file mode 100755 index 0000000..1136b4b --- /dev/null +++ b/enter-bash/deploy.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# Execute the script as root + + +### add some packages +apt -y update +apt -y install tree wamerican + +### Création des utilisateurs + + touch /etc/skel/.hushlogin # To suppress /etc/motd and Gandi message + + for i in {1..10} ; do deluser level$i ; delgroup level$i ; rm -Rfv /home/level$i ; done + + # hashes are done with mkpassword -m shA-512 PASSWORD . First column ($ as sep.) is for method, 2nd is for seed, 3 is encrypted pwd. + + useradd -m -s /bin/bash -p '$6$12345678$z6Yi8kgUombQ0LWF6tYGnRpKjqMgm.NULCC03xD6mDMclpCsfSZfVR5ehRTdEgb0i09PVLN51cUTJAyjWZTr41' level1 #knj-yhn-576 + useradd -m -s /bin/bash -p '$6$12345678$QLwlPOpn3lOH988Xamb1GaSSkG5JSIWcrkx.b0sFhPU9ceSpPOSLeE265PX23zXEWF3dz/nbJEDMpIRMW7OB0.' level2 #kbc-209-xdf + useradd -m -s /bin/bash -p '$6$12345678$h4IhZhhMPr/h6gVyWVZwTYFldW/clQwTDdheLhiTKmrgj.vv4KSBTYaOEchzfz73X0hpFjRcE6bDc6l8FXZfW1' level3 #ihj-pli-444 + useradd -m -s /bin/bash -p '$6$eG7L5FVdvn$WnxWH5Cjt.mOUElddKez66cW4SAOQGwslbChK5EiQgac9rDln/c1VYjXjSzY9XrkmeWQCTjgWOtQ4oD9Qly9s/' level4 #bvi-rsk-820 + useradd -m -s /bin/bash -p '$6$qA//d3/4X$KNnEkQiGHzJcahwZdKs6PBgTB7NHDj6QKMWMcErD0qkbltAV6/8QuSym6yGTUs8b3ksPlMHrX2kdWIrUqbidL1' level5 #830-bus-fux + useradd -m -s /bin/bash -p '$6$e1.zNiSsuIB$xYF7oMVVcHoQDLljdcSGN4g/Gj3/TxU1mdHv5LX5gtplOA5RBOMh1Jr.JFcGNPbg1SDjUCit7jpF//2L0m1AV.' level6 #wdo-bou-fun + useradd -m -s /bin/bash -p '$6$P6Olk2sRKl$JUJlERtQxYivrW.igFcg7N0K2p83Ed1RyYws..LrblMLQYopxGApPnjTyAYxOjr75l5O73hFBNie0BneBBvWp/' level7 #ocj-eyf-thc + useradd -m -s /bin/bash -p '$6$CrgxMXpbZDTE6Ta6$iYtpCcmRk9Bo.KSCSzL.99B309ZhD5qgvNr8K3jYz5ugiLknKP6m.hORlfJx2QUfsASeSj4m25vlDX3c4unBV1' level8 #fuf-612-vhi + useradd -m -s /bin/bash -p '$6$2lgI6wKPuF98gNW$fG8kCkaQkxxTEsg/PKnMCdqXblN9UHVSr6xESJlmHA9luUqFm4.zPLCFHDx6IwgTSo95Z9CKLY09q19lkrYNn/' level9 #wqp-230-ang + useradd -m -s /bin/bash -p '$6$qRV0jKJxhWmb$kxs4fKMkLg2diqNdAqPpA8lZ4cW5OoR8Rf7xBnJp1L2btsKDKFpIAA9manXUMsXplmGoEqwjGcBH0QG4ws7nA.' level10 #qpe-fvx-718 + + +for i in {1..10}; do + #bash chmod +x scripts/level$i-init.sh + bash /home/debian/scripts/level$i-init.sh +done + +for i in {1..10}; do chown -Rfv level$i:level$i /home/level$i ; chmod ug+x /home/level$i/.*.sh ; chmod ug+x /home/level$i/*.sh ; chmod -R a-w /home/level$i ; chmod ug+w /home/level8/script.sh; done + +touch /var/lib/AccountsService/users/level{1..10} +for i in /var/lib/AccountsService/users/level{1..10} ; do + cat << EOF >> $i +[User] +Language= +XSession=gnome +SystemAccount=true + +EOF +done diff --git a/enter-bash/scripts/level1-init.sh b/enter-bash/scripts/level1-init.sh new file mode 100644 index 0000000..8e26520 --- /dev/null +++ b/enter-bash/scripts/level1-init.sh @@ -0,0 +1,29 @@ +#!/bin/bash +cat <<- EOF1 >> /home/level1/.bashrc +cat << NestedEOF1 + +Bienvenue! + +Vous avez réussi à vous connecter au serveur! + +Pour passer au niveau 2, il faut écrire la commande suivante: + + su - level2 + +La commande su permet de changer d'utilisateur (Switch User). +N'oubliez pas le "-" (tiret du 6) entre "su" et "level2" + +Appuyez ensuite sur Entrée, et saisissez le mot de passe suivant: + + kbc-209-xdf + + +puis appuyez sur Entrée à nouveau! + + +NestedEOF1 +EOF1 + + + + diff --git a/enter-bash/scripts/level2-init.sh b/enter-bash/scripts/level2-init.sh new file mode 100644 index 0000000..3e1bfcc --- /dev/null +++ b/enter-bash/scripts/level2-init.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +cat <<- EOF1 >> /home/level2/.bashrc +cat << NestedEOF1 + + Super! + + +Bienvenue dans le niveau 2 ! + +Vous êtes en train d'utiliser Linux, un SYSTÈME D'EXPLOITATION OPEN-SOURCE. + +Nous allons apprendre quelques commandes de base pour manipuler le système. + +Commencez par écrire la commande "ls" (ne mettez pas les guillemets) + +Appuyez ensuite sur Entrée + +Vous voyez la liste des fichiers du DOSSIER COURANT + +Le nom de l'un des fichiers est le mot de passe pour le niveau 3. + +Tapez su - level3 puis Entrée et saisissez le mot de passe + + + +NestedEOF1 +EOF1 + + +for i in {1..6} ; do + touch /home/level2/fichier$i ; + cat <<- EOF2 >> /home/level2/fichier$i + + Ceci est le contenu du fichier nommé fichier$i + +EOF2 +done + +for i in {1..3} ; do + mkdir /home/level2/dossier$i ; +done + +touch /home/level2/ihj-pli-444 diff --git a/enter-bash/scripts/level3-init.sh b/enter-bash/scripts/level3-init.sh new file mode 100644 index 0000000..0b31cac --- /dev/null +++ b/enter-bash/scripts/level3-init.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +cat <<- EOF1 >> /home/level3/.bashrc +cat << NestedEOF1 + + + Bravo, vous êtes déjà arrivés au 3eme niveau! + + Nous allons maintenant apprendre à regarder le contenu d'un fichier. + + Avec la commande ls, vous voyer un fichier nommé "README" (Lisez-moi). + + Saisissez la commande suivante pour afficher son contenu: + + cat README + + Écrivez bien README en majuscules + + Connectez-vous maintenant au niveau 4 avec la commande + + su - level4 + +NestedEOF1 +EOF1 + +touch /home/level3/README +echo "mot de passe : bvi-rsk-820" > /home/level3/README + diff --git a/enter-bash/scripts/level4-init.sh b/enter-bash/scripts/level4-init.sh new file mode 100644 index 0000000..d896d10 --- /dev/null +++ b/enter-bash/scripts/level4-init.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +cat <<- EOF1 >> /home/level4/.bashrc +cat << NestedEOF1 + + + Vous êtes au 4eme niveau. + + Certains fichiers sont trop longs être lus avec cat. + + Nous allons utiliser la commande "less" pour naviguer dans le fichier. + + Une fois dans "less", utilisez les flèches haut et bas pour naviquer, + + et appuyez sur q pour quitter. + + Vous trouverez le mot de passe au milieu du fichier. + + Saisissez la commande suivante: + + less README + + Quand vous aurez trouvé le mot de passe, connectez-vous au niveau 5: + + su - level5 + +NestedEOF1 +EOF1 + +touch /home/level4/README + +for i in {1..90} ; do shuf -n4 /usr/share/dict/words |tr '\n' ' ' >> /home/level4/README \ +&& echo ' ' >> /home/level4/README ; done +echo "mot de passe : 830-bus-fux" >> /home/level4/README +for i in {1..90} ; do shuf -n4 /usr/share/dict/words |tr '\n' ' ' >> /home/level4/README \ +&& echo ' ' >> /home/level4/README ; done + + diff --git a/enter-bash/scripts/level5-init.sh b/enter-bash/scripts/level5-init.sh new file mode 100644 index 0000000..e3de05c --- /dev/null +++ b/enter-bash/scripts/level5-init.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +cat <<- EOF1 >> /home/level5/.bashrc +cat << NestedEOF1 + + + Vous êtes au 5eme niveau. + + C'est presque la dernière fois que vous verrez un message d'accueil. + + Il vous faudra désormais lire le contenu du fichier README. + + Saisissez la commande + + less README + + et suivez les indications. + + Appuyez sur la touche q pour quitter less ! + + +NestedEOF1 +EOF1 + +touch /home/level5/README + +cat << EOF2 > /home/level5/README + +Pour trouver le mot de passe du 5ème niveau, + +vous allez exécuter un script. + +Un script, c'est comme un petit logiciel, qui tient dans un seul fichier. + +Pour exécuter un script, on utilise la commande bash, +suivi du nom du fichier. + +Saisissez la commande + + bash script.sh + +et appuyez sur Entrée. Connectez-vous ensuite au niveau 6 avec + + su - level6 + +EOF2 + +touch /home/level5/script.sh +chmod u+x /home/level5/script.sh + +cat << EOF3 > /home/level5/script.sh +#!/bin/bash + +echo " le mot de passe est wdo-810-289-bou-104-910-429-fun " |sed 's/[[:digit:]]\+\-//g' + +EOF3 + + diff --git a/enter-bash/scripts/level6-init.sh b/enter-bash/scripts/level6-init.sh new file mode 100644 index 0000000..d648dfc --- /dev/null +++ b/enter-bash/scripts/level6-init.sh @@ -0,0 +1,38 @@ +echo "echo 'Lisez le README avec la commande less README (q pour quitter) ' " >> /home/level6/.bashrc + +touch /home/level6/README + +cat << EOF2 > /home/level6/README + +Les scripts peuvent aussi être interactifs, et demander à l'utilisateur +de confirmer une action ou d'écrire une information. + +Éxecutez le script présent dans le dossier avec la commande: + +bash script.sh + +EOF2 + +touch /home/level6/script.sh +chmod u+x /home/level6/script.sh + +cat << 'EOF3' > /home/level6/script.sh +#!/bin/bash + + cat <<- 'EOF4' + Pour obtenir le mot de passe, + + Répondez à la question suivante et validez avec Entrée: + + Quel est le système d'exploitation que nous utilisons actuellement? + + EOF4 + +read os_used +os_low="$(echo $os_used |tr [:upper:] [:lower:])" +[[ "$os_low" = "linux" ]] \ +&& printf "\nC'est bien ça ! \n\nle mot de passe du niveau 7 est ocj-728-289-eyf-267-108-thc \n\nConnectez-vous avec le commande \n\n su - level7 \n" |sed 's/[[:digit:]]\+\-//g' \ +|| printf "Non, ce n\'est pas $os_low, relancez le script pour essayer à nouveau\n" + + +EOF3 diff --git a/enter-bash/scripts/level7-init.sh b/enter-bash/scripts/level7-init.sh new file mode 100644 index 0000000..9a4ebb0 --- /dev/null +++ b/enter-bash/scripts/level7-init.sh @@ -0,0 +1,32 @@ +echo "echo 'Lisez le README avec la commande less README' \(q pour quitter\)" >> /home/level7/.bashrc + +touch /home/level7/README + +cat << EOF1 > /home/level7/README + +La différence entre un script et un logiciel classique, c'est qu'un script, +ça tient dans un seul fichier, dont on peut lire le contenu. + +Pour lire le contenu du script, c'est pareil que pour lire le contenu du +README, mais en remplaçant README dans la commande par le nom du script. + +Pour accéder, au niveau 8, lisez le contenu du script nommé script.sh + +EOF1 + + + +touch /home/level7/script.sh + +cat << 'EOF2' > /home/level7/script.sh +#!/bin/bash + +# Ceci est un script +# Les lignes commençant par '#' ne sont pas 'interprétées', c'est-à-dire +# que les commandes qu'elles contiennent ne sont pas exécutées. +# Cela permet d'écrire des commentaires ou des explications dans le script. + +echo " Le mot de passe du niveau 8 est fuf-612-vhi" + + +EOF2 diff --git a/enter-bash/scripts/level8-init.sh b/enter-bash/scripts/level8-init.sh new file mode 100644 index 0000000..607420a --- /dev/null +++ b/enter-bash/scripts/level8-init.sh @@ -0,0 +1,104 @@ +echo "echo 'Devenez Technicien DevOps'" >> /home/level8/.bashrc + +touch /home/level8/README + +cat < /home/level8/README + +Le Technicien DevOps c'est quelqu'un qui peut utiliser et écrire des scripts + +pour faciliter la maintenance des ordinateurs et des serveurs. + + +Commencez dès maintenant à "débuguer", c'est à dire à trouver le problème + +dans le code-source du script (le contenu du fichier) ! + + + +1/ Essayez d'exécuter le script nommé script.sh à l'aide de la commande: + + bash script.sh + +Vous verrez qu'il y a une erreur qui s'affiche, alors que le script devrait +nous afficher le mot de passe pour le niveau 9... + + + +2/ Lisez alors le contenu du script (son code-source) avec less: + + less script.sh + + + +3/ Quand vous aurez trouvé l'erreur, exécutez un autre script, nommé debug.sh: + + bash debug.sh + + +Avec ça, vous devriez pouvoir passer au niveau 9 ! + + +EOF1 + + +touch /home/level8/script.sh +touch /home/level8/.clear.sh +cat <<- 'EOF2' > /home/level8/.clear.sh + + + SECRET2=$(echo `cat /dev/urandom |tr -dc [:alnum:] |fold -w 3 |head -n10` wqp `cat /dev/urandom |tr -dc [:alnum:] |fold -w 3 |head -n10` 230 `cat /dev/urandom |tr -dc [:alnum:] |fold -w 3 |head -n10` ang) + cat << 'EOF3' > /home/level8/script.sh + Voici un script permettant d\'afficher le mot de passe du niveau 9 && + . .clear.sh && echo $SECRET2 |sed -e "s/ /-/g" |cut -d- -f11,22,33 && bash ./.clear.sh && exit +EOF3 + +EOF2 + +bash /home/level8/.clear.sh + + +touch /home/level8/debug.sh +cat << 'EOF4' > /home/level8/debug.sh + + cat <<- 'EOF5' + + Quel est le caractère à ajouter au début de la 1ère ligne du script + + pour qu'il fonctionne ? + + Répondez et validez avec Entrée: + +EOF5 + + +PASS=" + +Féliciations ! + Vous avez corrigés le script ! + + Exécutez le à nouveau avec la commande: + + bash script.sh + +" + +TRY=" + + Ce n'est pas ça ! + + Lisez à nouveau le fichier pour trouver l'erreur : + + less script.sh + + puis exécutez à nouveau ce script: + + bash debug.sh + +" + +read CHAR + +[[ $CHAR == "#" ]] && sed "1s/^/# /" /home/level8/script.sh > /tmp/script.sh && cat /tmp/script.sh > /home/level8/script.sh && rm -f /tmp/sript.sh && echo "${PASS}" || echo "${TRY}" + +EOF4 + diff --git a/enter-bash/scripts/level9-init.sh b/enter-bash/scripts/level9-init.sh new file mode 100644 index 0000000..56ed4b3 --- /dev/null +++ b/enter-bash/scripts/level9-init.sh @@ -0,0 +1,14 @@ +cat <> /home/level9/.bashrc + +cat < + + + + + + + + {{ .Site.Title }} + + + + + {{ partial "head_includes.html" . }} + + + + {{ partial "sidebar.html" . }} + + +
+
+
+

+ Home +

+
+
+ + +
+

This is a Blog made by Hugo

+ +

Welcome to my blog!

+ +

This is really just a bare-bone website to stand as a template for + creating a blog that is statically generated by Hugo + and hosted on GitLab via GitLab Pages.

+ +

It's using a slightly modified version of the Lanyon + Jekyll theme.

+ + +

About me

+ +

Sometimes people have an "About me" section on the homepage of their website.

+ + + +

Recent Posts

+
+
    + {{ range first 10 .Data.Pages }} + {{ .Render "summary"}} + {{ end }} +
+
+
+
+ + + +{{ partial "footer.html" . }} diff --git a/enter-bash/themes/Lanyon/layouts/indexes/category.html b/enter-bash/themes/Lanyon/layouts/indexes/category.html new file mode 100644 index 0000000..2869bf0 --- /dev/null +++ b/enter-bash/themes/Lanyon/layouts/indexes/category.html @@ -0,0 +1,56 @@ + + + +{{ partial "header.html" . }} + + + {{ partial "sidebar.html" . }} + + +
+
+
+

+ Blog Posts +

+
+
+ + +
+

Recent Posts

+
+
+
Full Category Index
+

Posts in “{{ .Title }}”

+ {{ range .Data.Pages }} + {{ .Render "summary"}} + {{ end }} +
+
+ +
+
+ + + + + {{ partial "footer.html" }} + + + diff --git a/enter-bash/themes/Lanyon/layouts/indexes/indexes.html b/enter-bash/themes/Lanyon/layouts/indexes/indexes.html new file mode 100644 index 0000000..7865821 --- /dev/null +++ b/enter-bash/themes/Lanyon/layouts/indexes/indexes.html @@ -0,0 +1,52 @@ + + +{{ partial "header.html" . }} + + + {{ partial "sidebar.html" . }} + + +
+
+
+

+ Blog Posts +

+
+
+ + +
+
+
+

Archive of Posts, by {{ .Data.Singular }}

+
    + {{ $data := .Data }} + {{ range $key,$value := .Data.Index.ByCount }} +
  • {{ $value.Name }} ({{ $value.Count }} entries)
  • + {{ end }} +
+
+
+
+
+ + + + + {{ partial "footer.html" }} + + + diff --git a/enter-bash/themes/Lanyon/layouts/indexes/posts.html b/enter-bash/themes/Lanyon/layouts/indexes/posts.html new file mode 100644 index 0000000..05e8e33 --- /dev/null +++ b/enter-bash/themes/Lanyon/layouts/indexes/posts.html @@ -0,0 +1,46 @@ + + +{{ partial "header.html" . }} + + + {{ partial "sidebar.html" . }} + + +
+
+
+

+ Blog Posts +

+
+
+ + +
+

Here are all my blog posts, in descending order by creation date. If you would like to view them by topic, see the Categories page.

+

All Blog Posts (By Date)

+
+
    + {{ range .Data.Pages }} + {{ .Render "li"}} + {{ end }} +
+
+
+
+ + + + + {{ partial "footer.html" }} + + + diff --git a/enter-bash/themes/Lanyon/layouts/partials/categories.html b/enter-bash/themes/Lanyon/layouts/partials/categories.html new file mode 100644 index 0000000..0444f62 --- /dev/null +++ b/enter-bash/themes/Lanyon/layouts/partials/categories.html @@ -0,0 +1,12 @@ + +
+
    +
  • Categories:
  • + {{ range .Params.categories }} +
  • {{ . }}
  • + {{ end }} +
+
diff --git a/enter-bash/themes/Lanyon/layouts/partials/footer.html b/enter-bash/themes/Lanyon/layouts/partials/footer.html new file mode 100644 index 0000000..bdf453c --- /dev/null +++ b/enter-bash/themes/Lanyon/layouts/partials/footer.html @@ -0,0 +1,27 @@ + + +
+
+
+

+ Fancy footer here. Link to Home Page +

+
+
+
+ + + + + diff --git a/enter-bash/themes/Lanyon/layouts/partials/ga.html b/enter-bash/themes/Lanyon/layouts/partials/ga.html new file mode 100644 index 0000000..a4629fd --- /dev/null +++ b/enter-bash/themes/Lanyon/layouts/partials/ga.html @@ -0,0 +1,17 @@ + + diff --git a/enter-bash/themes/Lanyon/layouts/partials/head_includes.html b/enter-bash/themes/Lanyon/layouts/partials/head_includes.html new file mode 100644 index 0000000..14e152d --- /dev/null +++ b/enter-bash/themes/Lanyon/layouts/partials/head_includes.html @@ -0,0 +1,13 @@ + + + + + + diff --git a/enter-bash/themes/Lanyon/layouts/partials/header.html b/enter-bash/themes/Lanyon/layouts/partials/header.html new file mode 100644 index 0000000..c71ac9b --- /dev/null +++ b/enter-bash/themes/Lanyon/layouts/partials/header.html @@ -0,0 +1,16 @@ + + + + + + + + {{ .Title }} + + {{ partial "head_includes.html" . }} + diff --git a/enter-bash/themes/Lanyon/layouts/partials/prev_next.html b/enter-bash/themes/Lanyon/layouts/partials/prev_next.html new file mode 100644 index 0000000..833d065 --- /dev/null +++ b/enter-bash/themes/Lanyon/layouts/partials/prev_next.html @@ -0,0 +1,29 @@ + + +
+
+
+ {{if .Prev}} + +   « Previous: + + {{end}} + + {{if .Next}} + + Next: » + + {{end}} +
diff --git a/enter-bash/themes/Lanyon/layouts/partials/sidebar.html b/enter-bash/themes/Lanyon/layouts/partials/sidebar.html new file mode 100644 index 0000000..32a2572 --- /dev/null +++ b/enter-bash/themes/Lanyon/layouts/partials/sidebar.html @@ -0,0 +1,29 @@ + + + + + + + diff --git a/enter-bash/themes/Lanyon/layouts/posts/li.html b/enter-bash/themes/Lanyon/layouts/posts/li.html new file mode 100644 index 0000000..166cba7 --- /dev/null +++ b/enter-bash/themes/Lanyon/layouts/posts/li.html @@ -0,0 +1,26 @@ + +
  • +

    {{ .Title }}

    + {{ .Date.Format "Mon, Jan 2, 2006" }} + +
      + {{ range .Params.categories }} +
    • {{ . }}
    • + {{ end }} +
    +
    + +
    + {{ .Description }} +
  • diff --git a/enter-bash/themes/Lanyon/layouts/posts/single.html b/enter-bash/themes/Lanyon/layouts/posts/single.html new file mode 100644 index 0000000..e6b4553 --- /dev/null +++ b/enter-bash/themes/Lanyon/layouts/posts/single.html @@ -0,0 +1,51 @@ + + +{{ partial "header.html" . }} + + + {{ partial "sidebar.html" . }} + + +
    +
    +
    +

    + Blog Posts +

    +
    +
    + + +
    +

    {{ .Title }}

    +
    +
    {{ .Date.Format "Mon Jan 2, 2006" }}
    + {{ .Content }} +
    +
    +
    + + + + {{ partial "prev_next.html" . }} +
    + {{ partial "categories.html" . }} + + + + {{ partial "footer.html" }} + + + diff --git a/enter-bash/themes/Lanyon/layouts/posts/summary.html b/enter-bash/themes/Lanyon/layouts/posts/summary.html new file mode 100644 index 0000000..5021ca9 --- /dev/null +++ b/enter-bash/themes/Lanyon/layouts/posts/summary.html @@ -0,0 +1,24 @@ + + + diff --git a/enter-bash/themes/Lanyon/static/css/lanyon.css b/enter-bash/themes/Lanyon/static/css/lanyon.css new file mode 100644 index 0000000..721c9d3 --- /dev/null +++ b/enter-bash/themes/Lanyon/static/css/lanyon.css @@ -0,0 +1,527 @@ +/* + * ___ + * /\_ \ + * \//\ \ __ ___ __ __ ___ ___ + * \ \ \ /'__`\ /' _ `\/\ \/\ \ / __`\ /' _ `\ + * \_\ \_/\ \_\.\_/\ \/\ \ \ \_\ \/\ \_\ \/\ \/\ \ + * /\____\ \__/.\_\ \_\ \_\/`____ \ \____/\ \_\ \_\ + * \/____/\/__/\/_/\/_/\/_/`/___/> \/___/ \/_/\/_/ + * /\___/ + * \/__/ + * + * Designed, built, and released under MIT license by @mdo. Learn more at + * https://github.com/poole/lanyon. + */ + + +/* + * Contents + * + * Global resets + * Masthead + * Sidebar + * Slide effect + * Posts and pages + * Pagination + * Reverse layout + * Themes + */ + + +/* + * Global resets + * + * Update the foundational and global aspects of the page. + */ + +/* Prevent scroll on narrow devices */ +html, +body { + overflow-x: hidden; +} + +html { + font-family: "PT Serif", Georgia, "Times New Roman", serif; +} + +h1, h2, h3, h4, h5, h6 { + font-family: "PT Sans", Helvetica, Arial, sans-serif; + font-weight: 400; + color: #313131; + letter-spacing: -.025rem; +} + + +/* + * Wrapper + * + * The wrapper is used to position site content when the sidebar is toggled. We + * use an outter wrap to position the sidebar without interferring with the + * regular page content. + */ + +.wrap { + position: relative; + width: 100%; +} + + +/* + * Container + * + * Center the page content. + */ + +.container { + max-width: 28rem; +} +@media (min-width: 38rem) { + .container { + max-width: 32rem; + } +} +@media (min-width: 56rem) { + .container { + max-width: 38rem; + } +} + + +/* + * Masthead + * + * Super small header above the content for site name and short description. + */ + +.masthead { + padding-top: 1rem; + padding-bottom: 1rem; + margin-bottom: 3rem; + border-bottom: 1px solid #eee; +} +.masthead-title { + margin-top: 0; + margin-bottom: 0; + color: #505050; +} +.masthead-title a { + color: #505050; +} +.masthead-title small { + font-size: 75%; + font-weight: 400; + color: #c0c0c0; + letter-spacing: 0; +} + +@media (max-width: 48rem) { + .masthead-title { + text-align: center; + } + .masthead-title small { + display: none; + } +} + + +/* + * Sidebar + * + * The sidebar is the drawer, the item we are toggling with our handy hamburger + * button in the corner of the page. + * + * This particular sidebar implementation was inspired by Chris Coyier's + * "Offcanvas Menu with CSS Target" article, and the checkbox variation from the + * comments by a reader. It modifies both implementations to continue using the + * checkbox (no change in URL means no polluted browser history), but this uses + * `position` for the menu to avoid some potential content reflow issues. + * + * Source: http://css-tricks.com/off-canvas-menu-with-css-target/#comment-207504 + */ + +/* Style and "hide" the sidebar */ +.sidebar { + position: fixed; + top: 0; + bottom: 0; + left: -14rem; + width: 14rem; + visibility: hidden; + overflow-y: auto; + font-family: "PT Sans", Helvetica, Arial, sans-serif; + font-size: .875rem; /* 15px */ + color: rgba(255,255,255,.6); + background-color: #202020; + -webkit-transition: all .3s ease-in-out; + transition: all .3s ease-in-out; +} +@media (min-width: 30rem) { + .sidebar { + font-size: .75rem; /* 14px */ + } +} + +/* Sidebar content */ +.sidebar a { + font-weight: normal; + color: #fff; +} +.sidebar-item { + padding: 1rem; +} +.sidebar-item p:last-child { + margin-bottom: 0; +} + +/* Sidebar nav */ +.sidebar-nav { + border-bottom: 1px solid rgba(255,255,255,.1); +} +.sidebar-nav-item { + display: block; + padding: .5rem 1rem; + border-top: 1px solid rgba(255,255,255,.1); +} +.sidebar-nav-item.active, +a.sidebar-nav-item:hover, +a.sidebar-nav-item:focus { + text-decoration: none; + background-color: rgba(255,255,255,.1); + border-color: transparent; +} + +@media (min-width: 48rem) { + .sidebar-item { + padding: 1.5rem; + } + .sidebar-nav-item { + padding-left: 1.5rem; + padding-right: 1.5rem; + } +} + +/* Hide the sidebar checkbox that we toggle with `.sidebar-toggle` */ +.sidebar-checkbox { + display: none; +} + +/* Style the `label` that we use to target the `.sidebar-checkbox` */ +.sidebar-toggle { + position: absolute; + top: 1rem; + left: 1rem; + display: block; + width: 2.2rem; + padding: .5rem .65rem; + color: #505050; + background-color: #fff; + border-radius: 4px; + cursor: pointer; +} +.sidebar-toggle:before { + display: block; + content: ""; + width: 100%; + padding-bottom: .125rem; + border-top: .375rem double; + border-bottom: .125rem solid; + + /* Make the border inside the box */ + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.sidebar-toggle:active, +#sidebar-checkbox:checked ~ .sidebar-toggle { + color: #fff; + background-color: #505050; +} + +@media (min-width: 30.1rem) { + .sidebar-toggle { + position: fixed; + width: 2.25rem; + } + .sidebar-toggle:before { + padding-bottom: .15rem; + border-top-width: .45rem; + border-bottom-width: .15rem; + } +} + + +/* Slide effect + * + * Handle the sliding effects of the sidebar and content in one spot, seperate + * from the default styles. + * + * As an a heads up, we don't use `transform: translate3d()` here because when + * mixed with `position: fixed;` for the sidebar toggle, it creates a new + * containing block. Put simply, the fixed sidebar toggle behaves like + * `position: absolute;` when transformed. + * + * Read more about it at http://meyerweb.com/eric/thoughts/2011/09/12/. + */ + +.wrap, +.sidebar, +.sidebar-toggle { + -webkit-backface-visibility: hidden; + -ms-backface-visibility: hidden; + backface-visibility: hidden; +} +.wrap, +.sidebar-toggle { + -webkit-transition: -webkit-transform .3s ease-in-out; + transition: transform .3s ease-in-out; +} + +#sidebar-checkbox:checked + .sidebar { + visibility: visible; +} +#sidebar-checkbox:checked ~ .sidebar, +#sidebar-checkbox:checked ~ .wrap, +#sidebar-checkbox:checked ~ .sidebar-toggle { + -webkit-transform: translateX(14rem); + -ms-transform: translateX(14rem); + transform: translateX(14rem); +} + + +/* + * Posts and pages + * + * Each post is wrapped in `.post` and is used on default and post layouts. Each + * page is wrapped in `.page` and is only used on the page layout. + */ + +.page, +.post { + margin-bottom: 4em; +} + +/* Blog post or page title */ +.page-title, +.post-title, +.post-title a { + color: #303030; +} +.page-title, +.post-title { + margin-top: 0; +} + +/* Meta data line below post title */ +.post-date { + display: block; + margin-top: -.5rem; + margin-bottom: 1rem; + color: #9a9a9a; +} + +/* Related posts */ +.related { + padding-top: 2rem; + padding-bottom: 2rem; + border-top: 1px solid #eee; +} +.related-posts { + padding-left: 0; + list-style: none; +} +.related-posts h3 { + margin-top: 0; +} +.related-posts li small { + font-size: 75%; + color: #999; +} +.related-posts li a:hover { + color: #268bd2; + text-decoration: none; +} +.related-posts li a:hover small { + color: inherit; +} + + +/* + * Pagination + * + * Super lightweight (HTML-wise) blog pagination. `span`s are provide for when + * there are no more previous or next posts to show. + */ + +.pagination { + overflow: hidden; /* clearfix */ + margin-left: -1rem; + margin-right: -1rem; + font-family: "PT Sans", Helvetica, Arial, sans-serif; + color: #ccc; + text-align: center; +} + +/* Pagination items can be `span`s or `a`s */ +.pagination-item { + display: block; + padding: 1rem; + border: 1px solid #eee; +} +.pagination-item:first-child { + margin-bottom: -1px; +} + +/* Only provide a hover state for linked pagination items */ +a.pagination-item:hover { + background-color: #f5f5f5; +} + +@media (min-width: 30rem) { + .pagination { + margin: 3rem 0; + } + .pagination-item { + float: left; + width: 50%; + } + .pagination-item:first-child { + margin-bottom: 0; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + } + .pagination-item:last-child { + margin-left: -1px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + } +} + + +/* + * Reverse layout + * + * Flip the orientation of the page by placing the `.sidebar` and sidebar toggle + * on the right side. + */ + +.layout-reverse .sidebar { + left: auto; + right: -14rem; +} +.layout-reverse .sidebar-toggle { + left: auto; + right: 1rem; +} + +.layout-reverse #sidebar-checkbox:checked ~ .sidebar, +.layout-reverse #sidebar-checkbox:checked ~ .wrap, +.layout-reverse #sidebar-checkbox:checked ~ .sidebar-toggle { + -webkit-transform: translateX(-14rem); + -ms-transform: translateX(-14rem); + transform: translateX(-14rem); +} + + +/* + * Themes + * + * Apply custom color schemes by adding the appropriate class to the `body`. + * Based on colors from Base16: http://chriskempson.github.io/base16/#default. + */ + +/* Red */ +.theme-base-08 .sidebar, +.theme-base-08 .sidebar-toggle:active, +.theme-base-08 #sidebar-checkbox:checked ~ .sidebar-toggle { + background-color: #ac4142; +} +.theme-base-08 .container a, +.theme-base-08 .sidebar-toggle, +.theme-base-08 .related-posts li a:hover { + color: #ac4142; +} + +/* Orange */ +.theme-base-09 .sidebar, +.theme-base-09 .sidebar-toggle:active, +.theme-base-09 #sidebar-checkbox:checked ~ .sidebar-toggle { + background-color: #d28445; +} +.theme-base-09 .container a, +.theme-base-09 .sidebar-toggle, +.theme-base-09 .related-posts li a:hover { + color: #d28445; +} + +/* Yellow */ +.theme-base-0a .sidebar, +.theme-base-0a .sidebar-toggle:active, +.theme-base-0a #sidebar-checkbox:checked ~ .sidebar-toggle { + background-color: #f4bf75; +} +.theme-base-0a .container a, +.theme-base-0a .sidebar-toggle, +.theme-base-0a .related-posts li a:hover { + color: #f4bf75; +} + +/* Green */ +.theme-base-0b .sidebar, +.theme-base-0b .sidebar-toggle:active, +.theme-base-0b #sidebar-checkbox:checked ~ .sidebar-toggle { + background-color: #90a959; +} +.theme-base-0b .container a, +.theme-base-0b .sidebar-toggle, +.theme-base-0b .related-posts li a:hover { + color: #90a959; +} + +/* Cyan */ +.theme-base-0c .sidebar, +.theme-base-0c .sidebar-toggle:active, +.theme-base-0c #sidebar-checkbox:checked ~ .sidebar-toggle { + background-color: #75b5aa; +} +.theme-base-0c .container a, +.theme-base-0c .sidebar-toggle, +.theme-base-0c .related-posts li a:hover { + color: #75b5aa; +} + +/* Blue */ +.theme-base-0d .sidebar, +.theme-base-0d .sidebar-toggle:active, +.theme-base-0d #sidebar-checkbox:checked ~ .sidebar-toggle { + background-color: #6a9fb5; +} +.theme-base-0d .container a, +.theme-base-0d .sidebar-toggle, +.theme-base-0d .related-posts li a:hover { + color: #6a9fb5; +} + +/* Magenta */ +.theme-base-0e .sidebar, +.theme-base-0e .sidebar-toggle:active, +.theme-base-0e #sidebar-checkbox:checked ~ .sidebar-toggle { + background-color: #aa759f; +} +.theme-base-0e .container a, +.theme-base-0e .sidebar-toggle, +.theme-base-0e .related-posts li a:hover { + color: #aa759f; +} + +/* Brown */ +.theme-base-0f .sidebar, +.theme-base-0f .sidebar-toggle:active, +.theme-base-0f #sidebar-checkbox:checked ~ .sidebar-toggle { + background-color: #8f5536; +} +.theme-base-0f .container a, +.theme-base-0f .sidebar-toggle, +.theme-base-0f .related-posts li a:hover { + color: #8f5536; +} diff --git a/enter-bash/themes/Lanyon/static/css/poole.css b/enter-bash/themes/Lanyon/static/css/poole.css new file mode 100644 index 0000000..5c362cb --- /dev/null +++ b/enter-bash/themes/Lanyon/static/css/poole.css @@ -0,0 +1,396 @@ +/* + * ___ + * /\_ \ + * _____ ___ ___\//\ \ __ + * /\ '__`\ / __`\ / __`\\ \ \ /'__`\ + * \ \ \_\ \/\ \_\ \/\ \_\ \\_\ \_/\ __/ + * \ \ ,__/\ \____/\ \____//\____\ \____\ + * \ \ \/ \/___/ \/___/ \/____/\/____/ + * \ \_\ + * \/_/ + * + * Designed, built, and released under MIT license by @mdo. Learn more at + * https://github.com/poole/poole. + */ + + +/* + * Contents + * + * Body resets + * Custom type + * Messages + * Container + * Masthead + * Posts and pages + * Reverse layout + * Themes + */ + + +/* + * Body resets + * + * Update the foundational and global aspects of the page. + */ + +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +html, +body { + margin: 0; + padding: 0; +} + +html { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 16px; + line-height: 1.5; +} +@media (min-width: 38rem) { + html { + font-size: 20px; + } +} + +body { + color: #515151; + background-color: #fff; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +/* No `:visited` state is required by default (browsers will use `a`) */ +a { + color: #268bd2; + text-decoration: none; +} +/* `:focus` is linked to `:hover` for basic accessibility */ +a:hover, +a:focus { + text-decoration: underline; +} + +/* Headings */ +h1, h2, h3, h4, h5, h6 { + margin-bottom: .5rem; + font-weight: bold; + line-height: 1.25; + color: #313131; + text-rendering: optimizeLegibility; +} +h1 { + font-size: 2rem; +} +h2 { + margin-top: 1rem; + font-size: 1.5rem; +} +h3 { + margin-top: 1.5rem; + font-size: 1.25rem; +} +h4, h5, h6 { + font-family: "ff-meta-web-pro", "Helvetica Neue", "Helvetica", Arial, sans-serif; + margin-top: 1rem; + font-size: 1rem; +} + +/* Body text */ +p { + margin-top: 0; + margin-bottom: 1rem; +} + +strong { + color: #303030; +} + +/* Lists */ +ul, ol, dl { + margin-top: 0; + padding-left: 0; + margin-bottom: 1rem; + list-style-type: none; +} + + + +dt { + font-weight: bold; +} +dd { + margin-bottom: .5rem; +} + +/* Misc */ +hr { + position: relative; + margin: 1.5rem 0; + border: 0; + border-top: 1px solid #eee; + border-bottom: 1px solid #fff; +} + +abbr { + font-size: 85%; + font-weight: bold; + color: #555; + text-transform: uppercase; +} +abbr[title] { + cursor: help; + border-bottom: 1px dotted #e5e5e5; +} + + +mono, tt, code, pre { + font-family: PragmataPro, Menlo, Monaco, "Andale Mono", "Lucida Console", "Courier New", monospace } +code { + padding: .25em .5em; + font-size: 85%; + color: #bf616a; + background-color: #f9f9f9; + border-radius: 3px; +} +pre { + display: block; + margin-top: 0; + margin-bottom: 1rem; + padding: 1rem; + font-size: .8rem; + line-height: 1.4; + white-space: pre; + overflow: auto; + background-color: #f9f9f9; +} +pre code { + padding: 0; + font-size: 100%; + color: inherit; + background-color: transparent; +} +.highlight { + margin-bottom: 1rem; + border-radius: 4px; +} +.highlight pre { + margin-bottom: 0; +} + +/* Quotes */ +blockquote { + padding: .5rem 1rem; + margin: .8rem 0; + color: #7a7a7a; + border-left: .25rem solid #e5e5e5; +} +blockquote p:last-child { + margin-bottom: 0; +} +@media (min-width: 30rem) { + blockquote { + padding-right: 5rem; + padding-left: 1.25rem; + } +} + +img { + display: block; + margin: 0 0 1rem; + border-radius: 5px; + height: auto; + width:100%; +} + +.fpimg { + padding-bottom: 2rem; +} + +.lbg { + display: inline; + width: auto; + padding-left: 1rem; +} + + +.right { + float: right; + margin-left: 1rem; +} + +.left { + float: left; + margin-right: 1rem; +} + +.center { + float: center; +} + +/* Tables */ +table { + margin-bottom: 1rem; + width: 100%; + border-top: 1px solid #e5e5e5; + border-bottom: 1px solid #e5e5e5; + border-collapse: collapse; +} +td, +th { + padding: .25rem .5rem; + /* border: 1px solid #e5e5e5; */ +} +tbody tr:nth-child(odd) td, +tbody tr:nth-child(odd) th { + background-color: #f9f9f9; +} + + +/* + * Custom type + * + * Extend paragraphs with `.lead` for larger introductory text. + */ + +.lead { + font-size: 1.25rem; + font-weight: 300; +} + +.front { + margin-bottom: 500px; +} + +.credit { + padding-top: 3rem; + font-size: small; +} + + +ul.category {text-transform: capitalize;} +ul.category li {margin-bottom: 1rem;} + +ul.catlist { list-style: none; margin: 0; padding: 0; } +ul.catlist li { display: inline; } +ul.catlist li:after { content: "・"; } +ul.catlist li:last-child:after { content: ""; } + +/* This gets Google to fall into place */ +.social { + font-size: 1px; + padding-bottom: 2rem; + padding-top: 0; +} + +/* From https://gist.github.com/thebigreason/1296097 */ +/* This gets Facebook to fall into place */ +.social iframe { + vertical-align: bottom; +} + +/* Set an optional width for your button wrappers */ +.social span { + display: inline-block; + width: 110px; +} + +/* + * Messages + * + * Show alert messages to users. You may add it to single elements like a `

    `, + * or to a parent if there are multiple elements to show. + */ + +.message { + margin-bottom: 1rem; + padding: 1rem; + color: #717171; + background-color: #f9f9f9; +} + + +/* + * Container + * + * Center the page content. + */ + +.container { + max-width: 38rem; + padding-left: 1rem; + padding-right: 1rem; + margin-left: auto; + margin-right: auto; +} + + +/* + * Masthead + * + * Super small header above the content for site name and short description. + */ + +.masthead { + padding-top: 1rem; + padding-bottom: 1rem; + margin-bottom: 3rem; +} +.masthead-title { + margin-top: 0; + margin-bottom: 0; + color: #505050; +} +.masthead-title a { + color: #505050; +} +.masthead-title small { + font-size: 75%; + font-weight: 400; + color: #c0c0c0; + letter-spacing: 0; +} + + +/* + * Posts and pages + * + * Each post is wrapped in `.post` and is used on default and post layouts. Each + * page is wrapped in `.page` and is only used on the page layout. + */ + +.page, +.post { + margin-bottom: 4em; +} + +/* Blog post or page title */ +.page-title, +.post-title, +.post-title a { + color: #303030; +} +.page-title, +.post-title { + margin-top: 0; +} + +/* Meta data line below post title */ +.post-date { + display: block; + margin-top: -.5rem; + margin-bottom: 1rem; + color: #9a9a9a; +} + +/* Archive list */ + +.archive h3 { + margin-top:0; + padding-bottom: 0; +} + diff --git a/enter-bash/themes/beautifulhugo/.gitattributes b/enter-bash/themes/beautifulhugo/.gitattributes new file mode 100644 index 0000000..bdb0cab --- /dev/null +++ b/enter-bash/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/enter-bash/themes/beautifulhugo/.gitignore b/enter-bash/themes/beautifulhugo/.gitignore new file mode 100644 index 0000000..81b9599 --- /dev/null +++ b/enter-bash/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/enter-bash/themes/beautifulhugo/LICENSE b/enter-bash/themes/beautifulhugo/LICENSE new file mode 100644 index 0000000..7787b8f --- /dev/null +++ b/enter-bash/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/enter-bash/themes/beautifulhugo/README.md b/enter-bash/themes/beautifulhugo/README.md new file mode 100644 index 0000000..25d97f4 --- /dev/null +++ b/enter-bash/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/enter-bash/themes/beautifulhugo/archetypes/default.md b/enter-bash/themes/beautifulhugo/archetypes/default.md new file mode 100644 index 0000000..d9fd371 --- /dev/null +++ b/enter-bash/themes/beautifulhugo/archetypes/default.md @@ -0,0 +1,4 @@ +--- +subtitle: "" +tags: [] +--- diff --git a/enter-bash/themes/beautifulhugo/data/beautifulhugo/social.toml b/enter-bash/themes/beautifulhugo/data/beautifulhugo/social.toml new file mode 100644 index 0000000..5968c80 --- /dev/null +++ b/enter-bash/themes/beautifulhugo/data/beautifulhugo/social.toml @@ -0,0 +1,121 @@ +[[social_icons]] +id = "email" +url = "mailto:%s" +title = "Email me" +icon = "fas fa-envelope" + +[[social_icons]] +id = "facebook" +url = "https://www.facebook.com/%s" +title = "Facebook" +icon = "fab fa-facebook" + +[[social_icons]] +id = "googleplus" +url = "https://www.plus.google.com/%s" +title = "Google+" +icon = "fab fa-google-plus" + +[[social_icons]] +id = "gitlab" +url = "https://gitlab.com/%s" +title = "GitLab" +icon = "fab fa-gitlab" + +[[social_icons]] +id = "github" +url = "https://github.com/%s" +title = "GitHub" +icon = "fab fa-github" + +[[social_icons]] +id = "twitter" +url = "https://twitter.com/%s" +title = "Twitter" +icon = "fab fa-twitter" + +[[social_icons]] +id = "reddit" +url = "https://reddit.com/u/%s" +title = "Reddit" +icon = "fab fa-reddit-alien" + +[[social_icons]] +id = "linkedin" +url = "https://linkedin.com/in/%s" +title = "LinkedIn" +icon = "fab fa-linkedin" + +[[social_icons]] +id = "xing" +url = "https://www.xing.com/profile/%s" +title = "Xing" +icon = "fab fa-xing" + +[[social_icons]] +id = "stackoverflow" +url = "https://stackoverflow.com/%s" +title = "StackOverflow" +icon = "fab fa-stack-overflow" + +[[social_icons]] +id = "snapchat" +url = "https://www.snapchat.com/add/%s" +title = "Snapchat" +icon = "fab fa-snapchat-ghost" + +[[social_icons]] +id = "instagram" +url = "https://www.instagram.com/%s" +title = "Instagram" +icon = "fab fa-instagram" + +[[social_icons]] +id = "youtube" +url = "https://www.youtube.com/%s" +title = "Youtube" +icon = "fab fa-youtube" + +[[social_icons]] +id = "soundcloud" +url = "https://soundcloud.com/%s" +title = "SoundCloud" +icon = "fab fa-soundcloud" + +[[social_icons]] +id = "spotify" +url = "https://open.spotify.com/user/%s" +title = "Spotify" +icon = "fab fa-spotify" + +[[social_icons]] +id = "bandcamp" +url = "https://%s.bandcamp.com/" +title = "Bandcamp" +icon = "fab fa-bandcamp" + +[[social_icons]] +id = "itchio" +url = "https://itch.io/profile/%s" +title = "itch.io" +icon = "fas fa-gamepad" + +[[social_icons]] +id = "steam" +url = "https://steamcommunity.com/id/%s" +title = "Steam" +icon = "fab fa-steam" + +[[social_icons]] +id = "keybase" +url = "https://keybase.io/%s" +title = "Keybase" +icon = "fab fa-keybase" + +[[social_icons]] +id = "Goodreads" +url = "https://www.goodreads.com/%s" +title = "Goodreads" +icon = "fab fa-goodreads" + + diff --git a/enter-bash/themes/beautifulhugo/i18n/en.yaml b/enter-bash/themes/beautifulhugo/i18n/en.yaml new file mode 100644 index 0000000..64c2f7b --- /dev/null +++ b/enter-bash/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/enter-bash/themes/beautifulhugo/i18n/ja.yaml b/enter-bash/themes/beautifulhugo/i18n/ja.yaml new file mode 100644 index 0000000..c7c77b2 --- /dev/null +++ b/enter-bash/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/enter-bash/themes/beautifulhugo/i18n/ru.yaml b/enter-bash/themes/beautifulhugo/i18n/ru.yaml new file mode 100644 index 0000000..deeaecf --- /dev/null +++ b/enter-bash/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/enter-bash/themes/beautifulhugo/images/screenshot.png b/enter-bash/themes/beautifulhugo/images/screenshot.png new file mode 100644 index 0000000..0d68a8a Binary files /dev/null and b/enter-bash/themes/beautifulhugo/images/screenshot.png differ diff --git a/enter-bash/themes/beautifulhugo/images/tn.png b/enter-bash/themes/beautifulhugo/images/tn.png new file mode 100644 index 0000000..97904cc Binary files /dev/null and b/enter-bash/themes/beautifulhugo/images/tn.png differ diff --git a/enter-bash/themes/beautifulhugo/layouts/404.html b/enter-bash/themes/beautifulhugo/layouts/404.html new file mode 100644 index 0000000..9fbcb45 --- /dev/null +++ b/enter-bash/themes/beautifulhugo/layouts/404.html @@ -0,0 +1,11 @@ +{{ define "header" }}{{ end }} +{{ define "main" }} +

    +
    +

    {{ i18n "pageNotFound" }}

    +
    + +
    +
    +{{ end }} + diff --git a/enter-bash/themes/beautifulhugo/layouts/_default/baseof.html b/enter-bash/themes/beautifulhugo/layouts/_default/baseof.html new file mode 100644 index 0000000..13923d9 --- /dev/null +++ b/enter-bash/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/enter-bash/themes/beautifulhugo/layouts/_default/list.html b/enter-bash/themes/beautifulhugo/layouts/_default/list.html new file mode 100644 index 0000000..e9f4c65 --- /dev/null +++ b/enter-bash/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/enter-bash/themes/beautifulhugo/layouts/_default/single.html b/enter-bash/themes/beautifulhugo/layouts/_default/single.html new file mode 100644 index 0000000..d1408f4 --- /dev/null +++ b/enter-bash/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/enter-bash/themes/beautifulhugo/layouts/_default/terms.html b/enter-bash/themes/beautifulhugo/layouts/_default/terms.html new file mode 100644 index 0000000..6ab687e --- /dev/null +++ b/enter-bash/themes/beautifulhugo/layouts/_default/terms.html @@ -0,0 +1,14 @@ +{{ define "main" }} + {{ $data := .Data }} +
    + +
    +{{ end }} + diff --git a/enter-bash/themes/beautifulhugo/layouts/index.html b/enter-bash/themes/beautifulhugo/layouts/index.html new file mode 100644 index 0000000..5587697 --- /dev/null +++ b/enter-bash/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/enter-bash/themes/beautifulhugo/layouts/partials/disqus.html b/enter-bash/themes/beautifulhugo/layouts/partials/disqus.html new file mode 100644 index 0000000..8029525 --- /dev/null +++ b/enter-bash/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/enter-bash/themes/beautifulhugo/layouts/partials/footer.html b/enter-bash/themes/beautifulhugo/layouts/partials/footer.html new file mode 100644 index 0000000..18b2d3e --- /dev/null +++ b/enter-bash/themes/beautifulhugo/layouts/partials/footer.html @@ -0,0 +1,78 @@ +
    +
    +
    +
    + + + +

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

    +
    +
    +
    +
    + + + + + + + + + + +{{ if ($.Scratch.Get "photoswipeloaded") }} + + + +{{ end }} + +{{ if .Site.Params.gcse }} + +{{ end }} + +{{- partial "footer_custom.html" . }} diff --git a/enter-bash/themes/beautifulhugo/layouts/partials/footer_custom.html b/enter-bash/themes/beautifulhugo/layouts/partials/footer_custom.html new file mode 100644 index 0000000..af173b5 --- /dev/null +++ b/enter-bash/themes/beautifulhugo/layouts/partials/footer_custom.html @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/enter-bash/themes/beautifulhugo/layouts/partials/head.html b/enter-bash/themes/beautifulhugo/layouts/partials/head.html new file mode 100644 index 0000000..fd0b8a0 --- /dev/null +++ b/enter-bash/themes/beautifulhugo/layouts/partials/head.html @@ -0,0 +1,51 @@ + + + + + +{{- 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" . }} +{{ template "_internal/google_analytics_async.html" . }} + diff --git a/enter-bash/themes/beautifulhugo/layouts/partials/head_custom.html b/enter-bash/themes/beautifulhugo/layouts/partials/head_custom.html new file mode 100644 index 0000000..3d012e4 --- /dev/null +++ b/enter-bash/themes/beautifulhugo/layouts/partials/head_custom.html @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/enter-bash/themes/beautifulhugo/layouts/partials/header.html b/enter-bash/themes/beautifulhugo/layouts/partials/header.html new file mode 100644 index 0000000..2b1e43b --- /dev/null +++ b/enter-bash/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/enter-bash/themes/beautifulhugo/layouts/partials/nav.html b/enter-bash/themes/beautifulhugo/layouts/partials/nav.html new file mode 100644 index 0000000..3d18c1e --- /dev/null +++ b/enter-bash/themes/beautifulhugo/layouts/partials/nav.html @@ -0,0 +1,96 @@ + + + +{{ if isset .Site.Params "gcse" }} + +{{ end }} diff --git a/enter-bash/themes/beautifulhugo/layouts/partials/post_meta.html b/enter-bash/themes/beautifulhugo/layouts/partials/post_meta.html new file mode 100644 index 0000000..4a1e679 --- /dev/null +++ b/enter-bash/themes/beautifulhugo/layouts/partials/post_meta.html @@ -0,0 +1,11 @@ + + diff --git a/enter-bash/themes/beautifulhugo/layouts/partials/translation_link.html b/enter-bash/themes/beautifulhugo/layouts/partials/translation_link.html new file mode 100644 index 0000000..1f9a817 --- /dev/null +++ b/enter-bash/themes/beautifulhugo/layouts/partials/translation_link.html @@ -0,0 +1,2 @@ +{{ default .Lang .Site.Language.LanguageName }} + diff --git a/enter-bash/themes/beautifulhugo/layouts/shortcodes/figure.html b/enter-bash/themes/beautifulhugo/layouts/shortcodes/figure.html new file mode 100644 index 0000000..b8dcbc9 --- /dev/null +++ b/enter-bash/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/enter-bash/themes/beautifulhugo/layouts/shortcodes/gallery.html b/enter-bash/themes/beautifulhugo/layouts/shortcodes/gallery.html new file mode 100644 index 0000000..bd74f8b --- /dev/null +++ b/enter-bash/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/enter-bash/themes/beautifulhugo/layouts/shortcodes/load-photoswipe-theme.html b/enter-bash/themes/beautifulhugo/layouts/shortcodes/load-photoswipe-theme.html new file mode 100644 index 0000000..4b3bfad --- /dev/null +++ b/enter-bash/themes/beautifulhugo/layouts/shortcodes/load-photoswipe-theme.html @@ -0,0 +1,75 @@ + + + +{{ if not ($.Page.Scratch.Get "photoswipeloaded") }} + {{ $.Page.Scratch.Set "photoswipeloaded" 1 }} + + + + + + + + + + + +{{ end }} \ No newline at end of file diff --git a/enter-bash/themes/beautifulhugo/layouts/shortcodes/load-photoswipe.html b/enter-bash/themes/beautifulhugo/layouts/shortcodes/load-photoswipe.html new file mode 100644 index 0000000..9eec863 --- /dev/null +++ b/enter-bash/themes/beautifulhugo/layouts/shortcodes/load-photoswipe.html @@ -0,0 +1,71 @@ + + + +{{ if not ($.Page.Scratch.Get "photoswipeloaded") }} + {{ $.Page.Scratch.Set "photoswipeloaded" 1 }} + + + + + + + + + + + + + +{{ end }} \ No newline at end of file diff --git a/enter-bash/themes/beautifulhugo/static/css/highlight.min.css b/enter-bash/themes/beautifulhugo/static/css/highlight.min.css new file mode 100644 index 0000000..77ff6fa --- /dev/null +++ b/enter-bash/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/enter-bash/themes/beautifulhugo/static/css/hugo-easy-gallery.css b/enter-bash/themes/beautifulhugo/static/css/hugo-easy-gallery.css new file mode 100644 index 0000000..a2c5b32 --- /dev/null +++ b/enter-bash/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/enter-bash/themes/beautifulhugo/static/css/main-minimal.css b/enter-bash/themes/beautifulhugo/static/css/main-minimal.css new file mode 100644 index 0000000..6baca79 --- /dev/null +++ b/enter-bash/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/enter-bash/themes/beautifulhugo/static/css/main.css b/enter-bash/themes/beautifulhugo/static/css/main.css new file mode 100644 index 0000000..2ffd999 --- /dev/null +++ b/enter-bash/themes/beautifulhugo/static/css/main.css @@ -0,0 +1,704 @@ +@import url("pygment_highlights.css"); + +/* --- General --- */ + +body { + font-family: 'Lora', 'Times New Roman', serif; + font-size: 18px; + color: #404040; + position: relative; + background: #FFF; +} +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: 50px; + font-size: 14px; +} + +footer a { + color: #404040; +} + +footer .list-inline { + margin: 0; + padding: 0; +} +footer .copyright { + font-family: Open Sans; + 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/enter-bash/themes/beautifulhugo/static/css/pygment_highlights.css b/enter-bash/themes/beautifulhugo/static/css/pygment_highlights.css new file mode 100644 index 0000000..015cf7c --- /dev/null +++ b/enter-bash/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/enter-bash/themes/beautifulhugo/static/img/404-southpark.jpg b/enter-bash/themes/beautifulhugo/static/img/404-southpark.jpg new file mode 100644 index 0000000..354eb12 Binary files /dev/null and b/enter-bash/themes/beautifulhugo/static/img/404-southpark.jpg differ diff --git a/enter-bash/themes/beautifulhugo/static/img/LOGOweb.png b/enter-bash/themes/beautifulhugo/static/img/LOGOweb.png new file mode 100644 index 0000000..74fe3f2 Binary files /dev/null and b/enter-bash/themes/beautifulhugo/static/img/LOGOweb.png differ diff --git a/enter-bash/themes/beautifulhugo/static/img/SIGNALweb.png b/enter-bash/themes/beautifulhugo/static/img/SIGNALweb.png new file mode 100644 index 0000000..87ff120 Binary files /dev/null and b/enter-bash/themes/beautifulhugo/static/img/SIGNALweb.png differ diff --git a/enter-bash/themes/beautifulhugo/static/img/avatar-favicon.png b/enter-bash/themes/beautifulhugo/static/img/avatar-favicon.png new file mode 100644 index 0000000..94aed04 Binary files /dev/null and b/enter-bash/themes/beautifulhugo/static/img/avatar-favicon.png differ diff --git a/enter-bash/themes/beautifulhugo/static/img/avatar-icon.png b/enter-bash/themes/beautifulhugo/static/img/avatar-icon.png new file mode 100644 index 0000000..cc83179 Binary files /dev/null and b/enter-bash/themes/beautifulhugo/static/img/avatar-icon.png differ diff --git a/enter-bash/themes/beautifulhugo/static/img/favicon.ico b/enter-bash/themes/beautifulhugo/static/img/favicon.ico new file mode 100644 index 0000000..3479cbb Binary files /dev/null and b/enter-bash/themes/beautifulhugo/static/img/favicon.ico differ diff --git a/enter-bash/themes/beautifulhugo/static/img/hexagon-thumb.jpg b/enter-bash/themes/beautifulhugo/static/img/hexagon-thumb.jpg new file mode 100644 index 0000000..2572be9 Binary files /dev/null and b/enter-bash/themes/beautifulhugo/static/img/hexagon-thumb.jpg differ diff --git a/enter-bash/themes/beautifulhugo/static/img/hexagon.jpg b/enter-bash/themes/beautifulhugo/static/img/hexagon.jpg new file mode 100644 index 0000000..cf244bb Binary files /dev/null and b/enter-bash/themes/beautifulhugo/static/img/hexagon.jpg differ diff --git a/enter-bash/themes/beautifulhugo/static/img/path.jpg b/enter-bash/themes/beautifulhugo/static/img/path.jpg new file mode 100644 index 0000000..5855c09 Binary files /dev/null and b/enter-bash/themes/beautifulhugo/static/img/path.jpg differ diff --git a/enter-bash/themes/beautifulhugo/static/img/sphere-thumb.jpg b/enter-bash/themes/beautifulhugo/static/img/sphere-thumb.jpg new file mode 100644 index 0000000..fa5e2ee Binary files /dev/null and b/enter-bash/themes/beautifulhugo/static/img/sphere-thumb.jpg differ diff --git a/enter-bash/themes/beautifulhugo/static/img/sphere.jpg b/enter-bash/themes/beautifulhugo/static/img/sphere.jpg new file mode 100644 index 0000000..820cf7e Binary files /dev/null and b/enter-bash/themes/beautifulhugo/static/img/sphere.jpg differ diff --git a/enter-bash/themes/beautifulhugo/static/img/triangle-thumb.jpg b/enter-bash/themes/beautifulhugo/static/img/triangle-thumb.jpg new file mode 100644 index 0000000..8eb0761 Binary files /dev/null and b/enter-bash/themes/beautifulhugo/static/img/triangle-thumb.jpg differ diff --git a/enter-bash/themes/beautifulhugo/static/img/triangle.jpg b/enter-bash/themes/beautifulhugo/static/img/triangle.jpg new file mode 100644 index 0000000..2dfbcec Binary files /dev/null and b/enter-bash/themes/beautifulhugo/static/img/triangle.jpg differ diff --git a/enter-bash/themes/beautifulhugo/static/js/bootstrap.js b/enter-bash/themes/beautifulhugo/static/js/bootstrap.js new file mode 100644 index 0000000..4139b6f --- /dev/null +++ b/enter-bash/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 + $('