Add styling for table of contents
This commit is contained in:
		
							parent
							
								
									f1c6ac09c8
								
							
						
					
					
						commit
						8e541f28dd
					
				| 
						 | 
				
			
			@ -28,7 +28,9 @@ module.exports = function (eleventyConfig) {
 | 
			
		|||
	});
 | 
			
		||||
	eleventyConfig.amendLibrary("md", mdLib => mdLib
 | 
			
		||||
		.use(mdDefList)
 | 
			
		||||
		.use(mdToc)
 | 
			
		||||
		.use(mdToc, {
 | 
			
		||||
			includeLevel: [ 1, 2, 3, 4, 5, 6 ]
 | 
			
		||||
		})
 | 
			
		||||
		.use(mdAnchor));
 | 
			
		||||
 | 
			
		||||
	eleventyConfig.addFilter("IsNotPage", (collection, url) =>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										10
									
								
								src/css/Components/_table-of-contents.scss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								src/css/Components/_table-of-contents.scss
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,10 @@
 | 
			
		|||
@use '_variables';
 | 
			
		||||
 | 
			
		||||
.table-of-contents {
 | 
			
		||||
	padding-left: 0.5em;
 | 
			
		||||
	padding-right: 1em;
 | 
			
		||||
	border: 1px solid var(--primary-border-color);
 | 
			
		||||
	border-radius: var(--main-border-radius);
 | 
			
		||||
 | 
			
		||||
	text-transform: capitalize;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -12,3 +12,4 @@
 | 
			
		|||
@use 'Components/_lists';
 | 
			
		||||
@use 'Components/_code';
 | 
			
		||||
@use 'Components/_posts';
 | 
			
		||||
@use 'Components/_table-of-contents';
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue