Instance | Branch |
---|
A collection of links to the excellent "Composing Software" series of medium stories by Eric Elliott.
In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.
For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.
We will assume we have a package/project called https://github.com/foo/bar
Most redistributable packages are hosted on a version control website such as Github or Bitbucket. Version control repositories often have a tagging system where we can define stable versions of our application. For example with git we can use the command:
git tag -a 1.0.0 -m 'First version.'
With this we have created version 1.0.0 of our application. This is a stable release which people can depend on. If we wanted to include "foo/bar" then we could create a composer.json
and specify the tagged release we wanted:
<?php | |
/* | |
* Mysql database class - only one connection alowed | |
*/ | |
class Database { | |
private $_connection; | |
private static $_instance; //The single instance | |
private $_host = "HOSTt"; | |
private $_username = "USERNAME"; | |
private $_password = "PASSWORd"; |
You can control icons direction using the following CSS:
[dir=ltr].fa-dir-flip .fa.fa-flip-horizontal,
[dir=rtl].fa-dir-flip .fa,
[dir=rtl] .fa.fa-dir-flip {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);
-webkit-transform: scale(-1, 1);
-ms-transform: scale(-1, 1);
transform: scale(-1, 1);
<?php | |
class Db | |
{ | |
private $_connection; | |
private static $_instance; //The single instance | |
private $_host = DB_HOST; | |
private $_username = DB_USER; | |
private $_password = DB_PASSWORD; | |
private $_database = DB_DB; |
Important! This guide is out of date (circa 2017) and should no longer be used. For the latest advice, please refer to the BootstrapVue docs and their Nuxt.js module. https://bootstrap-vue.org/docs#nuxt-js
General setup:
- Install bootstrap as a dev dependency, and its dependencies (node-sass and sass-loader)
npm install --save-dev bootstrap@4.0.0-beta.2 node-sass sass-loader
<!-- http://tech.pro/tutorial/1383/javascript-one-language-to-rule-them-all --> | |
<style> | |
[for=blue] { color: blue; } | |
[for=green] { color: green; } | |
[for=red] { color: red; } | |
</style> | |
<input id="uploadImage" type="file" name="photo" /> | |
<input id="caption" type="text" name="caption" placeholder="caption" /> | |
<label for="blue">Blue</label> |
// dashboard component | |
var dashboard = Vue.extend({ | |
template: '<p>Hello from dashboard</p>' | |
}) | |
// user management component | |
var user = Vue.extend({ | |
template: '<p>Hello from user management page</p>' | |
}) |