init
This commit is contained in:
		
						commit
						dfed1df8b6
					
				
							
								
								
									
										37
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,37 @@ | ||||
| # Quickstart Theme for NodeBB | ||||
| 
 | ||||
| This repository contains all of the preparatory work for a theme based off of the vanilla base theme. | ||||
| 
 | ||||
| Fork it to create your own theme based off of it! | ||||
| 
 | ||||
| ### Some things to change | ||||
| 
 | ||||
| * You should rename this theme from `quickstart` to something else. Change all instances of that word in the following files: | ||||
|     * `package.json` | ||||
|     * `plugin.json` | ||||
|     * `theme.json` | ||||
| 
 | ||||
| ### When you're done... | ||||
| 
 | ||||
| Be sure to add some other metadata to the `package.json`, like this: | ||||
| 
 | ||||
| ``` json | ||||
| "author": { | ||||
|     "name": "Your Name", | ||||
|     "email": "Your Email", | ||||
|     "url": "Your website" | ||||
| }, | ||||
| "repository": { | ||||
|     "type": "git", | ||||
|     "url": "https://github.com/{your-username}/{your-repository}" | ||||
| }, | ||||
| "bugs": { | ||||
|     "url": "https://github.com/{your-username}/{your-repository}/issues" | ||||
| } | ||||
| ``` | ||||
| 
 | ||||
| Also, add a screenshot! Take a picture of your theme, and save it as "screenshot.png" in the root of your theme folder, then add this to `theme.json`: | ||||
| 
 | ||||
| ``` json | ||||
| "screenshot": "screenshot.png" | ||||
| ``` | ||||
							
								
								
									
										17
									
								
								lib/client.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								lib/client.js
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,17 @@ | ||||
| /* | ||||
| 	Hey there! | ||||
| 
 | ||||
| 	This is the client file for your theme. If you need to do any client-side work in javascript, | ||||
| 	this is where it needs to go. | ||||
| 
 | ||||
| 	You can listen for page changes by writing something like this: | ||||
| 
 | ||||
| 	  $(window).on('action:ajaxify.end', function(data) { | ||||
| 		var	url = data.url; | ||||
| 		console.log('I am now at: ' + url); | ||||
| 	  }); | ||||
| */ | ||||
| 
 | ||||
| $(document).ready(function() { | ||||
| 	// Your code goes here
 | ||||
| }); | ||||
							
								
								
									
										35
									
								
								lib/theme.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								lib/theme.js
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,35 @@ | ||||
| (function(module) { | ||||
| 	"use strict"; | ||||
| 
 | ||||
| 	var Theme = {}; | ||||
| 
 | ||||
| 	Theme.defineWidgetAreas = function(areas, callback) { | ||||
| 		areas = areas.concat([ | ||||
| 			{ | ||||
| 				'name': 'MOTD', | ||||
| 				'template': 'home.tpl', | ||||
| 				'location': 'motd' | ||||
| 			}, | ||||
| 			{ | ||||
| 				'name': 'Homepage Footer', | ||||
| 				'template': 'home.tpl', | ||||
| 				'location': 'footer' | ||||
| 			}, | ||||
| 			{ | ||||
| 				'name': 'Category Sidebar', | ||||
| 				'template': 'category.tpl', | ||||
| 				'location': 'sidebar' | ||||
| 			}, | ||||
| 			{ | ||||
| 				'name': 'Topic Footer', | ||||
| 				'template': 'topic.tpl', | ||||
| 				'location': 'footer' | ||||
| 			} | ||||
| 		]); | ||||
| 
 | ||||
| 		callback(null, areas); | ||||
| 	}; | ||||
| 
 | ||||
| 	module.exports = Theme; | ||||
| 
 | ||||
| }(module)); | ||||
							
								
								
									
										10
									
								
								package.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								package.json
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | ||||
| { | ||||
|   "name": "nodebb-theme-quickstart", | ||||
|   "version": "0.0.0", | ||||
|   "description": "Enter a description here", | ||||
|   "main": "theme.less", | ||||
|   "keywords": [ | ||||
| 
 | ||||
|   ], | ||||
|   "license": "MIT" | ||||
| } | ||||
							
								
								
									
										12
									
								
								plugin.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								plugin.json
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,12 @@ | ||||
| { | ||||
| 	"id": "nodebb-theme-quickstart", | ||||
| 	"library": "./lib/theme.js", | ||||
| 	"hooks": [ | ||||
| 		{ | ||||
| 			"hook": "filter:widgets.getAreas", "method": "defineWidgetAreas", "callbacked": true | ||||
| 		} | ||||
| 	], | ||||
| 	"scripts": [ | ||||
| 		"lib/client.js" | ||||
| 	] | ||||
| } | ||||
							
								
								
									
										6
									
								
								theme.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								theme.json
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | ||||
| { | ||||
|     "id": "nodebb-theme-quickstart", | ||||
|     "name": "My Theme Name", | ||||
|     "description": "Enter a description here", | ||||
|     "url": "https://github.com/designcreateplay/nodebb-theme-quickstart" | ||||
| } | ||||
							
								
								
									
										1
									
								
								theme.less
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								theme.less
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| @import "../nodebb-theme-vanilla/theme"; | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Julian Lam
						Julian Lam