Просмотр исходного кода

Add some information about theming

sh4nks 9 лет назад
Родитель
Сommit
91562e41cd
2 измененных файлов с 60 добавлено и 3 удалено
  1. 57 0
      flaskbb/themes/aurora/README.md
  2. 3 3
      flaskbb/themes/aurora/info.json

+ 57 - 0
flaskbb/themes/aurora/README.md

@@ -35,3 +35,60 @@ or see the list below:
 You can run a task with gulp like this:
 
 ``node_modules/gulp/bin/gulp.js watch``
+
+
+# CREATING YOUR OWN THEME
+
+If you want to create your own theme based on this theme you have to take care
+of a few things first.
+
+1. Create a new folder within the ``themes/`` folder and give it the name
+of your theme.
+2. Copy the content of the ``aurora/`` folder into your folder theme's folder.
+3. Create a new folder called ``static/`` in your themes folder.
+4. (Optional) If you plan on modifying templates you also need to create a
+``templates/`` folder where your templates are located. To edit a template,
+you have to copy them over from flaskbb's template folder into your template
+folder
+5. Add some information about your theme using the ``info.json``. Have look at
+aurora's ``info.json`` for an example.
+6. Edit the ``bower.json`` and ``package.json`` to your needs.
+7. Happy theming!
+
+In the end your folder structure should look like this:
+
+    ── example_theme/
+        ├── bower_components
+        │   └── ...
+        ├── node_modules
+        │   └── ...
+        ├── src
+        │   ├── styles.scss
+        │   ├── _aurora.scss
+        │   ├── _bootstrap-variables.scss
+        │   ├── _button.scss
+        │   ├── _category.scss
+        │   ├── _editor.scss
+        │   ├── _fixes.scss
+        │   ├── _forum.scss
+        │   ├── _management.scss
+        │   ├── _misc.scss
+        │   ├── _mixins.scss
+        │   ├── _navigation.scss
+        │   ├── _panel.scss
+        │   ├── _profile.scss
+        │   ├── _topic.scss
+        │   └── _variables.scss
+        ├── static
+        │   ├── css
+        │   ├── fonts
+        │   └── js
+        ├── templates
+        │   └── layout.html
+        ├── bower.json
+        ├── Gulpfile.js
+        ├── info.json
+        ├── LICENSE
+        ├── package.json
+        └── README.md
+

+ 3 - 3
flaskbb/themes/aurora/info.json

@@ -1,7 +1,7 @@
 {
-    "application": "flaskbb",
-    "identifier": "aurora",
-    "name": "Aurora",
+    "application": "flaskbb",   // The name of the application, in our case this should always be flaskbb
+    "identifier": "aurora",     // The unique name of the theme. This identifier should match the themes folder name!
+    "name": "Aurora",           // Human readable name of the theme
     "author": "sh4nks",
     "license": "BSD 3-Clause",
     "description": "The default theme for FlaskBB.",