updated readmes and added new ones
This commit is contained in:
parent
faa2bbb0c9
commit
beb2156b47
4 changed files with 155 additions and 4 deletions
|
|
@ -147,9 +147,8 @@ replace it with:
|
||||||
|
|
||||||
ssh-keygen -y -f /path/to/myinstance.pem
|
ssh-keygen -y -f /path/to/myinstance.pem
|
||||||
|
|
||||||
2. copy the above results. on osx this would look like:
|
2. copy the above results
|
||||||
|
|
||||||
ssh-keygen -y -f /path/to/myinstance.pem | pbcopy
|
|
||||||
3. log in to the ubuntu instance using default ubuntu user
|
3. log in to the ubuntu instance using default ubuntu user
|
||||||
|
|
||||||
4. change users to the custom username
|
4. change users to the custom username
|
||||||
|
|
@ -163,8 +162,14 @@ replace it with:
|
||||||
touch .ssh/authorized_keys
|
touch .ssh/authorized_keys
|
||||||
vim ~/.ssh/authorized_keys
|
vim ~/.ssh/authorized_keys
|
||||||
|
|
||||||
6. now paste in the public_key you got in step 1
|
6. change the permissions
|
||||||
7. log out and test with the username
|
|
||||||
|
chown -R username:username_gropus .ssh
|
||||||
|
chmod 700 .ssh
|
||||||
|
chmod 600 .ssh/authorized_keys
|
||||||
|
|
||||||
|
7. now paste in the public_key you got in step 1
|
||||||
|
8. log out and test with the username
|
||||||
|
|
||||||
ssh username@instance.domain
|
ssh username@instance.domain
|
||||||
|
|
||||||
|
|
|
||||||
35
share/templates/readmes/fontawesome.md
Normal file
35
share/templates/readmes/fontawesome.md
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
###specify the font path to the "webfonts directory"
|
||||||
|
|
||||||
|
$fa-font-path: "../node_modules/@fortawesome/fontawesome-free/webfonts" !default;
|
||||||
|
|
||||||
|
###when importing from an app-local installation:
|
||||||
|
|
||||||
|
in this case "coffesshop" is the name of the app
|
||||||
|
|
||||||
|
`@import 'coffeeshop/node_modules/\@fortawesome/fontawesome-free/scss/fontawesome'`
|
||||||
|
`@import 'coffeeshop/node_modules/\@fortawesome/fontawesome-free/scss/solid'`
|
||||||
|
`@import 'coffeeshop/node_modules/\@fortawesome/fontawesome-free/scss/brands'`
|
||||||
|
|
||||||
|
### when importing from a shared directory
|
||||||
|
|
||||||
|
#### set the location in static and sass
|
||||||
|
|
||||||
|
`STATICFILES_DIRS = [
|
||||||
|
os.path.join(
|
||||||
|
PROJECT_ROOT,
|
||||||
|
'share/media/node_modules/@fortawesome'),
|
||||||
|
]`
|
||||||
|
|
||||||
|
`SASS_PROCESSOR_INCLUDE_DIRS = [
|
||||||
|
os.path.join(
|
||||||
|
PROJECT_ROOT,
|
||||||
|
'share/media/node_modules/@fortawesome'),
|
||||||
|
]`
|
||||||
|
|
||||||
|
#### now import directly from where you set loc above
|
||||||
|
|
||||||
|
`@import 'fontawesome-free/scss/fontawesome'`
|
||||||
|
`@import 'fontawesome-free/scss/solid'`
|
||||||
|
`@import 'fontawesome-free/scss/brands'`
|
||||||
|
|
||||||
|
|
||||||
109
share/templates/readmes/foundation.md
Normal file
109
share/templates/readmes/foundation.md
Normal file
|
|
@ -0,0 +1,109 @@
|
||||||
|
# How to install Foundation Zurb
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
* [node js](https://nodejs.org/en/download/)
|
||||||
|
* [foundation zurb](foundation.zurb.com)
|
||||||
|
|
||||||
|
|
||||||
|
## install nodeenv
|
||||||
|
|
||||||
|
[how to install nodeenv](https://calvinx.com/2013/07/11/python-virtualenv-with-node-environment-via-nodeenv/)
|
||||||
|
|
||||||
|
1. mkvirtualenv myproject1
|
||||||
|
2. pip install nodeenv
|
||||||
|
3. nodeenv -p
|
||||||
|
4. deactivate; workon myproject1
|
||||||
|
5. npm install -g foundation-cli
|
||||||
|
6. npm install -g autoprefixer
|
||||||
|
7. npm install -g generate
|
||||||
|
8. npm install -g postcss-cli
|
||||||
|
|
||||||
|
## install django sass processor
|
||||||
|
|
||||||
|
github url [django sass processor](https://github.com/jrief/django-sass-processor)
|
||||||
|
|
||||||
|
`pip install django-sass-processor`
|
||||||
|
|
||||||
|
### add to installed apps
|
||||||
|
|
||||||
|
`sass_processor`
|
||||||
|
|
||||||
|
### additional configuration settings
|
||||||
|
|
||||||
|
#### set extensions to look for
|
||||||
|
|
||||||
|
sass processor searches template files to find links to sass stylesheets. If using templates with a .django extension, you have to set the ext types you want the processor to search
|
||||||
|
|
||||||
|
`SASS_TEMPLATE_EXTS = ['.django', '.html']`
|
||||||
|
|
||||||
|
#### file search root directory
|
||||||
|
|
||||||
|
set the root value for which sass processor will search for sass files (set to the same value as static root)
|
||||||
|
|
||||||
|
`SASS_PROCESSOR_ROOT = STATIC_ROOT`
|
||||||
|
|
||||||
|
#### add cssfinder to static file finders
|
||||||
|
|
||||||
|
we need to tell the static finders thingie to use sass_processor
|
||||||
|
|
||||||
|
`STATICFILES_FINDERS = [`
|
||||||
|
` 'django.contrib.staticfiles.finders.FileSystemFinder',`
|
||||||
|
` 'django.contrib.staticfiles.finders.AppDirectoriesFinder', `
|
||||||
|
` 'sass_processor.finders.CssFinder', ]`
|
||||||
|
|
||||||
|
#### directories to look through
|
||||||
|
|
||||||
|
you must tell django wher eto find static files that you want to look through if you want to use them in a template
|
||||||
|
|
||||||
|
you must also tell the sass processor where those files are if you want the sass processor to be able to do anything with it
|
||||||
|
|
||||||
|
`STATICFILES_DIRS = [`
|
||||||
|
` ('node_modules', os.path.join(PROJECT_ROOT, 'share/media/node_modules/')),`
|
||||||
|
` os.path.join(PROJECT_ROOT,'share/media/node_modules/foundation-sites/scss'), ]`
|
||||||
|
|
||||||
|
`SASS_PROCESSOR_INCLUDE_DIRS = [`
|
||||||
|
` os.path.join(PROJECT_ROOT, 'share/media/node_modules'),`
|
||||||
|
` os.path.join(PROJECT_ROOT, 'share/media/node_modules/foundation-sites/scss'), ]`
|
||||||
|
|
||||||
|
Notice how "node modules" is attached without a prefix.
|
||||||
|
|
||||||
|
also, I add direct links to the scss of the underlying packages so I can import them with a direct command
|
||||||
|
|
||||||
|
`@import foundation`
|
||||||
|
|
||||||
|
_instead of_
|
||||||
|
|
||||||
|
`@import foundation-sites/scss/foundation`
|
||||||
|
|
||||||
|
When you want to import sass modules underneath the "node_modules" directory you must refer to the directory structure _underneath_ the node modules structure:
|
||||||
|
|
||||||
|
`@import foundation-sites/scss/foundation`
|
||||||
|
|
||||||
|
however, to directly import the foundation sass library, you must do so through the "assets" directory referenced in static.
|
||||||
|
|
||||||
|
so foundation-sites/assets refers to what will be used in static, and foundation-sites/scss/foundation refers to compiling
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
`{% load sass_tags %}`
|
||||||
|
|
||||||
|
`<link href="{% sass_src 'myapp/css/mystyle.scss' %}"`
|
||||||
|
`rel="stylesheet" type="text/css" />`
|
||||||
|
|
||||||
|
|
||||||
|
## installing Zurb Foundation Template
|
||||||
|
|
||||||
|
[how to install foundation with django](https://www.physics.utoronto.ca/~icom/workshop/django-install/foundation.html)
|
||||||
|
|
||||||
|
either open up the virtualenv that contains foundation-cli or create one, or just install foundation-cli
|
||||||
|
|
||||||
|
create a new template
|
||||||
|
`foundation new`
|
||||||
|
|
||||||
|
## installing via foundation-sites
|
||||||
|
|
||||||
|
npm install foundation-sites
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -15,6 +15,8 @@ let g:syntastic_sass_sass_args="
|
||||||
-I /Full/share/media/projectwide_sass_files"
|
-I /Full/share/media/projectwide_sass_files"
|
||||||
````
|
````
|
||||||
|
|
||||||
|
you can also add multiple directories to the -I directive. Separate them with a space
|
||||||
|
|
||||||
[fixing syntastic check args](http://stackoverflow.com/questions/29041876/fixing-syntasticcheck-bootstrap-error-vim-syntastic-plugin)
|
[fixing syntastic check args](http://stackoverflow.com/questions/29041876/fixing-syntasticcheck-bootstrap-error-vim-syntastic-plugin)
|
||||||
|
|
||||||
[syntastic manual](https://github.com/vim-syntastic/syntastic/blob/master/doc/syntastic.txt)
|
[syntastic manual](https://github.com/vim-syntastic/syntastic/blob/master/doc/syntastic.txt)
|
||||||
Loading…
Add table
Reference in a new issue