mirror of
				https://github.com/BBaoVanC/bobatheme.git
				synced 2025-10-28 16:53:30 -05:00 
			
		
		
		
	Compare commits
	
		
			77 Commits
		
	
	
		
			c0426f191a
			...
			remove-sha
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| b1cdf7c318 | |||
| 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 | 
							
								
								
									
										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 | ||||||
|   | |||||||
| @@ -8,7 +8,7 @@ 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: | categories: | ||||||
|   - archetype-stuff |   - archetype-stuff | ||||||
|   | |||||||
| @@ -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 }} | ||||||
|  |  | ||||||
| --- | --- | ||||||
|  |  | ||||||
|   | |||||||
| @@ -158,62 +158,38 @@ pre > code { | |||||||
|  |  | ||||||
| /* }}} */ | /* }}} */ | ||||||
|  |  | ||||||
| /* Basic elements {{{ */ | /* Common distances/sizes {{{ */ | ||||||
|  |  | ||||||
| html { | :root { | ||||||
|   scroll-behavior: smooth; |   --page-margin: 16px; | ||||||
| } | } | ||||||
|  |  | ||||||
| @media screen and (prefers-reduced-motion: reduce) { | /* }}} */ | ||||||
|     html { |  | ||||||
|         scroll-behavior: auto; |  | ||||||
|     } |  | ||||||
| } |  | ||||||
|  |  | ||||||
| body { |  | ||||||
|   background-color: var(--background-0); |  | ||||||
|   color: var(--text-0); |  | ||||||
|   margin: 20px; |  | ||||||
|   max-width: 720px; |  | ||||||
|   overflow-wrap: break-word; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| @media (min-width: 760px) { | /* Common elements {{{ */ | ||||||
|   body { |  | ||||||
|     margin: 20px auto; |  | ||||||
|   } |  | ||||||
| } |  | ||||||
|  |  | ||||||
| footer { |  | ||||||
|   margin-top: 20px; |  | ||||||
|   text-align: center; |  | ||||||
|   font-size: smaller; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| footer p { |  | ||||||
|   margin: 0; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| img, | img, | ||||||
| video { | video { | ||||||
|   max-width: 100%; |   max-width: 100%; | ||||||
| } | } | ||||||
|  |  | ||||||
| .post-media > figure.border img, | figure > .figure-media { | ||||||
| .post-media > figure.border video { |  | ||||||
|   padding: 5px; |   padding: 5px; | ||||||
|   border: 7px solid var(--figure-border); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| figure.border img, | figure > .figure-media.border { | ||||||
| figure.border video { |  | ||||||
|   padding: 5px; |  | ||||||
|   border: 2px solid var(--figure-border); |   border: 2px solid var(--figure-border); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .post-media > figure > .figure-media { | ||||||
|  |   border: 7px solid var(--figure-border); | ||||||
|  | } | ||||||
|  |  | ||||||
| figure { | figure { | ||||||
|   margin: auto; |   display: block; | ||||||
|   display: inline-block; |   text-align: center; | ||||||
|  |   margin: 0; | ||||||
| } | } | ||||||
|  |  | ||||||
| figcaption { | figcaption { | ||||||
| @@ -241,39 +217,31 @@ hr { | |||||||
|   border: 1px solid var(--background-3); |   border: 1px solid var(--background-3); | ||||||
| } | } | ||||||
|  |  | ||||||
| @media (min-width: 720px) { | table.simple { | ||||||
|   .full-width-hr { |  | ||||||
|     /* see also: the related-posts section too */ |  | ||||||
|     margin-left: calc(-100vw / 2 + 760px / 2); |  | ||||||
|     margin-right: calc(-100vw / 2 + 760px / 2); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
|  |  | ||||||
| table.markdown { |  | ||||||
|   border-collapse: collapse; |   border-collapse: collapse; | ||||||
|   border: 2px solid var(--text-1); |   border: 2px solid var(--text-1); | ||||||
| } | } | ||||||
|  |  | ||||||
| table.markdown thead { | table.simple thead { | ||||||
|   background-color: var(--background-2); |   background-color: var(--background-2); | ||||||
|   color: var(--text-2); |   color: var(--text-2); | ||||||
|   border-bottom: 2px solid var(--text-1); |   border-bottom: 2px solid var(--text-1); | ||||||
| } | } | ||||||
|  |  | ||||||
| table.markdown th, | table.simple th, | ||||||
| table.markdown td { | table.simple td { | ||||||
|   padding: 8px; |   padding: 8px; | ||||||
| } | } | ||||||
|  |  | ||||||
| table.markdown :is(th, td) + :is(th, td) { | table.simple :is(th, td) + :is(th, td) { | ||||||
|   border-left: 2px solid var(--text-1); |   border-left: 2px solid var(--text-1); | ||||||
| } | } | ||||||
|  |  | ||||||
| table.markdown tbody tr:nth-child(odd) { | table.simple tbody tr:nth-child(odd) { | ||||||
|   background-color: var(--background-0); |   background-color: var(--background-0); | ||||||
|   color: var(--text-0); |   color: var(--text-0); | ||||||
| } | } | ||||||
| table.markdown tbody tr:nth-child(even) { | table.simple tbody tr:nth-child(even) { | ||||||
|   background-color: var(--background-1); |   background-color: var(--background-1); | ||||||
|   color: var(--text-1); |   color: var(--text-1); | ||||||
| } | } | ||||||
| @@ -292,62 +260,97 @@ table.markdown tbody tr:nth-child(even) { | |||||||
|  |  | ||||||
| /* Icons */ | /* Icons */ | ||||||
| .icon { | .icon { | ||||||
|   width: 20px; |   width: 1em; | ||||||
|   height: 20px; |   height: 1em; | ||||||
|   color: var(--text-1); |   color: var(--text-1); | ||||||
|   text-align: center; |   text-align: center; | ||||||
|   display: inline; |   display: inline; | ||||||
|   vertical-align: middle; |   vertical-align: sub; | ||||||
| } | } | ||||||
|  |  | ||||||
| h1 svg.icon { | /* workarounds for some icons from jam-icons being non-square aspect ratio */ | ||||||
|   width: 30px; | .icon-code { | ||||||
|   height: 30px; |   width: 1.25em; | ||||||
| } | } | ||||||
|  |  | ||||||
| /* }}} */ | /* }}} */ | ||||||
|  |  | ||||||
|  |  | ||||||
| /* Heading formatting (website title and article section headers) {{{ */ | /* Baseof formatting {{{ */ | ||||||
|  |  | ||||||
| .header { | html { | ||||||
|   margin: 16px 0; |   scroll-behavior: smooth; | ||||||
|   font-size: 1.5em; |  | ||||||
| } | } | ||||||
|  |  | ||||||
| /* this is also used i.e. in page-title */ | @media screen and (prefers-reduced-motion: reduce) { | ||||||
| .heading-link { |     html { | ||||||
|  |         scroll-behavior: auto; | ||||||
|  |     } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | body { | ||||||
|  |   background-color: var(--background-0); | ||||||
|  |   color: var(--text-0); | ||||||
|  |   overflow-wrap: break-word; | ||||||
|  |   margin: 0; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .main-container { | ||||||
|  |   margin: var(--page-margin) auto; | ||||||
|  |   /* use padding because otherwise there's no way to have margin be both auto, and a minimum value */ | ||||||
|  |   padding: 0 var(--page-margin); | ||||||
|  |   max-width: calc(720px + 2 * var(--page-margin)); /* padding is included in the element's width */ | ||||||
|  | } | ||||||
|  |  | ||||||
|  | footer { | ||||||
|  |   margin: var(--page-margin) 0; | ||||||
|  |   text-align: center; | ||||||
|  |   font-size: smaller; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | footer p { | ||||||
|  |   margin: 0; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /* }}} */ | ||||||
|  |  | ||||||
|  | /* Top bar formatting {{{ */ | ||||||
|  |  | ||||||
|  | .top { | ||||||
|  |   display: flex; | ||||||
|  |   flex-direction: row; | ||||||
|  |   flex-wrap: wrap; | ||||||
|  |   justify-content: space-between; | ||||||
|  |   background-color: var(--background-1); | ||||||
|  |   /* padding can't be here because then the first navbar element will be shifted too far over, | ||||||
|  |    * or it will need its hover background to be chopped off on the left */ | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .header { | ||||||
|  |   flex-grow: 1; | ||||||
|  |   margin: 8px var(--page-margin); | ||||||
|  |   font-size: 1.25em; | ||||||
|  |   display: flex; | ||||||
|  |   align-items: center; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .header a { | ||||||
|   color: inherit; |   color: inherit; | ||||||
|   font-weight: bold; |   font-weight: bold; | ||||||
| } | } | ||||||
|  |  | ||||||
| .heading-link svg { |  | ||||||
|   width: 15px; |  | ||||||
|   height: 15px; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| /* }}} */ |  | ||||||
|  |  | ||||||
| /* Navbar formatting {{{ */ |  | ||||||
|  |  | ||||||
| .navbar { | .navbar { | ||||||
|   display: flex; |   display: flex; | ||||||
|   flex-grow: 1; |   flex-wrap: wrap; | ||||||
|   overflow: auto; |  | ||||||
|   background-color: var(--background-1); |  | ||||||
|   border-radius: 8px; |  | ||||||
|   margin-top: 5px; |  | ||||||
|   padding: 4px; |  | ||||||
| } | } | ||||||
|  |  | ||||||
| .navbar-item { | .navbar-item { | ||||||
|   padding: 8px 12px; |   padding: 12px var(--page-margin); | ||||||
|   border-radius: 12px; |  | ||||||
|   white-space: nowrap; |   white-space: nowrap; | ||||||
| } | } | ||||||
|  |  | ||||||
| .navbar-item:hover { | .navbar-item:hover { | ||||||
|   background-color: var(--background-3); |   background-color: var(--background-2); | ||||||
|   text-decoration: none; |   text-decoration: none; | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -357,27 +360,26 @@ h1 svg.icon { | |||||||
|  |  | ||||||
| /* }}} */ | /* }}} */ | ||||||
|  |  | ||||||
| /* Back to top {{{ */ | /* Skip to main content {{{ */ | ||||||
| #top { | #skip-to-main { | ||||||
|   font-size: 0; |   position: absolute; | ||||||
|  |   padding: 8px; | ||||||
|  |   background-color: var(--text-0); | ||||||
|  |   color: var(--background-0); | ||||||
|  |   transform: translateY(-100%); | ||||||
| } | } | ||||||
| #back-to-top { | #skip-to-main:focus { | ||||||
|   position: fixed; |   transform: translateY(0%); | ||||||
|   float: right; | } | ||||||
|   bottom: 25px; | #main-content:target { | ||||||
|   right: 25px; |   animation: none; /* prevent it from turning yellow */ | ||||||
|   background-color: var(--background-1); |  | ||||||
|   color: var(--text-1); |  | ||||||
|   border-radius: 100%; |  | ||||||
|   padding: 12px; |  | ||||||
|   display: none; |  | ||||||
| } | } | ||||||
| /* }}} */ | /* }}} */ | ||||||
|  |  | ||||||
| /* Breadcrumb navigation {{{ */ | /* Breadcrumb navigation {{{ */ | ||||||
|  |  | ||||||
| .breadcrumb { | .breadcrumb { | ||||||
|   margin: 20px 0; |   margin: var(--page-margin) 0; | ||||||
| } | } | ||||||
|  |  | ||||||
| .breadcrumb ul { | .breadcrumb ul { | ||||||
| @@ -485,6 +487,10 @@ h1 svg.icon { | |||||||
|   margin-bottom: 10px; |   margin-bottom: 10px; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .page-title a { | ||||||
|  |   color: inherit; | ||||||
|  | } | ||||||
|  |  | ||||||
| .page-title h1 { | .page-title h1 { | ||||||
|   margin: 0; |   margin: 0; | ||||||
| } | } | ||||||
| @@ -635,7 +641,7 @@ h1 svg.icon { | |||||||
| /* }}} */ | /* }}} */ | ||||||
|  |  | ||||||
|  |  | ||||||
| /* Content (single) formatting {{{ */ | /* Components exclusive to content/single pages {{{ */ | ||||||
|  |  | ||||||
| .series-box { | .series-box { | ||||||
|   background-color: var(--background-1); |   background-color: var(--background-1); | ||||||
| @@ -662,43 +668,6 @@ h1 svg.icon { | |||||||
|   padding: 8px 15px; |   padding: 8px 15px; | ||||||
| } | } | ||||||
|  |  | ||||||
| /* Social media share buttons */ |  | ||||||
|  |  | ||||||
| .share-buttons { |  | ||||||
|   background: var(--background-1); |  | ||||||
|   color: var(--text-1); |  | ||||||
|   margin: 25px 0; |  | ||||||
|   padding: 8px 0; |  | ||||||
|   border-radius: 8px; |  | ||||||
|   display: flex; |  | ||||||
|   gap: 8px; |  | ||||||
|   justify-content: center; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .share-buttons a { |  | ||||||
|   background-color: var(--background-2); |  | ||||||
|   color: var(--text-2); |  | ||||||
|   padding: 4px; |  | ||||||
|   border-radius: 8px; |  | ||||||
| } |  | ||||||
| .share-buttons a:hover { |  | ||||||
|   background-color: var(--background-3); |  | ||||||
|   color: var(--text-3); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .share-buttons svg { |  | ||||||
|   width: 32px; |  | ||||||
|   height: 32px; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| /* https://stackoverflow.com/a/72073682/19003757 */ |  | ||||||
| /* |  | ||||||
| .telegram-share > svg { |  | ||||||
|   transform: scale(1.5); |  | ||||||
|   margin: 9px -9px -9px 9px; |  | ||||||
| } |  | ||||||
| */ |  | ||||||
|  |  | ||||||
| /* See also formating */ | /* See also formating */ | ||||||
| .see-also { | .see-also { | ||||||
|   background-color: var(--background-1); |   background-color: var(--background-1); | ||||||
| @@ -875,64 +844,43 @@ aside.quote { | |||||||
|  |  | ||||||
| /* }}} */ | /* }}} */ | ||||||
|  |  | ||||||
| /* }}} */ |  | ||||||
|  |  | ||||||
| /* Related posts section {{{ */ | /* Related posts section {{{ */ | ||||||
|  |  | ||||||
| .full-width-page-list { | /* set the margins on the contents instead of the parent .related-posts | ||||||
|   /* make left/right 0 margin so it takes up full width */ |  * so that the posts in the list clip off the edge of the screen, | ||||||
|   margin: 25px 0; |  * which makes a more obvious indicator that it's scrollable | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | .related-posts > hr, | ||||||
|  | .related-posts > h1 { | ||||||
|  |   margin: var(--page-margin); | ||||||
| } | } | ||||||
|  |  | ||||||
| .full-width-page-list > hr, | .related-posts .page { | ||||||
| .full-width-page-list > h1 { |  | ||||||
|   margin-left: 20px; |  | ||||||
|   margin-right: 20px; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .full-width-page-list .page { |  | ||||||
|   min-width: 300px; |   min-width: 300px; | ||||||
|   max-width: 300px; |   max-width: 300px; | ||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
| .full-width-page-list .page:first-child { | .related-posts .page:first-child { | ||||||
|   margin-left: 20px; |   margin-left: var(--page-margin); | ||||||
| } | } | ||||||
| .full-width-page-list .page:last-child { | .related-posts .page:last-child { | ||||||
|   margin-right: 20px; |   margin-right: var(--page-margin); | ||||||
| } | } | ||||||
|  |  | ||||||
| @media (max-width: 720px) { | .related-posts .page-list { | ||||||
|   /* when the screen is smaller than max size, make sure that the .related div |  | ||||||
|    * still reaches the screen edge. then if the posts overflow and require |  | ||||||
|    * scrolling, you can see it cut off on the side of your phone screen |  | ||||||
|    */ |  | ||||||
|   .full-width-page-list { |  | ||||||
|     margin-left: -20px; |  | ||||||
|     margin-right: -20px; |  | ||||||
|   } |  | ||||||
| } |  | ||||||
|  |  | ||||||
| @media (min-width: 720px) { |  | ||||||
|   .full-width-page-list { |  | ||||||
|     /* this makes it full width -- 720px max-width on body it is exactly 720px |  | ||||||
|      * so .related takes up full width |  | ||||||
|      */ |  | ||||||
|     margin-left: calc(-100vw / 2 + 720px / 2); |  | ||||||
|     margin-right: calc(-100vw / 2 + 720px / 2); |  | ||||||
|   } |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .full-width-page-list .page-list { |  | ||||||
|   display: flex; |   display: flex; | ||||||
|   flex-direction: row; |   flex-direction: row; | ||||||
|   gap: 20px; |   gap: 20px; | ||||||
|   overflow-x: scroll; |   overflow-x: auto; | ||||||
|  |   margin-bottom: var(--page-margin); | ||||||
| } | } | ||||||
|  |  | ||||||
| /* }}} */ | /* }}} */ | ||||||
|  |  | ||||||
|  | /* }}} */ | ||||||
|  |  | ||||||
|  |  | ||||||
| /* @media specializations {{{ */ | /* @media specializations {{{ */ | ||||||
|  |  | ||||||
| @@ -946,13 +894,13 @@ aside.quote { | |||||||
|  |  | ||||||
| /* Print compatibility {{{ */ | /* Print compatibility {{{ */ | ||||||
| @media print { | @media print { | ||||||
|   .top, |   .top > .navbar, | ||||||
|   .section-header-link, |   .content-heading-link, | ||||||
|   .post-meta-edit-history, |   .post-meta-edit-history, | ||||||
|  |   .post-meta-view-markdown, | ||||||
|  |   .code-copy-button, | ||||||
|   .prevnext, |   .prevnext, | ||||||
|   .share-buttons, |   .related-posts { | ||||||
|   .related-posts, |  | ||||||
|   .latest-posts { |  | ||||||
|     display: none; |     display: none; | ||||||
|   } |   } | ||||||
|  |  | ||||||
| @@ -961,8 +909,21 @@ aside.quote { | |||||||
|     color-adjust: exact !important; |     color-adjust: exact !important; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   body { |   .top { | ||||||
|  |     background-color: unset; | ||||||
|  |   } | ||||||
|  |   .top > .header { | ||||||
|  |     margin-left: 0; | ||||||
|  |     margin-right: 0; | ||||||
|  |   } | ||||||
|  |   .main-container { | ||||||
|     max-width: 100%; |     max-width: 100%; | ||||||
|  |     margin: 8px 0; | ||||||
|  |     padding: 0; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   .breadcrumb { | ||||||
|  |     margin: 8px 0; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   table, |   table, | ||||||
| @@ -978,10 +939,6 @@ aside.quote { | |||||||
|   .table-of-contents.print { |   .table-of-contents.print { | ||||||
|     display: block; |     display: block; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   #back-to-top { |  | ||||||
|     display: none !important; |  | ||||||
|   } |  | ||||||
| } | } | ||||||
|  |  | ||||||
| /* }}} */ | /* }}} */ | ||||||
|   | |||||||
							
								
								
									
										121
									
								
								assets/css/comments.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										121
									
								
								assets/css/comments.css
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,121 @@ | |||||||
|  | /* 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 */ | ||||||
|  | } | ||||||
							
								
								
									
										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); | ||||||
|  | } | ||||||
| @@ -5,16 +5,17 @@ | |||||||
|     color: black; |     color: black; | ||||||
|   } |   } | ||||||
|  |  | ||||||
| /* Background */ .bg { background-color: #f8f8f8 } | /* Background */ .bg { background-color: #f8f8f8; } | ||||||
| /* PreWrapper */ .chroma { 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 {  } | /* 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; } | /* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; } | ||||||
| /* LineHighlight */ .chroma .hl { background-color: #ffffcc } | /* LineHighlight */ .chroma .hl { background-color: #dfdfdf } | ||||||
| /* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; 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 { white-space: pre; user-select: none; 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; } | /* 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 } | ||||||
|   | |||||||
| @@ -1,15 +1,16 @@ | |||||||
| /* native style */ | /* native style */ | ||||||
|  |  | ||||||
| /* Background */ .bg { color: #d0d0d0; background-color: #202020 } | /* Background */ .bg { color: #d0d0d0; background-color: #202020; } | ||||||
| /* PreWrapper */ .chroma { 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 {  } | /* 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; } | /* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; } | ||||||
| /* LineHighlight */ .chroma .hl { background-color: #ffffcc } | /* LineHighlight */ .chroma .hl { background-color: #363636 } | ||||||
| /* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; 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 { white-space: pre; user-select: none; 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; } | /* 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 } | ||||||
|   | |||||||
| @@ -1,13 +1,3 @@ | |||||||
| // back to top |  | ||||||
| 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"; |  | ||||||
|     } |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // code block copy to clipboard | // code block copy to clipboard | ||||||
| window.onload = () => { | window.onload = () => { | ||||||
|     document.querySelectorAll(".code-block").forEach(codeBlock => { |     document.querySelectorAll(".code-block").forEach(codeBlock => { | ||||||
|   | |||||||
| @@ -1,3 +0,0 @@ | |||||||
| function share_event(service) { |  | ||||||
|     // this function does nothing by default |  | ||||||
| } |  | ||||||
| @@ -1,63 +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 |  | ||||||
|   # gitHistoryURL: https://github.com/BBaoVanC/bobatheme/commits/master |  | ||||||
|  |  | ||||||
|   # 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 |  | ||||||
|   #   print: 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 |  | ||||||
| @@ -2,6 +2,12 @@ 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 | ||||||
| @@ -12,11 +18,20 @@ taxonomies: | |||||||
|   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: | ||||||
							
								
								
									
										26
									
								
								i18n/en.yaml
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								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" | ||||||
| @@ -30,6 +32,9 @@ readingtime: | |||||||
| edit_history: | edit_history: | ||||||
|   other: "Edit history" |   other: "Edit history" | ||||||
|  |  | ||||||
|  | view_markdown: | ||||||
|  |   other: "View raw" | ||||||
|  |  | ||||||
|  |  | ||||||
| # Post count | # Post count | ||||||
| no_posts: | no_posts: | ||||||
| @@ -67,6 +72,9 @@ aria_rss_link: | |||||||
| aria_post_meta_edit_history: | aria_post_meta_edit_history: | ||||||
|   other: "link to page edit history" |   other: "link to page edit history" | ||||||
|  |  | ||||||
|  | aria_post_meta_view_markdown: | ||||||
|  |   other: "link to view raw markdown code of page" | ||||||
|  |  | ||||||
| aria_post_meta_categories: | aria_post_meta_categories: | ||||||
|   other: "categories" |   other: "categories" | ||||||
|  |  | ||||||
| @@ -117,21 +125,3 @@ aria_navbar: | |||||||
|  |  | ||||||
| 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" |  | ||||||
|   | |||||||
| @@ -1,45 +0,0 @@ | |||||||
| {{ i18n "credit_comment" | safeHTML }} |  | ||||||
| <!DOCTYPE html> |  | ||||||
| <html lang="{{ .Language.Lang }}"> |  | ||||||
|     {{ partial "head.html" . }} |  | ||||||
|  |  | ||||||
|     <body> |  | ||||||
|         <a id="top" aria-hidden="true"></a> |  | ||||||
|  |  | ||||||
|         {{ partial "top.html" . }} |  | ||||||
|  |  | ||||||
|         {{ 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 }} |  | ||||||
|             <footer> |  | ||||||
|                 {{ with .Site.Copyright }} |  | ||||||
|                     <p>{{ . | safeHTML }}</p> |  | ||||||
|                 {{ end }} |  | ||||||
|  |  | ||||||
|                 {{ with .Site.Params.footer }} |  | ||||||
|                     {{ . | $.RenderString (dict "display" "block") }} |  | ||||||
|                 {{ end }} |  | ||||||
|             </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,6 +1,6 @@ | |||||||
| <h{{ .Level }} id="{{ .Anchor | safeURL }}" class="section-heading"> | <h{{ .Level }} id="{{ .Anchor | safeURL }}" class="section-heading"> | ||||||
|     {{ .Text | safeHTML }} |     {{ .Text | safeHTML }} | ||||||
|     <a class="heading-link" href="#{{ .Anchor | safeURL }}"> |     <a class="content-heading-link" href="#{{ .Anchor | safeURL }}"> | ||||||
|         <span aria-label="{{ i18n "aria_heading_link" }}"> |         <span aria-label="{{ i18n "aria_heading_link" }}"> | ||||||
|             {{ partial "icon.html" "link" }} |             {{ partial "icon.html" "link" }} | ||||||
|         </span> |         </span> | ||||||
							
								
								
									
										15
									
								
								layouts/_partials/comments.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								layouts/_partials/comments.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | |||||||
|  | {{ with resources.Get "css/comments.css" | fingerprint "sha512" }} | ||||||
|  |     <link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"> | ||||||
|  | {{ end }} | ||||||
|  |  | ||||||
|  | <h2 style="margin-bottom: 0;">Comments</h2> | ||||||
|  | <p style="margin: 0; font-size: smaller;"> | ||||||
|  |     If you provide an email address, you can enable notifications for | ||||||
|  |     replies to your comment. It will not be shown publicly. | ||||||
|  | </p> | ||||||
|  |  | ||||||
|  | <noscript> | ||||||
|  |     <i>Enable JavaScript to see the comment section.</i> | ||||||
|  | </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 }} | ||||||
							
								
								
									
										97
									
								
								layouts/_partials/head.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										97
									
								
								layouts/_partials/head.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,97 @@ | |||||||
|  | <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" 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> | ||||||
|  |     {{ 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 -}} | ||||||
| @@ -1,14 +1,14 @@ | |||||||
| {{ with .Params.authors }} | {{ with .Params.authors }} | ||||||
|     <span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_authors" }}"> |     <span class="page-metadata-item" data-pagefind-meta="authors" aria-label="{{ i18n "aria_post_meta_authors" }}"> | ||||||
|         {{ partial "icon.html" "user-circle" }} |         {{ partial "icon.html" "user-circle" }} | ||||||
| 
 | 
 | ||||||
|         {{ if index $.Site.Taxonomies "authors" }} |         {{ if index $.Site.Taxonomies "authors" }} | ||||||
|             {{ $authors := slice }} |             {{ $authors := slice }} | ||||||
|             {{ range . }} |             {{ range . }} | ||||||
|                 {{ $url := (printf "authors/%s" (. | anchorize)) | absLangURL }} |                 {{ $url := (printf "authors/%s" (. | anchorize)) | absLangURL }} | ||||||
|                 {{ $authors = $authors | append (printf `<a href="%s">%s</a>` $url . | safeHTML) }} |                 {{ $authors = $authors | append (printf `<a href="%s">%s</a>` $url .) }} | ||||||
|             {{ end }} |             {{ end }} | ||||||
|             {{ delimit $authors ", " }} |             {{ delimit $authors ", " | safeHTML }} | ||||||
|         {{ else }} |         {{ else }} | ||||||
|             {{ delimit . ", " }} |             {{ delimit . ", " }} | ||||||
|         {{ end }} |         {{ end }} | ||||||
| @@ -4,8 +4,8 @@ | |||||||
|         {{ $categories = $categories | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }} |         {{ $categories = $categories | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }} | ||||||
|     {{ end }} |     {{ end }} | ||||||
| 
 | 
 | ||||||
|     <div class="page-metadata-section categories" aria-label="{{ i18n "aria_post_meta_categories" }}"> |     <div class="page-metadata-section categories" data-pagefind-meta="categories" aria-label="{{ i18n "aria_post_meta_categories" }}"> | ||||||
|         {{ partial "icon.html" "folder" }} |         {{ partial "icon.html" "folder" }} | ||||||
|         {{ delimit $categories ", " }} |         {{ delimit $categories ", " | safeHTML }} | ||||||
|     </div> |     </div> | ||||||
| {{ end }} | {{ end }} | ||||||
| @@ -0,0 +1,8 @@ | |||||||
|  | <span class="page-metadata-item" 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> | ||||||
| @@ -4,8 +4,8 @@ | |||||||
|         {{ $series = $series | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }} |         {{ $series = $series | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }} | ||||||
|     {{ end }} |     {{ end }} | ||||||
| 
 | 
 | ||||||
|     <div class="page-metadata-section series" aria-label="{{ i18n "aria_post_meta_series" }}"> |     <div class="page-metadata-section series" data-pagefind-meta="series" aria-label="{{ i18n "aria_post_meta_series" }}"> | ||||||
|         {{ partial "icon.html" "files" }} |         {{ partial "icon.html" "files" }} | ||||||
|         {{ delimit $series ", " }} |         {{ delimit $series ", " | safeHTML }} | ||||||
|     </div> |     </div> | ||||||
| {{ end }} | {{ end }} | ||||||
| @@ -4,8 +4,8 @@ | |||||||
|         {{ $tags = $tags | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }} |         {{ $tags = $tags | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }} | ||||||
|     {{ end }} |     {{ end }} | ||||||
| 
 | 
 | ||||||
|     <div class="page-metadata-section tags" aria-label="{{ i18n "aria_post_meta_tags" }}"> |     <div class="page-metadata-section tags" data-pagefind-meta="tags" aria-label="{{ i18n "aria_post_meta_tags" }}"> | ||||||
|         {{ partial "icon.html" "tag" }} |         {{ partial "icon.html" "tag" }} | ||||||
|         {{ delimit $tags ", " }} |         {{ delimit $tags ", " | safeHTML }} | ||||||
|     </div> |     </div> | ||||||
| {{ end }} | {{ 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 }} | ||||||
| @@ -20,7 +20,11 @@ | |||||||
|         {{ partial "page-metadata/item/authors.html" . }} |         {{ partial "page-metadata/item/authors.html" . }} | ||||||
|         {{ partial "page-metadata/item/readingtime.html" . }} |         {{ partial "page-metadata/item/readingtime.html" . }} | ||||||
|         {{ partial "page-metadata/item/edithistory.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/categories.html" . }} | ||||||
|  | 
 | ||||||
|         {{ partial "page-metadata/item/tags.html" . }} |         {{ partial "page-metadata/item/tags.html" . }} | ||||||
|     </div> |     </div> | ||||||
| {{ end }} | {{ end }} | ||||||
| @@ -9,6 +9,8 @@ | |||||||
| 
 | 
 | ||||||
|         {{ partial "page-metadata/item/authors.html" . }} |         {{ partial "page-metadata/item/authors.html" . }} | ||||||
|         {{ partial "page-metadata/item/readingtime.html" . }} |         {{ partial "page-metadata/item/readingtime.html" . }} | ||||||
|  |         {{ partial "page-metadata/item/comments-counter.html" . }} | ||||||
|  | 
 | ||||||
|         {{ partial "page-metadata/item/series.html" . }} |         {{ partial "page-metadata/item/series.html" . }} | ||||||
|         {{ partial "page-metadata/item/categories.html" . }} |         {{ partial "page-metadata/item/categories.html" . }} | ||||||
|         {{ partial "page-metadata/item/tags.html" . }} |         {{ partial "page-metadata/item/tags.html" . }} | ||||||
							
								
								
									
										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 }} | ||||||
| @@ -33,7 +33,7 @@ | |||||||
|     <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 }} | ||||||
| 
 | 
 | ||||||
| @@ -21,10 +21,14 @@ | |||||||
|     <meta itemprop="image" content="{{ $featured.Permalink }}"> |     <meta itemprop="image" content="{{ $featured.Permalink }}"> | ||||||
| {{ end }} | {{ end }} | ||||||
| 
 | 
 | ||||||
| {{ with (.GetTerms "tags") }} | {{ with .Keywords }} | ||||||
|  |     <meta itemprop="keywords" content="{{ delimit . ", " }}"> | ||||||
|  | {{ else }} | ||||||
|  |     {{ with (.GetTerms "tags") }} | ||||||
|         {{ $tags := slice }} |         {{ $tags := slice }} | ||||||
|         {{ range . }} |         {{ range . }} | ||||||
|             {{ $tags = $tags | append .LinkTitle }} |             {{ $tags = $tags | append .LinkTitle }} | ||||||
|         {{ end }} |         {{ end }} | ||||||
|         <meta itemprop="keywords" content="{{ delimit $tags ", " }}"> |         <meta itemprop="keywords" content="{{ delimit $tags ", " }}"> | ||||||
|  |     {{ end }} | ||||||
| {{ end }} | {{ end }} | ||||||
							
								
								
									
										41
									
								
								layouts/_partials/seo-tags/twitter-cards.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								layouts/_partials/seo-tags/twitter-cards.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,41 @@ | |||||||
|  | {{/* 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="@{{ . }}"> | ||||||
|  | {{ 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 }} | ||||||
							
								
								
									
										24
									
								
								layouts/_partials/top.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								layouts/_partials/top.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | |||||||
|  | <div class="top"> | ||||||
|  |     <header class="header"> | ||||||
|  |         <a href="{{ .Site.Home.Permalink | absLangURL }}"> | ||||||
|  |             {{ .Site.Title | markdownify }} | ||||||
|  |         </a> | ||||||
|  |     </header> | ||||||
|  |  | ||||||
|  |     <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> | ||||||
|  | </div> | ||||||
							
								
								
									
										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,13 +1,15 @@ | |||||||
| <h2 class="page-title"> | <h2 class="page-title"> | ||||||
|     <a class="heading-link" href="{{ .Permalink }}">{{ .Title | markdownify }}</a> |     <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> | ||||||
|     {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} |     {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} | ||||||
| </h2> | </h2> | ||||||
|  |  | ||||||
| {{ partial "page-metadata/author.html" . }} | {{ partial "page-metadata/author.html" . }} | ||||||
|  |  | ||||||
| <div class="page-description"> | {{ with .Summary }} | ||||||
|     {{ partial "description-or-summary.html" . }} |     <div class="page-description"> | ||||||
| </div> |         {{ . }} | ||||||
|  |     </div> | ||||||
|  | {{ end }} | ||||||
|  |  | ||||||
| <div class="readmore"> | <div class="readmore"> | ||||||
|     <a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a> |     <a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a> | ||||||
|   | |||||||
							
								
								
									
										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 }} | ||||||
							
								
								
									
										40
									
								
								layouts/baseof.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								layouts/baseof.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,40 @@ | |||||||
|  | {{ 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" . }} | ||||||
|  |  | ||||||
|  |         <div class="main-container"> | ||||||
|  |             {{ if not .IsHome }} | ||||||
|  |                 {{ partial "breadcrumb.html" . }} | ||||||
|  |             {{ end }} | ||||||
|  |  | ||||||
|  |             <main id="main-content"> | ||||||
|  |                 {{ 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 }} | ||||||
|  |                 <footer> | ||||||
|  |                     {{ with .Site.Copyright }} | ||||||
|  |                         {{ . | safeHTML }} | ||||||
|  |                     {{ end }} | ||||||
|  |  | ||||||
|  |                     {{ with .Site.Params.footer }} | ||||||
|  |                         {{ . | $.RenderString (dict "display" "block") }} | ||||||
|  |                     {{ end }} | ||||||
|  |                 </footer> | ||||||
|  |             {{ end }} | ||||||
|  |         </div> | ||||||
|  |  | ||||||
|  |         {{ block "post-body" . }} | ||||||
|  |             {{/* currently this is only used for related posts */}} | ||||||
|  |         {{ 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 }} | ||||||
| @@ -22,13 +22,9 @@ | |||||||
|         </div> |         </div> | ||||||
|     {{ end }} |     {{ end }} | ||||||
| 
 | 
 | ||||||
|     {{ with .Resources.GetMatch "feature" }} |     {{ partial "feature-figure.html" . }} | ||||||
|         <div class="post-media"> |  | ||||||
|             {{ partial "figure.html" (dict "src" .) }} |  | ||||||
|         </div> |  | ||||||
|     {{ end }} |  | ||||||
| 
 | 
 | ||||||
|     <article class="post-content"> |     <article class="post-content" data-pagefind-body> | ||||||
|         {{ .Content }} |         {{ .Content }} | ||||||
|     </article> |     </article> | ||||||
| 
 | 
 | ||||||
| @@ -64,26 +60,21 @@ | |||||||
|         </div> |         </div> | ||||||
|     {{ end }} |     {{ end }} | ||||||
| 
 | 
 | ||||||
|     {{ if .Site.Params.shareButtons }} |  | ||||||
|         {{ partial "share.html" . }} |  | ||||||
|     {{ end }} |  | ||||||
| 
 |  | ||||||
|     {{ if .Params.comments }} |     {{ if .Params.comments }} | ||||||
|         <div class="comments"> |         <div class="comments"> | ||||||
|             {{ partial "comments.html" . }} |             {{ partial "comments.html" . }} | ||||||
|         </div> |         </div> | ||||||
|     {{ end }} |     {{ end }} | ||||||
|  | {{ end }} | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  | {{ define "post-body" }} | ||||||
|     {{ $related := .Site.RegularPages.Related . | first 10 }} |     {{ $related := .Site.RegularPages.Related . | first 10 }} | ||||||
|     {{ with $related }} |     {{ with $related }} | ||||||
|         <div class="related-posts full-width-page-list"> |         <div class="related-posts"> | ||||||
|             <hr> |             <hr> | ||||||
|             <h1>{{ i18n "related_posts" }}</h1> |             <h1>{{ i18n "related_posts" }}</h1> | ||||||
|             {{ partial "page-list.html" . }} |             {{ partial "page-list.html" . }} | ||||||
|         </div> |         </div> | ||||||
|     {{ end }} |     {{ end }} | ||||||
| 
 |  | ||||||
|     {{ if .Site.Params.latestPostsOnContent }} |  | ||||||
|         {{ partialCached "latest-posts.html" . }} |  | ||||||
|     {{ end }} |  | ||||||
| {{ 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,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/bobatheme.js" | fingerprint "sha512" }} |  | ||||||
|         <script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script> |  | ||||||
|     {{ end }} |  | ||||||
|     {{ with resources.Get "js/share-event.js" | fingerprint "sha512" }} |  | ||||||
|         <script defer src="{{ .Permalink }}" 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-description.html" .) | plainify }}"> |  | ||||||
|  |  | ||||||
|     {{ partial "additional-head.html" . }} |  | ||||||
| </head> |  | ||||||
| @@ -1,11 +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 }} |  | ||||||
|         {{ partial "page-list.html" . }} |  | ||||||
|     {{ end }} |  | ||||||
| </div> |  | ||||||
| @@ -1,5 +0,0 @@ | |||||||
| {{ if gt .Paginator.TotalPages 1 }} |  | ||||||
|     <nav class="pagination"> |  | ||||||
|         {{ template "_internal/pagination.html" . }} |  | ||||||
|     </nav> |  | ||||||
| {{ 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-description.html" .) | plainify }}"> |  | ||||||
|  |  | ||||||
| {{ with .Site.Social.twitter }} |  | ||||||
|     <meta name="twitter:site" content="@{{ . }}"> |  | ||||||
| {{ end }} |  | ||||||
| @@ -1,69 +0,0 @@ | |||||||
| <div class="share-buttons"> |  | ||||||
|     {{ if .Site.Params.shareButtons.twitter }} |  | ||||||
|         <a class="twitter-share" |  | ||||||
|            target="_blank" |  | ||||||
|            rel="noopener" |  | ||||||
|            aria-label="{{ i18n "aria_share_twitter" }}" |  | ||||||
|            onclick="share_event('Twitter');" |  | ||||||
|            href="https://twitter.com/intent/tweet?url={{ .Permalink }}&text={{ .Title }}&via=bbaovanc"> |  | ||||||
|             {{- partial "icon.html" "twitter" -}} |  | ||||||
|         </a> |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     {{ if .Site.Params.shareButtons.facebook }} |  | ||||||
|         <a class="facebook-share" |  | ||||||
|            target="_blank" |  | ||||||
|            rel="noopener" |  | ||||||
|            aria-label="{{ i18n "aria_share_facebook" }}" |  | ||||||
|            onclick="share_event('Facebook');" |  | ||||||
|            href="https://www.facebook.com/sharer.php?u={{ .Permalink }}"> |  | ||||||
|             {{- partial "icon.html" "facebook" -}} |  | ||||||
|         </a> |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     {{ if .Site.Params.shareButtons.linkedin }} |  | ||||||
|         <a class="linkedin-share" |  | ||||||
|            target="_blank" |  | ||||||
|            rel="noopener" |  | ||||||
|            aria-label="{{ i18n "aria_share_linkedin" }}" |  | ||||||
|            onclick="share_event('LinkedIn');" |  | ||||||
|            href="https://www.linkedin.com/sharing/share-offsite/?url={{ .Permalink }}"> |  | ||||||
|             {{- partial "icon.html" "linkedin" -}} |  | ||||||
|         </a> |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     {{ if .Site.Params.shareButtons.reddit }} |  | ||||||
|         <a class="reddit-share" |  | ||||||
|            target="_blank" |  | ||||||
|            rel="noopener" |  | ||||||
|            aria-label="{{ i18n "aria_share_reddit" }}" |  | ||||||
|            onclick="share_event('Reddit');" |  | ||||||
|            href="https://reddit.com/submit?url={{ .Permalink }}&title={{ .Title }}"> |  | ||||||
|             {{- partial "icon.html" "reddit" -}} |  | ||||||
|         </a> |  | ||||||
|     {{ end }} |  | ||||||
|  |  | ||||||
|     {{/* Telegram icon doesn't have `viewbox` set, which breaks the sizing. |  | ||||||
|             https://stackoverflow.com/q/72073399/19003757 |  | ||||||
|             https://github.com/michaelampr/jam/issues/39 |  | ||||||
|     {{ if .Site.Params.shareButtons.telegram }} |  | ||||||
|         <a class="telegram-share" |  | ||||||
|            target="_blank" |  | ||||||
|            rel="noopener" |  | ||||||
|            aria-label="{{ i18n "aria_share_telegram" }}" |  | ||||||
|            onclick="share_event('Telegram');" |  | ||||||
|            href="https://t.me/share/url?url={{ .Permalink }}&text={{ .Title }}"> |  | ||||||
|             {{- partial "icon.html" "telegram" -}} |  | ||||||
|         </a> |  | ||||||
|     {{ 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> |  | ||||||
| @@ -1,21 +0,0 @@ | |||||||
| <header class="header"> |  | ||||||
|     <a class="heading-link" href="{{ .Site.Home.Permalink | absLangURL }}"> |  | ||||||
|         {{ .Site.Title | markdownify }} |  | ||||||
|     </a> |  | ||||||
| </header> |  | ||||||
|  |  | ||||||
| <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> |  | ||||||
							
								
								
									
										3
									
								
								layouts/search.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								layouts/search.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | {{ define "main" }} | ||||||
|  |     <div id="search-box"></div> | ||||||
|  | {{ end }} | ||||||
| @@ -5,8 +5,10 @@ | |||||||
|             {{ .Title | markdownify }} |             {{ .Title | markdownify }} | ||||||
|         </h2> |         </h2> | ||||||
| 
 | 
 | ||||||
|  |         {{ with .Summary }} | ||||||
|             <div class="section-description"> |             <div class="section-description"> | ||||||
|             {{ partial "description-or-summary.html" . }} |                 {{ . }} | ||||||
|             </div> |             </div> | ||||||
|  |         {{ end }} | ||||||
|     </div> |     </div> | ||||||
| </a> | </a> | ||||||
| @@ -1,14 +1,16 @@ | |||||||
| <h2 class="page-title"> | <h2 class="page-title"> | ||||||
|     {{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }} |     {{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }} | ||||||
|     <a class="heading-link" href="{{ .Permalink }}">{{ .Title | markdownify }}</a> |     <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> | ||||||
|     {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} |     {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} | ||||||
| </h2> | </h2> | ||||||
|  |  | ||||||
| {{ partial "page-metadata/series.html" . }} | {{ partial "page-metadata/series.html" . }} | ||||||
|  |  | ||||||
| <div class="page-description"> | {{ with .Summary }} | ||||||
|     {{ partial "description-or-summary.html" . }} |     <div class="page-description"> | ||||||
| </div> |         {{ . }} | ||||||
|  |     </div> | ||||||
|  | {{ end }} | ||||||
|  |  | ||||||
| <div class="page-list series-inner"> | <div class="page-list series-inner"> | ||||||
|     {{ range .Data.Pages.Reverse }} |     {{ range .Data.Pages.Reverse }} | ||||||
|   | |||||||
| @@ -1,15 +0,0 @@ | |||||||
| {{ $resource := .Page.Resources.GetMatch (.Get "src") }} |  | ||||||
|  |  | ||||||
| {{ $noborder := false }} |  | ||||||
| {{ if .Get "noborder" }} |  | ||||||
|     {{ $noborder = true }} |  | ||||||
| {{ end }} |  | ||||||
|  |  | ||||||
| {{ $hidecaption := false }} |  | ||||||
| {{ if .Get "hidecaption" }} |  | ||||||
|     {{ $hidecaption = true }} |  | ||||||
| {{ end }} |  | ||||||
|  |  | ||||||
| <p> |  | ||||||
|     {{ partial "figure.html" (dict "src" $resource "noborder" $noborder "hidecaption" $hidecaption) }} |  | ||||||
| </p> |  | ||||||
| @@ -1 +0,0 @@ | |||||||
| <hr class="full-width-hr"> |  | ||||||
| @@ -1,17 +0,0 @@ | |||||||
| {{ $path := "" }} |  | ||||||
| {{ $markdown := false }} |  | ||||||
| {{ if .IsNamedParams }} |  | ||||||
|     {{ $path = .Get "path" }} |  | ||||||
|     {{ with .Get "markdown" }} |  | ||||||
|         {{ $markdown = . }} |  | ||||||
|     {{ end }} |  | ||||||
| {{ else }} |  | ||||||
|     {{ $path = .Get 0 }} |  | ||||||
| {{ end }} |  | ||||||
|  |  | ||||||
|  |  | ||||||
| {{ if $markdown }} |  | ||||||
|     {{ $path | readFile | .Page.RenderString (dict "display" "block") }} |  | ||||||
| {{ else }} |  | ||||||
|     {{ $path | readFile }} |  | ||||||
| {{ end }} |  | ||||||
| @@ -1,13 +0,0 @@ | |||||||
| {{ $border := false }} |  | ||||||
| {{ if .Get "border" }} |  | ||||||
|     {{ $border = true }} |  | ||||||
| {{ end }} |  | ||||||
|  |  | ||||||
| {{ $hidecaption := false }} |  | ||||||
| {{ if .Get "hidecaption" }} |  | ||||||
|     {{ $hidecaption = true }} |  | ||||||
| {{ end }} |  | ||||||
|  |  | ||||||
| <p> |  | ||||||
|     {{ partial "remote_figure.html" (dict "src" (.Get "src") "border" $border "hidecaption" $hidecaption "type" (.Get "type") "alt" (.Get "alt")) }} |  | ||||||
| </p> |  | ||||||
| @@ -1,10 +0,0 @@ | |||||||
| {{/* See https://willschenk.com/articles/2020/styling_tables_with_hugo/ */}} |  | ||||||
|  |  | ||||||
| {{ $class := "markdown" }} |  | ||||||
| {{ with .Get "class" }} |  | ||||||
|     {{ $class = delimit (slice $class .) " " }} |  | ||||||
| {{ end }} |  | ||||||
|  |  | ||||||
| {{ $htmlTable := .Inner | .Page.RenderString (dict "display" "block") }} |  | ||||||
| {{ $new := printf `<table class="%s">` $class }} |  | ||||||
| {{ (replace $htmlTable "<table>" $new) | safeHTML }} |  | ||||||
| @@ -1,21 +1,19 @@ | |||||||
| <h2 class="page-title"> | <h2 class="page-title"> | ||||||
|     {{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }} |     {{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }} | ||||||
|     <a class="heading-link" href="{{ .Permalink }}">{{ .Title | markdownify }}</a> |     <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> | ||||||
|     {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} |     {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} | ||||||
| </h2> | </h2> | ||||||
| 
 | 
 | ||||||
| {{ partial "page-metadata/post-short.html" . }} | {{ partial "page-metadata/post-short.html" . }} | ||||||
| 
 | 
 | ||||||
| {{ with .Resources.GetMatch "feature" }} | {{ partial "feature-figure.html" . }} | ||||||
|     <div class="post-media"> | 
 | ||||||
|         {{ partial "figure.html" (dict "src" .) }} | {{ with .Summary }} | ||||||
|  |     <div class="page-description"> | ||||||
|  |         {{ . }} | ||||||
|     </div> |     </div> | ||||||
| {{ end }} | {{ end }} | ||||||
| 
 | 
 | ||||||
| <div class="page-description"> |  | ||||||
|     {{ partial "description-or-summary.html" . }} |  | ||||||
| </div> |  | ||||||
| 
 |  | ||||||
| <div class="readmore"> | <div class="readmore"> | ||||||
|     <a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a> |     <a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a> | ||||||
| </div> | </div> | ||||||
| @@ -28,7 +28,7 @@ | |||||||
|                             </a> |                             </a> | ||||||
|                             {{ partial "page-metadata/taxonomy.html" . }} |                             {{ partial "page-metadata/taxonomy.html" . }} | ||||||
|                         </div> |                         </div> | ||||||
|                         {{ partial "description-or-summary.html" . }} |                         {{ .Summary }} | ||||||
|                     </article> |                     </article> | ||||||
|                 {{ end }} |                 {{ end }} | ||||||
|             {{ end }} |             {{ end }} | ||||||
		Reference in New Issue
	
	Block a user