mirror of
				https://github.com/BBaoVanC/bobatheme.git
				synced 2025-10-26 07:43:29 -05:00 
			
		
		
		
	Compare commits
	
		
			174 Commits
		
	
	
		
			034ef462a2
			...
			cleanup-bo
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| f9481a6e7f | |||
| 8083b1a299 | |||
| 314b533698 | |||
| 00a0f64be4 | |||
| 741b3bc01b | |||
| df2fae9886 | |||
| f38abfe73f | |||
| 3d55a7dabe | |||
| 67de113bdf | |||
| 349672bbad | |||
| ec382b2085 | |||
| 21f2a91b54 | |||
| 0237c496ed | |||
| 61d5ca29dd | |||
| 8bb8720545 | |||
| bd8e34a381 | |||
| 62cdcf5b11 | |||
| c9909762d6 | |||
| cc4af0c385 | |||
| 7aeb95a437 | |||
| 14475c13f4 | |||
| 6b729c6acf | |||
| f751c4b104 | |||
| de20387b5a | |||
| 84004d3ac0 | |||
| 52a6440011 | |||
| 322928ed7a | |||
| 4e753395ba | |||
| 5d335647d0 | |||
| 22fff1a9c5 | |||
| b79c956c07 | |||
| b15ca73977 | |||
| ccb5170d2b | |||
| 433dd125e2 | |||
| d50a4dc6bd | |||
| bbe76a44bb | |||
| 8845272d4d | |||
| 5afaf2ce3e | |||
| 486fa65ad6 | |||
| f371afe529 | |||
| 8f79d2af3a | |||
| d6cb2c12c8 | |||
| 2fa53d1f2c | |||
| e0d2c536e4 | |||
| 8fafc843ef | |||
| 1f82ad4f0b | |||
| 7e016547ec | |||
| b4bff1e36d | |||
| 1f9477759d | |||
| cc7cec07df | |||
| be12afb50d | |||
| 9d761b2f81 | |||
| ba9c106a88 | |||
| 150ee40fd5 | |||
| ca0f8d390c | |||
| 62f0d42140 | |||
| 16f08dce7f | |||
| c06e7eb938 | |||
| 5a957bc745 | |||
| 67ac36e9e2 | |||
| 6ff0ffb80b | |||
| ff4998f31b | |||
| 1aa2f8ea5c | |||
| 6e7160efbb | |||
| 04c3c007a8 | |||
| ad7432155f | |||
| 0aaf865b75 | |||
| c9095e948b | |||
| ddb57e0120 | |||
| 9b851ce0e4 | |||
| f34cffb849 | |||
| 91994df910 | |||
| e84f334591 | |||
| ebf39263a6 | |||
| 77afe66aa6 | |||
| 788583ea23 | |||
| 4216b9ed6f | |||
| 54e639ecc3 | |||
| c980ced2fb | |||
| 9ca15a198f | |||
| 5c87c2b069 | |||
| 6c42ae9518 | |||
| f33492ef8e | |||
| ffcae79156 | |||
| a59a87374b | |||
| 88adfbdf89 | |||
| 0f717e81c0 | |||
| ede5958a46 | |||
| 0b3b160e87 | |||
| 12c6efc0fe | |||
| 0e930f7ae1 | |||
| 289f55dc19 | |||
| 0ddf0bdf42 | |||
| 03d826f1c4 | |||
| f94307cdbf | |||
| fde24f7438 | |||
| c0426f191a | |||
| e8a34ae4a4 | |||
| 18731498e8 | |||
| ad5c40b02b | |||
| e6b5997dff | |||
| 960d1d24be | |||
| 17047babc0 | |||
| 7bc8a4cb57 | |||
| d34b2a56d7 | |||
| 50a207b8ee | |||
| 6f140f096b | |||
| 316c62ebe8 | |||
| 1caa7acdc9 | |||
| f2f9e78559 | |||
| dd65d55389 | |||
| c7acf8ce38 | |||
| d7647a0b6f | |||
| ebaa1de00b | |||
| 0744af717d | |||
| 23f86d5982 | |||
| b854ae48e6 | |||
| 36a19a48b7 | |||
| 1f8a82228e | |||
| 60ed1c0264 | |||
| 3fae019148 | |||
| 8ef1e3840a | |||
| 629b3758b9 | |||
| 9412906b4f | |||
| f8cfad647f | |||
| b200623dca | |||
| 80f5994d96 | |||
| 342710a755 | |||
| 8eb642dbc8 | |||
| a4be8b395b | |||
| 47d6d02186 | |||
| a26ea62b60 | |||
| 7cff045cb3 | |||
| 9f080377e7 | |||
| fb40c8a4c3 | |||
| 0c248a4ca5 | |||
| 56d8a07893 | |||
| 8aab2ca693 | |||
| e46288dc45 | |||
| 637ffc12f5 | |||
| 2a40664bb6 | |||
| e34d2109ec | |||
| 54f89dad51 | |||
| 04b5017279 | |||
| a65a435b1d | |||
| 73dc916d5a | |||
| e8be3ae45b | |||
| 73ef9cc7a6 | |||
| 4adb754ae3 | |||
| 81709bb47e | |||
| 9c3a076e96 | |||
| 833edacc1f | |||
| 121a67a1fc | |||
| 8e3fb4038a | |||
| e9266cdead | |||
| 3a4cb538f7 | |||
| de84bc5ddf | |||
| 466c91a980 | |||
| 8d81f5e37c | |||
| 7dd01894da | |||
| 9665133ba4 | |||
| b272ed6181 | |||
| 17918a5617 | |||
| 493ee2da96 | |||
| 3d83e9fbdf | |||
| 684769df5a | |||
| 9bee463a3c | |||
| 805dc65ccb | |||
| a9d1c25ee4 | |||
| fe08bdc93c | |||
| 026d5ab2c3 | |||
| 311d846cb8 | |||
| 0888356292 | |||
| bcf0b68df9 | 
							
								
								
									
										2
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							| @@ -1,4 +1,4 @@ | |||||||
| [submodule "assets/jam"] | [submodule "assets/jam"] | ||||||
| 	path = assets/jam | 	path = assets/jam | ||||||
| 	url = https://github.com/michaelampr/jam.git | 	url = https://github.com/BBaoVanC/jam.git | ||||||
| 	branch = master | 	branch = master | ||||||
|   | |||||||
| @@ -1,2 +1,4 @@ | |||||||
| # bobatheme | # bobatheme | ||||||
| Simple Hugo theme |  | ||||||
|  | The (boba) best Hugo theme. Contains everything I need for bbaovanc.com and | ||||||
|  | boba.best. | ||||||
|   | |||||||
| @@ -8,7 +8,10 @@ comments: true | |||||||
| draft: true | draft: true | ||||||
|  |  | ||||||
| authors: | authors: | ||||||
|   - {{ with .Site.Author.name }}{{ . }}{{ else }}John Doe{{ end }} |   - {{ with .Site.Params.author.name }}{{ . }}{{ else }}John Doe{{ end }} | ||||||
|  |  | ||||||
|  | categories: | ||||||
|  |   - archetype-stuff | ||||||
|  |  | ||||||
| tags: | tags: | ||||||
|   - awesome |   - awesome | ||||||
| @@ -21,7 +24,17 @@ series: | |||||||
| resources: | resources: | ||||||
|   - name: feature |   - name: feature | ||||||
|     src: something.webp |     src: something.webp | ||||||
|     title: Some image (image format can be anything; webp is just an example) |     title: >- | ||||||
|  |       Fallback title if one is not provided when calling figure shortcode with | ||||||
|  |       this listed as the src | ||||||
|  |     params: | ||||||
|  |       alt: Write an accessible description of this image. Don't over-write. | ||||||
|  |  | ||||||
|  |   - src: demonstration.webp | ||||||
|  |     params: | ||||||
|  |       alt: >- | ||||||
|  |         Annotate an image without giving it an explicit name (the filename is | ||||||
|  |         simply used as the `name` instead). | ||||||
|  |  | ||||||
| --- | --- | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										15
									
								
								archetypes/categories/_index.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								archetypes/categories/_index.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | |||||||
|  | --- | ||||||
|  |  | ||||||
|  | title: {{ replace .Name "-" " " | title }} | ||||||
|  |  | ||||||
|  | --- | ||||||
|  |  | ||||||
|  | A short summary of what the category is about. | ||||||
|  |  | ||||||
|  | <!--more--> | ||||||
|  |  | ||||||
|  | Optionally provide more information about the category here. This part will only | ||||||
|  | show on the category page, not on the category list page. | ||||||
|  |  | ||||||
|  | If you delete this section, DO NOT delete the summary separator (`<!--more-->`) | ||||||
|  | or else the summary won't be shown. | ||||||
| @@ -6,7 +6,7 @@ toc: true | |||||||
| comments: false | comments: false | ||||||
|  |  | ||||||
| authors: | authors: | ||||||
|   - {{ with .Site.Author.name }}{{ . }}{{ else }}John Doe{{ end }} |   - {{ with .Site.params.author.name }}{{ . }}{{ else }}John Doe{{ end }} | ||||||
|  |  | ||||||
| --- | --- | ||||||
|  |  | ||||||
|   | |||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										132
									
								
								assets/css/comments.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										132
									
								
								assets/css/comments.css
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,132 @@ | |||||||
|  | .comments > h2 { | ||||||
|  |     margin-bottom: 0; | ||||||
|  | } | ||||||
|  | .comments .email-address-notice { | ||||||
|  |     margin: 0; | ||||||
|  |     font-size: smaller; | ||||||
|  | } | ||||||
|  | .comments .enable-javascript-notice { | ||||||
|  |     font-style: italic; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /* Isso styling */ | ||||||
|  | h4.isso-thread-heading { | ||||||
|  |     color: var(--text-0); | ||||||
|  |     margin-bottom: 8px; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .isso-comment:not(:first-of-type), | ||||||
|  | .isso-follow-up .isso-comment { | ||||||
|  |     border-color: var(--background-3); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .isso-author, | ||||||
|  | .isso-page-author-suffix, | ||||||
|  | .isso-comment-footer, | ||||||
|  | .isso-comment-footer .isso-votes { | ||||||
|  |     color: var(--text-gray-0); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .isso-comment-header .isso-spacer, | ||||||
|  | .isso-spacer:hover, | ||||||
|  | .isso-permalink, | ||||||
|  | .isso-permalink:hover { | ||||||
|  |     color: var(--text-gray-1) !important; | ||||||
|  | } | ||||||
|  | a.isso-author:hover, | ||||||
|  | .isso-permalink:hover { | ||||||
|  |     text-decoration: underline !important; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .isso-comment.isso-is-page-author > .isso-text-wrapper { | ||||||
|  |     background-color: var(--background-accent-1); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .isso-feedlink:hover, | ||||||
|  | .isso-reply { | ||||||
|  |     color: var(--link-0) !important; | ||||||
|  |     text-shadow: unset !important; | ||||||
|  | } | ||||||
|  | .isso-reply:hover { | ||||||
|  |     text-decoration: underline; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .isso-text pre, | ||||||
|  | .isso-text :not(pre) > code { | ||||||
|  |     background-color: var(--background-2); | ||||||
|  |     border: none; | ||||||
|  |     padding: 2px 4px; | ||||||
|  |     border-radius: 5px; | ||||||
|  |     /* thanks isso.css for setting this to 85% for whatever reason */ | ||||||
|  |     font-size: 0.75em; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .isso-input-wrapper input, | ||||||
|  | .isso-post-action > input, | ||||||
|  | .isso-textarea, | ||||||
|  | .isso-preview { | ||||||
|  |     color: var(--text-1); | ||||||
|  |     background-color: var(--background-1); | ||||||
|  |     border-color: var(--background-2) !important; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .isso-input-wrapper input:focus, | ||||||
|  | .isso-textarea:focus { | ||||||
|  |     border-color: var(--background-3) !important; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .isso-post-action > input:hover { | ||||||
|  |     background-color: var(--background-2); | ||||||
|  | } | ||||||
|  | .isso-post-action > input:focus, | ||||||
|  | .isso-post-action > input:active { | ||||||
|  |     background-color: var(--background-3); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .isso-textarea { | ||||||
|  |     margin-bottom: 4px; | ||||||
|  | } | ||||||
|  | .isso-input-wrapper { | ||||||
|  |     display: inline-flex; | ||||||
|  |     flex-direction: column; | ||||||
|  |     margin-right: 4px; | ||||||
|  |     max-width: 25%; | ||||||
|  | } | ||||||
|  | .isso-input-wrapper input { | ||||||
|  |     order: 1; | ||||||
|  | } | ||||||
|  | .isso-input-wrapper label { | ||||||
|  |     order: 2; | ||||||
|  |     font-size: small; | ||||||
|  | } | ||||||
|  | .isso-post-action { | ||||||
|  |     margin-left: 4px; | ||||||
|  |     margin-top: 0; | ||||||
|  | } | ||||||
|  | @media screen and (max-width: 600px) { | ||||||
|  |     .isso-input-wrapper { | ||||||
|  |         display: block; | ||||||
|  |         max-width: 100%; | ||||||
|  |     } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | @media print { | ||||||
|  |     .comments { | ||||||
|  |         break-before: always; | ||||||
|  |     } | ||||||
|  |     .isso-comment { | ||||||
|  |         max-width: unset; | ||||||
|  |     } | ||||||
|  |     .isso-text-wrapper { | ||||||
|  |         break-inside: avoid; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     .isso-postbox, | ||||||
|  |     .isso-feedlink { | ||||||
|  |         display: none; | ||||||
|  |     } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .isso-target { | ||||||
|  |     animation: target-fade 10s ease-out; /* defined in bobatheme */ | ||||||
|  | } | ||||||
							
								
								
									
										4
									
								
								assets/css/noscript.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								assets/css/noscript.css
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | |||||||
|  | .page-meta-comments-counter, | ||||||
|  | .code-copy-button { | ||||||
|  |   display: none; | ||||||
|  | } | ||||||
							
								
								
									
										9
									
								
								assets/css/search.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								assets/css/search.css
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | |||||||
|  | /* put on body so it overrides the defaults set in :root by pagefind.css */ | ||||||
|  | body { | ||||||
|  |     /* https://pagefind.app/docs/ui-usage/#customising-the-styles */ | ||||||
|  |     --pagefind-ui-background: var(--background-1); | ||||||
|  |     --pagefind-ui-border: var(--background-2); | ||||||
|  |     --pagefind-ui-primary: var(--link-0); | ||||||
|  |     --pagefind-ui-tag: var(--background-1); | ||||||
|  |     --pagefind-ui-text: var(--text-1); | ||||||
|  | } | ||||||
| @@ -1,14 +1,22 @@ | |||||||
|  | /* tango style */ | ||||||
|  |  | ||||||
| @media print, (prefers-color-scheme: light) { | @media print, (prefers-color-scheme: light) { | ||||||
|   .chroma { |   .chroma { | ||||||
|     color: black; |     color: black; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  | /* Background */ .bg { background-color: #f8f8f8; } | ||||||
|  | /* PreWrapper */ .chroma { background-color: #f8f8f8; } | ||||||
| /* Other */ .chroma .x { color: #000000 } | /* Other */ .chroma .x { color: #000000 } | ||||||
| /* Error */ .chroma .err { color: #a40000 } | /* Error */ .chroma .err { color: #a40000 } | ||||||
|  | /* CodeLine */ .chroma .cl {  } | ||||||
|  | /* LineLink */ .chroma .lnlinks { outline: none; text-decoration: none; color: inherit } | ||||||
| /* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } | /* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } | ||||||
| /* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } | /* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; } | ||||||
| /* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc } | /* LineHighlight */ .chroma .hl { background-color: #dfdfdf } | ||||||
| /* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } | /* LineNumbersTable */ .chroma .lnt { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } | ||||||
| /* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } | /* LineNumbers */ .chroma .ln { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } | ||||||
|  | /* Line */ .chroma .line { display: flex; } | ||||||
| /* Keyword */ .chroma .k { color: #204a87; font-weight: bold } | /* Keyword */ .chroma .k { color: #204a87; font-weight: bold } | ||||||
| /* KeywordConstant */ .chroma .kc { color: #204a87; font-weight: bold } | /* KeywordConstant */ .chroma .kc { color: #204a87; font-weight: bold } | ||||||
| /* KeywordDeclaration */ .chroma .kd { color: #204a87; font-weight: bold } | /* KeywordDeclaration */ .chroma .kd { color: #204a87; font-weight: bold } | ||||||
| @@ -83,6 +91,7 @@ | |||||||
| /* GenericTraceback */ .chroma .gt { color: #a40000; font-weight: bold } | /* GenericTraceback */ .chroma .gt { color: #a40000; font-weight: bold } | ||||||
| /* GenericUnderline */ .chroma .gl { color: #000000; text-decoration: underline } | /* GenericUnderline */ .chroma .gl { color: #000000; text-decoration: underline } | ||||||
| /* TextWhitespace */ .chroma .w { color: #f8f8f8; text-decoration: underline } | /* TextWhitespace */ .chroma .w { color: #f8f8f8; text-decoration: underline } | ||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
| @media (prefers-color-scheme: light) { | @media (prefers-color-scheme: light) { | ||||||
|   | |||||||
| @@ -1,11 +1,17 @@ | |||||||
| /* Background */ .chroma { color: #d0d0d0; background-color: #202020 } | /* native style */ | ||||||
|  |  | ||||||
|  | /* Background */ .bg { color: #d0d0d0; background-color: #202020; } | ||||||
|  | /* PreWrapper */ .chroma { color: #d0d0d0; background-color: #202020; } | ||||||
| /* Other */ .chroma .x {  } | /* Other */ .chroma .x {  } | ||||||
| /* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 } | /* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 } | ||||||
|  | /* CodeLine */ .chroma .cl {  } | ||||||
|  | /* LineLink */ .chroma .lnlinks { outline: none; text-decoration: none; color: inherit } | ||||||
| /* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } | /* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } | ||||||
| /* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } | /* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; } | ||||||
| /* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #363636 } | /* LineHighlight */ .chroma .hl { background-color: #363636 } | ||||||
| /* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 } | /* LineNumbersTable */ .chroma .lnt { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 } | ||||||
| /* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 } | /* LineNumbers */ .chroma .ln { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #686868 } | ||||||
|  | /* Line */ .chroma .line { display: flex; } | ||||||
| /* Keyword */ .chroma .k { color: #6ab825; font-weight: bold } | /* Keyword */ .chroma .k { color: #6ab825; font-weight: bold } | ||||||
| /* KeywordConstant */ .chroma .kc { color: #6ab825; font-weight: bold } | /* KeywordConstant */ .chroma .kc { color: #6ab825; font-weight: bold } | ||||||
| /* KeywordDeclaration */ .chroma .kd { color: #6ab825; font-weight: bold } | /* KeywordDeclaration */ .chroma .kd { color: #6ab825; font-weight: bold } | ||||||
|   | |||||||
| @@ -1,8 +0,0 @@ | |||||||
| const backToTop = document.getElementById("back-to-top"); |  | ||||||
| window.onscroll = function() { |  | ||||||
|     if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) { |  | ||||||
|         backToTop.style.display = "block"; |  | ||||||
|     } else { |  | ||||||
|         backToTop.style.display = "none"; |  | ||||||
|     } |  | ||||||
| } |  | ||||||
							
								
								
									
										25
									
								
								assets/js/bobatheme.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								assets/js/bobatheme.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | |||||||
|  | // code block copy to clipboard | ||||||
|  | window.onload = () => { | ||||||
|  |     document.querySelectorAll(".code-block").forEach(codeBlock => { | ||||||
|  |         const button = codeBlock.querySelector(".code-header > .code-copy-button"); | ||||||
|  |  | ||||||
|  |         // lang will not be unset because we default it to text | ||||||
|  |         // clone it so it doesn't change the actual DOM element | ||||||
|  |         const codeElem = codeBlock.querySelector("code[data-lang]").cloneNode(true); | ||||||
|  |         // bashsession: remove command output lines | ||||||
|  |         codeElem.querySelectorAll(".go").forEach(e => e.parentNode.removeChild(e)); | ||||||
|  |         // bashsession: remove prompt symbol | ||||||
|  |         codeElem.querySelectorAll(".gp").forEach(e => e.parentNode.removeChild(e)); | ||||||
|  |         const rawCode = codeElem.innerText; | ||||||
|  |  | ||||||
|  |         const originalCopyText = button.innerHTML; | ||||||
|  |         button.onclick = event => { | ||||||
|  |             navigator.clipboard.writeText(rawCode); | ||||||
|  |             // TODO: maybe we could add a fancier indicator, like a flash or something | ||||||
|  |             event.target.innerHTML = "Copied!"; | ||||||
|  |             setTimeout(() => { | ||||||
|  |                 event.target.innerHTML = originalCopyText; | ||||||
|  |             }, 3000); | ||||||
|  |         } | ||||||
|  |     }); | ||||||
|  | } | ||||||
| @@ -1,3 +1,3 @@ | |||||||
| function share_event(service) { | function share_event(service) { | ||||||
|     // this function does nothing by default |     plausible("Share", {props: {Network: service}}); | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1,12 +0,0 @@ | |||||||
| 1: "enero" |  | ||||||
| 2: "febrero" |  | ||||||
| 3: "marzo" |  | ||||||
| 4: "abril" |  | ||||||
| 5: "mayo" |  | ||||||
| 6: "julio" |  | ||||||
| 7: "junio" |  | ||||||
| 8: "agosto" |  | ||||||
| 9: "septiembre" |  | ||||||
| 10: "octubre" |  | ||||||
| 11: "noviembre" |  | ||||||
| 12: "diciembre" |  | ||||||
| @@ -1,68 +0,0 @@ | |||||||
| baseURL: https://example.com |  | ||||||
| theme: bobatheme |  | ||||||
| defaultContentLanguage: en |  | ||||||
| copyright: '© 2021 bbaovanc <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>' |  | ||||||
| sectionPagesMenu: main |  | ||||||
| enableRobotsTXT: true |  | ||||||
| paginate: 5 |  | ||||||
| enableGitInfo: true |  | ||||||
|  |  | ||||||
| taxonomies: |  | ||||||
|   _merge: deep |  | ||||||
|  |  | ||||||
| author: |  | ||||||
|   name: bbaovanc |  | ||||||
|  |  | ||||||
| markup: # this just keeps the bobatheme markup styling |  | ||||||
|   _merge: deep |  | ||||||
|  |  | ||||||
| params: |  | ||||||
|   # these are for the OpenGraph/Twitter embeds in Hugo |  | ||||||
|   description: Example website for bobatheme |  | ||||||
|  |  | ||||||
|   # these are for favicons in bobatheme (disabled by default) |  | ||||||
|   # faviconSVG: favicon.svg |  | ||||||
|   # appleTouchPNG: apple-touch-icon.png |  | ||||||
|  |  | ||||||
|   # show reading time (enabled by default) |  | ||||||
|   # readingtime: true |  | ||||||
|  |  | ||||||
|   # used for "View source" (unset by default) |  | ||||||
|   # gitFileURL: https://github.com/BBaoVanC/bobatheme/blob/master |  | ||||||
|   # gitFileIcon: github-circle |  | ||||||
|  |  | ||||||
|   # display a "Latest Posts" section on the homepage below its content |  | ||||||
|   homepageLatestPosts: true |  | ||||||
|  |  | ||||||
|   # social media share icons |  | ||||||
|   # shareButtons: |  | ||||||
|   #   twitter: true |  | ||||||
|   #   facebook: true |  | ||||||
|   #   linkedin: true |  | ||||||
|   #   reddit: true |  | ||||||
|   #   telegram: true |  | ||||||
|  |  | ||||||
|   # show "Latest Posts" section at bottom of content pages |  | ||||||
|   # latestPostsOnContent: true |  | ||||||
|  |  | ||||||
|   # footer: >- |  | ||||||
|   #   Some example text for the footer. |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # see https://gohugo.io/about/hugo-and-gdpr/#all-privacy-settings |  | ||||||
| # you probably want to keep this default |  | ||||||
| privacy: |  | ||||||
|   _merge: deep |  | ||||||
|  |  | ||||||
| languages: |  | ||||||
|   en: |  | ||||||
|     languageName: English |  | ||||||
|     title: Example Website |  | ||||||
|     weight: 1 |  | ||||||
|  |  | ||||||
|   es: |  | ||||||
|     languageName: Español |  | ||||||
|     title: Sitio web ejemplo |  | ||||||
|     weight: 2 |  | ||||||
|     params: |  | ||||||
|       description: Sitio web ejemplo para bobatheme |  | ||||||
| @@ -2,20 +2,36 @@ markup: | |||||||
|   highlight: |   highlight: | ||||||
|     noClasses: false |     noClasses: false | ||||||
|     lineNos: true |     lineNos: true | ||||||
|  |   goldmark: | ||||||
|  |     parser: | ||||||
|  |       attribute: | ||||||
|  |         block: true | ||||||
|  |         # this is enabled by default already | ||||||
|  |         #title: true | ||||||
| 
 | 
 | ||||||
| params: | params: | ||||||
|   readingtime: true |   readingtime: true | ||||||
| 
 | 
 | ||||||
| taxonomies: | taxonomies: | ||||||
|  |   category: categories | ||||||
|   tag: tags |   tag: tags | ||||||
|   author: authors |   author: authors | ||||||
|   series: series |   series: series | ||||||
| 
 | 
 | ||||||
|  | outputs: | ||||||
|  |   page: | ||||||
|  |     - html | ||||||
|  |     - markdown | ||||||
|  | 
 | ||||||
|  | outputFormats: | ||||||
|  |   markdown: | ||||||
|  |     ugly: true | ||||||
|  | 
 | ||||||
| privacy: | privacy: | ||||||
|   googleAnalytics: |   googleAnalytics: | ||||||
|     disable: true |     disable: true | ||||||
| 
 | 
 | ||||||
|   twitter: |   x: | ||||||
|     enableDNT: true |     enableDNT: true | ||||||
| 
 | 
 | ||||||
|   vimeo: |   vimeo: | ||||||
							
								
								
									
										59
									
								
								i18n/en.yaml
									
									
									
									
									
								
							
							
						
						
									
										59
									
								
								i18n/en.yaml
									
									
									
									
									
								
							| @@ -7,6 +7,8 @@ table_of_contents: | |||||||
|  |  | ||||||
| browser_no_video_support: | browser_no_video_support: | ||||||
|   other: "Your browser does not support video." |   other: "Your browser does not support video." | ||||||
|  | browser_no_video_support_link: | ||||||
|  |   other: "Click here to download it instead." | ||||||
|  |  | ||||||
| latest_posts: | latest_posts: | ||||||
|   other: "Latest Posts" |   other: "Latest Posts" | ||||||
| @@ -14,11 +16,11 @@ latest_posts: | |||||||
| see_also: | see_also: | ||||||
|   other: "SEE ALSO:" |   other: "SEE ALSO:" | ||||||
|  |  | ||||||
|  | copy_to_clipboard: | ||||||
|  |   other: "Copy" | ||||||
|  |  | ||||||
|  |  | ||||||
| # Meta items | # Meta items | ||||||
| long_date: |  | ||||||
|   other: "{{ .Date.Format `January 2, 2006` }}" |  | ||||||
|  |  | ||||||
| wordcount: | wordcount: | ||||||
|   one: "{{ . }} word" |   one: "{{ . }} word" | ||||||
|   other: "{{ . }} words" |   other: "{{ . }} words" | ||||||
| @@ -27,6 +29,12 @@ readingtime: | |||||||
|   one: "{{ . }} min" |   one: "{{ . }} min" | ||||||
|   other: "{{ . }} mins" |   other: "{{ . }} mins" | ||||||
|  |  | ||||||
|  | edit_history: | ||||||
|  |   other: "Edit history" | ||||||
|  |  | ||||||
|  | view_markdown: | ||||||
|  |   other: "View raw" | ||||||
|  |  | ||||||
|  |  | ||||||
| # Post count | # Post count | ||||||
| no_posts: | no_posts: | ||||||
| @@ -52,8 +60,8 @@ newer_post: | |||||||
|  |  | ||||||
|  |  | ||||||
| # ARIA labels | # ARIA labels | ||||||
| aria_header_link: | aria_heading_link: | ||||||
|   other: "header link" |   other: "heading link" | ||||||
|  |  | ||||||
| aria_back_to_top_button: | aria_back_to_top_button: | ||||||
|   other: "back to top button" |   other: "back to top button" | ||||||
| @@ -61,11 +69,14 @@ aria_back_to_top_button: | |||||||
| aria_rss_link: | aria_rss_link: | ||||||
|   other: "RSS feed link" |   other: "RSS feed link" | ||||||
|  |  | ||||||
| aria_post_meta_view_source: | aria_post_meta_edit_history: | ||||||
|   other: "link to page source" |   other: "link to page edit history" | ||||||
|  |  | ||||||
| aria_post_meta_translations: | aria_post_meta_view_markdown: | ||||||
|   other: "translations" |   other: "link to view raw markdown code of page" | ||||||
|  |  | ||||||
|  | aria_post_meta_categories: | ||||||
|  |   other: "categories" | ||||||
|  |  | ||||||
| aria_post_meta_tags: | aria_post_meta_tags: | ||||||
|   other: "tags" |   other: "tags" | ||||||
| @@ -88,6 +99,9 @@ aria_post_metadata: | |||||||
| aria_author_metadata: | aria_author_metadata: | ||||||
|   other: "author metadata" |   other: "author metadata" | ||||||
|  |  | ||||||
|  | aria_taxonomy_metadata: | ||||||
|  |   other: "taxonomy metadata" | ||||||
|  |  | ||||||
| aria_post_meta_date: | aria_post_meta_date: | ||||||
|   other: "date" |   other: "date" | ||||||
|  |  | ||||||
| @@ -100,17 +114,32 @@ aria_author_post_count: | |||||||
| aria_author_word_count: | aria_author_word_count: | ||||||
|   other: "word count" |   other: "word count" | ||||||
|  |  | ||||||
|  | aria_taxonomy_post_count: | ||||||
|  |   other: "post count" | ||||||
|  |  | ||||||
| aria_series_metadata: | aria_series_metadata: | ||||||
|   other: "series metadata" |   other: "series metadata" | ||||||
|  |  | ||||||
| aria_navbar: | aria_navbar: | ||||||
|   other: "navigation bar" |   other: "navigation bar" | ||||||
|  |  | ||||||
| aria_langpicker: |  | ||||||
|   other: "language picker" |  | ||||||
|  |  | ||||||
| aria_langpicker_list: |  | ||||||
|   other: "language list" |  | ||||||
|  |  | ||||||
| aria_table_of_contents: | aria_table_of_contents: | ||||||
|   other: "table of contents" |   other: "table of contents" | ||||||
|  |  | ||||||
|  | aria_share_twitter: | ||||||
|  |   other: "share to twitter button" | ||||||
|  |  | ||||||
|  | aria_share_facebook: | ||||||
|  |   other: "share to facebook button" | ||||||
|  |  | ||||||
|  | aria_share_linkedin: | ||||||
|  |   other: "share to linkedin button" | ||||||
|  |  | ||||||
|  | aria_share_reddit: | ||||||
|  |   other: "share to reddit button" | ||||||
|  |  | ||||||
|  | aria_share_telegram: | ||||||
|  |   other: "share to telegram button" | ||||||
|  |  | ||||||
|  | aria_share_print: | ||||||
|  |   other: "print article button" | ||||||
|   | |||||||
							
								
								
									
										113
									
								
								i18n/es.yaml
									
									
									
									
									
								
							
							
						
						
									
										113
									
								
								i18n/es.yaml
									
									
									
									
									
								
							| @@ -1,113 +0,0 @@ | |||||||
| # Misc |  | ||||||
| credit_comment: |  | ||||||
|   other: "<!-- bobatheme está disponible en GitHub basado en la licensia MIT: https://github.com/BBaoVanC/bobatheme. -->" |  | ||||||
|  |  | ||||||
| table_of_contents: |  | ||||||
|   other: "Índice" |  | ||||||
|  |  | ||||||
| browser_no_video_support: |  | ||||||
|   other: "Tu navegador de internet no admite video." |  | ||||||
|  |  | ||||||
| see_also: |  | ||||||
|   other: "Véase también:" |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Meta items |  | ||||||
| long_date: |  | ||||||
|   other: "{{ .Date.Day }} de {{ index .Data.meses (printf `%d` .Date.Month) }} de {{ .Date.Year }}" |  | ||||||
|  |  | ||||||
| wordcount: |  | ||||||
|   one: "{{ . }} palabra" |  | ||||||
|   other: "{{ . }} palabras" |  | ||||||
|  |  | ||||||
| readingtime: |  | ||||||
|   one: "{{ . }} min" |  | ||||||
|   other: "{{ . }} mins" |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Post count |  | ||||||
| no_posts: |  | ||||||
|   other: "¡No hay contenido para mostrar!" |  | ||||||
|  |  | ||||||
| # post_count: |  | ||||||
| #   one: "{{ . }} post" |  | ||||||
| #   other: "{{ . }} posts" |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # Navigation |  | ||||||
| read_more: |  | ||||||
|   other: "Leer más" |  | ||||||
|  |  | ||||||
| related_posts: |  | ||||||
|   other: "Publicaciones similares" |  | ||||||
|  |  | ||||||
| older_post: |  | ||||||
|   other: "Más antiguo" |  | ||||||
|  |  | ||||||
| newer_post: |  | ||||||
|   other: "Más nuevo" |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # ARIA labels |  | ||||||
| # aria_header_link: |  | ||||||
| #   other: "header link" |  | ||||||
|  |  | ||||||
| # aria_back_to_top_button: |  | ||||||
| #   other: "back to top button" |  | ||||||
|  |  | ||||||
| # aria_rss_link: |  | ||||||
| #   other: "RSS feed link" |  | ||||||
|  |  | ||||||
| # aria_post_meta_view_source: |  | ||||||
| #   other: "link to page source" |  | ||||||
|  |  | ||||||
| # aria_post_meta_translations: |  | ||||||
| #   other: "translations" |  | ||||||
|  |  | ||||||
| # aria_post_meta_tags: |  | ||||||
| #   other: "tags" |  | ||||||
|  |  | ||||||
| # aria_post_meta_reading_time: |  | ||||||
| #   other: "reading time" |  | ||||||
|  |  | ||||||
| # aria_post_meta_authors: |  | ||||||
| #   other: "authors" |  | ||||||
|  |  | ||||||
| # aria_post_meta_series: |  | ||||||
| #   other: "series" |  | ||||||
|  |  | ||||||
| # aria_breadcrumbnav: |  | ||||||
| #   other: "breadcrumb navigation bar" |  | ||||||
|  |  | ||||||
| # aria_post_metadata: |  | ||||||
| #   other: "post metadata" |  | ||||||
|  |  | ||||||
| # aria_author_metadata: |  | ||||||
| #   other: "author metadata" |  | ||||||
|  |  | ||||||
| # aria_post_meta_date: |  | ||||||
| #   other: "date" |  | ||||||
|  |  | ||||||
| # aria_post_meta_modified_date: |  | ||||||
| #   other: "last modified date" |  | ||||||
|  |  | ||||||
| # aria_author_post_count: |  | ||||||
| #   other: "post count" |  | ||||||
|  |  | ||||||
| # aria_author_word_count: |  | ||||||
| #   other: "word count" |  | ||||||
|  |  | ||||||
| # aria_series_metadata: |  | ||||||
| #   other: "series metadata" |  | ||||||
|  |  | ||||||
| # aria_navbar: |  | ||||||
| #   other: "navigation bar" |  | ||||||
|  |  | ||||||
| # aria_langpicker: |  | ||||||
| #   other: "language picker" |  | ||||||
|  |  | ||||||
| # aria_langpicker_list: |  | ||||||
| #   other: "language list" |  | ||||||
|  |  | ||||||
| # aria_table_of_contents: |  | ||||||
| #   other: "table of contents" |  | ||||||
| @@ -1,8 +0,0 @@ | |||||||
| <h{{ .Level }} id="{{ .Anchor | safeURL }}" class="section-header"> |  | ||||||
|     {{ .Text | safeHTML }} |  | ||||||
|     <a href="#{{ .Anchor | safeURL }}"> |  | ||||||
|         <span class="section-header-link" aria-label="{{ i18n "aria_header_link" }}"> |  | ||||||
|             {{ partial "icon.html" "link" }} |  | ||||||
|         </span> |  | ||||||
|     </a> |  | ||||||
| </h{{ .Level }}> |  | ||||||
| @@ -1,50 +0,0 @@ | |||||||
| {{ partial "credit.html" }} |  | ||||||
| <!DOCTYPE html> |  | ||||||
| <html lang="{{ .Language.Lang }}"> |  | ||||||
|     {{ partial "head.html" . }} |  | ||||||
|  |  | ||||||
|     <body> |  | ||||||
|         <a id="top" name="top" aria-hidden="true"></a> |  | ||||||
|  |  | ||||||
|         <div class="top"> |  | ||||||
|             {{ partial "top.html" . }} |  | ||||||
|         </div> |  | ||||||
|  |  | ||||||
|         {{ if not .IsHome }} |  | ||||||
|             {{ partial "breadcrumb.html" . }} |  | ||||||
|         {{ end }} |  | ||||||
|  |  | ||||||
|         <main> |  | ||||||
|             {{ block "main" . }} |  | ||||||
|                 THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it) |  | ||||||
|             {{ end }} |  | ||||||
|         </main> |  | ||||||
|  |  | ||||||
|         {{ if or .Site.Copyright .Site.Params.footer }} |  | ||||||
|             <hr> |  | ||||||
|             <footer> |  | ||||||
|                 <small> |  | ||||||
|                     {{ with .Site.Copyright }} |  | ||||||
|                         <p>{{ . | safeHTML }}</p> |  | ||||||
|                     {{ end }} |  | ||||||
|  |  | ||||||
|                     {{ with .Site.Params.footer }} |  | ||||||
|                         {{ . | $.RenderString (dict "display" "block") }} |  | ||||||
|                     {{ end }} |  | ||||||
|                 </small> |  | ||||||
|             </footer> |  | ||||||
|         {{ end }} |  | ||||||
|  |  | ||||||
|         <a id="back-to-top" href="#top" aria-label="{{ i18n "aria_back_to_top_button" }}"> |  | ||||||
|             {{ partial "icon.html" "chevron-up" }} |  | ||||||
|         </a> |  | ||||||
|         <noscript> |  | ||||||
|             <style> |  | ||||||
|                 #back-to-top { |  | ||||||
|                     display: block; |  | ||||||
|                 } |  | ||||||
|             </style> |  | ||||||
|         </noscript> |  | ||||||
|     </body> |  | ||||||
|  |  | ||||||
| </html> |  | ||||||
| @@ -1,33 +0,0 @@ | |||||||
| {{ define "main" }} |  | ||||||
|     <h1> |  | ||||||
|         {{ with .Params.icon }}{{ partial "icon.html" . }}{{ end }} |  | ||||||
|         {{ .Title | markdownify }} |  | ||||||
|         {{ partial "rss-link.html" . }} |  | ||||||
|     </h1> |  | ||||||
|  |  | ||||||
|     <div class="list-page-content"> |  | ||||||
|         {{ with .Sections }} |  | ||||||
|             <div class="sections"> |  | ||||||
|                 {{ range . }} |  | ||||||
|                     {{ .Render "summary/section" }} |  | ||||||
|                 {{ end }} |  | ||||||
|             </div> |  | ||||||
|         {{ end }} |  | ||||||
|  |  | ||||||
|         <div class="page-list"> |  | ||||||
|             {{ with .Paginator.Pages }} |  | ||||||
|                 <ul> |  | ||||||
|                     {{ range . }} |  | ||||||
|                         <li>{{ .Render "summary/post" }}</li> |  | ||||||
|                     {{ end }} |  | ||||||
|                 </ul> |  | ||||||
|             {{ else }} |  | ||||||
|                 <div> |  | ||||||
|                     {{ i18n "no_posts" }} |  | ||||||
|                 </div> |  | ||||||
|             {{ end }} |  | ||||||
|         </div> |  | ||||||
|     </div> |  | ||||||
|  |  | ||||||
|     {{ partial "pagination.html" . }} |  | ||||||
| {{ end }} |  | ||||||
| @@ -1,95 +0,0 @@ | |||||||
| {{ define "main" }} |  | ||||||
|     <div class="post-title"> |  | ||||||
|         <h1> |  | ||||||
|             {{ .Title | markdownify }} |  | ||||||
|             {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} |  | ||||||
|         </h1> |  | ||||||
|     </div> |  | ||||||
|  |  | ||||||
|     {{ partial "post-metadata/full.html" . }} |  | ||||||
|     {{ partial "series-box.html" . }} |  | ||||||
|  |  | ||||||
|     {{ if .Params.Toc }} |  | ||||||
|         <div class="table-of-contents" aria-label="{{ i18n "aria_table_of_contents" }}"> |  | ||||||
|             <details> |  | ||||||
|                 <summary>{{ i18n "table_of_contents" }}</summary> |  | ||||||
|                 {{ .TableOfContents }} |  | ||||||
|             </details> |  | ||||||
|         </div> |  | ||||||
|         <div class="table-of-contents print"> |  | ||||||
|             {{ i18n "table_of_contents" }} |  | ||||||
|             {{ .TableOfContents }} |  | ||||||
|         </div> |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     {{ with .Resources.GetMatch "feature" }} |  | ||||||
|         <div class="post-media"> |  | ||||||
|             {{ partial "figure.html" (dict "src" . "border" true) }} |  | ||||||
|         </div> |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     <div class="post-content"> |  | ||||||
|         {{ .Content }} |  | ||||||
|     </div> |  | ||||||
|  |  | ||||||
|     {{ partial "series-box.html" . }} |  | ||||||
|  |  | ||||||
|     {{ if or .NextInSection .PrevInSection }} |  | ||||||
|         <div class="prevnext"> |  | ||||||
|             {{ with .NextInSection }} |  | ||||||
|                 <a class="prev" href="{{ .Permalink }}"> |  | ||||||
|                     <div class="prev-caption"> |  | ||||||
|                         ← {{ i18n "newer_post" }} |  | ||||||
|                     </div> |  | ||||||
|                     <div class="prev-post"> |  | ||||||
|                         {{ .Title | markdownify }} |  | ||||||
|                     </div> |  | ||||||
|                 </a> |  | ||||||
|             {{ else }} |  | ||||||
|                 <div class="prev"></div> |  | ||||||
|             {{ end }} |  | ||||||
|  |  | ||||||
|             {{ with .PrevInSection }} |  | ||||||
|                 <a class="next" href="{{ .Permalink }}"> |  | ||||||
|                     <div class="next-caption"> |  | ||||||
|                         {{ i18n "older_post" }} → |  | ||||||
|                     </div> |  | ||||||
|                     <div class="next-post"> |  | ||||||
|                         {{ .Title | markdownify }} |  | ||||||
|                     </div> |  | ||||||
|                 </a> |  | ||||||
|             {{ else }} |  | ||||||
|                 <div class="next"></div> |  | ||||||
|             {{ end }} |  | ||||||
|         </div> |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     {{ if .Site.Params.shareButtons }} |  | ||||||
|         {{ partial "share.html" . }} |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     {{ if .Params.comments }} |  | ||||||
|         <div class="comments"> |  | ||||||
|             {{ partial "comments.html" . }} |  | ||||||
|         </div> |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     {{ $related := .Site.RegularPages.Related . | first 10 }} |  | ||||||
|     {{ with $related }} |  | ||||||
|         <div class="related-posts full-width-page-list"> |  | ||||||
|             <hr> |  | ||||||
|             <h1>{{ i18n "related_posts" }}</h1> |  | ||||||
|             <div class="page-list"> |  | ||||||
|                 <ul> |  | ||||||
|                     {{ range . }} |  | ||||||
|                         <li>{{ .Render "summary/post" }}</li> |  | ||||||
|                     {{ end }} |  | ||||||
|                 </ul> |  | ||||||
|             </div> |  | ||||||
|         </div> |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     {{ if .Site.Params.latestPostsOnContent }} |  | ||||||
|         {{ partialCached "latest-posts.html" . }} |  | ||||||
|     {{ end }} |  | ||||||
| {{ end }} |  | ||||||
| @@ -1,16 +0,0 @@ | |||||||
| <div class="author"> |  | ||||||
|     <h2 class="author-name"> |  | ||||||
|         <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> |  | ||||||
|         {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} |  | ||||||
|     </h2> |  | ||||||
|  |  | ||||||
|     {{ partial "post-metadata/author.html" . }} |  | ||||||
|  |  | ||||||
|     <div class="author-description"> |  | ||||||
|         {{ partial "description-or-summary.html" . }} |  | ||||||
|     </div> |  | ||||||
|  |  | ||||||
|     <div class="readmore"> |  | ||||||
|         <a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a> |  | ||||||
|     </div> |  | ||||||
| </div> |  | ||||||
| @@ -1,23 +0,0 @@ | |||||||
| <div class="post"> |  | ||||||
|     <h2 class="post-title"> |  | ||||||
|         {{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }} |  | ||||||
|         <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> |  | ||||||
|         {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} |  | ||||||
|     </h2> |  | ||||||
|  |  | ||||||
|     {{ partial "post-metadata/short.html" . }} |  | ||||||
|  |  | ||||||
|     {{ with .Resources.GetMatch "feature" }} |  | ||||||
|         <div class="post-media"> |  | ||||||
|             {{ partial "figure.html" (dict "src" . "border" true) }} |  | ||||||
|         </div> |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     <div class="post-description"> |  | ||||||
|         {{ partial "description-or-summary.html" . }} |  | ||||||
|     </div> |  | ||||||
|  |  | ||||||
|     <div class="readmore"> |  | ||||||
|         <a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a> |  | ||||||
|     </div> |  | ||||||
| </div> |  | ||||||
| @@ -1,26 +0,0 @@ | |||||||
| <div class="post"> |  | ||||||
|     <h2 class="post-title"> |  | ||||||
|         {{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }} |  | ||||||
|         <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> |  | ||||||
|         {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} |  | ||||||
|     </h2> |  | ||||||
|  |  | ||||||
|     {{ partial "post-metadata/series.html" . }} |  | ||||||
|  |  | ||||||
|     <div class="post-description"> |  | ||||||
|         {{ partial "description-or-summary.html" . }} |  | ||||||
|     </div> |  | ||||||
|  |  | ||||||
|     <div class="series-pages"> |  | ||||||
|         <ul> |  | ||||||
|             {{ $i := 0 }} |  | ||||||
|             {{ $total := len .Data.Pages }} |  | ||||||
|             {{ range .Data.Pages.Reverse }} |  | ||||||
|                 {{ $i = add 1 $i }} |  | ||||||
|                 {{ .Scratch.Set "series_position" $i }} |  | ||||||
|                 {{ .Scratch.Set "series_total" $total }} |  | ||||||
|                 <li>{{ .Render "summary/series_post" }}</li> |  | ||||||
|             {{ end }} |  | ||||||
|         </ul> |  | ||||||
|     </div> |  | ||||||
| </div> |  | ||||||
| @@ -1,29 +0,0 @@ | |||||||
| <div class="post"> |  | ||||||
|     <div class="post-series-position"> |  | ||||||
|         {{ if .Scratch.Get "series_position" }} |  | ||||||
|             ({{ .Scratch.Get "series_position" }}/{{ .Scratch.Get "series_total" }}) |  | ||||||
|         {{ end }} |  | ||||||
|     </div> |  | ||||||
|  |  | ||||||
|     <h2 class="post-title"> |  | ||||||
|         {{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }} |  | ||||||
|         <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> |  | ||||||
|         {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} |  | ||||||
|     </h2> |  | ||||||
|  |  | ||||||
|     {{ partial "post-metadata/short.html" . }} |  | ||||||
|  |  | ||||||
|     {{ with .Resources.GetMatch "feature" }} |  | ||||||
|         <div class="post-media"> |  | ||||||
|             {{ partial "figure.html" (dict "src" . "border" true) }} |  | ||||||
|         </div> |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     <div class="post-description"> |  | ||||||
|         {{ partial "description-or-summary.html" . }} |  | ||||||
|     </div> |  | ||||||
|  |  | ||||||
|     <div class="readmore"> |  | ||||||
|         <a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a> |  | ||||||
|     </div> |  | ||||||
| </div> |  | ||||||
							
								
								
									
										15
									
								
								layouts/_markup/render-codeblock.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								layouts/_markup/render-codeblock.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | |||||||
|  | {{ $type := "text" }} | ||||||
|  | {{ with .Type }} | ||||||
|  |     {{ $type = . }} | ||||||
|  | {{ end }} | ||||||
|  | <div class="code-block"> | ||||||
|  |     <div class="code-header"> | ||||||
|  |         <pre class="code-type">{{ $type }}</pre> | ||||||
|  |         <a href="javascript:void(0)" class="code-copy-button"> | ||||||
|  |             {{ i18n "copy_to_clipboard" }} | ||||||
|  |         </a> | ||||||
|  |     </div> | ||||||
|  |  | ||||||
|  |     {{/* a div.highlight is already created by highlight function */}} | ||||||
|  |     {{ highlight .Inner $type }} | ||||||
|  | </div> | ||||||
							
								
								
									
										8
									
								
								layouts/_markup/render-heading.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								layouts/_markup/render-heading.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | |||||||
|  | <h{{ .Level }} id="{{ .Anchor | safeURL }}" class="section-heading"> | ||||||
|  |     {{ .Text | safeHTML }} | ||||||
|  |     <a class="content-heading-link" href="#{{ .Anchor | safeURL }}"> | ||||||
|  |         <span aria-label="{{ i18n "aria_heading_link" }}"> | ||||||
|  |             {{ partial "icon.html" "link" }} | ||||||
|  |         </span> | ||||||
|  |     </a> | ||||||
|  | </h{{ .Level }}> | ||||||
| @@ -1,4 +1,4 @@ | |||||||
| <nav class="breadcrumb" aria-label="{{ i18n "aria_breadcrumbnav" }}"> | <nav class="body-module--center breadcrumb" aria-label="{{ i18n "aria_breadcrumbnav" }}"> | ||||||
|     <ul> |     <ul> | ||||||
|         {{ template "breadcrumbnav" (dict "p1" . "p2" .) }} |         {{ template "breadcrumbnav" (dict "p1" . "p2" .) }} | ||||||
|     </ul> |     </ul> | ||||||
							
								
								
									
										20
									
								
								layouts/_partials/comments.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								layouts/_partials/comments.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | |||||||
|  | {{/* put comments CSS here instead of in <head> so that it doesn't get | ||||||
|  |    * loaded unnecessarily on regular pages | ||||||
|  |    */}} | ||||||
|  | {{ with resources.Get "css/comments.css" | fingerprint "sha512" }} | ||||||
|  |     <link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"> | ||||||
|  | {{ end }} | ||||||
|  |  | ||||||
|  | <h2>Comments</h2> | ||||||
|  | <p class="email-address-notice"> | ||||||
|  |     If you provide an email address, you can enable notifications for | ||||||
|  |     replies to your comment. It will not be shown publicly. | ||||||
|  | </p> | ||||||
|  |  | ||||||
|  | <noscript> | ||||||
|  |     <p class="enable-javascript-notice"> | ||||||
|  |         Enable JavaScript to see the comment section. | ||||||
|  |     </p> | ||||||
|  | </noscript> | ||||||
|  |  | ||||||
|  | <section id="isso-thread" data-title="{{ .Title }}"></section> | ||||||
							
								
								
									
										23
									
								
								layouts/_partials/embed-resource.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								layouts/_partials/embed-resource.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | |||||||
|  | {{ if eq .ResourceType "image" }} | ||||||
|  |     {{/* TODO: figure out whether loading="lazy" should be set because MDN | ||||||
|  |        *       claims that images won't work with JS disabled since it would | ||||||
|  |        *       make tracking possible, but my experience says otherwise | ||||||
|  |        */}} | ||||||
|  |     <img class="figure-media" src="{{ .Permalink }}" {{ with .Params.alt }}alt="{{ . }}"{{ end }} /> | ||||||
|  | {{ else if eq .ResourceType "video" }} | ||||||
|  |     <video class="figure-media" controls preload="metadata"> | ||||||
|  |         {{ with .Params.alt }} | ||||||
|  |             {{ warnf "video does not support alt text, '%s'" . }} | ||||||
|  |         {{ end }} | ||||||
|  |         <source src="{{ .Permalink }}" /> | ||||||
|  |         {{ i18n "browser_no_video_support" }} | ||||||
|  |         <a href="{{ .Permalink }}" target="_blank" rel="noopener"> | ||||||
|  |             {{ i18n "browser_no_video_support_link" }} | ||||||
|  |         </a> | ||||||
|  |     </video> | ||||||
|  | {{ else }} | ||||||
|  |     {{/* TODO: could consider implementing more types, listed at: | ||||||
|  |        * https://www.iana.org/assignments/media-types/media-types.xhtml | ||||||
|  |        */}} | ||||||
|  |     {{ errorf "Handling %q resource not supported" .ResourceType }} | ||||||
|  | {{ end }} | ||||||
							
								
								
									
										10
									
								
								layouts/_partials/feature-figure.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								layouts/_partials/feature-figure.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | |||||||
|  | {{ with .Resources.Get "feature" }} | ||||||
|  |     <div class="post-media"> | ||||||
|  |         <figure> | ||||||
|  |             {{ partial "embed-resource.html" . }} | ||||||
|  |             {{ with .Title }} | ||||||
|  |                 <figcaption>{{ . | markdownify }}</figcaption> | ||||||
|  |             {{ end }} | ||||||
|  |         </figure> | ||||||
|  |     </div> | ||||||
|  | {{ end }} | ||||||
							
								
								
									
										106
									
								
								layouts/_partials/head.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										106
									
								
								layouts/_partials/head.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,106 @@ | |||||||
|  | <head> | ||||||
|  |     <meta charset="UTF-8"> | ||||||
|  |     <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||||
|  |     {{ hugo.Generator }} | ||||||
|  |  | ||||||
|  |     {{ with resources.Get "css/bobastyle.css" | fingerprint "sha512" }} | ||||||
|  |         <link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"> | ||||||
|  |     {{ end }} | ||||||
|  |     {{ with resources.Get "css/noscript.css" | fingerprint "sha512" }} | ||||||
|  |         <noscript> | ||||||
|  |             <link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"> | ||||||
|  |         </noscript> | ||||||
|  |     {{ end }} | ||||||
|  |  | ||||||
|  |     {{ with resources.Get "css/syntax.css" | fingerprint "sha512" }} | ||||||
|  |         <link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous" media="print" onload="this.media='all'"> | ||||||
|  |     {{ end }} | ||||||
|  |     {{ with resources.Get "css/syntax-light.css" | fingerprint "sha512" }} | ||||||
|  |         <link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous" media="print" onload="this.media='all'"> | ||||||
|  |     {{ end }} | ||||||
|  |  | ||||||
|  |     {{ with resources.Get "js/bobatheme.js" | fingerprint "sha512" }} | ||||||
|  |         <script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script> | ||||||
|  |     {{ end }} | ||||||
|  |     {{ if not hugo.IsServer }} | ||||||
|  |         <script defer data-domain="bbaovanc.com" src="https://plausible.bbaovanc.com/js/bobalytics.outbound-links.js"></script> | ||||||
|  |         <script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script> | ||||||
|  |         {{ with resources.Get "js/share-event.js" | fingerprint "sha512" }} | ||||||
|  |             <script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script> | ||||||
|  |         {{ end }} | ||||||
|  |     {{ end }} | ||||||
|  |     {{ $isso_url := .Permalink }} | ||||||
|  |     {{ if .IsTranslated }} | ||||||
|  |         {{ with index .AllTranslations 0 }} | ||||||
|  |             {{ $isso_url = .Permalink }} | ||||||
|  |         {{ end }} | ||||||
|  |     {{ end }} | ||||||
|  |     <script defer src="https://isso.bbaovanc.com/js/embed.min.js" | ||||||
|  |             data-isso-id="{{ $isso_url }}" | ||||||
|  |             data-isso-default-lang="{{ .Language.Lang }}" | ||||||
|  |             data-isso-css="true" | ||||||
|  |             data-isso-max-comments-top="inf" | ||||||
|  |             data-isso-max-comments-nested="inf" | ||||||
|  |             data-isso-reveal-on-click="5" | ||||||
|  |             {{/* | ||||||
|  |             data-isso-avatar-bg="#111" | ||||||
|  |             data-isso-avatar-fg="#9abf88 #5698c4 #e279a3 #9163b6 ..." | ||||||
|  |             */}} | ||||||
|  |             data-isso-vote="true" | ||||||
|  |             {{/* | ||||||
|  |             data-isso-vote-levels="" | ||||||
|  |             */}} | ||||||
|  |             data-isso-feed="true" | ||||||
|  |             data-isso-require-email="false" | ||||||
|  |             data-isso-reply-notifications="true" | ||||||
|  |             data-isso-reply-notifications-default-enabled="true" | ||||||
|  |  | ||||||
|  |             {{ with (.GetTerms "authors") }} | ||||||
|  |                 {{ $authorHashes := slice }} | ||||||
|  |                 {{ range . }} | ||||||
|  |                     {{ with .Params.issoUserID }} | ||||||
|  |                         {{ $authorHashes = $authorHashes | append . }} | ||||||
|  |                     {{ end }} | ||||||
|  |                 {{ end }} | ||||||
|  |  | ||||||
|  |                 data-isso-page-author-hashes="{{ delimit $authorHashes "," }}" | ||||||
|  |             {{ end }} | ||||||
|  |             > | ||||||
|  |     </script> | ||||||
|  |  | ||||||
|  |     {{ if eq .Layout "search" }} | ||||||
|  |         {{ with resources.Get "css/search.css" | fingerprint "sha512" }} | ||||||
|  |             <link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"> | ||||||
|  |         {{ end }} | ||||||
|  |  | ||||||
|  |         <link rel="stylesheet" type="text/css" href="{{ absURL "pagefind/pagefind-ui.css" }}" crossorigin="anonymous"> | ||||||
|  |         <script src="{{ absURL "pagefind/pagefind-ui.js" }}" crossorigin="anonymous"></script> | ||||||
|  |         <script> | ||||||
|  |             window.addEventListener('DOMContentLoaded', (event) => { | ||||||
|  |                 new PagefindUI({ element: "#search-box", showSubResults: true }); | ||||||
|  |             }); | ||||||
|  |         </script> | ||||||
|  |     {{ end }} | ||||||
|  |  | ||||||
|  |     {{ with .Site.Params.faviconSVG }} | ||||||
|  |         <link rel="icon" href="{{ . | absURL }}" /> | ||||||
|  |     {{ end }} | ||||||
|  |     {{ with .Site.Params.appleTouchPNG }} | ||||||
|  |         <link rel="apple-touch-icon" href="{{ . | absURL }}" /> | ||||||
|  |     {{ end }} | ||||||
|  |  | ||||||
|  |     <title>{{ .Render "head_title" }}</title> | ||||||
|  |  | ||||||
|  |     {{ range .Site.Params.rel_me }} | ||||||
|  |         <link rel="me" href="{{ . }}" /> | ||||||
|  |     {{ end }} | ||||||
|  |  | ||||||
|  |     {{ partial "seo-tags/opengraph.html" . }} | ||||||
|  |     {{ partial "seo-tags/twitter-cards.html" . }} | ||||||
|  |     {{ partial "seo-tags/schema.html" . }} | ||||||
|  |     {{ partial "seo-tags/link.html" . }} | ||||||
|  |     {{ partial "seo-tags/author.html" . }} | ||||||
|  |  | ||||||
|  |     <meta name="language" content="{{ .Language.Lang }}"> | ||||||
|  |     <meta name="description" content="{{ (partial "seo-description.html" .) | plainify }}"> | ||||||
|  | </head> | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| {{- $icon_resource := resources.Get (printf "jam/icons/%s.svg" .) -}} | {{- $icon_resource := resources.Get (printf "jam/icons/%s.svg" .) -}} | ||||||
| {{- $icon := $icon_resource.Content -}} | {{- $icon := $icon_resource.Content -}} | ||||||
| {{- $icon = replaceRE `<svg` `<svg class="icon"` $icon -}} | {{- $icon = replaceRE `<svg` (printf `<svg class="icon icon-%s"` .) $icon -}} | ||||||
| {{- $icon = replaceRE `</svg>` (printf `<title>%s icon</title></svg>` .) $icon -}} | {{- $icon = replaceRE `</svg>` (printf `<title>%s icon</title></svg>` .) $icon -}} | ||||||
| {{- $icon = replaceRE `(width|height)="[0-9]*"` "" $icon -}} | {{- $icon = replaceRE `(width|height)="[0-9]*"` "" $icon -}} | ||||||
| {{- $icon | safeHTML -}} | {{- $icon | safeHTML -}} | ||||||
							
								
								
									
										13
									
								
								layouts/_partials/page-list.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								layouts/_partials/page-list.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | |||||||
|  | <div class="page-list"> | ||||||
|  |     {{ with . }} | ||||||
|  |         {{ range . }} | ||||||
|  |             <article class="page"> | ||||||
|  |                 {{ .Render "summary" }} | ||||||
|  |             </article> | ||||||
|  |         {{ end }} | ||||||
|  |     {{ else }} | ||||||
|  |         <div> | ||||||
|  |             {{ i18n "no_posts" }} | ||||||
|  |         </div> | ||||||
|  |     {{ end }} | ||||||
|  | </div> | ||||||
| @@ -1,16 +1,16 @@ | |||||||
| <div class="author-metadata" aria-label="{{ i18n "aria_author_metadata" }}"> | <div class="page-metadata" aria-label="{{ i18n "aria_author_metadata" }}"> | ||||||
|     {{/* Calculate the total word count */}} |     {{/* Calculate the total word count */}} | ||||||
|     {{ $total_words := 0 }} |     {{ $total_words := 0 }} | ||||||
|     {{ range .Data.Pages }} |     {{ range .Data.Pages }} | ||||||
|         {{ $total_words = add $total_words .WordCount }} |         {{ $total_words = add $total_words .WordCount }} | ||||||
|     {{ end }} |     {{ end }} | ||||||
| 
 | 
 | ||||||
|     <span class="author-meta-item" aria-label="{{ i18n "aria_author_post_count" }}"> |     <span class="page-metadata-item" aria-label="{{ i18n "aria_author_post_count" }}"> | ||||||
|         {{ partial "icon.html" "newspaper" }} |         {{ partial "icon.html" "newspaper" }} | ||||||
|         {{ i18n "post_count" (len .Data.Pages) }} |         {{ i18n "post_count" (len .Data.Pages) }} | ||||||
|     </span> |     </span> | ||||||
| 
 | 
 | ||||||
|     <span class="author-meta-item" aria-label="{{ i18n "aria_author_word_count" }}"> |     <span class="page-metadata-item" aria-label="{{ i18n "aria_author_word_count" }}"> | ||||||
|         {{ partial "icon.html" "align-left" }} |         {{ partial "icon.html" "align-left" }} | ||||||
|         {{ i18n "wordcount" $total_words }} |         {{ i18n "wordcount" $total_words }} | ||||||
|     </span> |     </span> | ||||||
							
								
								
									
										9
									
								
								layouts/_partials/page-metadata/item/authors.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								layouts/_partials/page-metadata/item/authors.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | |||||||
|  | {{ with .GetTerms "authors" }} | ||||||
|  |     <span class="page-metadata-item authors" aria-label="{{ i18n "aria_post_meta_authors" }}"> | ||||||
|  |         {{ partial "icon.html" "user-circle" }} | ||||||
|  |  | ||||||
|  |         {{ range . }} | ||||||
|  |             <a href="{{ .Permalink }}" data-pagefind-filter="author">{{ .LinkTitle }}</a> | ||||||
|  |         {{ end }} | ||||||
|  |     </span> | ||||||
|  | {{ end }} | ||||||
							
								
								
									
										13
									
								
								layouts/_partials/page-metadata/item/categories.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								layouts/_partials/page-metadata/item/categories.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | |||||||
|  | {{ with (.GetTerms "categories") }} | ||||||
|  |     {{ $categories := slice }} | ||||||
|  |     {{ range . }} | ||||||
|  |         {{ $categories = $categories | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }} | ||||||
|  |     {{ end }} | ||||||
|  |  | ||||||
|  |     <div class="page-metadata-section categories" aria-label="{{ i18n "aria_post_meta_categories" }}"> | ||||||
|  |         {{ partial "icon.html" "folder" }} | ||||||
|  |         {{ range . }} | ||||||
|  |             <a href="{{ .Permalink }}" data-pagefind-filter="category">{{ .LinkTitle }}</a> | ||||||
|  |         {{ end }} | ||||||
|  |     </div> | ||||||
|  | {{ end }} | ||||||
| @@ -0,0 +1,8 @@ | |||||||
|  | <span class="page-metadata-item page-meta-comments-counter" aria-label="comments counter"> | ||||||
|  |     {{ partial "icon.html" "message" }} | ||||||
|  |     {{/* TODO: figure out if there's a nicer way to generate this URL | ||||||
|  |        * the current issue is that we can't use RelRef, since content view means that we don't | ||||||
|  |        * have access to the original page context | ||||||
|  |        */}} | ||||||
|  |     <a href="{{ .RelPermalink }}#isso-thread">comments</a> | ||||||
|  | </span> | ||||||
							
								
								
									
										8
									
								
								layouts/_partials/page-metadata/item/edithistory.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								layouts/_partials/page-metadata/item/edithistory.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | |||||||
|  | {{ if and .Site.Params.gitHistoryURL .File.Path }} | ||||||
|  |     <span class="page-metadata-item post-meta-edit-history" aria-label="{{ i18n "aria_post_meta_edit_history" }}"> | ||||||
|  |         {{ partial "icon.html" "history" }} | ||||||
|  |         <a href="{{ printf "%s/content/%s" .Site.Params.gitHistoryURL .File.Path }}" target="_blank" rel="noopener"> | ||||||
|  |             {{- i18n "edit_history" -}} | ||||||
|  |         </a> | ||||||
|  |     </span> | ||||||
|  | {{ end }} | ||||||
| @@ -1,5 +1,5 @@ | |||||||
| {{ if ne .Site.Params.readingtime false }} | {{ if ne .Site.Params.readingtime false }} | ||||||
|     <span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_reading_time" }}"> |     <span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_reading_time" }}"> | ||||||
|         {{ partial "icon.html" "clock" }} |         {{ partial "icon.html" "clock" }} | ||||||
|         {{ i18n "readingtime" .ReadingTime }} |         {{ i18n "readingtime" .ReadingTime }} | ||||||
|     </span> |     </span> | ||||||
							
								
								
									
										8
									
								
								layouts/_partials/page-metadata/item/series.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								layouts/_partials/page-metadata/item/series.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | |||||||
|  | {{ with (.GetTerms "series") }} | ||||||
|  |     <div class="page-metadata-section series" aria-label="{{ i18n "aria_post_meta_series" }}"> | ||||||
|  |         {{ partial "icon.html" "files" }} | ||||||
|  |         {{ range . }} | ||||||
|  |             <a href="{{ .Permalink }}" data-pagefind-filter="series">{{ .LinkTitle }}</a> | ||||||
|  |         {{ end }} | ||||||
|  |     </div> | ||||||
|  | {{ end }} | ||||||
							
								
								
									
										10
									
								
								layouts/_partials/page-metadata/item/tags.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								layouts/_partials/page-metadata/item/tags.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | |||||||
|  | {{ with (.GetTerms "tags") }} | ||||||
|  |     {{ $tags := slice }} | ||||||
|  |  | ||||||
|  |     <div class="page-metadata-section tags" aria-label="{{ i18n "aria_post_meta_tags" }}"> | ||||||
|  |         {{ partial "icon.html" "tag" }} | ||||||
|  |         {{ range . }} | ||||||
|  |             <a href="{{ .Permalink }}" data-pagefind-filter="tag">{{ .LinkTitle }}</a> | ||||||
|  |         {{ end }} | ||||||
|  |     </div> | ||||||
|  | {{ end }} | ||||||
							
								
								
									
										8
									
								
								layouts/_partials/page-metadata/item/viewraw.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								layouts/_partials/page-metadata/item/viewraw.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | |||||||
|  | {{ with .OutputFormats.Get "markdown" }} | ||||||
|  |     <span class="page-metadata-item post-meta-view-markdown" aria-label="{{ i18n "aria_post_meta_view_markdown" }}"> | ||||||
|  |         {{ partial "icon.html" "code" }} | ||||||
|  |         <a href="{{ .Permalink }}" target="_blank"> | ||||||
|  |             {{- i18n "view_markdown" -}} | ||||||
|  |         </a> | ||||||
|  |     </span> | ||||||
|  | {{ end }} | ||||||
							
								
								
									
										30
									
								
								layouts/_partials/page-metadata/post-full.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								layouts/_partials/page-metadata/post-full.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | |||||||
|  | {{ if or .Date .Params.authors .Site.Params.readingtime .Site.Params.gitFileURL }} | ||||||
|  |     <div class="page-metadata" aria-label="{{ i18n "aria_post_metadata" }}"> | ||||||
|  |         {{ if .Date }} | ||||||
|  |             <span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_date" }}"> | ||||||
|  |                 {{ partial "icon.html" "calendar" }} | ||||||
|  |                 {{ partial "time-element.html" .Date }} | ||||||
|  |             </span> | ||||||
|  |  | ||||||
|  |             {{/* TODO: make this be a tooltip */}} | ||||||
|  |             {{/* DISABLED | ||||||
|  |             {{ if ne (time.Format "2006-01-02" .Lastmod) (time.Format "2006-01-02" .Date) }} | ||||||
|  |                 <span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_modified_date" }}"> | ||||||
|  |                     {{ partial "icon.html" "pencil" }} | ||||||
|  |                     {{ partial "time-element.html" .Lastmod }} | ||||||
|  |                     {{ end }} | ||||||
|  |                 </span> | ||||||
|  |             */}} | ||||||
|  |         {{ end }} | ||||||
|  |  | ||||||
|  |         {{ partial "page-metadata/item/authors.html" . }} | ||||||
|  |         {{ partial "page-metadata/item/readingtime.html" . }} | ||||||
|  |         {{ partial "page-metadata/item/edithistory.html" . }} | ||||||
|  |         {{ partial "page-metadata/item/viewraw.html" . }} | ||||||
|  |         {{ partial "page-metadata/item/comments-counter.html" . }} | ||||||
|  |  | ||||||
|  |         {{ partial "page-metadata/item/categories.html" . }} | ||||||
|  |  | ||||||
|  |         {{ partial "page-metadata/item/tags.html" . }} | ||||||
|  |     </div> | ||||||
|  | {{ end }} | ||||||
							
								
								
									
										18
									
								
								layouts/_partials/page-metadata/post-short.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								layouts/_partials/page-metadata/post-short.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | |||||||
|  | {{ if or .Date .Params.authors .Site.Params.readingtime }} | ||||||
|  |     <div class="page-metadata" aria-label="{{ i18n "aria_post_metadata" }}"> | ||||||
|  |         {{ if .Date }} | ||||||
|  |             <span class="page-metadata-item" aria-label="date"> | ||||||
|  |                 {{ partial "icon.html" "calendar" }} | ||||||
|  |                 {{ partial "time-element.html" .Date }} | ||||||
|  |             </span> | ||||||
|  |         {{ end }} | ||||||
|  |  | ||||||
|  |         {{ partial "page-metadata/item/authors.html" . }} | ||||||
|  |         {{ partial "page-metadata/item/readingtime.html" . }} | ||||||
|  |         {{ partial "page-metadata/item/comments-counter.html" . }} | ||||||
|  |  | ||||||
|  |         {{ partial "page-metadata/item/series.html" . }} | ||||||
|  |         {{ partial "page-metadata/item/categories.html" . }} | ||||||
|  |         {{ partial "page-metadata/item/tags.html" . }} | ||||||
|  |     </div> | ||||||
|  | {{ end }} | ||||||
| @@ -1,11 +1,11 @@ | |||||||
| <div class="post-metadata" aria-label="{{ i18n "aria_series_metadata" }}"> | <div class="page-metadata" aria-label="{{ i18n "aria_series_metadata" }}"> | ||||||
|     <span class="post-meta-item"> |     <span class="page-metadata-item"> | ||||||
|         {{ partial "icon.html" "newspaper" }} |         {{ partial "icon.html" "newspaper" }} | ||||||
|         {{ i18n "post_count" (len .Data.Pages) }} |         {{ i18n "post_count" (len .Data.Pages) }} | ||||||
|     </span> |     </span> | ||||||
| 
 | 
 | ||||||
|     {{ if ne .Site.Params.readingtime false }} |     {{ if ne .Site.Params.readingtime false }} | ||||||
|         <span class="post-meta-item"> |         <span class="page-metadata-item"> | ||||||
|             {{ partial "icon.html" "clock" }} |             {{ partial "icon.html" "clock" }} | ||||||
|             {{ $readingtime := 0 }} |             {{ $readingtime := 0 }} | ||||||
|             {{ range .Data.Pages }} |             {{ range .Data.Pages }} | ||||||
| @@ -14,9 +14,4 @@ | |||||||
|             {{ i18n "readingtime" $readingtime }} |             {{ i18n "readingtime" $readingtime }} | ||||||
|         </span> |         </span> | ||||||
|     {{ end }} |     {{ end }} | ||||||
| 
 |  | ||||||
|     {{ partial "post-meta-item/translations.html" . }} |  | ||||||
|     {{ if .File }} |  | ||||||
|         {{ partial "post-meta-item/viewsource.html" . }} |  | ||||||
|     {{ end }} |  | ||||||
| </div> | </div> | ||||||
							
								
								
									
										6
									
								
								layouts/_partials/page-metadata/taxonomy.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								layouts/_partials/page-metadata/taxonomy.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | |||||||
|  | <div class="taxonomy-metadata" aria-label="{{ i18n "aria_taxonomy_metadata" }}"> | ||||||
|  |     <span class="taxonomy-meta-item" aria-label="{{ i18n "aria_taxonomy_post_count" }}"> | ||||||
|  |         {{ partial "icon.html" "newspaper" }} | ||||||
|  |         {{ i18n "post_count" (len .Data.Pages) }} | ||||||
|  |     </span> | ||||||
|  | </div> | ||||||
							
								
								
									
										154
									
								
								layouts/_partials/pagination-hugo.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										154
									
								
								layouts/_partials/pagination-hugo.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,154 @@ | |||||||
|  | {{- $validFormats := slice "default" "terse" }} | ||||||
|  |  | ||||||
|  | {{- $msg1 := "When passing a map to the internal pagination template, one of the elements must be named 'page', and it must be set to the context of the current page." }} | ||||||
|  | {{- $msg2 := "The 'format' specified in the map passed to the internal pagination template is invalid. Valid choices are: %s." }} | ||||||
|  |  | ||||||
|  | {{- $page := . }} | ||||||
|  | {{- $format := "default" }} | ||||||
|  |  | ||||||
|  | {{- if reflect.IsMap . }} | ||||||
|  |   {{- with .page }} | ||||||
|  |     {{- $page = . }} | ||||||
|  |   {{- else }} | ||||||
|  |     {{- errorf $msg1 }} | ||||||
|  |   {{- end }} | ||||||
|  |   {{- with .format }} | ||||||
|  |     {{- $format = lower . }} | ||||||
|  |   {{- end }} | ||||||
|  | {{- end }} | ||||||
|  |  | ||||||
|  | {{- if in $validFormats $format }} | ||||||
|  |   {{- if gt $page.Paginator.TotalPages 1 }} | ||||||
|  |     <ul class="pagination pagination-{{ $format }}"> | ||||||
|  |       {{- partial (printf "inline/pagination/%s.html" $format) $page }} | ||||||
|  |     </ul> | ||||||
|  |   {{- end }} | ||||||
|  | {{- else }} | ||||||
|  |   {{- errorf $msg2 (delimit $validFormats ", ") }} | ||||||
|  | {{- end -}} | ||||||
|  |  | ||||||
|  | {{/* Format: default | ||||||
|  | {{/* --------------------------------------------------------------------- */}} | ||||||
|  | {{- define "_partials/inline/pagination/default.html" }} | ||||||
|  |   {{- with .Paginator }} | ||||||
|  |     {{- $currentPageNumber := .PageNumber }} | ||||||
|  |  | ||||||
|  |     {{- with .First }} | ||||||
|  |       {{- if ne $currentPageNumber .PageNumber }} | ||||||
|  |       <li class="page-item"> | ||||||
|  |         <a href="{{ .URL }}" aria-label="First" class="page-link" role="button"><span aria-hidden="true">««</span></a> | ||||||
|  |       </li> | ||||||
|  |       {{- else }} | ||||||
|  |       <li class="page-item disabled"> | ||||||
|  |         <a aria-disabled="true" aria-label="First" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">««</span></a> | ||||||
|  |       </li> | ||||||
|  |       {{- end }} | ||||||
|  |     {{- end }} | ||||||
|  |  | ||||||
|  |     {{- with .Prev }} | ||||||
|  |       <li class="page-item"> | ||||||
|  |         <a href="{{ .URL }}" aria-label="Previous" class="page-link" role="button"><span aria-hidden="true">«</span></a> | ||||||
|  |       </li> | ||||||
|  |     {{- else }} | ||||||
|  |       <li class="page-item disabled"> | ||||||
|  |         <a aria-disabled="true" aria-label="Previous" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">«</span></a> | ||||||
|  |       </li> | ||||||
|  |     {{- end }} | ||||||
|  |  | ||||||
|  |     {{- $slots := 5 }} | ||||||
|  |     {{- $start := math.Max 1 (sub .PageNumber (math.Floor (div $slots 2))) }} | ||||||
|  |     {{- $end := math.Min .TotalPages (sub (add $start $slots) 1) }} | ||||||
|  |     {{- if lt (add (sub $end $start) 1) $slots }} | ||||||
|  |       {{- $start = math.Max 1 (add (sub $end $slots) 1) }} | ||||||
|  |     {{- end }} | ||||||
|  |  | ||||||
|  |     {{- range $k := seq $start $end }} | ||||||
|  |       {{- if eq $.Paginator.PageNumber $k }} | ||||||
|  |       <li class="page-item active"> | ||||||
|  |         <a aria-current="page" aria-label="Page {{ $k }}" class="page-link" role="button">{{ $k }}</a> | ||||||
|  |       </li> | ||||||
|  |       {{- else }} | ||||||
|  |       <li class="page-item"> | ||||||
|  |         <a href="{{ (index $.Paginator.Pagers (sub $k 1)).URL }}" aria-label="Page {{ $k }}" class="page-link" role="button">{{ $k }}</a> | ||||||
|  |       </li> | ||||||
|  |       {{- end }} | ||||||
|  |     {{- end }} | ||||||
|  |  | ||||||
|  |     {{- with .Next }} | ||||||
|  |       <li class="page-item"> | ||||||
|  |         <a href="{{ .URL }}" aria-label="Next" class="page-link" role="button"><span aria-hidden="true">»</span></a> | ||||||
|  |       </li> | ||||||
|  |     {{- else }} | ||||||
|  |       <li class="page-item disabled"> | ||||||
|  |         <a aria-disabled="true" aria-label="Next" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">»</span></a> | ||||||
|  |       </li> | ||||||
|  |     {{- end }} | ||||||
|  |  | ||||||
|  |     {{- with .Last }} | ||||||
|  |       {{- if ne $currentPageNumber .PageNumber }} | ||||||
|  |       <li class="page-item"> | ||||||
|  |         <a href="{{ .URL }}" aria-label="Last" class="page-link" role="button"><span aria-hidden="true">»»</span></a> | ||||||
|  |       </li> | ||||||
|  |       {{- else }} | ||||||
|  |       <li class="page-item disabled"> | ||||||
|  |         <a aria-disabled="true" aria-label="Last" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">»»</span></a> | ||||||
|  |       </li> | ||||||
|  |       {{- end }} | ||||||
|  |     {{- end }} | ||||||
|  |   {{- end }} | ||||||
|  | {{- end -}} | ||||||
|  |  | ||||||
|  | {{/* Format: terse | ||||||
|  | {{/* --------------------------------------------------------------------- */}} | ||||||
|  | {{- define "_partials/inline/pagination/terse.html" }} | ||||||
|  |   {{- with .Paginator }} | ||||||
|  |     {{- $currentPageNumber := .PageNumber }} | ||||||
|  |  | ||||||
|  |     {{- with .First }} | ||||||
|  |       {{- if ne $currentPageNumber .PageNumber }} | ||||||
|  |       <li class="page-item"> | ||||||
|  |         <a href="{{ .URL }}" aria-label="First" class="page-link" role="button"><span aria-hidden="true">««</span></a> | ||||||
|  |       </li> | ||||||
|  |       {{- end }} | ||||||
|  |     {{- end }} | ||||||
|  |  | ||||||
|  |     {{- with .Prev }} | ||||||
|  |       <li class="page-item"> | ||||||
|  |         <a href="{{ .URL }}" aria-label="Previous" class="page-link" role="button"><span aria-hidden="true">«</span></a> | ||||||
|  |       </li> | ||||||
|  |     {{- end }} | ||||||
|  |  | ||||||
|  |     {{- $slots := 3 }} | ||||||
|  |     {{- $start := math.Max 1 (sub .PageNumber (math.Floor (div $slots 2))) }} | ||||||
|  |     {{- $end := math.Min .TotalPages (sub (add $start $slots) 1) }} | ||||||
|  |     {{- if lt (add (sub $end $start) 1) $slots }} | ||||||
|  |       {{- $start = math.Max 1 (add (sub $end $slots) 1) }} | ||||||
|  |     {{- end }} | ||||||
|  |  | ||||||
|  |     {{- range $k := seq $start $end }} | ||||||
|  |       {{- if eq $.Paginator.PageNumber $k }} | ||||||
|  |       <li class="page-item active"> | ||||||
|  |         <a aria-current="page" aria-label="Page {{ $k }}" class="page-link" role="button">{{ $k }}</a> | ||||||
|  |       </li> | ||||||
|  |       {{- else }} | ||||||
|  |       <li class="page-item"> | ||||||
|  |         <a href="{{ (index $.Paginator.Pagers (sub $k 1)).URL }}" aria-label="Page {{ $k }}" class="page-link" role="button">{{ $k }}</a> | ||||||
|  |       </li> | ||||||
|  |       {{- end }} | ||||||
|  |     {{- end }} | ||||||
|  |  | ||||||
|  |     {{- with .Next }} | ||||||
|  |       <li class="page-item"> | ||||||
|  |         <a href="{{ .URL }}" aria-label="Next" class="page-link" role="button"><span aria-hidden="true">»</span></a> | ||||||
|  |       </li> | ||||||
|  |     {{- end }} | ||||||
|  |  | ||||||
|  |     {{- with .Last }} | ||||||
|  |       {{- if ne $currentPageNumber .PageNumber }} | ||||||
|  |       <li class="page-item"> | ||||||
|  |         <a href="{{ .URL }}" aria-label="Last" class="page-link" role="button"><span aria-hidden="true">»»</span></a> | ||||||
|  |       </li> | ||||||
|  |       {{- end }} | ||||||
|  |     {{- end }} | ||||||
|  |   {{- end }} | ||||||
|  | {{- end -}} | ||||||
							
								
								
									
										6
									
								
								layouts/_partials/pagination.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								layouts/_partials/pagination.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | |||||||
|  | {{ if gt .Paginator.TotalPages 1 }} | ||||||
|  |     <nav class="pagination"> | ||||||
|  |         {{/* https://github.com/gohugoio/hugo/blob/a88b488181279befd50e1d127f9f67604f2f9854/tpl/tplimpl/embedded/templates/_partials/pagination.html */}} | ||||||
|  |         {{ partial "pagination-hugo.html" . }} | ||||||
|  |     </nav> | ||||||
|  | {{ end }} | ||||||
| @@ -1,18 +1,8 @@ | |||||||
| <meta property="og:title" content="{{ .Title | plainify }}"> | <meta property="og:title" content="{{ .Title | plainify }}"> | ||||||
| <meta property="og:description" content="{{ (partial "seo-tags/description.html" .) | plainify }}"> | <meta property="og:description" content="{{ (partial "seo-description.html" .) | plainify }}"> | ||||||
| <meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}"> | <meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}"> | ||||||
| <meta property="og:url" content="{{ .Permalink }}"> | <meta property="og:url" content="{{ .Permalink }}"> | ||||||
| 
 | 
 | ||||||
| {{ $images := $.Resources.ByType "image" }} |  | ||||||
| {{ $featured := $images.GetMatch "*feature*" }} |  | ||||||
| {{ if not $featured }} |  | ||||||
|     {{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }} |  | ||||||
| {{ end }} |  | ||||||
| 
 |  | ||||||
| {{ with $featured }} |  | ||||||
|     <meta property="og:image" content="{{ $featured.Permalink }}"> |  | ||||||
| {{ end }} |  | ||||||
| 
 |  | ||||||
| {{ with .Section }} | {{ with .Section }} | ||||||
|     <meta property="article:section" content="{{ . }}"> |     <meta property="article:section" content="{{ . }}"> | ||||||
| {{ end }} | {{ end }} | ||||||
| @@ -33,16 +23,42 @@ | |||||||
|     <meta property="og:locale" content="{{ . }}"> |     <meta property="og:locale" content="{{ . }}"> | ||||||
| {{ end }} | {{ end }} | ||||||
| 
 | 
 | ||||||
| {{ with .Site.Params.title }} | {{ with .Site.Title }} | ||||||
|     <meta property="og:site_name" content="{{ . }}"> |     <meta property="og:site_name" content="{{ . }}"> | ||||||
| {{ end }} | {{ end }} | ||||||
| 
 | 
 | ||||||
|  | {{ $images := $.Resources.ByType "image" }} | ||||||
|  | {{ $featured := $images.GetMatch "*feature*" }} | ||||||
|  | {{ if not $featured }} | ||||||
|  |     {{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }} | ||||||
|  | {{ end }} | ||||||
|  | 
 | ||||||
|  | {{ with $featured }} | ||||||
|  |     <meta property="og:image" content="{{ $featured.Permalink }}"> | ||||||
|  |     {{ with .Params.alt }} | ||||||
|  |         <meta property="og:image:alt" content="{{ . }}"> | ||||||
|  |     {{ end }} | ||||||
|  |     {{ with .MediaType }} | ||||||
|  |         <meta property="og:image:type" content="{{ . }}"> | ||||||
|  |     {{ end }} | ||||||
|  |     {{ with .Width }} | ||||||
|  |         <meta property="og:image:width" content="{{ . }}"> | ||||||
|  |     {{ end }} | ||||||
|  |     {{ with .Height }} | ||||||
|  |         <meta property="og:image:height" content="{{ . }}"> | ||||||
|  |     {{ end }} | ||||||
|  | {{ end }} | ||||||
|  | 
 | ||||||
| {{ $videos := $.Resources.ByType "video" }} | {{ $videos := $.Resources.ByType "video" }} | ||||||
| {{ $featured_video := $videos.GetMatch "*feature*" }} | {{ $featured_video := $videos.GetMatch "*feature*" }} | ||||||
| {{ if not $featured_video }} | {{ if not $featured_video }} | ||||||
|     {{ $featured_video = $videos.GetMatch "{*cover*,*thumbnail*}" }} |     {{ $featured_video = $videos.GetMatch "{*cover*,*thumbnail*}" }} | ||||||
| {{ end }} | {{ end }} | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| {{ with $featured_video }} | {{ with $featured_video }} | ||||||
|     <meta property="og:video" content="{{ $featured_video.Permalink | absURL }}"> |     <meta property="og:video" content="{{ $featured_video.Permalink | absURL }}"> | ||||||
|  |     {{ with .MediaType }} | ||||||
|  |         <meta property="og:video:type" content="{{ . }}"> | ||||||
|  |     {{ end }} | ||||||
| {{ end }} | {{ end }} | ||||||
| @@ -1,5 +1,5 @@ | |||||||
| <meta itemprop="name" content="{{ .Title | plainify }}"> | <meta itemprop="name" content="{{ .Title | plainify }}"> | ||||||
| <meta itemprop="description" content="{{ (partial "seo-tags/description.html" .) | plainify }}"> | <meta itemprop="description" content="{{ (partial "seo-description.html" .) | plainify }}"> | ||||||
| 
 | 
 | ||||||
| {{ $format := "2006-01-02T15:04:05-07:00" }} | {{ $format := "2006-01-02T15:04:05-07:00" }} | ||||||
| {{ with .Date }} | {{ with .Date }} | ||||||
| @@ -21,6 +21,14 @@ | |||||||
|     <meta itemprop="image" content="{{ $featured.Permalink }}"> |     <meta itemprop="image" content="{{ $featured.Permalink }}"> | ||||||
| {{ end }} | {{ end }} | ||||||
| 
 | 
 | ||||||
| {{ with .Params.tags }} | {{ with .Keywords }} | ||||||
|     <meta itemprop="keywords" content="{{ delimit . ", " }}"> |     <meta itemprop="keywords" content="{{ delimit . ", " }}"> | ||||||
|  | {{ else }} | ||||||
|  |     {{ with (.GetTerms "tags") }} | ||||||
|  |         {{ $tags := slice }} | ||||||
|  |         {{ range . }} | ||||||
|  |             {{ $tags = $tags | append .LinkTitle }} | ||||||
|  |         {{ end }} | ||||||
|  |         <meta itemprop="keywords" content="{{ delimit $tags ", " }}"> | ||||||
|  |     {{ end }} | ||||||
| {{ end }} | {{ end }} | ||||||
							
								
								
									
										43
									
								
								layouts/_partials/seo-tags/twitter-cards.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								layouts/_partials/seo-tags/twitter-cards.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,43 @@ | |||||||
|  | {{/* we do not need to duplicate what's already covered by OpenGraph tags | ||||||
|  |    * see: https://demo.bbaovanc.com/test/remove-twitter-tags/blog/swapfile-guide/ | ||||||
|  |    * so, no twitter:image/title/description | ||||||
|  |    */}} | ||||||
|  | {{ $images := $.Resources.ByType "image" }} | ||||||
|  | {{ $featured := $images.GetMatch "*feature*" }} | ||||||
|  | {{ if not $featured }} | ||||||
|  |     {{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }} | ||||||
|  | {{ end }} | ||||||
|  |  | ||||||
|  | {{ with $featured }} | ||||||
|  |     {{ $ratio := 0 }} | ||||||
|  |     {{ if gt .Width .Height }} | ||||||
|  |         {{ $ratio = div (float .Width) .Height }} | ||||||
|  |     {{ else }} | ||||||
|  |         {{ $ratio = div (float .Height) .Width }} | ||||||
|  |     {{ end }} | ||||||
|  |  | ||||||
|  |     {{ if lt $ratio 1.75 }} | ||||||
|  |         <meta name="twitter:card" content="summary_large_image"> | ||||||
|  |     {{ else }} | ||||||
|  |         <meta name="twitter:card" content="summary"> | ||||||
|  |     {{ end }} | ||||||
|  | {{ else }} | ||||||
|  |     <meta name="twitter:card" content="summary"> | ||||||
|  | {{ end }} | ||||||
|  |  | ||||||
|  | {{/* twitter:site is the site author; twitter:creator is page author | ||||||
|  |    * https://developer.x.com/en/docs/x-for-websites/cards/guides/getting-started | ||||||
|  |    * "Card and Content Attribution" | ||||||
|  |    */}} | ||||||
|  | {{ with .Site.Params.social.twitter }} | ||||||
|  |     <meta name="twitter:site" content="@{{ . }}"> | ||||||
|  | {{ else }} | ||||||
|  |     {{ errorf "a twitter username is required for twitter cards to work" }} | ||||||
|  | {{ end }} | ||||||
|  | {{ with .GetTerms "authors" }} | ||||||
|  |     {{ range . }} | ||||||
|  |         {{ with .Params.twitter }} | ||||||
|  |             <meta name="twitter:creator" content="@{{ . }}"> | ||||||
|  |         {{ end }} | ||||||
|  |     {{ end }} | ||||||
|  | {{ end }} | ||||||
| @@ -12,6 +12,6 @@ | |||||||
|             This post is part of a series: |             This post is part of a series: | ||||||
|         {{ end }} |         {{ end }} | ||||||
| 
 | 
 | ||||||
|         {{ delimit $series ", " }} |         {{ delimit $series ", " | safeHTML }} | ||||||
|     </div> |     </div> | ||||||
| {{ end }} | {{ end }} | ||||||
| @@ -3,6 +3,7 @@ | |||||||
|         <a class="twitter-share" |         <a class="twitter-share" | ||||||
|            target="_blank" |            target="_blank" | ||||||
|            rel="noopener" |            rel="noopener" | ||||||
|  |            aria-label="{{ i18n "aria_share_twitter" }}" | ||||||
|            onclick="share_event('Twitter');" |            onclick="share_event('Twitter');" | ||||||
|            href="https://twitter.com/intent/tweet?url={{ .Permalink }}&text={{ .Title }}&via=bbaovanc"> |            href="https://twitter.com/intent/tweet?url={{ .Permalink }}&text={{ .Title }}&via=bbaovanc"> | ||||||
|             {{- partial "icon.html" "twitter" -}} |             {{- partial "icon.html" "twitter" -}} | ||||||
| @@ -13,6 +14,7 @@ | |||||||
|         <a class="facebook-share" |         <a class="facebook-share" | ||||||
|            target="_blank" |            target="_blank" | ||||||
|            rel="noopener" |            rel="noopener" | ||||||
|  |            aria-label="{{ i18n "aria_share_facebook" }}" | ||||||
|            onclick="share_event('Facebook');" |            onclick="share_event('Facebook');" | ||||||
|            href="https://www.facebook.com/sharer.php?u={{ .Permalink }}"> |            href="https://www.facebook.com/sharer.php?u={{ .Permalink }}"> | ||||||
|             {{- partial "icon.html" "facebook" -}} |             {{- partial "icon.html" "facebook" -}} | ||||||
| @@ -23,6 +25,7 @@ | |||||||
|         <a class="linkedin-share" |         <a class="linkedin-share" | ||||||
|            target="_blank" |            target="_blank" | ||||||
|            rel="noopener" |            rel="noopener" | ||||||
|  |            aria-label="{{ i18n "aria_share_linkedin" }}" | ||||||
|            onclick="share_event('LinkedIn');" |            onclick="share_event('LinkedIn');" | ||||||
|            href="https://www.linkedin.com/sharing/share-offsite/?url={{ .Permalink }}"> |            href="https://www.linkedin.com/sharing/share-offsite/?url={{ .Permalink }}"> | ||||||
|             {{- partial "icon.html" "linkedin" -}} |             {{- partial "icon.html" "linkedin" -}} | ||||||
| @@ -33,6 +36,7 @@ | |||||||
|         <a class="reddit-share" |         <a class="reddit-share" | ||||||
|            target="_blank" |            target="_blank" | ||||||
|            rel="noopener" |            rel="noopener" | ||||||
|  |            aria-label="{{ i18n "aria_share_reddit" }}" | ||||||
|            onclick="share_event('Reddit');" |            onclick="share_event('Reddit');" | ||||||
|            href="https://reddit.com/submit?url={{ .Permalink }}&title={{ .Title }}"> |            href="https://reddit.com/submit?url={{ .Permalink }}&title={{ .Title }}"> | ||||||
|             {{- partial "icon.html" "reddit" -}} |             {{- partial "icon.html" "reddit" -}} | ||||||
| @@ -46,10 +50,20 @@ | |||||||
|         <a class="telegram-share" |         <a class="telegram-share" | ||||||
|            target="_blank" |            target="_blank" | ||||||
|            rel="noopener" |            rel="noopener" | ||||||
|  |            aria-label="{{ i18n "aria_share_telegram" }}" | ||||||
|            onclick="share_event('Telegram');" |            onclick="share_event('Telegram');" | ||||||
|            href="https://t.me/share/url?url={{ .Permalink }}&text={{ .Title }}"> |            href="https://t.me/share/url?url={{ .Permalink }}&text={{ .Title }}"> | ||||||
|             {{- partial "icon.html" "telegram" -}} |             {{- partial "icon.html" "telegram" -}} | ||||||
|         </a> |         </a> | ||||||
|     {{ end }} |     {{ end }} | ||||||
|     */}} |     */}} | ||||||
|  | 
 | ||||||
|  |     {{ if .Site.Params.shareButtons.print }} | ||||||
|  |         <a class="print-share" | ||||||
|  |            aria-label="{{ i18n "aria_share_print" }}" | ||||||
|  |            href="javascript:void(0)" | ||||||
|  |            onclick="window.print(); share_event('Print');"> | ||||||
|  |             {{- partial "icon.html" "printer" -}} | ||||||
|  |         </a> | ||||||
|  |     {{ end }} | ||||||
| </div> | </div> | ||||||
							
								
								
									
										3
									
								
								layouts/_partials/time-element.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								layouts/_partials/time-element.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | <time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}" title="{{ . }}"> | ||||||
|  |     {{ .Format "January 2, 2006" }} | ||||||
|  | </time> | ||||||
							
								
								
									
										24
									
								
								layouts/_partials/top.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								layouts/_partials/top.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | |||||||
|  | <header class="top"> | ||||||
|  |     <div class="brand"> | ||||||
|  |         <a href="{{ .Site.Home.Permalink | absLangURL }}"> | ||||||
|  |             {{ .Site.Title | markdownify }} | ||||||
|  |         </a> | ||||||
|  |     </div> | ||||||
|  |  | ||||||
|  |     <nav class="navbar" aria-label="{{ i18n "aria_navbar" }}"> | ||||||
|  |         {{ with .Site.Home }} | ||||||
|  |             <a class="navbar-item{{ if $.IsHome }} active{{ end }}" href="{{ .Permalink | absLangURL }}">{{ .Title | markdownify }}</a> | ||||||
|  |         {{ end }} | ||||||
|  |  | ||||||
|  |         {{ range .Site.Menus.main }} | ||||||
|  |             {{ $isActive := false }} | ||||||
|  |             {{/* https://discourse.gohugo.io/t/ismenucurrent-not-working-with-using-sectionpagesmenu/46687/2?u=bbaovanc */}} | ||||||
|  |             {{ if or ($.HasMenuCurrent .Menu .) (eq .Page $) }} | ||||||
|  |                 {{ $isActive = true }} | ||||||
|  |             {{ end }} | ||||||
|  |             <a class="navbar-item{{ if $isActive }} active{{ end }}" | ||||||
|  |                {{ if strings.HasPrefix .URL "http" }}target="_blank" rel="noopener"{{ end }} | ||||||
|  |                href="{{ .URL }}">{{ .Name }}</a> | ||||||
|  |         {{ end }} | ||||||
|  |     </nav> | ||||||
|  | </header> | ||||||
							
								
								
									
										5
									
								
								layouts/_shortcodes/abbr.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								layouts/_shortcodes/abbr.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | |||||||
|  | {{ if .IsNamedParams }} | ||||||
|  |     <abbr title="{{ .Get "title" }}">{{ .Inner }}</abbr> | ||||||
|  | {{ else }} | ||||||
|  |     <abbr title="{{ .Get 0 }}">{{ .Inner }}</abbr> | ||||||
|  | {{ end }} | ||||||
							
								
								
									
										28
									
								
								layouts/_shortcodes/aside.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								layouts/_shortcodes/aside.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | |||||||
|  | {{ $type := "" }} | ||||||
|  | {{ if .IsNamedParams }} | ||||||
|  |     {{ $type = .Get "type" | default "note" }} | ||||||
|  | {{ else }} | ||||||
|  |     {{ $type = .Get 0 | default "note" }} | ||||||
|  | {{ end }} | ||||||
|  |  | ||||||
|  | {{/* This idea comes from the LoveIt theme: | ||||||
|  |      https://github.com/dillonzq/LoveIt/blob/aa834e89af8349f6c18d4c7ad50a73fd5f1e40e0/layouts/shortcodes/admonition.html#L3-L14 | ||||||
|  | */}} | ||||||
|  |  | ||||||
|  | {{ $icons := dict "note" "pencil" }} | ||||||
|  | {{ $icons  = dict "info" "info" | merge $icons }} | ||||||
|  | {{ $icons  = dict "tip" "lightbulb" | merge $icons }} | ||||||
|  | {{ $icons  = dict "warning" "info" | merge $icons }} | ||||||
|  | {{ $icons  = dict "example" "flask" | merge $icons }} | ||||||
|  | {{ $icons  = dict "quote" "quote" | merge $icons }} | ||||||
|  |  | ||||||
|  | <aside class="{{ $type }}"> | ||||||
|  |     <div class="aside-title"> | ||||||
|  |         {{ partial "icon.html" (index $icons $type) }} | ||||||
|  |         {{ title $type }} | ||||||
|  |     </div> | ||||||
|  |  | ||||||
|  |     <div class="aside-content"> | ||||||
|  |         {{ .Inner | .Page.RenderString (dict "display" "block") }} | ||||||
|  |     </div> | ||||||
|  | </aside> | ||||||
							
								
								
									
										17
									
								
								layouts/_shortcodes/figure.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								layouts/_shortcodes/figure.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | |||||||
|  | <figure> | ||||||
|  |     {{ $resource_title := "" }} | ||||||
|  |     {{ with .Get "src" }} | ||||||
|  |         {{ with $.Page.Resources.Get . }} | ||||||
|  |             {{ $resource_title = .Title }} | ||||||
|  |             {{ partial "embed-resource.html" . }} | ||||||
|  |         {{ else }} | ||||||
|  |             {{ errorf "resource %q not found" . }} | ||||||
|  |         {{ end }} | ||||||
|  |     {{ else }} | ||||||
|  |         {{ .Inner }} | ||||||
|  |     {{ end }} | ||||||
|  |  | ||||||
|  |     {{ with or (.Get "caption") (.Get 0) $resource_title }} | ||||||
|  |         <figcaption>{{ (replace . "\\bt" "`") | markdownify }}</figcaption> | ||||||
|  |     {{ end }} | ||||||
|  | </figure> | ||||||
							
								
								
									
										14
									
								
								layouts/_shortcodes/include.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								layouts/_shortcodes/include.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | |||||||
|  | {{/* https://github.com/gohugoio/hugo/issues/13823#issuecomment-3015270202 */}} | ||||||
|  | {{ with .Get 0 -}} | ||||||
|  |     {{ with $.Page.GetPage . -}} | ||||||
|  |         {{ .RenderShortcodes -}} | ||||||
|  |     {{ else with $.Page.Resources.Get . -}} | ||||||
|  |         {{ .RenderShortcodes -}} | ||||||
|  |     {{ else with resources.Get . -}} | ||||||
|  |         {{ .Content -}} | ||||||
|  |     {{ else -}} | ||||||
|  |         {{ errorf "The %q shortcode was unable to find %q. See %s" $.Name . $.Position -}} | ||||||
|  |     {{ end -}} | ||||||
|  | {{ else -}} | ||||||
|  |     {{ errorf "The %q shortcode requires a positional parameter indicating the logical path of the file to include. See %s" .Name .Position -}} | ||||||
|  | {{ end -}} | ||||||
							
								
								
									
										9
									
								
								layouts/_shortcodes/resource.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								layouts/_shortcodes/resource.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | |||||||
|  | {{ with .Get 0 }} | ||||||
|  |     {{ with $.Page.Resources.Get . }} | ||||||
|  |         {{ partial "embed-resource.html" . }} | ||||||
|  |     {{ else }} | ||||||
|  |         {{ errorf "resource %q not found" . }} | ||||||
|  |     {{ end }} | ||||||
|  | {{ else }} | ||||||
|  |     {{ errorf "resource name not provided as first parameter" }} | ||||||
|  | {{ end }} | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| <div class="see-also"> | <div class="see-also"> | ||||||
|     {{ with .Site.GetPage (.Get 0) }} |     {{ with .Site.GetPage (.Get 0) }} | ||||||
|         <p>{{ i18n "see_also" }} <a href="{{ .Permalink }}">{{ .Title }}</a></p> |         <p>{{ i18n "see_also" }} <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></p> | ||||||
|     {{ else }} |     {{ else }} | ||||||
|         {{ errorf "Page could not be found for see-also shortcode: %s" .Position }} |         {{ errorf "Page could not be found for see-also shortcode: %s" .Position }} | ||||||
|     {{ end }} |     {{ end }} | ||||||
| @@ -1,20 +1,26 @@ | |||||||
| {{ define "main" }} | {{ define "main" }} | ||||||
|     <h1> |     <section class="body-module--center"> | ||||||
|         {{ partial "icon.html" "user-circle" }} |         <h1> | ||||||
|         {{ .Title | markdownify }} |             {{ partial "icon.html" "user-circle" }} | ||||||
|     </h1> |             {{ .Title | markdownify }} | ||||||
|  |         </h1> | ||||||
|  |  | ||||||
|     <div class="page-list"> |         {{ with .Content }} | ||||||
|         {{ with .Paginator.Pages }} |             {{ . }} | ||||||
|             <ul> |  | ||||||
|                 {{ range . }} |  | ||||||
|                     <li>{{ .Render "summary/author" }}</li> |  | ||||||
|                 {{ end }} |  | ||||||
|             </ul> |  | ||||||
|         {{ else }} |  | ||||||
|             <div> |  | ||||||
|                 {{ i18n "no_posts" }} |  | ||||||
|             </div> |  | ||||||
|         {{ end }} |         {{ end }} | ||||||
|     </div> |  | ||||||
|  |         <div class="page-list"> | ||||||
|  |             {{ with .Paginator.Pages }} | ||||||
|  |                 {{ range . }} | ||||||
|  |                     <article class="page"> | ||||||
|  |                         {{ .Render "summary" }} | ||||||
|  |                     </article> | ||||||
|  |                 {{ end }} | ||||||
|  |             {{ else }} | ||||||
|  |                 <div> | ||||||
|  |                     {{ i18n "no_posts" }} | ||||||
|  |                 </div> | ||||||
|  |             {{ end }} | ||||||
|  |         </div> | ||||||
|  |     </section> | ||||||
| {{ end }} | {{ end }} | ||||||
|   | |||||||
							
								
								
									
										16
									
								
								layouts/authors/summary.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								layouts/authors/summary.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | |||||||
|  | <h2 class="page-title"> | ||||||
|  |     <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> | ||||||
|  |     {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} | ||||||
|  | </h2> | ||||||
|  |  | ||||||
|  | {{ partial "page-metadata/author.html" . }} | ||||||
|  |  | ||||||
|  | {{ with .Summary }} | ||||||
|  |     <div class="page-description"> | ||||||
|  |         {{ . }} | ||||||
|  |     </div> | ||||||
|  | {{ end }} | ||||||
|  |  | ||||||
|  | <div class="readmore"> | ||||||
|  |     <a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a> | ||||||
|  | </div> | ||||||
							
								
								
									
										1
									
								
								layouts/authors/term.head_title.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								layouts/authors/term.head_title.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | |||||||
|  | {{ (print .Title "'s Posts | " .Site.Title) | plainify }} | ||||||
| @@ -1,27 +1,19 @@ | |||||||
| {{ define "main" }} | {{ define "main" }} | ||||||
|     <h1> |     <div class="page-title"> | ||||||
|         {{ partial "icon.html" "user-circle" }} |         <h1> | ||||||
|         {{ .Title | markdownify }} |             {{ partial "icon.html" "user-circle" }} | ||||||
|         {{ partial "rss-link.html" . }} |             {{ .Title | markdownify }} | ||||||
|     </h1> |             {{ partial "rss-link.html" . }} | ||||||
|  |         </h1> | ||||||
|     {{ partial "post-metadata/author.html" . }} |  | ||||||
|  |  | ||||||
|     {{ .Content }} |  | ||||||
|  |  | ||||||
|     <div class="page-list"> |  | ||||||
|         {{ with .Paginator.Pages }} |  | ||||||
|             <ul> |  | ||||||
|                 {{ range . }} |  | ||||||
|                     <li>{{ .Render "summary/post" }}</li> |  | ||||||
|                 {{ end }} |  | ||||||
|             </ul> |  | ||||||
|         {{ else }} |  | ||||||
|             <div> |  | ||||||
|                 {{ i18n "no_posts" }} |  | ||||||
|             </div> |  | ||||||
|         {{ end }} |  | ||||||
|     </div> |     </div> | ||||||
|  |  | ||||||
|  |     {{ partial "page-metadata/author.html" . }} | ||||||
|  |  | ||||||
|  |     {{ with .Content }} | ||||||
|  |         {{ . }} | ||||||
|  |     {{ end }} | ||||||
|  |  | ||||||
|  |     {{ partial "page-list.html" .Paginator.Pages }} | ||||||
|  |  | ||||||
|     {{ partial "pagination.html" . }} |     {{ partial "pagination.html" . }} | ||||||
| {{ end }} | {{ end }} | ||||||
|   | |||||||
							
								
								
									
										38
									
								
								layouts/baseof.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								layouts/baseof.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | |||||||
|  | {{ i18n "credit_comment" | safeHTML }} | ||||||
|  | <!DOCTYPE html> | ||||||
|  | <html lang="{{ .Language.Lang }}"> | ||||||
|  |     {{ partial "head.html" . }} | ||||||
|  |  | ||||||
|  |     <body> | ||||||
|  |         <a id="skip-to-main" href="#main-content">Skip to main content</a> | ||||||
|  |  | ||||||
|  |         {{ partial "top.html" . }} | ||||||
|  |  | ||||||
|  |         {{ if not .IsHome }} | ||||||
|  |             {{ partial "breadcrumb.html" . }} | ||||||
|  |         {{ end }} | ||||||
|  |  | ||||||
|  |         {{ block "pre-body" . }}{{ end }} | ||||||
|  |  | ||||||
|  |         <main id="main-content"> | ||||||
|  |             {{ block "main" . }} | ||||||
|  |                 THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it) | ||||||
|  |             {{ end }} | ||||||
|  |         </main> | ||||||
|  |  | ||||||
|  |         {{ block "post-body" . }}{{ end }} | ||||||
|  |  | ||||||
|  |         {{ if or .Site.Copyright .Site.Params.footer }} | ||||||
|  |             <footer class="body-module--center"> | ||||||
|  |                 {{ with .Site.Copyright }} | ||||||
|  |                     {{ . | safeHTML }} | ||||||
|  |                 {{ end }} | ||||||
|  |  | ||||||
|  |                 {{ with .Site.Params.footer }} | ||||||
|  |                     {{ . | $.RenderString (dict "display" "block") }} | ||||||
|  |                 {{ end }} | ||||||
|  |             </footer> | ||||||
|  |         {{ end }} | ||||||
|  |     </body> | ||||||
|  |  | ||||||
|  | </html> | ||||||
							
								
								
									
										1
									
								
								layouts/head_title.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								layouts/head_title.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | |||||||
|  | {{ (print .Title " | " .Site.Title) | plainify }} | ||||||
							
								
								
									
										1
									
								
								layouts/home.head_title.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								layouts/home.head_title.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | |||||||
|  | {{ .Site.Title | plainify }} | ||||||
							
								
								
									
										23
									
								
								layouts/home.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								layouts/home.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | |||||||
|  | {{ define "main" }} | ||||||
|  |     {{ with .Content }} | ||||||
|  |         <article class="body-module--center"> | ||||||
|  |             {{ . }} | ||||||
|  |         </article> | ||||||
|  |         <hr class="body-module--center"> | ||||||
|  |     {{ end }} | ||||||
|  | {{ end }} | ||||||
|  |  | ||||||
|  | {{ define "post-body" }} | ||||||
|  |     {{ if .Site.Params.homepageLatestPosts }} | ||||||
|  |         <div class="body-module--center"> | ||||||
|  |             <h1> | ||||||
|  |                 {{ i18n "latest_posts" }} | ||||||
|  |                 {{ partial "rss-link.html" . }} | ||||||
|  |             </h1> | ||||||
|  |  | ||||||
|  |             {{ partial "page-list.html" (.Paginate .Site.RegularPages).Pages }} | ||||||
|  |  | ||||||
|  |             {{ partial "pagination.html" . }} | ||||||
|  |         </div> | ||||||
|  |     {{ end }} | ||||||
|  | {{ end }} | ||||||
| @@ -1,33 +0,0 @@ | |||||||
| {{ define "main" }} |  | ||||||
|     {{ with .Content }} |  | ||||||
|         <div class="homepage-content"> |  | ||||||
|             {{ . }} |  | ||||||
|         </div> |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     {{ if .Site.Params.homepageLatestPosts }} |  | ||||||
|         <div class="homepage-latest-posts"> |  | ||||||
|             <hr> |  | ||||||
|             <h1> |  | ||||||
|                 {{ i18n "latest_posts" }} |  | ||||||
|                 {{ partial "rss-link.html" . }} |  | ||||||
|             </h1> |  | ||||||
|  |  | ||||||
|             {{ with (.Paginate .Site.RegularPages).Pages }} |  | ||||||
|                 <div class="page-list"> |  | ||||||
|                     <ul> |  | ||||||
|                         {{ range . }} |  | ||||||
|                             <li>{{ .Render "summary/post" }}</li> |  | ||||||
|                         {{ end }} |  | ||||||
|                     </ul> |  | ||||||
|                 </div> |  | ||||||
|             {{ else }} |  | ||||||
|                 <div> |  | ||||||
|                     {{ i18n "no_posts" }} |  | ||||||
|                 </div> |  | ||||||
|             {{ end }} |  | ||||||
|  |  | ||||||
|             {{ partial "pagination.html" . }} |  | ||||||
|         </div> |  | ||||||
|     {{ end }} |  | ||||||
| {{ end }} |  | ||||||
							
								
								
									
										86
									
								
								layouts/page.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										86
									
								
								layouts/page.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,86 @@ | |||||||
|  | {{ define "main" }} | ||||||
|  |     <article class="body-module--center"> | ||||||
|  |         <div class="page-title"> | ||||||
|  |             <h1> | ||||||
|  |                 {{ .Title | markdownify }} | ||||||
|  |                 {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} | ||||||
|  |             </h1> | ||||||
|  |         </div> | ||||||
|  |  | ||||||
|  |         {{ partial "page-metadata/post-full.html" . }} | ||||||
|  |         {{ partial "series-box.html" . }} | ||||||
|  |  | ||||||
|  |         {{ if .Params.Toc }} | ||||||
|  |             <div class="table-of-contents" aria-label="{{ i18n "aria_table_of_contents" }}"> | ||||||
|  |                 <details> | ||||||
|  |                     <summary>{{ i18n "table_of_contents" }}</summary> | ||||||
|  |                     {{ .TableOfContents }} | ||||||
|  |                 </details> | ||||||
|  |             </div> | ||||||
|  |             <div class="table-of-contents print"> | ||||||
|  |                 {{ i18n "table_of_contents" }} | ||||||
|  |                 {{ .TableOfContents }} | ||||||
|  |             </div> | ||||||
|  |         {{ end }} | ||||||
|  |  | ||||||
|  |         {{ partial "feature-figure.html" . }} | ||||||
|  |  | ||||||
|  |         <article class="post-content" data-pagefind-body> | ||||||
|  |             {{ .Content }} | ||||||
|  |         </article> | ||||||
|  |  | ||||||
|  |         {{ partial "series-box.html" . }} | ||||||
|  |  | ||||||
|  |         {{ if or .NextInSection .PrevInSection }} | ||||||
|  |             <div class="prevnext"> | ||||||
|  |                 {{ with .NextInSection }} | ||||||
|  |                     <a class="prev" href="{{ .Permalink }}"> | ||||||
|  |                         <div class="prev-caption"> | ||||||
|  |                             ← {{ i18n "newer_post" }} | ||||||
|  |                         </div> | ||||||
|  |                         <div class="prev-post"> | ||||||
|  |                             {{ .Title | markdownify }} | ||||||
|  |                         </div> | ||||||
|  |                     </a> | ||||||
|  |                 {{ else }} | ||||||
|  |                     <div class="prev"></div> | ||||||
|  |                 {{ end }} | ||||||
|  |  | ||||||
|  |                 {{ with .PrevInSection }} | ||||||
|  |                     <a class="next" href="{{ .Permalink }}"> | ||||||
|  |                         <div class="next-caption"> | ||||||
|  |                             {{ i18n "older_post" }} → | ||||||
|  |                         </div> | ||||||
|  |                         <div class="next-post"> | ||||||
|  |                             {{ .Title | markdownify }} | ||||||
|  |                         </div> | ||||||
|  |                     </a> | ||||||
|  |                 {{ else }} | ||||||
|  |                     <div class="next"></div> | ||||||
|  |                 {{ end }} | ||||||
|  |             </div> | ||||||
|  |         {{ end }} | ||||||
|  |  | ||||||
|  |         {{ if .Site.Params.shareButtons }} | ||||||
|  |             {{ partial "share.html" . }} | ||||||
|  |         {{ end }} | ||||||
|  |  | ||||||
|  |         {{ if .Params.comments }} | ||||||
|  |             <div class="comments"> | ||||||
|  |                 {{ partial "comments.html" . }} | ||||||
|  |             </div> | ||||||
|  |         {{ end }} | ||||||
|  |     </article> | ||||||
|  | {{ end }} | ||||||
|  |  | ||||||
|  |  | ||||||
|  | {{ define "post-body" }} | ||||||
|  |     {{ $related := .Site.RegularPages.Related . | first 10 }} | ||||||
|  |     {{ with $related }} | ||||||
|  |         <div class="body-module--full-width related-posts"> | ||||||
|  |             <hr> | ||||||
|  |             <h1>{{ i18n "related_posts" }}</h1> | ||||||
|  |             {{ partial "page-list.html" . }} | ||||||
|  |         </div> | ||||||
|  |     {{ end }} | ||||||
|  | {{ end }} | ||||||
							
								
								
									
										9
									
								
								layouts/page.markdown.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								layouts/page.markdown.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | |||||||
|  | {{ with .File -}} | ||||||
|  |   {{ with (.Path | readFile) -}} | ||||||
|  |     {{ . -}} | ||||||
|  |   {{ else -}} | ||||||
|  |     {{ errorf "file not found: %s" .Path -}} | ||||||
|  |   {{ end -}} | ||||||
|  | {{ else -}} | ||||||
|  |   {{ errorf "no file available for markdown template?" -}} | ||||||
|  | {{ end -}} | ||||||
| @@ -1,4 +0,0 @@ | |||||||
| {{/* |  | ||||||
|     Create a file named `layouts/partials/comments.html` at your site root to |  | ||||||
|     add a comment system. Page variables are passed. |  | ||||||
| */}} |  | ||||||
| @@ -1 +0,0 @@ | |||||||
| {{ i18n "credit_comment" | safeHTML }} |  | ||||||
| @@ -1,7 +0,0 @@ | |||||||
| {{ with .Description }} |  | ||||||
|     <p>{{ . | markdownify }}</p> |  | ||||||
| {{ else }} |  | ||||||
|     {{ with .Summary }} |  | ||||||
|         {{ . }} |  | ||||||
|     {{ end }} |  | ||||||
| {{ end }} |  | ||||||
| @@ -1,28 +0,0 @@ | |||||||
| {{ $hidecaption := index . "hidecaption" }} |  | ||||||
|  |  | ||||||
| {{ if index . "noborder" }} |  | ||||||
|     <figure> |  | ||||||
| {{ else }} |  | ||||||
|     <figure class="border"> |  | ||||||
| {{ end }} |  | ||||||
|  |  | ||||||
|     {{ with index . "src" }} |  | ||||||
|         {{ $media := . }} |  | ||||||
|         {{ if eq .MediaType.MainType "image" }} |  | ||||||
|             <img src="{{ $media.Permalink }}" alt="{{ $media.Title }}" /> |  | ||||||
|         {{ else if eq .MediaType.MainType "video" }} |  | ||||||
|             <video controls preload="metadata"> |  | ||||||
|                 <source src="{{ $media.Permalink }}" alt="{{ $media.Title }}"> |  | ||||||
|                 {{ i18n "browser_no_video_support" }} |  | ||||||
|             </video> |  | ||||||
|         {{ end }} |  | ||||||
|  |  | ||||||
|         {{ if not $hidecaption }} |  | ||||||
|             {{ with $media.Title }} |  | ||||||
|                 <figcaption> |  | ||||||
|                     {{ . | markdownify }} |  | ||||||
|                 </figcaption> |  | ||||||
|             {{ end }} |  | ||||||
|         {{ end }} |  | ||||||
|     {{ end }} |  | ||||||
| </figure> |  | ||||||
| @@ -1,46 +0,0 @@ | |||||||
| <head> |  | ||||||
|     <meta charset="UTF-8"> |  | ||||||
|     <meta name="viewport" content="width=device-width, initial-scale=1"> |  | ||||||
|     {{ hugo.Generator }} |  | ||||||
|  |  | ||||||
|     {{ with resources.Get "css/bobastyle.css" | fingerprint "sha512" }} |  | ||||||
|         <link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"> |  | ||||||
|     {{ end }} |  | ||||||
|     {{ with resources.Get "css/syntax.css" | fingerprint "sha512" }} |  | ||||||
|         <link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"> |  | ||||||
|     {{ end }} |  | ||||||
|     {{ with resources.Get "css/syntax-light.css" | fingerprint "sha512" }} |  | ||||||
|         <link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"> |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     {{ with resources.Get "js/back-to-top.js" | fingerprint "sha512" }} |  | ||||||
|         <script defer src="{{ .Permalink }}" type="text/javascript" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script> |  | ||||||
|     {{ end }} |  | ||||||
|     {{ with resources.Get "js/share-event.js" | fingerprint "sha512" }} |  | ||||||
|         <script defer src="{{ .Permalink }}" type="text/javascript" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script> |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     {{ with .Site.Params.faviconSVG }} |  | ||||||
|         <link rel="icon" href="{{ . | absURL }}" /> |  | ||||||
|     {{ end }} |  | ||||||
|     {{ with .Site.Params.appleTouchPNG }} |  | ||||||
|         <link rel="apple-touch-icon" href="{{ . | absURL }}" /> |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     {{ if .IsHome }} |  | ||||||
|         <title>{{ .Site.Title | plainify }}</title> |  | ||||||
|     {{ else }} |  | ||||||
|         <title>{{ (print .Title " | " .Site.Title) | plainify }}</title> |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     {{ partial "seo-tags/opengraph.html" . }} |  | ||||||
|     {{ partial "seo-tags/twitter-cards.html" . }} |  | ||||||
|     {{ partial "seo-tags/schema.html" . }} |  | ||||||
|     {{ partial "seo-tags/link.html" . }} |  | ||||||
|     {{ partial "seo-tags/author.html" . }} |  | ||||||
|  |  | ||||||
|     <meta name="language" content="{{ .Language.Lang }}"> |  | ||||||
|     <meta name="description" content="{{ (partial "seo-tags/description.html" .) | plainify }}"> |  | ||||||
|  |  | ||||||
|     {{ partial "additional-head.html" . }} |  | ||||||
| </head> |  | ||||||
| @@ -1,21 +0,0 @@ | |||||||
| <div class="latest-posts full-width-page-list"> |  | ||||||
|     <hr> |  | ||||||
|     <h1> |  | ||||||
|         {{ i18n "latest_posts" }} |  | ||||||
|         {{ partial "rss-link.html" .Site.Home }} |  | ||||||
|     </h1> |  | ||||||
|  |  | ||||||
|     {{ with .Site.RegularPages | first 5 }} |  | ||||||
|         <div class="page-list"> |  | ||||||
|             <ul> |  | ||||||
|                 {{ range . }} |  | ||||||
|                     <li>{{ .Render "summary/post" }}</li> |  | ||||||
|                 {{ end }} |  | ||||||
|             </ul> |  | ||||||
|         </div> |  | ||||||
|     {{ else }} |  | ||||||
|         <div> |  | ||||||
|             {{ i18n "no_posts" }} |  | ||||||
|         </div> |  | ||||||
|     {{ end }} |  | ||||||
| </div> |  | ||||||
| @@ -1,5 +0,0 @@ | |||||||
| {{ if gt .Paginator.TotalPages 1 }} |  | ||||||
|     <div class="pagination"> |  | ||||||
|         {{ template "_internal/pagination.html" . }} |  | ||||||
|     </div> |  | ||||||
| {{ end }} |  | ||||||
| @@ -1,16 +0,0 @@ | |||||||
| {{ with .Params.authors }} |  | ||||||
|     <span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_authors" }}"> |  | ||||||
|         {{ partial "icon.html" "user-circle" }} |  | ||||||
|  |  | ||||||
|         {{ if index $.Site.Taxonomies "authors" }} |  | ||||||
|             {{ $authors := slice }} |  | ||||||
|             {{ range . }} |  | ||||||
|                 {{ $url := (printf "authors/%s" (. | anchorize)) | absLangURL }} |  | ||||||
|                 {{ $authors = $authors | append (printf `<a href="%s">%s</a>` $url . | safeHTML) }} |  | ||||||
|             {{ end }} |  | ||||||
|             {{ delimit $authors ", " }} |  | ||||||
|         {{ else }} |  | ||||||
|             {{ delimit . ", " }} |  | ||||||
|         {{ end }} |  | ||||||
|     </span> |  | ||||||
| {{ end }} |  | ||||||
| @@ -1,11 +0,0 @@ | |||||||
| {{ with (.GetTerms "series") }} |  | ||||||
|     {{ $series := slice }} |  | ||||||
|     {{ range . }} |  | ||||||
|         {{ $series = $series | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }} |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     <div class="series" aria-label="{{ i18n "aria_post_meta_series" }}"> |  | ||||||
|         {{ partial "icon.html" "files" }} |  | ||||||
|         {{ delimit $series ", " }} |  | ||||||
|     </div> |  | ||||||
| {{ end }} |  | ||||||
| @@ -1,11 +0,0 @@ | |||||||
| {{ with (.GetTerms "tags") }} |  | ||||||
|     {{ $tags := slice }} |  | ||||||
|     {{ range . }} |  | ||||||
|         {{ $tags = $tags | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }} |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     <div class="tags" aria-label="{{ i18n "aria_post_meta_tags" }}"> |  | ||||||
|         {{ partial "icon.html" "tag" }} |  | ||||||
|         {{ delimit $tags ", " }} |  | ||||||
|     </div> |  | ||||||
| {{ end }} |  | ||||||
| @@ -1,8 +0,0 @@ | |||||||
| {{ if .IsTranslated }} |  | ||||||
|     <span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_translations" }}"> |  | ||||||
|         {{ partial "icon.html" "world" }} |  | ||||||
|         {{ range .Translations }} |  | ||||||
|             <a href="{{ .Permalink }}">{{ .Language }}</a> |  | ||||||
|         {{ end }} |  | ||||||
|     </span> |  | ||||||
| {{ end }} |  | ||||||
| @@ -1,13 +0,0 @@ | |||||||
| {{ if and .Site.Params.gitFileURL .File.Path }} |  | ||||||
|     <span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_view_source" }}"> |  | ||||||
|         {{ with .Site.Params.gitFileIcon }} |  | ||||||
|             {{ partial "icon.html" . }} |  | ||||||
|         {{ else }} |  | ||||||
|             {{ partial "icon.html" "file" }} |  | ||||||
|         {{ end }} |  | ||||||
|  |  | ||||||
|         <a href="{{ printf "%s/content/%s" .Site.Params.gitFileURL .File.Path }}" target="_blank" rel="noopener"> |  | ||||||
|             View source |  | ||||||
|         </a> |  | ||||||
|     </span> |  | ||||||
| {{ end }} |  | ||||||
| @@ -1,30 +0,0 @@ | |||||||
| {{ if or .Date .Params.authors .IsTranslated .Site.Params.readingtime .Site.Params.gitFileURL }} |  | ||||||
|     <div class="post-metadata" aria-label="{{ i18n "aria_post_metadata" }}"> |  | ||||||
|         {{ if .Date }} |  | ||||||
|             <span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_date" }}"> |  | ||||||
|                 {{ partial "icon.html" "calendar" }} |  | ||||||
|                 <time datetime="{{ .Date.Format "2006-01-02" }}" pubdate> |  | ||||||
|                     {{ i18n "long_date" (dict "Date" .Date "Data" .Site.Data) }} |  | ||||||
|                 </time> |  | ||||||
|             </span> |  | ||||||
|  |  | ||||||
|             {{/* TODO: make this be a tooltip */}} |  | ||||||
|             {{/* DISABLED |  | ||||||
|             {{ if ne (time.Format "2006-01-02" .Lastmod) (time.Format "2006-01-02" .Date) }} |  | ||||||
|                 <span class="post-meta-item" aria-label="{{ i18n "aria_post_meta_modified_date" }}"> |  | ||||||
|                     {{ partial "icon.html" "pencil" }} |  | ||||||
|                     <time datetime="{{ .Lastmod.Format "2006-01-02" }}" pubdate> |  | ||||||
|                         {{ i18n "long_date" (dict "Date" .Lastmod "Data" .Site.Data) }} |  | ||||||
|                     </time> |  | ||||||
|                     {{ end }} |  | ||||||
|                 </span> |  | ||||||
|             */}} |  | ||||||
|         {{ end }} |  | ||||||
|  |  | ||||||
|         {{ partial "post-meta-item/authors.html" . }} |  | ||||||
|         {{ partial "post-meta-item/translations.html" . }} |  | ||||||
|         {{ partial "post-meta-item/readingtime.html" . }} |  | ||||||
|         {{ partial "post-meta-item/viewsource.html" . }} |  | ||||||
|         {{ partial "post-meta-item/tags.html" . }} |  | ||||||
|     </div> |  | ||||||
| {{ end }} |  | ||||||
| @@ -1,18 +0,0 @@ | |||||||
| {{ if or .Date .Params.authors .IsTranslated .Site.Params.readingtime }} |  | ||||||
|     <div class="post-metadata" aria-label="{{ i18n "aria_post_metadata" }}"> |  | ||||||
|         {{ if .Date }} |  | ||||||
|             <span class="post-meta-item" aria-label="date"> |  | ||||||
|                 {{ partial "icon.html" "calendar" }} |  | ||||||
|                 <time datetime="{{ .Date.Format "2006-01-02" }}" pubdate> |  | ||||||
|                     {{ i18n "long_date" (dict "Date" .Date "Data" .Site.Data) }} |  | ||||||
|                 </time> |  | ||||||
|             </span> |  | ||||||
|         {{ end }} |  | ||||||
|  |  | ||||||
|         {{ partial "post-meta-item/authors.html" . }} |  | ||||||
|         {{ partial "post-meta-item/translations.html" . }} |  | ||||||
|         {{ partial "post-meta-item/readingtime.html" . }} |  | ||||||
|         {{ partial "post-meta-item/series.html" . }} |  | ||||||
|         {{ partial "post-meta-item/tags.html" . }} |  | ||||||
|     </div> |  | ||||||
| {{ end }} |  | ||||||
| @@ -1,28 +0,0 @@ | |||||||
| {{ $hidecaption := index . "hidecaption" }} |  | ||||||
| {{ $type := index . "type" }} |  | ||||||
| {{ $src := index . "src" }} |  | ||||||
| {{ $alt := index . "alt" }} |  | ||||||
|  |  | ||||||
| {{ if index . "border" }} |  | ||||||
|     <figure class="border"> |  | ||||||
| {{ else }} |  | ||||||
|     <figure> |  | ||||||
| {{ end }} |  | ||||||
|  |  | ||||||
|     {{ if eq $type "image" }} |  | ||||||
|         <img src="{{ $src }}" alt="{{ $alt }}" /> |  | ||||||
|     {{ else if eq $type "video" }} |  | ||||||
|         <video controls preload="metadata"> |  | ||||||
|             <source src="{{ $src }}" alt="{{ $alt }}"> |  | ||||||
|             {{ i18n "browser_no_video_support" }} |  | ||||||
|         </video> |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     {{ if not $hidecaption }} |  | ||||||
|         {{ with $alt }} |  | ||||||
|             <figcaption> |  | ||||||
|                 {{ . | markdownify }} |  | ||||||
|             </figcaption> |  | ||||||
|         {{ end }} |  | ||||||
|     {{ end }} |  | ||||||
| </figure> |  | ||||||
| @@ -1,29 +0,0 @@ | |||||||
| {{ $images := $.Resources.ByType "image" }} |  | ||||||
| {{ $featured := $images.GetMatch "*feature*" }} |  | ||||||
| {{ if not $featured }} |  | ||||||
|     {{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }} |  | ||||||
| {{ end }} |  | ||||||
|  |  | ||||||
| {{ with $featured }} |  | ||||||
|     {{ $ratio := 0 }} |  | ||||||
|     {{ if gt .Width .Height }} |  | ||||||
|         {{ $ratio = div (float .Width) .Height }} |  | ||||||
|     {{ else }} |  | ||||||
|         {{ $ratio = div (float .Height) .Width }} |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     {{ if lt $ratio 1.75 }} |  | ||||||
|         <meta name="twitter:card" content="summary_large_image"> |  | ||||||
|     {{ else }} |  | ||||||
|         <meta name="twitter:card" content="summary"> |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     <meta name="twitter:image" content="{{ $featured.Permalink }}"> |  | ||||||
| {{ end }} |  | ||||||
|  |  | ||||||
| <meta name="twitter:title" content="{{ .Title | plainify }}"> |  | ||||||
| <meta name="twitter:description" content="{{ (partial "seo-tags/description.html" .) | plainify }}"> |  | ||||||
|  |  | ||||||
| {{ with .Site.Social.twitter }} |  | ||||||
|     <meta name="twitter:site" content="@{{ . }}"> |  | ||||||
| {{ end }} |  | ||||||
| @@ -1,52 +0,0 @@ | |||||||
| <h2 class="header"> |  | ||||||
|     <a href="{{ .Site.Home.Permalink | absLangURL }}">{{ .Site.Title | markdownify }}</a> |  | ||||||
| </h2> |  | ||||||
|  |  | ||||||
| <div class="topbar"> |  | ||||||
|     <nav class="navbar" aria-label="{{ i18n "aria_navbar" }}"> |  | ||||||
|         {{ with .Site.Home }} |  | ||||||
|             <a class="navbar-item{{ if $.IsHome }} active{{ end }}" href="{{ .Permalink | absLangURL }}">{{ .Title | markdownify }}</a> |  | ||||||
|         {{ end }} |  | ||||||
|  |  | ||||||
|         {{ range .Site.Menus.main }} |  | ||||||
|             {{ $isActive := false }} |  | ||||||
|             {{ if or ($.HasMenuCurrent .Menu .) ($.IsMenuCurrent .Menu .) }} |  | ||||||
|                 {{ $isActive = true }} |  | ||||||
|             {{ end }} |  | ||||||
|             <a class="navbar-item{{ if $isActive }} active{{ end }}" |  | ||||||
|                {{ if strings.HasPrefix .URL "http" }}target="_blank" rel="noopener"{{ end }} |  | ||||||
|                href="{{ .URL }}">{{ .Name }}</a> |  | ||||||
|         {{ end }} |  | ||||||
|     </nav> |  | ||||||
|  |  | ||||||
|     {{ if .Site.IsMultiLingual }} |  | ||||||
|         <details class="langpicker" aria-label="{{ i18n "aria_langpicker" }}"> |  | ||||||
|             <summary> |  | ||||||
|                 {{- partial "icon.html" "world" -}} |  | ||||||
|             </summary> |  | ||||||
|             <ul class="languages" aria-label="{{ i18n "aria_langpicker_list" }}"> |  | ||||||
|                 {{ range .AllTranslations }} |  | ||||||
|                     <li> |  | ||||||
|                         <a class="langpicker-item{{ if eq .Language $.Site.Language }} active{{ end }}" href="{{ .Permalink }}">{{ .Language.LanguageName }}</a> |  | ||||||
|                     </li> |  | ||||||
|                 {{ end }} |  | ||||||
|  |  | ||||||
|                 {{ $site_translations := slice }} |  | ||||||
|                 {{ range .Site.Languages }} |  | ||||||
|                     {{ $site_translations = $site_translations | append .LanguageName }} |  | ||||||
|                 {{ end }} |  | ||||||
|  |  | ||||||
|                 {{ $translation_codes := slice }} |  | ||||||
|                 {{ range .AllTranslations }} |  | ||||||
|                     {{ $translation_codes = $translation_codes | append .Language }} |  | ||||||
|                 {{ end }} |  | ||||||
|  |  | ||||||
|                 {{ range (.Site.Languages | complement $translation_codes) }} |  | ||||||
|                     <li> |  | ||||||
|                         <a class="langpicker-item unavailable" aria-disabled="true">{{ .LanguageName }}</a> |  | ||||||
|                     </li> |  | ||||||
|                 {{ end }} |  | ||||||
|             </ul> |  | ||||||
|         </details> |  | ||||||
|     {{ end }} |  | ||||||
| </div> |  | ||||||
| @@ -1,2 +1,6 @@ | |||||||
| User-Agent: * | User-Agent: * | ||||||
| Sitemap: {{ "sitemap.xml" | absLangURL }} | Sitemap: {{ "sitemap.xml" | absLangURL }} | ||||||
|  |  | ||||||
|  | {{/* It complains about the raw markdown output having no title tag */ -}} | ||||||
|  | User-Agent: Bingbot | ||||||
|  | Disallow: /blog/*.md$ | ||||||
|   | |||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user