Add a content-grid shortcode that creates a grid of n columns inside a <div>
This commit is contained in:
		
							parent
							
								
									7872296ee3
								
							
						
					
					
						commit
						4a5dc3a318
					
				
					 4 changed files with 23 additions and 0 deletions
				
			
		|  | @ -67,6 +67,7 @@ hr { | |||
|       "blockquote" | ||||
|       "table" | ||||
|       ".codeblock" | ||||
|       ".content-grid" | ||||
|       ".figure" | ||||
|       ".highlight" | ||||
|       ".instagram-media" | ||||
|  |  | |||
|  | @ -92,3 +92,8 @@ figcaption { | |||
|   grid-column: main-start / main-end; | ||||
|   letter-spacing: 0.01em; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| .content-grid > .figure { | ||||
|   grid-column: unset; | ||||
| } | ||||
|  |  | |||
							
								
								
									
										13
									
								
								assets/css/090_content_grid.css
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								assets/css/090_content_grid.css
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,13 @@ | |||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| /*************** | ||||
|  * CONTENT GRID | ||||
|  ***************/ | ||||
| 
 | ||||
| .content-grid { | ||||
|   display: grid; | ||||
|   grid-template-columns: repeat(var(--columns), 1fr); | ||||
| } | ||||
							
								
								
									
										4
									
								
								layouts/shortcodes/content-grid.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								layouts/shortcodes/content-grid.html
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| {{- $columns := .Get "columns" -}} | ||||
| <div class="content-grid" style="--columns: {{ $columns }};"> | ||||
|   {{ .Inner }} | ||||
| </div> | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue