initial commit
This commit is contained in:
commit
a412f9f674
13
.editorconfig
Normal file
13
.editorconfig
Normal file
@ -0,0 +1,13 @@
|
||||
# http://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
/js/
|
||||
/css/
|
||||
/img/
|
||||
/.sass-cache/
|
||||
/src/source_maps/
|
||||
/node_modules/
|
||||
/bower_components/
|
||||
27
.jshintrc
Normal file
27
.jshintrc
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"node": true,
|
||||
"esnext": true,
|
||||
"bitwise": true,
|
||||
"camelcase": true,
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
"immed": true,
|
||||
"indent": 4,
|
||||
"latedef": true,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"quotmark": "single",
|
||||
"regexp": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"globalstrict": true,
|
||||
"trailing": true,
|
||||
"smarttabs": true,
|
||||
"white": true,
|
||||
"globals": {
|
||||
"define": false,
|
||||
"require": false,
|
||||
"requirejs": false,
|
||||
"$": false
|
||||
}
|
||||
}
|
||||
180
GruntFile.js
Normal file
180
GruntFile.js
Normal file
@ -0,0 +1,180 @@
|
||||
module.exports = function (grunt) {
|
||||
'use strict';
|
||||
// Configuration
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
compass: {
|
||||
config: 'config.rb'
|
||||
},
|
||||
jshint: {
|
||||
options: grunt.file.readJSON('.jshintrc'),
|
||||
files: ['src/js/**/*.js']
|
||||
},
|
||||
uglify: {
|
||||
options: {
|
||||
sourceMap: function (script) {
|
||||
return 'src/source_maps/' + script + '.map';
|
||||
},
|
||||
sourceMapRoot: '/whitemill/',
|
||||
// in a live environment when website is in www.[name].com, use the below sourceMapRoot if sourceMaps are still needed
|
||||
//sourceMapRoot: '/',
|
||||
sourceMappingURL: function (script) {
|
||||
//return '../src/source_maps/' + script.replace(/^.+\//, "") + '.map';
|
||||
return '../src/source_maps/' + script + '.map';
|
||||
}
|
||||
},
|
||||
src: {
|
||||
files: [{
|
||||
expand: true,
|
||||
cwd: 'src/js/',
|
||||
src: ['**/*.js', '!rjs/**/*.js'],
|
||||
dest: 'js/',
|
||||
//ext: '.min.js', //commenting out for now
|
||||
}]
|
||||
},
|
||||
modernizr: {
|
||||
files: [{ // Dictionary of files
|
||||
expand: true, // Enable dynamic expansion.
|
||||
cwd: 'bower_components/modernizr', // Src matches are relative to this path.
|
||||
src: ['**/*.js', '!**/grunt*', '!test/**/*.js'], // Actual pattern(s) to match.
|
||||
dest: 'js/libs/' // Destination path prefix.
|
||||
//ext: '.js' // Dest filepaths will have this extension.
|
||||
}],
|
||||
options: {
|
||||
sourceMappingURL: function (script) {
|
||||
//return '../src/source_maps/' + script.replace(/^.+\//, "") + '.map';
|
||||
return '../../src/source_maps/' + script + '.map';
|
||||
}
|
||||
}
|
||||
},
|
||||
respond: {
|
||||
files: [{ // Dictionary of files
|
||||
expand: true, // Enable dynamic expansion.
|
||||
cwd: 'bower_components/respond', // Src matches are relative to this path.
|
||||
src: ['respond.src.js', '!test/**/*.js', '!cross-domain/**/*.js'], // Actual pattern(s) to match.
|
||||
dest: 'js/libs/' // Destination path prefix.
|
||||
//ext: '.js' // Dest filepaths will have this extension.
|
||||
}],
|
||||
options: {
|
||||
sourceMappingURL: function (script) {
|
||||
//return '../src/source_maps/' + script.replace(/^.+\//, "") + '.map';
|
||||
return '../../src/source_maps/' + script + '.map';
|
||||
}
|
||||
}
|
||||
},
|
||||
requirejs: {
|
||||
files: [{ // Dictionary of files
|
||||
expand: true, // Enable dynamic expansion.
|
||||
cwd: 'bower_components/requirejs', // Src matches are relative to this path.
|
||||
src: ['require.js'], // Actual pattern(s) to match.
|
||||
dest: 'js/libs/' // Destination path prefix.
|
||||
//ext: '.js' // Dest filepaths will have this extension.
|
||||
}],
|
||||
options: {
|
||||
sourceMappingURL: function (script) {
|
||||
//return '../src/source_maps/' + script.replace(/^.+\//, "") + '.map';
|
||||
return '../../src/source_maps/' + script + '.map';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
requirejs: {
|
||||
compile: {
|
||||
options: {
|
||||
mainConfigFile: 'src/js/rjs/config.js'
|
||||
//name: 'main',
|
||||
//baseUrl: 'src/js/',
|
||||
//out: 'js/requirejs.js'
|
||||
//baseUrl: 'js',
|
||||
//paths: {
|
||||
// jquery: 'https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min',
|
||||
//}
|
||||
}
|
||||
}
|
||||
},
|
||||
svgmin: { // Task
|
||||
options: { // Configuration that will be passed directly to SVGO
|
||||
plugins: [{
|
||||
removeViewBox: false
|
||||
}]
|
||||
},
|
||||
dist: { // Target
|
||||
files: [{ // Dictionary of files
|
||||
expand: true, // Enable dynamic expansion.
|
||||
cwd: 'src/svg', // Src matches are relative to this path.
|
||||
src: ['**/*.svg'], // Actual pattern(s) to match.
|
||||
dest: 'img/', // Destination path prefix.
|
||||
//ext: '.svg' // Dest filepaths will have this extension.
|
||||
}]
|
||||
}
|
||||
},
|
||||
smushit: {
|
||||
path: {
|
||||
src: 'img/'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
options: {
|
||||
nospawn: true
|
||||
},
|
||||
js: {
|
||||
files: ['src/js/**/*.js', '!src/js/rjs/**/*.js'],
|
||||
tasks: ['uglify:src']
|
||||
},
|
||||
requirejs: {
|
||||
files: ['src/js/rjs/**/*.js'],
|
||||
tasks: ['requirejs']
|
||||
},
|
||||
svg: {
|
||||
files: ['src/svg/**/*.svg'],
|
||||
tasks: ['svgmin']
|
||||
},
|
||||
img: {
|
||||
files: ['img/**/*.png', 'img/**/*.jpg'],
|
||||
tasks: ['smushit']
|
||||
},
|
||||
sass: {
|
||||
files: ['src/sass/**/*.scss'],
|
||||
tasks: ['compass'],
|
||||
options: {
|
||||
nospawn: true
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
});
|
||||
// Plugins
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-compass');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-svgmin');
|
||||
grunt.loadNpmTasks('grunt-smushit');
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-requirejs');
|
||||
|
||||
// Tasks
|
||||
grunt.registerTask('default', ['jshint', 'uglify', 'requirejs']);
|
||||
grunt.registerTask('image', ['smushit', 'svgmin']);
|
||||
grunt.event.on('watch', function (action, filepath, target) {
|
||||
//change the ource and destination in the uglify task at run time so that it affects the changed file only
|
||||
var destFilePath;
|
||||
if (target === 'js') {
|
||||
destFilePath = filepath.replace(/src\/(.+)$/, '$1');
|
||||
grunt.config('uglify.src.src', filepath);
|
||||
grunt.config('uglify.src.dest', destFilePath);
|
||||
} else if (target === 'svg') {
|
||||
destFilePath = filepath.replace(/src\/svg\/(.+)$/, 'img/$1');
|
||||
grunt.config('svgmin.dist.src', filepath);
|
||||
grunt.config('svgmin.dist.dest', destFilePath);
|
||||
|
||||
} else if (target === 'markdown') {
|
||||
destFilePath = filepath.replace(/src\/markdown\/([^.]+).+$/, 'application/views/pages/$1.php');
|
||||
grunt.config('markdown.dist.src', filepath);
|
||||
grunt.config('markdown.dist.dest', destFilePath);
|
||||
|
||||
} else if (target === 'img') {
|
||||
grunt.config('smushit.path.src', filepath);
|
||||
}
|
||||
});
|
||||
};
|
||||
1
application/.htaccess
Normal file
1
application/.htaccess
Normal file
@ -0,0 +1 @@
|
||||
Deny from all
|
||||
1
application/cache/.htaccess
vendored
Normal file
1
application/cache/.htaccess
vendored
Normal file
@ -0,0 +1 @@
|
||||
deny from all
|
||||
10
application/cache/index.html
vendored
Normal file
10
application/cache/index.html
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
116
application/config/autoload.php
Normal file
116
application/config/autoload.php
Normal file
@ -0,0 +1,116 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| AUTO-LOADER
|
||||
| -------------------------------------------------------------------
|
||||
| This file specifies which systems should be loaded by default.
|
||||
|
|
||||
| In order to keep the framework as light-weight as possible only the
|
||||
| absolute minimal resources are loaded by default. For example,
|
||||
| the database is not connected to automatically since no assumption
|
||||
| is made regarding whether you intend to use it. This file lets
|
||||
| you globally define which systems you would like loaded with every
|
||||
| request.
|
||||
|
|
||||
| -------------------------------------------------------------------
|
||||
| Instructions
|
||||
| -------------------------------------------------------------------
|
||||
|
|
||||
| These are the things you can load automatically:
|
||||
|
|
||||
| 1. Packages
|
||||
| 2. Libraries
|
||||
| 3. Helper files
|
||||
| 4. Custom config files
|
||||
| 5. Language files
|
||||
| 6. Models
|
||||
|
|
||||
*/
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Auto-load Packges
|
||||
| -------------------------------------------------------------------
|
||||
| Prototype:
|
||||
|
|
||||
| $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
|
||||
|
|
||||
*/
|
||||
|
||||
$autoload['packages'] = array();
|
||||
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Auto-load Libraries
|
||||
| -------------------------------------------------------------------
|
||||
| These are the classes located in the system/libraries folder
|
||||
| or in your application/libraries folder.
|
||||
|
|
||||
| Prototype:
|
||||
|
|
||||
| $autoload['libraries'] = array('database', 'session', 'xmlrpc');
|
||||
*/
|
||||
|
||||
$autoload['libraries'] = array('database', 'session');
|
||||
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Auto-load Helper Files
|
||||
| -------------------------------------------------------------------
|
||||
| Prototype:
|
||||
|
|
||||
| $autoload['helper'] = array('url', 'file');
|
||||
*/
|
||||
|
||||
$autoload['helper'] = array('url', 'html');
|
||||
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Auto-load Config files
|
||||
| -------------------------------------------------------------------
|
||||
| Prototype:
|
||||
|
|
||||
| $autoload['config'] = array('config1', 'config2');
|
||||
|
|
||||
| NOTE: This item is intended for use ONLY if you have created custom
|
||||
| config files. Otherwise, leave it blank.
|
||||
|
|
||||
*/
|
||||
|
||||
$autoload['config'] = array();
|
||||
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Auto-load Language files
|
||||
| -------------------------------------------------------------------
|
||||
| Prototype:
|
||||
|
|
||||
| $autoload['language'] = array('lang1', 'lang2');
|
||||
|
|
||||
| NOTE: Do not include the "_lang" part of your file. For example
|
||||
| "codeigniter_lang.php" would be referenced as array('codeigniter');
|
||||
|
|
||||
*/
|
||||
|
||||
$autoload['language'] = array();
|
||||
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Auto-load Models
|
||||
| -------------------------------------------------------------------
|
||||
| Prototype:
|
||||
|
|
||||
| $autoload['model'] = array('model1', 'model2');
|
||||
|
|
||||
*/
|
||||
|
||||
$autoload['model'] = array('dictionary_model');
|
||||
|
||||
|
||||
/* End of file autoload.php */
|
||||
/* Location: ./application/config/autoload.php */
|
||||
372
application/config/config.php
Normal file
372
application/config/config.php
Normal file
@ -0,0 +1,372 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/* LKM additions: */
|
||||
define('SITE_ROOT', dirname(dirname(dirname(__FILE__))));
|
||||
$config['site_name'] = 'Word Word Go';
|
||||
$config['comp_name'] = 'wordwordgo';
|
||||
$config['css_folder'] = 'css';
|
||||
$config['js_folder'] = 'js';
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Base Site URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| URL to your CodeIgniter root. Typically this will be your base URL,
|
||||
| WITH a trailing slash:
|
||||
|
|
||||
| http://example.com/
|
||||
|
|
||||
| If this is not set then CodeIgniter will guess the protocol, domain and
|
||||
| path to your installation.
|
||||
|
|
||||
*/
|
||||
|
||||
$config['base_url'] = "/";
|
||||
//$config['base_url'] = "/{$config['comp_name']}/";
|
||||
//$config['base_url'] = "http://localhost/{$config['comp_name']}/";
|
||||
//$config['base_url'] = "http://www.whitemill.se/clients/{$config['comp_name']}/";
|
||||
//$config['base_url'] = "http://www.{$config['comp_name']}.com/";
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Index File
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Typically this will be your index.php file, unless you've renamed it to
|
||||
| something else. If you are using mod_rewrite to remove the page set this
|
||||
| variable so that it is blank.
|
||||
|
|
||||
*/
|
||||
$config['index_page'] = 'index.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| URI PROTOCOL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This item determines which server global should be used to retrieve the
|
||||
| URI string. The default setting of 'AUTO' works for most servers.
|
||||
| If your links do not seem to work, try one of the other delicious flavors:
|
||||
|
|
||||
| 'AUTO' Default - auto detects
|
||||
| 'PATH_INFO' Uses the PATH_INFO
|
||||
| 'QUERY_STRING' Uses the QUERY_STRING
|
||||
| 'REQUEST_URI' Uses the REQUEST_URI
|
||||
| 'ORIG_PATH_INFO' Uses the ORIG_PATH_INFO
|
||||
|
|
||||
*/
|
||||
$config['uri_protocol'] = 'AUTO';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| URL suffix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to add a suffix to all URLs generated by CodeIgniter.
|
||||
| For more information please see the user guide:
|
||||
|
|
||||
| http://codeigniter.com/user_guide/general/urls.html
|
||||
*/
|
||||
|
||||
$config['url_suffix'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Language
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This determines which set of language files should be used. Make sure
|
||||
| there is an available translation if you intend to use something other
|
||||
| than english.
|
||||
|
|
||||
*/
|
||||
$config['language'] = 'english';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Character Set
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This determines which character set is used by default in various methods
|
||||
| that require a character set to be provided.
|
||||
|
|
||||
*/
|
||||
$config['charset'] = 'UTF-8';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Enable/Disable System Hooks
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you would like to use the 'hooks' feature you must enable it by
|
||||
| setting this variable to TRUE (boolean). See the user guide for details.
|
||||
|
|
||||
*/
|
||||
$config['enable_hooks'] = FALSE;
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Class Extension Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This item allows you to set the filename/classname prefix when extending
|
||||
| native libraries. For more information please see the user guide:
|
||||
|
|
||||
| http://codeigniter.com/user_guide/general/core_classes.html
|
||||
| http://codeigniter.com/user_guide/general/creating_libraries.html
|
||||
|
|
||||
*/
|
||||
$config['subclass_prefix'] = 'MY_';
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Allowed URL Characters
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This lets you specify with a regular expression which characters are permitted
|
||||
| within your URLs. When someone tries to submit a URL with disallowed
|
||||
| characters they will get a warning message.
|
||||
|
|
||||
| As a security measure you are STRONGLY encouraged to restrict URLs to
|
||||
| as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
|
||||
|
|
||||
| Leave blank to allow all characters -- but only if you are insane.
|
||||
|
|
||||
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
||||
|
|
||||
*/
|
||||
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Enable Query Strings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default CodeIgniter uses search-engine friendly segment based URLs:
|
||||
| example.com/who/what/where/
|
||||
|
|
||||
| By default CodeIgniter enables access to the $_GET array. If for some
|
||||
| reason you would like to disable it, set 'allow_get_array' to FALSE.
|
||||
|
|
||||
| You can optionally enable standard query string based URLs:
|
||||
| example.com?who=me&what=something&where=here
|
||||
|
|
||||
| Options are: TRUE or FALSE (boolean)
|
||||
|
|
||||
| The other items let you set the query string 'words' that will
|
||||
| invoke your controllers and its functions:
|
||||
| example.com/index.php?c=controller&m=function
|
||||
|
|
||||
| Please note that some of the helpers won't work as expected when
|
||||
| this feature is enabled, since CodeIgniter is designed primarily to
|
||||
| use segment based URLs.
|
||||
|
|
||||
*/
|
||||
$config['allow_get_array'] = TRUE;
|
||||
$config['enable_query_strings'] = FALSE;
|
||||
$config['controller_trigger'] = 'c';
|
||||
$config['function_trigger'] = 'm';
|
||||
$config['directory_trigger'] = 'd'; // experimental not currently in use
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Error Logging Threshold
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you have enabled error logging, you can set an error threshold to
|
||||
| determine what gets logged. Threshold options are:
|
||||
| You can enable error logging by setting a threshold over zero. The
|
||||
| threshold determines what gets logged. Threshold options are:
|
||||
|
|
||||
| 0 = Disables logging, Error logging TURNED OFF
|
||||
| 1 = Error Messages (including PHP errors)
|
||||
| 2 = Debug Messages
|
||||
| 3 = Informational Messages
|
||||
| 4 = All Messages
|
||||
|
|
||||
| For a live site you'll usually only enable Errors (1) to be logged otherwise
|
||||
| your log files will fill up very fast.
|
||||
|
|
||||
*/
|
||||
$config['log_threshold'] = 0;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Error Logging Directory Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Leave this BLANK unless you would like to set something other than the default
|
||||
| application/logs/ folder. Use a full server path with trailing slash.
|
||||
|
|
||||
*/
|
||||
$config['log_path'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Date Format for Logs
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Each item that is logged has an associated date. You can use PHP date
|
||||
| codes to set your own date formatting
|
||||
|
|
||||
*/
|
||||
$config['log_date_format'] = 'Y-m-d H:i:s';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Directory Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Leave this BLANK unless you would like to set something other than the default
|
||||
| system/cache/ folder. Use a full server path with trailing slash.
|
||||
|
|
||||
*/
|
||||
$config['cache_path'] = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Encryption Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you use the Encryption class or the Session class you
|
||||
| MUST set an encryption key. See the user guide for info.
|
||||
|
|
||||
*/
|
||||
$config['encryption_key'] = 'bbhW4ZFGwWGLQXuBEZNrjte4eM3lKhJH';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Variables
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| 'sess_cookie_name' = the name you want for the cookie
|
||||
| 'sess_expiration' = the number of SECONDS you want the session to last.
|
||||
| by default sessions last 7200 seconds (two hours). Set to zero for no expiration.
|
||||
| 'sess_expire_on_close' = Whether to cause the session to expire automatically
|
||||
| when the browser window is closed
|
||||
| 'sess_encrypt_cookie' = Whether to encrypt the cookie
|
||||
| 'sess_use_database' = Whether to save the session data to a database
|
||||
| 'sess_table_name' = The name of the session database table
|
||||
| 'sess_match_ip' = Whether to match the user's IP address when reading the session data
|
||||
| 'sess_match_useragent' = Whether to match the User Agent when reading the session data
|
||||
| 'sess_time_to_update' = how many seconds between CI refreshing Session Information
|
||||
|
|
||||
*/
|
||||
$config['sess_cookie_name'] = 'ci_session';
|
||||
$config['sess_expiration'] = 7200;
|
||||
$config['sess_expire_on_close'] = FALSE;
|
||||
$config['sess_encrypt_cookie'] = FALSE;
|
||||
$config['sess_use_database'] = FALSE;
|
||||
$config['sess_table_name'] = 'ci_sessions';
|
||||
$config['sess_match_ip'] = FALSE;
|
||||
$config['sess_match_useragent'] = TRUE;
|
||||
$config['sess_time_to_update'] = 300;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cookie Related Variables
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| 'cookie_prefix' = Set a prefix if you need to avoid collisions
|
||||
| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
|
||||
| 'cookie_path' = Typically will be a forward slash
|
||||
| 'cookie_secure' = Cookies will only be set if a secure HTTPS connection exists.
|
||||
|
|
||||
*/
|
||||
$config['cookie_prefix'] = "";
|
||||
$config['cookie_domain'] = "";
|
||||
$config['cookie_path'] = "/";
|
||||
$config['cookie_secure'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global XSS Filtering
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Determines whether the XSS filter is always active when GET, POST or
|
||||
| COOKIE data is encountered
|
||||
|
|
||||
*/
|
||||
$config['global_xss_filtering'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cross Site Request Forgery
|
||||
|--------------------------------------------------------------------------
|
||||
| Enables a CSRF cookie token to be set. When set to TRUE, token will be
|
||||
| checked on a submitted form. If you are accepting user data, it is strongly
|
||||
| recommended CSRF protection be enabled.
|
||||
|
|
||||
| 'csrf_token_name' = The token name
|
||||
| 'csrf_cookie_name' = The cookie name
|
||||
| 'csrf_expire' = The number in seconds the token should expire.
|
||||
*/
|
||||
$config['csrf_protection'] = FALSE;
|
||||
$config['csrf_token_name'] = 'csrf_test_name';
|
||||
$config['csrf_cookie_name'] = 'csrf_cookie_name';
|
||||
$config['csrf_expire'] = 7200;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Output Compression
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Enables Gzip output compression for faster page loads. When enabled,
|
||||
| the output class will test whether your server supports Gzip.
|
||||
| Even if it does, however, not all browsers support compression
|
||||
| so enable only if you are reasonably sure your visitors can handle it.
|
||||
|
|
||||
| VERY IMPORTANT: If you are getting a blank page when compression is enabled it
|
||||
| means you are prematurely outputting something to your browser. It could
|
||||
| even be a line of whitespace at the end of one of your scripts. For
|
||||
| compression to work, nothing can be sent before the output buffer is called
|
||||
| by the output class. Do not 'echo' any values with compression enabled.
|
||||
|
|
||||
*/
|
||||
$config['compress_output'] = FALSE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Master Time Reference
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Options are 'local' or 'gmt'. This pref tells the system whether to use
|
||||
| your server's local time as the master 'now' reference, or convert it to
|
||||
| GMT. See the 'date helper' page of the user guide for information
|
||||
| regarding date handling.
|
||||
|
|
||||
*/
|
||||
$config['time_reference'] = 'local';
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Rewrite PHP Short Tags
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If your PHP installation does not have short tag support enabled CI
|
||||
| can rewrite the tags on-the-fly, enabling you to utilize that syntax
|
||||
| in your view files. Options are TRUE or FALSE (boolean)
|
||||
|
|
||||
*/
|
||||
$config['rewrite_short_tags'] = FALSE;
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Reverse Proxy IPs
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If your server is behind a reverse proxy, you must whitelist the proxy IP
|
||||
| addresses from which CodeIgniter should trust the HTTP_X_FORWARDED_FOR
|
||||
| header in order to properly identify the visitor's IP address.
|
||||
| Comma-delimited, e.g. '10.0.1.200,10.0.1.201'
|
||||
|
|
||||
*/
|
||||
$config['proxy_ips'] = '';
|
||||
|
||||
|
||||
/* End of file config.php */
|
||||
/* Location: ./application/config/config.php */
|
||||
41
application/config/constants.php
Normal file
41
application/config/constants.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| File and Directory Modes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These prefs are used when checking and setting modes when working
|
||||
| with the file system. The defaults are fine on servers with proper
|
||||
| security, but you may wish (or even need) to change the values in
|
||||
| certain environments (Apache running a separate process for each
|
||||
| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
|
||||
| always be used to set the mode correctly.
|
||||
|
|
||||
*/
|
||||
define('FILE_READ_MODE', 0644);
|
||||
define('FILE_WRITE_MODE', 0666);
|
||||
define('DIR_READ_MODE', 0755);
|
||||
define('DIR_WRITE_MODE', 0777);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| File Stream Modes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These modes are used when working with fopen()/popen()
|
||||
|
|
||||
*/
|
||||
|
||||
define('FOPEN_READ', 'rb');
|
||||
define('FOPEN_READ_WRITE', 'r+b');
|
||||
define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
|
||||
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
|
||||
define('FOPEN_WRITE_CREATE', 'ab');
|
||||
define('FOPEN_READ_WRITE_CREATE', 'a+b');
|
||||
define('FOPEN_WRITE_CREATE_STRICT', 'xb');
|
||||
define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
|
||||
|
||||
|
||||
/* End of file constants.php */
|
||||
/* Location: ./application/config/constants.php */
|
||||
116
application/config/database.php
Normal file
116
application/config/database.php
Normal file
@ -0,0 +1,116 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| DATABASE CONNECTIVITY SETTINGS
|
||||
| -------------------------------------------------------------------
|
||||
| This file will contain the settings needed to access your database.
|
||||
|
|
||||
| For complete instructions please consult the 'Database Connection'
|
||||
| page of the User Guide.
|
||||
|
|
||||
| -------------------------------------------------------------------
|
||||
| EXPLANATION OF VARIABLES
|
||||
| -------------------------------------------------------------------
|
||||
|
|
||||
| ['hostname'] The hostname of your database server.
|
||||
| ['username'] The username used to connect to the database
|
||||
| ['password'] The password used to connect to the database
|
||||
| ['database'] The name of the database you want to connect to
|
||||
| ['dbdriver'] The database type. ie: mysql. Currently supported:
|
||||
mysql, mysqli, postgre, odbc, mssql, sqlite, oci8
|
||||
| ['dbprefix'] You can add an optional prefix, which will be added
|
||||
| to the table name when using the Active Record class
|
||||
| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
|
||||
| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
|
||||
| ['cache_on'] TRUE/FALSE - Enables/disables query caching
|
||||
| ['cachedir'] The path to the folder where cache files should be stored
|
||||
| ['char_set'] The character set used in communicating with the database
|
||||
| ['dbcollat'] The character collation used in communicating with the database
|
||||
| NOTE: For MySQL and MySQLi databases, this setting is only used
|
||||
| as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7
|
||||
| (and in table creation queries made with DB Forge).
|
||||
| There is an incompatibility in PHP with mysql_real_escape_string() which
|
||||
| can make your site vulnerable to SQL injection if you are using a
|
||||
| multi-byte character set and are running versions lower than these.
|
||||
| Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
|
||||
| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
|
||||
| ['autoinit'] Whether or not to automatically initialize the database.
|
||||
| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
|
||||
| - good for ensuring strict SQL while developing
|
||||
|
|
||||
| The $active_group variable lets you choose which connection group to
|
||||
| make active. By default there is only one group (the 'default' group).
|
||||
|
|
||||
| The $active_record variables lets you determine whether or not to load
|
||||
| the active record class
|
||||
*/
|
||||
|
||||
$active_group = 'local';
|
||||
//$active_group = 'sebbe-int';
|
||||
//$active_group = 'sebbe-ext';
|
||||
$active_record = TRUE;
|
||||
|
||||
$db['local']['hostname'] = 'localhost';
|
||||
$db['local']['username'] = 'wordwordgo_admin';
|
||||
$db['local']['password'] = '1112wOrDgO??';
|
||||
$db['local']['database'] = 'wordwordgo';
|
||||
$db['local']['dbdriver'] = 'mysqli';
|
||||
$db['local']['dbprefix'] = '';
|
||||
$db['local']['pconnect'] = TRUE;
|
||||
$db['local']['db_debug'] = TRUE;
|
||||
$db['local']['cache_on'] = FALSE;
|
||||
$db['local']['cachedir'] = '';
|
||||
$db['local']['char_set'] = 'utf8';
|
||||
$db['local']['dbcollat'] = 'utf8_general_ci';
|
||||
$db['local']['swap_pre'] = '';
|
||||
$db['local']['autoinit'] = TRUE;
|
||||
$db['local']['stricton'] = FALSE;
|
||||
|
||||
$db['sebbe-int']['hostname'] = '192.168.1.50';
|
||||
$db['sebbe-int']['username'] = 'wordwordgo_admin';
|
||||
$db['sebbe-int']['password'] = '1112wOrDgO??';
|
||||
$db['sebbe-int']['database'] = 'wordwordgo';
|
||||
$db['sebbe-int']['dbdriver'] = 'mysqli';
|
||||
$db['sebbe-int']['dbprefix'] = '';
|
||||
$db['sebbe-int']['pconnect'] = TRUE;
|
||||
$db['sebbe-int']['db_debug'] = TRUE;
|
||||
$db['sebbe-int']['cache_on'] = FALSE;
|
||||
$db['sebbe-int']['cachedir'] = '';
|
||||
$db['sebbe-int']['char_set'] = 'utf8';
|
||||
$db['sebbe-int']['dbcollat'] = 'utf8_general_ci';
|
||||
$db['sebbe-int']['swap_pre'] = '';
|
||||
$db['sebbe-int']['autoinit'] = TRUE;
|
||||
$db['sebbe-int']['stricton'] = FALSE;
|
||||
|
||||
$db['sebbe-ext']['hostname'] = '81.186.252.233';
|
||||
$db['sebbe-ext']['username'] = 'wordwordgo_admin';
|
||||
$db['sebbe-ext']['password'] = '1112wOrDgO??';
|
||||
$db['sebbe-ext']['database'] = 'wordwordgo';
|
||||
$db['sebbe-ext']['dbdriver'] = 'mysqli';
|
||||
$db['sebbe-ext']['dbprefix'] = '';
|
||||
$db['sebbe-ext']['pconnect'] = TRUE;
|
||||
$db['sebbe-ext']['db_debug'] = TRUE;
|
||||
$db['sebbe-ext']['cache_on'] = FALSE;
|
||||
$db['sebbe-ext']['cachedir'] = '';
|
||||
$db['sebbe-ext']['char_set'] = 'utf8';
|
||||
$db['sebbe-ext']['dbcollat'] = 'utf8_general_ci';
|
||||
$db['sebbe-ext']['swap_pre'] = '';
|
||||
$db['sebbe-ext']['autoinit'] = TRUE;
|
||||
$db['sebbe-ext']['stricton'] = FALSE;
|
||||
|
||||
$db['sigge-int']['hostname'] = '130.235.134.187';
|
||||
$db['sigge-int']['username'] = 'whitemill_admin';
|
||||
$db['sigge-int']['password'] = '1112wHiTeMiLl??';
|
||||
$db['sigge-int']['database'] = 'whitemill';
|
||||
$db['sigge-int']['dbdriver'] = 'mysqli';
|
||||
$db['sigge-int']['dbprefix'] = '';
|
||||
$db['sigge-int']['pconnect'] = TRUE;
|
||||
$db['sigge-int']['db_debug'] = TRUE;
|
||||
$db['sigge-int']['cache_on'] = FALSE;
|
||||
$db['sigge-int']['cachedir'] = '';
|
||||
$db['sigge-int']['char_set'] = 'utf8';
|
||||
$db['sigge-int']['dbcollat'] = 'utf8_general_ci';
|
||||
$db['sigge-int']['swap_pre'] = '';
|
||||
$db['sigge-int']['autoinit'] = TRUE;
|
||||
$db['sigge-int']['stricton'] = FALSE;
|
||||
/* End of file database.php */
|
||||
15
application/config/doctypes.php
Normal file
15
application/config/doctypes.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
$_doctypes = array(
|
||||
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
|
||||
'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
|
||||
'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
|
||||
'xhtml1-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
|
||||
'html5' => '<!DOCTYPE html>',
|
||||
'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
|
||||
'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
|
||||
'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">'
|
||||
);
|
||||
|
||||
/* End of file doctypes.php */
|
||||
/* Location: ./application/config/doctypes.php */
|
||||
64
application/config/foreign_chars.php
Normal file
64
application/config/foreign_chars.php
Normal file
@ -0,0 +1,64 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| Foreign Characters
|
||||
| -------------------------------------------------------------------
|
||||
| This file contains an array of foreign characters for transliteration
|
||||
| conversion used by the Text helper
|
||||
|
|
||||
*/
|
||||
$foreign_characters = array(
|
||||
'/ä|æ|ǽ/' => 'ae',
|
||||
'/ö|œ/' => 'oe',
|
||||
'/ü/' => 'ue',
|
||||
'/Ä/' => 'Ae',
|
||||
'/Ü/' => 'Ue',
|
||||
'/Ö/' => 'Oe',
|
||||
'/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ/' => 'A',
|
||||
'/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª/' => 'a',
|
||||
'/Ç|Ć|Ĉ|Ċ|Č/' => 'C',
|
||||
'/ç|ć|ĉ|ċ|č/' => 'c',
|
||||
'/Ð|Ď|Đ/' => 'D',
|
||||
'/ð|ď|đ/' => 'd',
|
||||
'/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě/' => 'E',
|
||||
'/è|é|ê|ë|ē|ĕ|ė|ę|ě/' => 'e',
|
||||
'/Ĝ|Ğ|Ġ|Ģ/' => 'G',
|
||||
'/ĝ|ğ|ġ|ģ/' => 'g',
|
||||
'/Ĥ|Ħ/' => 'H',
|
||||
'/ĥ|ħ/' => 'h',
|
||||
'/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ/' => 'I',
|
||||
'/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı/' => 'i',
|
||||
'/Ĵ/' => 'J',
|
||||
'/ĵ/' => 'j',
|
||||
'/Ķ/' => 'K',
|
||||
'/ķ/' => 'k',
|
||||
'/Ĺ|Ļ|Ľ|Ŀ|Ł/' => 'L',
|
||||
'/ĺ|ļ|ľ|ŀ|ł/' => 'l',
|
||||
'/Ñ|Ń|Ņ|Ň/' => 'N',
|
||||
'/ñ|ń|ņ|ň|ʼn/' => 'n',
|
||||
'/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ/' => 'O',
|
||||
'/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º/' => 'o',
|
||||
'/Ŕ|Ŗ|Ř/' => 'R',
|
||||
'/ŕ|ŗ|ř/' => 'r',
|
||||
'/Ś|Ŝ|Ş|Š/' => 'S',
|
||||
'/ś|ŝ|ş|š|ſ/' => 's',
|
||||
'/Ţ|Ť|Ŧ/' => 'T',
|
||||
'/ţ|ť|ŧ/' => 't',
|
||||
'/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ/' => 'U',
|
||||
'/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ/' => 'u',
|
||||
'/Ý|Ÿ|Ŷ/' => 'Y',
|
||||
'/ý|ÿ|ŷ/' => 'y',
|
||||
'/Ŵ/' => 'W',
|
||||
'/ŵ/' => 'w',
|
||||
'/Ź|Ż|Ž/' => 'Z',
|
||||
'/ź|ż|ž/' => 'z',
|
||||
'/Æ|Ǽ/' => 'AE',
|
||||
'/ß/'=> 'ss',
|
||||
'/IJ/' => 'IJ',
|
||||
'/ij/' => 'ij',
|
||||
'/Œ/' => 'OE',
|
||||
'/ƒ/' => 'f'
|
||||
);
|
||||
|
||||
/* End of file foreign_chars.php */
|
||||
/* Location: ./application/config/foreign_chars.php */
|
||||
16
application/config/hooks.php
Normal file
16
application/config/hooks.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/*
|
||||
| -------------------------------------------------------------------------
|
||||
| Hooks
|
||||
| -------------------------------------------------------------------------
|
||||
| This file lets you define "hooks" to extend CI without hacking the core
|
||||
| files. Please see the user guide for info:
|
||||
|
|
||||
| http://codeigniter.com/user_guide/general/hooks.html
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* End of file hooks.php */
|
||||
/* Location: ./application/config/hooks.php */
|
||||
10
application/config/index.html
Normal file
10
application/config/index.html
Normal file
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
41
application/config/migration.php
Normal file
41
application/config/migration.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Enable/Disable Migrations
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Migrations are disabled by default but should be enabled
|
||||
| whenever you intend to do a schema migration.
|
||||
|
|
||||
*/
|
||||
$config['migration_enabled'] = FALSE;
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Migrations version
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is used to set migration version that the file system should be on.
|
||||
| If you run $this->migration->latest() this is the version that schema will
|
||||
| be upgraded / downgraded to.
|
||||
|
|
||||
*/
|
||||
$config['migration_version'] = 0;
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Migrations Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Path to your migrations folder.
|
||||
| Typically, it will be within your application path.
|
||||
| Also, writing permission is required within the migrations path.
|
||||
|
|
||||
*/
|
||||
$config['migration_path'] = APPPATH . 'migrations/';
|
||||
|
||||
|
||||
/* End of file migration.php */
|
||||
/* Location: ./application/config/migration.php */
|
||||
106
application/config/mimes.php
Normal file
106
application/config/mimes.php
Normal file
@ -0,0 +1,106 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| MIME TYPES
|
||||
| -------------------------------------------------------------------
|
||||
| This file contains an array of mime types. It is used by the
|
||||
| Upload class to help identify allowed file types.
|
||||
|
|
||||
*/
|
||||
|
||||
$mimes = array( 'hqx' => 'application/mac-binhex40',
|
||||
'cpt' => 'application/mac-compactpro',
|
||||
'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel'),
|
||||
'bin' => 'application/macbinary',
|
||||
'dms' => 'application/octet-stream',
|
||||
'lha' => 'application/octet-stream',
|
||||
'lzh' => 'application/octet-stream',
|
||||
'exe' => array('application/octet-stream', 'application/x-msdownload'),
|
||||
'class' => 'application/octet-stream',
|
||||
'psd' => 'application/x-photoshop',
|
||||
'so' => 'application/octet-stream',
|
||||
'sea' => 'application/octet-stream',
|
||||
'dll' => 'application/octet-stream',
|
||||
'oda' => 'application/oda',
|
||||
'pdf' => array('application/pdf', 'application/x-download'),
|
||||
'ai' => 'application/postscript',
|
||||
'eps' => 'application/postscript',
|
||||
'ps' => 'application/postscript',
|
||||
'smi' => 'application/smil',
|
||||
'smil' => 'application/smil',
|
||||
'mif' => 'application/vnd.mif',
|
||||
'xls' => array('application/excel', 'application/vnd.ms-excel', 'application/msexcel'),
|
||||
'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint'),
|
||||
'wbxml' => 'application/wbxml',
|
||||
'wmlc' => 'application/wmlc',
|
||||
'dcr' => 'application/x-director',
|
||||
'dir' => 'application/x-director',
|
||||
'dxr' => 'application/x-director',
|
||||
'dvi' => 'application/x-dvi',
|
||||
'gtar' => 'application/x-gtar',
|
||||
'gz' => 'application/x-gzip',
|
||||
'php' => 'application/x-httpd-php',
|
||||
'php4' => 'application/x-httpd-php',
|
||||
'php3' => 'application/x-httpd-php',
|
||||
'phtml' => 'application/x-httpd-php',
|
||||
'phps' => 'application/x-httpd-php-source',
|
||||
'js' => 'application/x-javascript',
|
||||
'swf' => 'application/x-shockwave-flash',
|
||||
'sit' => 'application/x-stuffit',
|
||||
'tar' => 'application/x-tar',
|
||||
'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
|
||||
'xhtml' => 'application/xhtml+xml',
|
||||
'xht' => 'application/xhtml+xml',
|
||||
'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed'),
|
||||
'mid' => 'audio/midi',
|
||||
'midi' => 'audio/midi',
|
||||
'mpga' => 'audio/mpeg',
|
||||
'mp2' => 'audio/mpeg',
|
||||
'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
|
||||
'aif' => 'audio/x-aiff',
|
||||
'aiff' => 'audio/x-aiff',
|
||||
'aifc' => 'audio/x-aiff',
|
||||
'ram' => 'audio/x-pn-realaudio',
|
||||
'rm' => 'audio/x-pn-realaudio',
|
||||
'rpm' => 'audio/x-pn-realaudio-plugin',
|
||||
'ra' => 'audio/x-realaudio',
|
||||
'rv' => 'video/vnd.rn-realvideo',
|
||||
'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
|
||||
'bmp' => array('image/bmp', 'image/x-windows-bmp'),
|
||||
'gif' => 'image/gif',
|
||||
'jpeg' => array('image/jpeg', 'image/pjpeg'),
|
||||
'jpg' => array('image/jpeg', 'image/pjpeg'),
|
||||
'jpe' => array('image/jpeg', 'image/pjpeg'),
|
||||
'png' => array('image/png', 'image/x-png'),
|
||||
'tiff' => 'image/tiff',
|
||||
'tif' => 'image/tiff',
|
||||
'css' => 'text/css',
|
||||
'html' => 'text/html',
|
||||
'htm' => 'text/html',
|
||||
'shtml' => 'text/html',
|
||||
'txt' => 'text/plain',
|
||||
'text' => 'text/plain',
|
||||
'log' => array('text/plain', 'text/x-log'),
|
||||
'rtx' => 'text/richtext',
|
||||
'rtf' => 'text/rtf',
|
||||
'xml' => 'text/xml',
|
||||
'xsl' => 'text/xml',
|
||||
'mpeg' => 'video/mpeg',
|
||||
'mpg' => 'video/mpeg',
|
||||
'mpe' => 'video/mpeg',
|
||||
'qt' => 'video/quicktime',
|
||||
'mov' => 'video/quicktime',
|
||||
'avi' => 'video/x-msvideo',
|
||||
'movie' => 'video/x-sgi-movie',
|
||||
'doc' => 'application/msword',
|
||||
'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip'),
|
||||
'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip'),
|
||||
'word' => array('application/msword', 'application/octet-stream'),
|
||||
'xl' => 'application/excel',
|
||||
'eml' => 'message/rfc822',
|
||||
'json' => array('application/json', 'text/json')
|
||||
);
|
||||
|
||||
|
||||
/* End of file mimes.php */
|
||||
/* Location: ./application/config/mimes.php */
|
||||
8
application/config/ms.php
Normal file
8
application/config/ms.php
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
$ms['salt'] = '--!!5Zzrbmj3B95Hp3JH';
|
||||
|
||||
|
||||
|
||||
/* End of file ms.php */
|
||||
/* Location: ./system/application/config/ms.php */
|
||||
17
application/config/profiler.php
Normal file
17
application/config/profiler.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/*
|
||||
| -------------------------------------------------------------------------
|
||||
| Profiler Sections
|
||||
| -------------------------------------------------------------------------
|
||||
| This file lets you determine whether or not various sections of Profiler
|
||||
| data are displayed when the Profiler is enabled.
|
||||
| Please see the user guide for info:
|
||||
|
|
||||
| http://codeigniter.com/user_guide/general/profiling.html
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* End of file profiler.php */
|
||||
/* Location: ./application/config/profiler.php */
|
||||
54
application/config/routes.php
Normal file
54
application/config/routes.php
Normal file
@ -0,0 +1,54 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/*
|
||||
| -------------------------------------------------------------------------
|
||||
| URI ROUTING
|
||||
| -------------------------------------------------------------------------
|
||||
| This file lets you re-map URI requests to specific controller functions.
|
||||
|
|
||||
| Typically there is a one-to-one relationship between a URL string
|
||||
| and its corresponding controller class/method. The segments in a
|
||||
| URL normally follow this pattern:
|
||||
|
|
||||
| example.com/class/method/id/
|
||||
|
|
||||
| In some instances, however, you may want to remap this relationship
|
||||
| so that a different class/function is called than the one
|
||||
| corresponding to the URL.
|
||||
|
|
||||
| Please see the user guide for complete details:
|
||||
|
|
||||
| http://codeigniter.com/user_guide/general/routing.html
|
||||
|
|
||||
| -------------------------------------------------------------------------
|
||||
| RESERVED ROUTES
|
||||
| -------------------------------------------------------------------------
|
||||
|
|
||||
| There area two reserved routes:
|
||||
|
|
||||
| $route['default_controller'] = 'welcome';
|
||||
|
|
||||
| This route indicates which controller class should be loaded if the
|
||||
| URI contains no data. In the above example, the "welcome" class
|
||||
| would be loaded.
|
||||
|
|
||||
| $route['404_override'] = 'errors/page_missing';
|
||||
|
|
||||
| This route will tell the Router what URI segments to use if those provided
|
||||
| in the URL cannot be matched to a valid route.
|
||||
|
|
||||
*/
|
||||
|
||||
$route['run'] = 'util/run';
|
||||
$route['ajax/ms/login'] = 'ajax/ms/login';
|
||||
$route['ajax/ms/update_user_password'] = 'ajax/ms/update_user_password';
|
||||
$route['ajax/ms/update_user'] = 'ajax/ms/update_user';
|
||||
$route['ajax/dictionary/search'] = 'ajax/dictionary/search';
|
||||
$route['login'] = 'ms/login';
|
||||
$route['logout'] = 'ms/logout';
|
||||
$route['(:any)'] = 'pages/view/$1';
|
||||
$route['default_controller'] = "pages/index";
|
||||
$route['404_override'] = '';
|
||||
|
||||
|
||||
/* End of file routes.php */
|
||||
/* Location: ./application/config/routes.php */
|
||||
66
application/config/smileys.php
Normal file
66
application/config/smileys.php
Normal file
@ -0,0 +1,66 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| SMILEYS
|
||||
| -------------------------------------------------------------------
|
||||
| This file contains an array of smileys for use with the emoticon helper.
|
||||
| Individual images can be used to replace multiple simileys. For example:
|
||||
| :-) and :) use the same image replacement.
|
||||
|
|
||||
| Please see user guide for more info:
|
||||
| http://codeigniter.com/user_guide/helpers/smiley_helper.html
|
||||
|
|
||||
*/
|
||||
|
||||
$smileys = array(
|
||||
|
||||
// smiley image name width height alt
|
||||
|
||||
':-)' => array('grin.gif', '19', '19', 'grin'),
|
||||
':lol:' => array('lol.gif', '19', '19', 'LOL'),
|
||||
':cheese:' => array('cheese.gif', '19', '19', 'cheese'),
|
||||
':)' => array('smile.gif', '19', '19', 'smile'),
|
||||
';-)' => array('wink.gif', '19', '19', 'wink'),
|
||||
';)' => array('wink.gif', '19', '19', 'wink'),
|
||||
':smirk:' => array('smirk.gif', '19', '19', 'smirk'),
|
||||
':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'),
|
||||
':-S' => array('confused.gif', '19', '19', 'confused'),
|
||||
':wow:' => array('surprise.gif', '19', '19', 'surprised'),
|
||||
':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'),
|
||||
':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'),
|
||||
'%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'),
|
||||
';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'),
|
||||
':P' => array('raspberry.gif', '19', '19', 'raspberry'),
|
||||
':blank:' => array('blank.gif', '19', '19', 'blank stare'),
|
||||
':long:' => array('longface.gif', '19', '19', 'long face'),
|
||||
':ohh:' => array('ohh.gif', '19', '19', 'ohh'),
|
||||
':grrr:' => array('grrr.gif', '19', '19', 'grrr'),
|
||||
':gulp:' => array('gulp.gif', '19', '19', 'gulp'),
|
||||
'8-/' => array('ohoh.gif', '19', '19', 'oh oh'),
|
||||
':down:' => array('downer.gif', '19', '19', 'downer'),
|
||||
':red:' => array('embarrassed.gif', '19', '19', 'red face'),
|
||||
':sick:' => array('sick.gif', '19', '19', 'sick'),
|
||||
':shut:' => array('shuteye.gif', '19', '19', 'shut eye'),
|
||||
':-/' => array('hmm.gif', '19', '19', 'hmmm'),
|
||||
'>:(' => array('mad.gif', '19', '19', 'mad'),
|
||||
':mad:' => array('mad.gif', '19', '19', 'mad'),
|
||||
'>:-(' => array('angry.gif', '19', '19', 'angry'),
|
||||
':angry:' => array('angry.gif', '19', '19', 'angry'),
|
||||
':zip:' => array('zip.gif', '19', '19', 'zipper'),
|
||||
':kiss:' => array('kiss.gif', '19', '19', 'kiss'),
|
||||
':ahhh:' => array('shock.gif', '19', '19', 'shock'),
|
||||
':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'),
|
||||
':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'),
|
||||
':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'),
|
||||
':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'),
|
||||
':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'),
|
||||
':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'),
|
||||
':vampire:' => array('vampire.gif', '19', '19', 'vampire'),
|
||||
':snake:' => array('snake.gif', '19', '19', 'snake'),
|
||||
':exclaim:' => array('exclaim.gif', '19', '19', 'excaim'),
|
||||
':question:' => array('question.gif', '19', '19', 'question') // no comma after last item
|
||||
|
||||
);
|
||||
|
||||
/* End of file smileys.php */
|
||||
/* Location: ./application/config/smileys.php */
|
||||
89
application/config/template.php
Normal file
89
application/config/template.php
Normal file
@ -0,0 +1,89 @@
|
||||
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Active template
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The $template['active_template'] setting lets you choose which template
|
||||
| group to make active. By default there is only one group (the
|
||||
| "default" group).
|
||||
|
|
||||
*/
|
||||
$template['active_template'] = 'default';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Explaination of template group variables
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| ['template'] The filename of your master template file in the Views folder.
|
||||
| Typically this file will contain a full XHTML skeleton that outputs your
|
||||
| full template or region per region. Include the file extension if other
|
||||
| than ".php"
|
||||
| ['regions'] Places within the template where your content may land.
|
||||
| You may also include default markup, wrappers and attributes here
|
||||
| (though not recommended). Region keys must be translatable into variables
|
||||
| (no spaces or dashes, etc)
|
||||
| ['parser'] The parser class/library to use for the parse_view() method
|
||||
| NOTE: See http://codeigniter.com/forums/viewthread/60050/P0/ for a good
|
||||
| Smarty Parser that works perfectly with Template
|
||||
| ['parse_template'] FALSE (default) to treat master template as a View. TRUE
|
||||
| to user parser (see above) on the master template
|
||||
|
|
||||
| Region information can be extended by setting the following variables:
|
||||
| ['content'] Must be an array! Use to set default region content
|
||||
| ['name'] A string to identify the region beyond what it is defined by its key.
|
||||
| ['wrapper'] An HTML element to wrap the region contents in. (We
|
||||
| recommend doing this in your template file.)
|
||||
| ['attributes'] Multidimensional array defining HTML attributes of the
|
||||
| wrapper. (We recommend doing this in your template file.)
|
||||
|
|
||||
| Example:
|
||||
| $template['default']['regions'] = array(
|
||||
| 'header' => array(
|
||||
| 'content' => array('<h1>Welcome</h1>','<p>Hello World</p>'),
|
||||
| 'name' => 'Page Header',
|
||||
| 'wrapper' => '<div>',
|
||||
| 'attributes' => array('id' => 'header', 'class' => 'clearfix')
|
||||
| )
|
||||
| );
|
||||
|
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Template Configuration (adjust this or create your own)
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$template['default']['template'] = 'masters/default';
|
||||
$template['default']['regions'] = array(
|
||||
'title',
|
||||
'content',
|
||||
);
|
||||
$template['default']['has_logic'] = FALSE;
|
||||
$template['default']['js_folder'] = 'js';
|
||||
$template['default']['js'] = array('main', 'modernizr');
|
||||
$template['default']['css_folder'] = 'css';
|
||||
$template['default']['css'] = array('main');
|
||||
$template['default']['parser'] = 'parser';
|
||||
$template['default']['parser_method'] = 'parse';
|
||||
$template['default']['parse_template'] = FALSE;
|
||||
$template['default']['controller'] = FALSE;
|
||||
|
||||
$template['ms']['template'] = 'templates/ms';
|
||||
$template['ms']['regions'] = array(
|
||||
'title',
|
||||
'content',
|
||||
);
|
||||
$template['ms']['has_logic'] = FALSE;
|
||||
$template['ms']['js_folder'] = 'js';
|
||||
$template['ms']['js'] = array('modernizr');
|
||||
$template['ms']['css_folder'] = 'css';
|
||||
$template['ms']['css'] = array('ms');
|
||||
$template['ms']['parser'] = 'parser';
|
||||
$template['ms']['parser_method'] = 'parse';
|
||||
$template['ms']['parse_template'] = FALSE;
|
||||
$template['ms']['controller'] = FALSE;
|
||||
/* End of file template.php */
|
||||
/* Location: ./system/application/config/template.php */
|
||||
178
application/config/user_agents.php
Normal file
178
application/config/user_agents.php
Normal file
@ -0,0 +1,178 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/*
|
||||
| -------------------------------------------------------------------
|
||||
| USER AGENT TYPES
|
||||
| -------------------------------------------------------------------
|
||||
| This file contains four arrays of user agent data. It is used by the
|
||||
| User Agent Class to help identify browser, platform, robot, and
|
||||
| mobile device data. The array keys are used to identify the device
|
||||
| and the array values are used to set the actual name of the item.
|
||||
|
|
||||
*/
|
||||
|
||||
$platforms = array (
|
||||
'windows nt 6.0' => 'Windows Longhorn',
|
||||
'windows nt 5.2' => 'Windows 2003',
|
||||
'windows nt 5.0' => 'Windows 2000',
|
||||
'windows nt 5.1' => 'Windows XP',
|
||||
'windows nt 4.0' => 'Windows NT 4.0',
|
||||
'winnt4.0' => 'Windows NT 4.0',
|
||||
'winnt 4.0' => 'Windows NT',
|
||||
'winnt' => 'Windows NT',
|
||||
'windows 98' => 'Windows 98',
|
||||
'win98' => 'Windows 98',
|
||||
'windows 95' => 'Windows 95',
|
||||
'win95' => 'Windows 95',
|
||||
'windows' => 'Unknown Windows OS',
|
||||
'os x' => 'Mac OS X',
|
||||
'ppc mac' => 'Power PC Mac',
|
||||
'freebsd' => 'FreeBSD',
|
||||
'ppc' => 'Macintosh',
|
||||
'linux' => 'Linux',
|
||||
'debian' => 'Debian',
|
||||
'sunos' => 'Sun Solaris',
|
||||
'beos' => 'BeOS',
|
||||
'apachebench' => 'ApacheBench',
|
||||
'aix' => 'AIX',
|
||||
'irix' => 'Irix',
|
||||
'osf' => 'DEC OSF',
|
||||
'hp-ux' => 'HP-UX',
|
||||
'netbsd' => 'NetBSD',
|
||||
'bsdi' => 'BSDi',
|
||||
'openbsd' => 'OpenBSD',
|
||||
'gnu' => 'GNU/Linux',
|
||||
'unix' => 'Unknown Unix OS'
|
||||
);
|
||||
|
||||
|
||||
// The order of this array should NOT be changed. Many browsers return
|
||||
// multiple browser types so we want to identify the sub-type first.
|
||||
$browsers = array(
|
||||
'Flock' => 'Flock',
|
||||
'Chrome' => 'Chrome',
|
||||
'Opera' => 'Opera',
|
||||
'MSIE' => 'Internet Explorer',
|
||||
'Internet Explorer' => 'Internet Explorer',
|
||||
'Shiira' => 'Shiira',
|
||||
'Firefox' => 'Firefox',
|
||||
'Chimera' => 'Chimera',
|
||||
'Phoenix' => 'Phoenix',
|
||||
'Firebird' => 'Firebird',
|
||||
'Camino' => 'Camino',
|
||||
'Netscape' => 'Netscape',
|
||||
'OmniWeb' => 'OmniWeb',
|
||||
'Safari' => 'Safari',
|
||||
'Mozilla' => 'Mozilla',
|
||||
'Konqueror' => 'Konqueror',
|
||||
'icab' => 'iCab',
|
||||
'Lynx' => 'Lynx',
|
||||
'Links' => 'Links',
|
||||
'hotjava' => 'HotJava',
|
||||
'amaya' => 'Amaya',
|
||||
'IBrowse' => 'IBrowse'
|
||||
);
|
||||
|
||||
$mobiles = array(
|
||||
// legacy array, old values commented out
|
||||
'mobileexplorer' => 'Mobile Explorer',
|
||||
// 'openwave' => 'Open Wave',
|
||||
// 'opera mini' => 'Opera Mini',
|
||||
// 'operamini' => 'Opera Mini',
|
||||
// 'elaine' => 'Palm',
|
||||
'palmsource' => 'Palm',
|
||||
// 'digital paths' => 'Palm',
|
||||
// 'avantgo' => 'Avantgo',
|
||||
// 'xiino' => 'Xiino',
|
||||
'palmscape' => 'Palmscape',
|
||||
// 'nokia' => 'Nokia',
|
||||
// 'ericsson' => 'Ericsson',
|
||||
// 'blackberry' => 'BlackBerry',
|
||||
// 'motorola' => 'Motorola'
|
||||
|
||||
// Phones and Manufacturers
|
||||
'motorola' => "Motorola",
|
||||
'nokia' => "Nokia",
|
||||
'palm' => "Palm",
|
||||
'iphone' => "Apple iPhone",
|
||||
'ipad' => "iPad",
|
||||
'ipod' => "Apple iPod Touch",
|
||||
'sony' => "Sony Ericsson",
|
||||
'ericsson' => "Sony Ericsson",
|
||||
'blackberry' => "BlackBerry",
|
||||
'cocoon' => "O2 Cocoon",
|
||||
'blazer' => "Treo",
|
||||
'lg' => "LG",
|
||||
'amoi' => "Amoi",
|
||||
'xda' => "XDA",
|
||||
'mda' => "MDA",
|
||||
'vario' => "Vario",
|
||||
'htc' => "HTC",
|
||||
'samsung' => "Samsung",
|
||||
'sharp' => "Sharp",
|
||||
'sie-' => "Siemens",
|
||||
'alcatel' => "Alcatel",
|
||||
'benq' => "BenQ",
|
||||
'ipaq' => "HP iPaq",
|
||||
'mot-' => "Motorola",
|
||||
'playstation portable' => "PlayStation Portable",
|
||||
'hiptop' => "Danger Hiptop",
|
||||
'nec-' => "NEC",
|
||||
'panasonic' => "Panasonic",
|
||||
'philips' => "Philips",
|
||||
'sagem' => "Sagem",
|
||||
'sanyo' => "Sanyo",
|
||||
'spv' => "SPV",
|
||||
'zte' => "ZTE",
|
||||
'sendo' => "Sendo",
|
||||
|
||||
// Operating Systems
|
||||
'symbian' => "Symbian",
|
||||
'SymbianOS' => "SymbianOS",
|
||||
'elaine' => "Palm",
|
||||
'palm' => "Palm",
|
||||
'series60' => "Symbian S60",
|
||||
'windows ce' => "Windows CE",
|
||||
|
||||
// Browsers
|
||||
'obigo' => "Obigo",
|
||||
'netfront' => "Netfront Browser",
|
||||
'openwave' => "Openwave Browser",
|
||||
'mobilexplorer' => "Mobile Explorer",
|
||||
'operamini' => "Opera Mini",
|
||||
'opera mini' => "Opera Mini",
|
||||
|
||||
// Other
|
||||
'digital paths' => "Digital Paths",
|
||||
'avantgo' => "AvantGo",
|
||||
'xiino' => "Xiino",
|
||||
'novarra' => "Novarra Transcoder",
|
||||
'vodafone' => "Vodafone",
|
||||
'docomo' => "NTT DoCoMo",
|
||||
'o2' => "O2",
|
||||
|
||||
// Fallback
|
||||
'mobile' => "Generic Mobile",
|
||||
'wireless' => "Generic Mobile",
|
||||
'j2me' => "Generic Mobile",
|
||||
'midp' => "Generic Mobile",
|
||||
'cldc' => "Generic Mobile",
|
||||
'up.link' => "Generic Mobile",
|
||||
'up.browser' => "Generic Mobile",
|
||||
'smartphone' => "Generic Mobile",
|
||||
'cellphone' => "Generic Mobile"
|
||||
);
|
||||
|
||||
// There are hundreds of bots but these are the most common.
|
||||
$robots = array(
|
||||
'googlebot' => 'Googlebot',
|
||||
'msnbot' => 'MSNBot',
|
||||
'slurp' => 'Inktomi Slurp',
|
||||
'yahoo' => 'Yahoo',
|
||||
'askjeeves' => 'AskJeeves',
|
||||
'fastcrawler' => 'FastCrawler',
|
||||
'infoseek' => 'InfoSeek Robot 1.0',
|
||||
'lycos' => 'Lycos'
|
||||
);
|
||||
|
||||
/* End of file user_agents.php */
|
||||
/* Location: ./application/config/user_agents.php */
|
||||
27
application/controllers/ajax/dictionary.php
Normal file
27
application/controllers/ajax/dictionary.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
class Dictionary extends CI_Controller {
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
$this->load->model('dictionary_model');
|
||||
}
|
||||
public function en_search_all() {
|
||||
$word = trim($_POST['word']);
|
||||
$data['result'] = $this->dictionary_model->en_search_all($word);
|
||||
if(count($data['result']) > 0) {
|
||||
$this->load->view('dictionary/result', $data);
|
||||
} else {
|
||||
echo 'No results were found!!!';
|
||||
}
|
||||
}
|
||||
public function search() {
|
||||
$language_abbr = $_POST['language'];
|
||||
$word = trim($_POST['word']);
|
||||
$data['result'] = $this->dictionary_model->search($language_abbr, $word);
|
||||
if(count($data['result']) > 0) {
|
||||
$this->load->view('dictionary/result', $data);
|
||||
} else {
|
||||
echo 'No results were found!!!';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
71
application/controllers/ajax/ms.php
Normal file
71
application/controllers/ajax/ms.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
class Ms extends CI_Controller {
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
$this->load->helper('form');
|
||||
$this->load->library('form_validation');
|
||||
$this->form_validation->set_error_delimiters('<span class="error">', '</span>');
|
||||
}
|
||||
public function login() {
|
||||
$this->form_validation->set_rules('username', 'lang:username', 'trim|required|alpha_numeric|max_length[32]');
|
||||
$this->form_validation->set_rules('password', 'lang:password', 'trim|required');
|
||||
if($this->form_validation->run() == TRUE) {
|
||||
$username = $_POST['username'];
|
||||
$password = $_POST['password'];
|
||||
if($this->ms->login($username, $password)) {
|
||||
$this->load->view('ms/block-login-success');
|
||||
} else {
|
||||
$data['login_error'] = true;
|
||||
$this->load->view('ms/block-login-frm', $data);
|
||||
}
|
||||
} else {
|
||||
$this->load->view('ms/block-login-frm');
|
||||
}
|
||||
}
|
||||
public function update_user() {
|
||||
$this->form_validation->set_rules('username', 'Username', 'trim|required');
|
||||
$this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email');
|
||||
$this->form_validation->set_rules('first_name', 'First Name', 'trim|required');
|
||||
$this->form_validation->set_rules('last_name', 'Last Name', 'trim|required');
|
||||
//$this->form_validation->set_rules('mobile', 'Mobile Number', 'trim|required');
|
||||
$this->form_validation->set_rules('social_security', 'Social Security', 'trim|required|numeric|exact_length[12]');
|
||||
if($this->form_validation->run() == true) {
|
||||
$user_id = $this->session->userdata('user_id');
|
||||
$username = $_POST['username'];
|
||||
$first_name = $_POST['first_name'];
|
||||
$last_name = $_POST['last_name'];
|
||||
$email = $_POST['email'];
|
||||
$mobile = $_POST['mobile'];
|
||||
$social_security = $_POST['social_security'];
|
||||
$result = $this->ms->update_user($user_id, $username, $first_name, $last_name, $email, $mobile, $social_security);
|
||||
if($result > 0) {
|
||||
$this->load->view('block-success');
|
||||
} else {
|
||||
$data['db_error'] = true;
|
||||
$this->load->view('ms/block-frm-details', $data);
|
||||
}
|
||||
} else {
|
||||
$this->load->view('ms/block-frm-details');
|
||||
}
|
||||
}
|
||||
public function update_user_password() {
|
||||
$this->form_validation->set_rules('old_password', 'Old Password', 'trim|required');
|
||||
$this->form_validation->set_rules('new_password', 'New Password', 'trim|required|min_length[10]');
|
||||
$this->form_validation->set_rules('new_password_conf', 'Password Confirmation', 'trim|required|matches[new_password]');
|
||||
if($this->form_validation->run() == true) {
|
||||
$user_id = $this->session->userdata('user_id');
|
||||
$old_password = $this->ms->generate_password_hash($_POST['old_password']);
|
||||
$new_password = $this->ms->generate_password_hash($_POST['new_password']);
|
||||
$result = $this->ms->update_user_password($user_id, $old_password, $new_password);
|
||||
if($result > 0) {
|
||||
$this->load->view('block-success');
|
||||
} else {
|
||||
$data['login_error'] = true;
|
||||
$this->load->view('ms/block-frm-password', $data);
|
||||
}
|
||||
} else {
|
||||
$this->load->view('ms/block-frm-password');
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
10
application/controllers/index.html
Normal file
10
application/controllers/index.html
Normal file
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
20
application/controllers/ms.php
Normal file
20
application/controllers/ms.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
class Ms extends CI_Controller {
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
$this->load->helper('form');
|
||||
$this->load->library('form_validation');
|
||||
}
|
||||
public function login() {
|
||||
if($this->ms->is_authenticated()) {
|
||||
redirect('', 'refresh');
|
||||
}
|
||||
$data['content'] = $this->load->view('ms/block-login-frm', '', true);
|
||||
$this->load->view('masters/login', $data);
|
||||
}
|
||||
public function logout() {
|
||||
$this->ms->logout();
|
||||
redirect('login', 'refresh');
|
||||
}
|
||||
}
|
||||
?>
|
||||
48
application/controllers/pages.php
Normal file
48
application/controllers/pages.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
class Pages extends CI_Controller {
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
//if(!$this->ms->is_authenticated()) {
|
||||
// redirect('login', 'refresh');
|
||||
//}
|
||||
$this->load->helper('form');
|
||||
}
|
||||
public function index(){
|
||||
self::view();
|
||||
}
|
||||
public function view($page = 'start'){
|
||||
$data = array();
|
||||
if($page == 'start') {
|
||||
$data['languages'] = $this->dictionary_model->lang_get_active();
|
||||
}
|
||||
$data['content'] = $this->load->view('pages/' . $page, $data, true);
|
||||
$this->load->view('masters/default', $data);
|
||||
}
|
||||
public function learn($page) {
|
||||
$data['content'] = $this->load->view('pages/learn/' . $page, null, true);
|
||||
preg_match('/^[^-]+/', $page, $matches);
|
||||
$data['current'] = $matches[0];
|
||||
|
||||
$data['content'] = $this->load->view('templates/learn', $data, true);
|
||||
$data['current'] = 'learn';
|
||||
$this->load->view('masters/default', $data);
|
||||
}
|
||||
public function projects($page) {
|
||||
$data['content'] = $this->load->view('pages/projects/' . $page, null, true);
|
||||
preg_match('/^[^-]+/', $page, $matches);
|
||||
$data['current'] = $matches[0];
|
||||
|
||||
$data['content'] = $this->load->view('templates/projects', $data, true);
|
||||
$data['current'] = 'projects';
|
||||
$this->load->view('masters/default', $data);
|
||||
}
|
||||
public function resources($page) {
|
||||
$data['learning'] = $this->load->view('pages/resources/learning', null, true);
|
||||
$data['inspiration'] = $this->load->view('pages/resources/inspiration', null, true);
|
||||
|
||||
$data['content'] = $this->load->view('templates/resources', $data, true);
|
||||
$data['current'] = 'resources';
|
||||
$this->load->view('masters/default', $data);
|
||||
}
|
||||
}
|
||||
?>
|
||||
30
application/controllers/user.php
Normal file
30
application/controllers/user.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
class User extends CI_Controller {
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
if(!$this->ms->is_authenticated()) {
|
||||
redirect('login', 'refresh');
|
||||
}
|
||||
$this->load->helper('form');
|
||||
$this->load->library('form_validation');
|
||||
}
|
||||
public function profile() {
|
||||
$data['user'] = $this->ms->get_user_by_id($this->session->userdata('user_id'));
|
||||
$data['password_form'] = $this->load->view('ms/block-frm-password', '', true);
|
||||
$data['details_form'] = $this->load->view('ms/block-frm-details', $data, true);
|
||||
$data['content'] = $this->load->view('ms/page-user_profile', $data, true);
|
||||
$data['current'] = null;
|
||||
$this->load->view('masters/default', $data);
|
||||
}
|
||||
public function password() {
|
||||
$hash = '7b49817170bc2f7a6c9e75f301615acb2a8ce671';
|
||||
$array = $this->ms->update_user_password(1, 'new', $hash);
|
||||
//print_r($array);
|
||||
echo reset($array);
|
||||
}
|
||||
public function logout() {
|
||||
$this->ms->logout();
|
||||
redirect('login', 'refresh');
|
||||
}
|
||||
}
|
||||
?>
|
||||
39
application/controllers/util.php
Normal file
39
application/controllers/util.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
class Util extends CI_Controller {
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
}
|
||||
public function run() {
|
||||
for($i = 65; $i <= 67; $i++) {
|
||||
echo '<br />' . $i . '<br />';
|
||||
$sql = 'SELECT * FROM en_definitions LIMIT ?,10000';
|
||||
$params = array($i * 10000);
|
||||
$query = $this->db->query($sql, $params);
|
||||
$result = $query->result_array();
|
||||
foreach($result as $r) {
|
||||
$id = $r['id'];
|
||||
$def = $r['definition'];
|
||||
preg_match_all('/\[\[.+?\]\]/', $def, $matches);
|
||||
foreach($matches[0] as $m) {
|
||||
$sql = 'SELECT * FROM en_words WHERE name=?';
|
||||
$params = array(trim($m, '[]'));
|
||||
$query = $this->db->query($sql, $params);
|
||||
$result = $query->row_array();
|
||||
if(isset($result['id'])) {
|
||||
$sql = 'INSERT IGNORE INTO en_synonyms (definition_id, word_id) VALUES(?,?)';
|
||||
$params = array($id, $result['id']);
|
||||
try {
|
||||
$query = $this->db->query($sql, $params);
|
||||
echo $this->db->affected_rows() > 0 ? ' Worked ' : ' Did not work ';
|
||||
} catch(Exception $e) {
|
||||
echo '<br /> ERROR. Defintion: ' . $id . ' Word: ' . $result['id'] . '<br />';
|
||||
}
|
||||
}
|
||||
}
|
||||
echo ' ROW ';
|
||||
}
|
||||
}
|
||||
echo '<br /><br />END!!!! YAY!!!';
|
||||
}
|
||||
}
|
||||
?>
|
||||
27
application/controllers/welcome.php
Normal file
27
application/controllers/welcome.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Welcome extends CI_Controller {
|
||||
|
||||
/**
|
||||
* Index Page for this controller.
|
||||
*
|
||||
* Maps to the following URL
|
||||
* http://example.com/index.php/welcome
|
||||
* - or -
|
||||
* http://example.com/index.php/welcome/index
|
||||
* - or -
|
||||
* Since this controller is set as the default controller in
|
||||
* config/routes.php, it's displayed at http://example.com/
|
||||
*
|
||||
* So any other public methods not prefixed with an underscore will
|
||||
* map to /index.php/welcome/<method_name>
|
||||
* @see http://codeigniter.com/user_guide/general/urls.html
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('welcome_message');
|
||||
}
|
||||
}
|
||||
|
||||
/* End of file welcome.php */
|
||||
/* Location: ./application/controllers/welcome.php */
|
||||
10
application/core/index.html
Normal file
10
application/core/index.html
Normal file
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
62
application/errors/error_404.php
Normal file
62
application/errors/error_404.php
Normal file
@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>404 Page Not Found</title>
|
||||
<style type="text/css">
|
||||
|
||||
::selection{ background-color: #E13300; color: white; }
|
||||
::moz-selection{ background-color: #E13300; color: white; }
|
||||
::webkit-selection{ background-color: #E13300; color: white; }
|
||||
|
||||
body {
|
||||
background-color: #fff;
|
||||
margin: 40px;
|
||||
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
||||
color: #4F5155;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #003399;
|
||||
background-color: transparent;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #444;
|
||||
background-color: transparent;
|
||||
border-bottom: 1px solid #D0D0D0;
|
||||
font-size: 19px;
|
||||
font-weight: normal;
|
||||
margin: 0 0 14px 0;
|
||||
padding: 14px 15px 10px 15px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||
font-size: 12px;
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #D0D0D0;
|
||||
color: #002166;
|
||||
display: block;
|
||||
margin: 14px 0 14px 0;
|
||||
padding: 12px 10px 12px 10px;
|
||||
}
|
||||
|
||||
#container {
|
||||
margin: 10px;
|
||||
border: 1px solid #D0D0D0;
|
||||
-webkit-box-shadow: 0 0 8px #D0D0D0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 12px 15px 12px 15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<h1><?php echo $heading; ?></h1>
|
||||
<?php echo $message; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
62
application/errors/error_db.php
Normal file
62
application/errors/error_db.php
Normal file
@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Database Error</title>
|
||||
<style type="text/css">
|
||||
|
||||
::selection{ background-color: #E13300; color: white; }
|
||||
::moz-selection{ background-color: #E13300; color: white; }
|
||||
::webkit-selection{ background-color: #E13300; color: white; }
|
||||
|
||||
body {
|
||||
background-color: #fff;
|
||||
margin: 40px;
|
||||
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
||||
color: #4F5155;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #003399;
|
||||
background-color: transparent;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #444;
|
||||
background-color: transparent;
|
||||
border-bottom: 1px solid #D0D0D0;
|
||||
font-size: 19px;
|
||||
font-weight: normal;
|
||||
margin: 0 0 14px 0;
|
||||
padding: 14px 15px 10px 15px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||
font-size: 12px;
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #D0D0D0;
|
||||
color: #002166;
|
||||
display: block;
|
||||
margin: 14px 0 14px 0;
|
||||
padding: 12px 10px 12px 10px;
|
||||
}
|
||||
|
||||
#container {
|
||||
margin: 10px;
|
||||
border: 1px solid #D0D0D0;
|
||||
-webkit-box-shadow: 0 0 8px #D0D0D0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 12px 15px 12px 15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<h1><?php echo $heading; ?></h1>
|
||||
<?php echo $message; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
62
application/errors/error_general.php
Normal file
62
application/errors/error_general.php
Normal file
@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Error</title>
|
||||
<style type="text/css">
|
||||
|
||||
::selection{ background-color: #E13300; color: white; }
|
||||
::moz-selection{ background-color: #E13300; color: white; }
|
||||
::webkit-selection{ background-color: #E13300; color: white; }
|
||||
|
||||
body {
|
||||
background-color: #fff;
|
||||
margin: 40px;
|
||||
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
||||
color: #4F5155;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #003399;
|
||||
background-color: transparent;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #444;
|
||||
background-color: transparent;
|
||||
border-bottom: 1px solid #D0D0D0;
|
||||
font-size: 19px;
|
||||
font-weight: normal;
|
||||
margin: 0 0 14px 0;
|
||||
padding: 14px 15px 10px 15px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||
font-size: 12px;
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #D0D0D0;
|
||||
color: #002166;
|
||||
display: block;
|
||||
margin: 14px 0 14px 0;
|
||||
padding: 12px 10px 12px 10px;
|
||||
}
|
||||
|
||||
#container {
|
||||
margin: 10px;
|
||||
border: 1px solid #D0D0D0;
|
||||
-webkit-box-shadow: 0 0 8px #D0D0D0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 12px 15px 12px 15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<h1><?php echo $heading; ?></h1>
|
||||
<?php echo $message; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
10
application/errors/error_php.php
Normal file
10
application/errors/error_php.php
Normal file
@ -0,0 +1,10 @@
|
||||
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
|
||||
|
||||
<h4>A PHP Error was encountered</h4>
|
||||
|
||||
<p>Severity: <?php echo $severity; ?></p>
|
||||
<p>Message: <?php echo $message; ?></p>
|
||||
<p>Filename: <?php echo $filepath; ?></p>
|
||||
<p>Line Number: <?php echo $line; ?></p>
|
||||
|
||||
</div>
|
||||
10
application/errors/index.html
Normal file
10
application/errors/index.html
Normal file
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
10
application/helpers/index.html
Normal file
10
application/helpers/index.html
Normal file
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
10
application/hooks/index.html
Normal file
10
application/hooks/index.html
Normal file
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
10
application/index.html
Normal file
10
application/index.html
Normal file
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
10
application/language/english/index.html
Normal file
10
application/language/english/index.html
Normal file
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
180
application/libraries/Ms.php
Normal file
180
application/libraries/Ms.php
Normal file
@ -0,0 +1,180 @@
|
||||
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/**
|
||||
* CodeIgniter
|
||||
*
|
||||
* An open source application development framework for PHP 4.3.2 or newer
|
||||
*
|
||||
* @package CodeIgniter
|
||||
* @author ExpressionEngine Dev Team
|
||||
* @copyright Copyright (c) 2006, EllisLab, Inc.
|
||||
* @license http://codeigniter.com/user_guide/license.html
|
||||
* @link http://codeigniter.com
|
||||
* @since Version 1.0
|
||||
* @current Version 2.1.3
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* CodeIgniter MS Class
|
||||
*
|
||||
* This class implements membership & role based user authentication
|
||||
*
|
||||
* @package CodeIgniter
|
||||
* @author Linus Miller
|
||||
* @subpackage Libraries
|
||||
* @category Libraries
|
||||
* @link None
|
||||
* @copyright Copyright (c) 2013, Linus Miller.
|
||||
* @version 0.0.1
|
||||
*
|
||||
*/
|
||||
class CI_MS {
|
||||
var $CI;
|
||||
var $config;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
|
||||
function CI_MS()
|
||||
{
|
||||
// Copy an instance of CI so we can use the entire framework.
|
||||
$this->CI =& get_instance();
|
||||
|
||||
// Load the template config file and setup our master template and regions
|
||||
include(APPPATH.'config/ms'.EXT);
|
||||
if (isset($ms))
|
||||
{
|
||||
$this->config = $ms;
|
||||
}
|
||||
}
|
||||
public function is_authenticated() {
|
||||
return $this->CI->session->userdata('is_authenticated') == true;
|
||||
}
|
||||
public function is_in_role($role_id) {
|
||||
return in_array($role_id, $this->CI->session->userdata('roles'));
|
||||
}
|
||||
public function get_user_login_information($username) {
|
||||
$sql = 'CALL ms_get_user_login_information(?)';
|
||||
$params = array($username);
|
||||
$query = $this->CI->db->query($sql, $params);
|
||||
return $query->row_array();
|
||||
}
|
||||
public function get_user_by_id($username) {
|
||||
$sql = 'CALL ms_get_user_by_id(?)';
|
||||
$params = array($username);
|
||||
$query = $this->CI->db->query($sql, $params);
|
||||
return $query->row_array();
|
||||
}
|
||||
public function get_user_by_username($username) {
|
||||
$sql = 'CALL ms_get_user_by_username(?)';
|
||||
$params = array($username);
|
||||
$query = $this->CI->db->query($sql, $params);
|
||||
return $query->row_array();
|
||||
}
|
||||
public function get_roles_by_user_id($user_id) {
|
||||
$sql = 'CALL ms_get_roles_by_user_id(?)';
|
||||
$params = array($user_id);
|
||||
$query = $this->CI->db->query($sql, $params);
|
||||
$result = $query->result_array();
|
||||
$array = array();
|
||||
foreach($result as $r) {
|
||||
array_push($array, $r['id']);
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
public function get_all_users() {
|
||||
$sql = 'CALL ms_get_all_users()';
|
||||
$query = $this->CI->db->query($sql);
|
||||
return $query->result_array();
|
||||
}
|
||||
public function update_user($user_id, $username, $first_name, $last_name, $email, $mobile, $social_security) {
|
||||
$first_name = $first_name == "" ? null : $first_name;
|
||||
$last_name = $last_name == "" ? null : $last_name;
|
||||
$mobile = $mobile == "" ? null : $mobile;
|
||||
$social_security = $social_security == "" ? null : $social_security;
|
||||
$sql = 'CALL ms_update_user(?,?,?,?,?,?,?)';
|
||||
$params = array($user_id, $username, $email, $first_name, $last_name, $mobile, $social_security);
|
||||
$query = $this->CI->db->query($sql, $params);
|
||||
return $this->CI->db->affected_rows();
|
||||
}
|
||||
public function update_user_password($user_id, $old_password, $new_password) {
|
||||
$sql = 'CALL ms_update_user_password(?,?,?)';
|
||||
$params = array($user_id, $old_password, $new_password);
|
||||
$query = $this->CI->db->query($sql, $params);
|
||||
return reset($query->row_array());
|
||||
}
|
||||
public function login($username, $password) {
|
||||
if($this->CI->ms->is_authenticated()) {
|
||||
return true;
|
||||
}
|
||||
$user = self::authenticate_user($username,self::generate_password_hash($password));
|
||||
if($user != null) {
|
||||
$user_data = array(
|
||||
'is_authenticated' => true,
|
||||
'user_id' => $user['id'],
|
||||
'username' => $username,
|
||||
'roles' => self::get_roles_by_user_id($user['id'])
|
||||
);
|
||||
$this->CI->session->set_userdata($user_data);
|
||||
$sql = 'CALL ms_update_user_last_login (?)';
|
||||
$params = array($user['id']);
|
||||
$query = $this->CI->db->query($sql, $params);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public function authenticate_user($username, $password) {
|
||||
$user = self::get_user_login_information($username);
|
||||
if(count($user) > 0) {
|
||||
if($user['pass'] == $password) {
|
||||
return $user;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public function logout() {
|
||||
$user_data = array(
|
||||
'is_authenticated' => '',
|
||||
'user_id' => '',
|
||||
'username' => '',
|
||||
'roles' => ''
|
||||
);
|
||||
$this->CI->session->unset_userdata($user_data);
|
||||
return true;
|
||||
}
|
||||
public function generate_password_hash($password){
|
||||
$this->CI->load->helper('security');
|
||||
return do_hash($this->CI->config->item('salt') . $password);
|
||||
}
|
||||
public function block_login() {
|
||||
$this->CI->load->library('form_validation');
|
||||
$this->CI->form_validation->set_error_delimiters('<span class="error">', '</span>');
|
||||
$this->CI->form_validation->set_rules('username', 'lang:username', 'trim|required|alpha_numeric|max_length[32]');
|
||||
$this->CI->form_validation->set_rules('password', 'lang:password', 'trim|required');
|
||||
if($this->CI->form_validation->run() == TRUE) {
|
||||
$username = $_POST['username'];
|
||||
$password = $_POST['password'];
|
||||
if($this->CI->ms->login($username, $password)) {
|
||||
return $this->CI->load->view('ms/block-login-success', '', true);
|
||||
} else {
|
||||
return $this->CI->load->view('ms/block-login-frm', '', true);
|
||||
}
|
||||
} else {
|
||||
return $this->CI->load->view('ms/block-login-frm', '', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
// END MS Class
|
||||
|
||||
/* End of file Ms.php */
|
||||
/* Location: ./system/application/libraries/MS.php */
|
||||
?>
|
||||
687
application/libraries/Template.php
Normal file
687
application/libraries/Template.php
Normal file
@ -0,0 +1,687 @@
|
||||
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
/**
|
||||
* CodeIgniter
|
||||
*
|
||||
* An open source application development framework for PHP 4.3.2 or newer
|
||||
*
|
||||
* @package CodeIgniter
|
||||
* @author ExpressionEngine Dev Team
|
||||
* @copyright Copyright (c) 2006, EllisLab, Inc.
|
||||
* @license http://codeigniter.com/user_guide/license.html
|
||||
* @link http://codeigniter.com
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* CodeIgniter Template Class
|
||||
*
|
||||
* This class is and interface to CI's View class. It aims to improve the
|
||||
* interaction between controllers and views. Follow @link for more info
|
||||
*
|
||||
* @package CodeIgniter
|
||||
* @author Colin Williams
|
||||
* @subpackage Libraries
|
||||
* @category Libraries
|
||||
* @link http://www.williamsconcepts.com/ci/libraries/template/index.html
|
||||
* @copyright Copyright (c) 2008, Colin Williams.
|
||||
* @version 1.4.1
|
||||
*
|
||||
*/
|
||||
class CI_Template {
|
||||
|
||||
var $CI;
|
||||
var $config;
|
||||
var $template;
|
||||
var $master;
|
||||
var $has_logic;
|
||||
var $regions = array(
|
||||
'_js' => array(),
|
||||
'_css' => array(),
|
||||
);
|
||||
var $output;
|
||||
var $js = array();
|
||||
var $css = array();
|
||||
var $parser = 'parser';
|
||||
var $parser_method = 'parse';
|
||||
var $parse_template = FALSE;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* Loads template configuration, template regions, and validates existence of
|
||||
* default template
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
|
||||
function CI_Template()
|
||||
{
|
||||
// Copy an instance of CI so we can use the entire framework.
|
||||
$this->CI =& get_instance();
|
||||
|
||||
// Load the template config file and setup our master template and regions
|
||||
include(APPPATH.'config/template'.EXT);
|
||||
if (isset($template))
|
||||
{
|
||||
$this->config = $template;
|
||||
$this->set_template($template['active_template']);
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Use given template settings
|
||||
*
|
||||
* @access public
|
||||
* @param string array key to access template settings
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function set_template($group)
|
||||
{
|
||||
if (isset($this->config[$group]))
|
||||
{
|
||||
$this->template = $this->config[$group];
|
||||
$this->js = array();
|
||||
$this->css = array();
|
||||
}
|
||||
else
|
||||
{
|
||||
show_error('The "'. $group .'" template group does not exist. Provide a valid group name or add the group first.');
|
||||
}
|
||||
$this->initialize($this->template);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Set master template
|
||||
*
|
||||
* @access public
|
||||
* @param string filename of new master template file
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function set_master_template($filename)
|
||||
{
|
||||
if (file_exists(APPPATH .'views/'. $filename) or file_exists(APPPATH .'views/'. $filename . EXT))
|
||||
{
|
||||
$this->master = $filename;
|
||||
}
|
||||
else
|
||||
{
|
||||
show_error('The filename provided does not exist in <strong>'. APPPATH .'views</strong>. Remember to include the extension if other than ".php"');
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Dynamically add a template and optionally switch to it
|
||||
*
|
||||
* @access public
|
||||
* @param string array key to access template settings
|
||||
* @param array properly formed
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function add_template($group, $template, $activate = FALSE)
|
||||
{
|
||||
if ( ! isset($this->config[$group]))
|
||||
{
|
||||
$this->config[$group] = $template;
|
||||
if ($activate === TRUE)
|
||||
{
|
||||
$this->initialize($template);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
show_error('The "'. $group .'" template group already exists. Use a different group name.');
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Initialize class settings using config settings
|
||||
*
|
||||
* @access public
|
||||
* @param array configuration array
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function initialize($props)
|
||||
{
|
||||
// Set master template
|
||||
if (isset($props['template'])
|
||||
&& (file_exists(APPPATH .'views/'. $props['template']) or file_exists(APPPATH .'views/'. $props['template'] . EXT)))
|
||||
{
|
||||
$this->master = $props['template'];
|
||||
}
|
||||
else
|
||||
{
|
||||
// Master template must exist. Throw error.
|
||||
show_error('Either you have not provided a master template or the one provided does not exist in <strong>'. APPPATH .'views</strong>. Remember to include the extension if other than ".php"');
|
||||
}
|
||||
|
||||
// Load our regions
|
||||
if (isset($props['regions']))
|
||||
{
|
||||
$this->set_regions($props['regions']);
|
||||
}
|
||||
// LM: Load any styles
|
||||
if (isset($props['css'])) {
|
||||
foreach($props['css'] as $s) {
|
||||
self::add_css($s, 'link', FALSE);
|
||||
}
|
||||
}
|
||||
// LM: Load any scripts
|
||||
if (isset($props['js'])) {
|
||||
foreach($props['js'] as $s) {
|
||||
self::add_js($s, 'import', FALSE);
|
||||
}
|
||||
}
|
||||
// Set parser and parser method
|
||||
if (isset($props['parser']))
|
||||
{
|
||||
$this->set_parser($props['parser']);
|
||||
}
|
||||
if (isset($props['parser_method']))
|
||||
{
|
||||
$this->set_parser_method($props['parser_method']);
|
||||
}
|
||||
|
||||
// Set master template parser instructions
|
||||
$this->parse_template = isset($props['parse_template']) ? $props['parse_template'] : FALSE;
|
||||
|
||||
// LM: Set template controller
|
||||
$this->has_logic = isset($props['has_logic']) ? $props['has_logic'] : FALSE;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Set regions for writing to
|
||||
*
|
||||
* @access public
|
||||
* @param array properly formed regions array
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function set_regions($regions)
|
||||
{
|
||||
if (count($regions))
|
||||
{
|
||||
$this->regions = array(
|
||||
'_js' => array(),
|
||||
'_css' => array(),
|
||||
);
|
||||
foreach ($regions as $key => $region)
|
||||
{
|
||||
// Regions must be arrays, but we take the burden off the template
|
||||
// developer and insure it here
|
||||
if ( ! is_array($region))
|
||||
{
|
||||
$this->add_region($region);
|
||||
}
|
||||
else {
|
||||
$this->add_region($key, $region);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Dynamically add region to the currently set template
|
||||
*
|
||||
* @access public
|
||||
* @param string Name to identify the region
|
||||
* @param array Optional array with region defaults
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function add_region($name, $props = array())
|
||||
{
|
||||
if ( ! is_array($props))
|
||||
{
|
||||
$props = array();
|
||||
}
|
||||
|
||||
if ( ! isset($this->regions[$name]))
|
||||
{
|
||||
$this->regions[$name] = $props;
|
||||
}
|
||||
else
|
||||
{
|
||||
show_error('The "'. $name .'" region has already been defined.');
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Empty a region's content
|
||||
*
|
||||
* @access public
|
||||
* @param string Name to identify the region
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function empty_region($name)
|
||||
{
|
||||
if (isset($this->regions[$name]['content']))
|
||||
{
|
||||
$this->regions[$name]['content'] = array();
|
||||
}
|
||||
else
|
||||
{
|
||||
show_error('The "'. $name .'" region is undefined.');
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Set parser
|
||||
*
|
||||
* @access public
|
||||
* @param string name of parser class to load and use for parsing methods
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function set_parser($parser, $method = NULL)
|
||||
{
|
||||
$this->parser = $parser;
|
||||
$this->CI->load->library($parser);
|
||||
|
||||
if ($method)
|
||||
{
|
||||
$this->set_parser_method($method);
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Set parser method
|
||||
*
|
||||
* @access public
|
||||
* @param string name of parser class member function to call when parsing
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function set_parser_method($method)
|
||||
{
|
||||
$this->parser_method = $method;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Write contents to a region
|
||||
*
|
||||
* @access public
|
||||
* @param string region to write to
|
||||
* @param string what to write
|
||||
* @param boolean FALSE to append to region, TRUE to overwrite region
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function write($region, $content, $overwrite = FALSE)
|
||||
{
|
||||
if (isset($this->regions[$region]))
|
||||
{
|
||||
if ($overwrite === TRUE) // Should we append the content or overwrite it
|
||||
{
|
||||
$this->regions[$region]['content'] = array($content);
|
||||
} else {
|
||||
$this->regions[$region]['content'][] = $content;
|
||||
}
|
||||
}
|
||||
|
||||
// Regions MUST be defined
|
||||
else
|
||||
{
|
||||
show_error("Cannot write to the '{$region}' region. The region is undefined.");
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Write content from a View to a region. 'Views within views'
|
||||
*
|
||||
* @access public
|
||||
* @param string region to write to
|
||||
* @param string view file to use
|
||||
* @param array variables to pass into view
|
||||
* @param boolean FALSE to append to region, TRUE to overwrite region
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function write_view($region, $view, $data = NULL, $overwrite = FALSE)
|
||||
{
|
||||
$args = func_get_args();
|
||||
|
||||
// Get rid of non-views
|
||||
unset($args[0], $args[2], $args[3]);
|
||||
|
||||
// Do we have more view suggestions?
|
||||
if (count($args) > 1)
|
||||
{
|
||||
foreach ($args as $suggestion)
|
||||
{
|
||||
if (file_exists(APPPATH .'views/'. $suggestion . EXT) or file_exists(APPPATH .'views/'. $suggestion))
|
||||
{
|
||||
// Just change the $view arg so the rest of our method works as normal
|
||||
$view = $suggestion;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$content = $this->CI->load->view($view, $data, TRUE);
|
||||
$this->write($region, $content, $overwrite);
|
||||
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Parse content from a View to a region with the Parser Class
|
||||
*
|
||||
* @access public
|
||||
* @param string region to write to
|
||||
* @param string view file to parse
|
||||
* @param array variables to pass into view for parsing
|
||||
* @param boolean FALSE to append to region, TRUE to overwrite region
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function parse_view($region, $view, $data = NULL, $overwrite = FALSE)
|
||||
{
|
||||
$this->CI->load->library('parser');
|
||||
|
||||
$args = func_get_args();
|
||||
|
||||
// Get rid of non-views
|
||||
unset($args[0], $args[2], $args[3]);
|
||||
|
||||
// Do we have more view suggestions?
|
||||
if (count($args) > 1)
|
||||
{
|
||||
foreach ($args as $suggestion)
|
||||
{
|
||||
if (file_exists(APPPATH .'views/'. $suggestion . EXT) or file_exists(APPPATH .'views/'. $suggestion))
|
||||
{
|
||||
// Just change the $view arg so the rest of our method works as normal
|
||||
$view = $suggestion;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$content = $this->CI->{$this->parser}->{$this->parser_method}($view, $data, TRUE);
|
||||
$this->write($region, $content, $overwrite);
|
||||
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Dynamically include javascript in the template
|
||||
*
|
||||
* NOTE: This function does NOT check for existence of .js file
|
||||
*
|
||||
* @access public
|
||||
* @param string script to import or embed
|
||||
* @param string 'import' to load external file or 'embed' to add as-is
|
||||
* @param boolean TRUE to use 'defer' attribute, FALSE to exclude it
|
||||
* @return TRUE on success, FALSE otherwise
|
||||
*/
|
||||
|
||||
function add_js($script, $type = 'import', $defer = FALSE)
|
||||
{
|
||||
$success = TRUE;
|
||||
$js = NULL;
|
||||
$js_folder = $this->CI->config->item('js_folder');
|
||||
|
||||
$this->CI->load->helper('url');
|
||||
|
||||
switch ($type)
|
||||
{
|
||||
case 'import':
|
||||
$filepath = base_url($js_folder . '/' . $script . '.js');
|
||||
$js = "\t<script type=\"text/javascript\" src=\"". $filepath .'"';
|
||||
if ($defer)
|
||||
{
|
||||
$js .= ' defer="defer"';
|
||||
}
|
||||
$js .= "></script>\n";
|
||||
break;
|
||||
|
||||
case 'embed':
|
||||
$js = "\t<script type=\"text/javascript\"";
|
||||
if ($defer)
|
||||
{
|
||||
$js .= ' defer="defer"';
|
||||
}
|
||||
$js .= ">";
|
||||
$js .= $script;
|
||||
$js .= "</script>\n";
|
||||
break;
|
||||
|
||||
default:
|
||||
$success = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
// Add to js array if it doesn't already exist
|
||||
if ($js != NULL && !in_array($js, $this->js))
|
||||
{
|
||||
$this->js[] = $js;
|
||||
$this->write('_js', $js);
|
||||
}
|
||||
|
||||
return $success;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Dynamically include CSS in the template
|
||||
*
|
||||
* NOTE: This function does NOT check for existence of .css file
|
||||
*
|
||||
* @access public
|
||||
* @param string CSS file to link, import or embed
|
||||
* @param string 'link', 'import' or 'embed'
|
||||
* @param string media attribute to use with 'link' type only, FALSE for none
|
||||
* @return TRUE on success, FALSE otherwise
|
||||
*/
|
||||
|
||||
function add_css($style, $type = 'link', $media = FALSE)
|
||||
{
|
||||
$success = TRUE;
|
||||
$css = NULL;
|
||||
$css_folder = $this->CI->config->item('css_folder');
|
||||
|
||||
$this->CI->load->helper('url');
|
||||
$filepath = base_url($css_folder . '/' . $style . '.css');
|
||||
|
||||
switch ($type)
|
||||
{
|
||||
case 'link':
|
||||
|
||||
$css = "\t<link type=\"text/css\" rel=\"stylesheet\" href=\"". $filepath .'"';
|
||||
if ($media)
|
||||
{
|
||||
$css .= ' media="'. $media .'"';
|
||||
}
|
||||
$css .= " />\n";
|
||||
break;
|
||||
|
||||
case 'import':
|
||||
$css = '\t<style type=\"text/css\">@import url('. $filepath .");</style>\n";
|
||||
break;
|
||||
|
||||
case 'embed':
|
||||
$css = "\t<style type=\"text/css\">";
|
||||
$css .= $style;
|
||||
$css .= "</style>\n";
|
||||
break;
|
||||
|
||||
default:
|
||||
$success = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
// Add to css array if it doesn't already exist
|
||||
if ($css != NULL && !in_array($css, $this->css))
|
||||
{
|
||||
$this->css[] = $css;
|
||||
$this->write('_css', $css);
|
||||
}
|
||||
|
||||
return $success;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Render the master template or a single region
|
||||
*
|
||||
* @access public
|
||||
* @param string optionally opt to render a specific region
|
||||
* @param boolean FALSE to output the rendered template, TRUE to return as a string. Always TRUE when $region is supplied
|
||||
* @return void or string (result of template build)
|
||||
*/
|
||||
|
||||
function render($region = NULL, $buffer = FALSE, $parse = FALSE)
|
||||
{
|
||||
// Just render $region if supplied
|
||||
if ($region) // Display a specific regions contents
|
||||
{
|
||||
if (isset($this->regions[$region]))
|
||||
{
|
||||
$output = $this->_build_content($this->regions[$region]);
|
||||
}
|
||||
else
|
||||
{
|
||||
show_error("Cannot render the '{$region}' region. The region is undefined.");
|
||||
}
|
||||
}
|
||||
|
||||
// Build the output array
|
||||
else
|
||||
{
|
||||
if($this->has_logic) {
|
||||
include(APPPATH . 'views/templates/' . $this->config['active_template'] . '_logic' . EXT);
|
||||
}
|
||||
foreach ($this->regions as $name => $region)
|
||||
{
|
||||
$this->output[$name] = $this->_build_content($region);
|
||||
}
|
||||
|
||||
if ($this->parse_template === TRUE or $parse === TRUE)
|
||||
{
|
||||
// Use provided parser class and method to render the template
|
||||
$output = $this->CI->{$this->parser}->{$this->parser_method}($this->master, $this->output, TRUE);
|
||||
|
||||
// Parsers never handle output, but we need to mimick it in this case
|
||||
if ($buffer === FALSE)
|
||||
{
|
||||
$this->CI->output->set_output($output);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use CI's loader class to render the template with our output array
|
||||
$output = $this->CI->load->view($this->master, $this->output, $buffer);
|
||||
}
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Build a region from it's contents. Apply wrapper if provided
|
||||
*
|
||||
* @access private
|
||||
* @param string region to build
|
||||
* @param string HTML element to wrap regions in; like '<div>'
|
||||
* @param array Multidimensional array of HTML elements to apply to $wrapper
|
||||
* @return string Output of region contents
|
||||
*/
|
||||
|
||||
function _build_content($region, $wrapper = NULL, $attributes = NULL)
|
||||
{
|
||||
$output = NULL;
|
||||
|
||||
// Can't build an empty region. Exit stage left
|
||||
if ( ! isset($region['content']) or ! count($region['content']))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Possibly overwrite wrapper and attributes
|
||||
if ($wrapper)
|
||||
{
|
||||
$region['wrapper'] = $wrapper;
|
||||
}
|
||||
if ($attributes)
|
||||
{
|
||||
$region['attributes'] = $attributes;
|
||||
}
|
||||
|
||||
// Open the wrapper and add attributes
|
||||
if (isset($region['wrapper']))
|
||||
{
|
||||
// This just trims off the closing angle bracket. Like '<p>' to '<p'
|
||||
$output .= substr($region['wrapper'], 0, strlen($region['wrapper']) - 1);
|
||||
|
||||
// Add HTML attributes
|
||||
if (isset($region['attributes']) && is_array($region['attributes']))
|
||||
{
|
||||
foreach ($region['attributes'] as $name => $value)
|
||||
{
|
||||
// We don't validate HTML attributes. Imagine someone using a custom XML template..
|
||||
$output .= " $name=\"$value\"";
|
||||
}
|
||||
}
|
||||
|
||||
$output .= ">";
|
||||
}
|
||||
|
||||
// Output the content items.
|
||||
foreach ($region['content'] as $content)
|
||||
{
|
||||
$output .= $content;
|
||||
}
|
||||
|
||||
// Close the wrapper tag
|
||||
if (isset($region['wrapper']))
|
||||
{
|
||||
// This just turns the wrapper into a closing tag. Like '<p>' to '</p>'
|
||||
$output .= str_replace('<', '</', $region['wrapper']) . "\n";
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
||||
// END Template Class
|
||||
|
||||
/* End of file Template.php */
|
||||
/* Location: ./system/application/libraries/Template.php */
|
||||
10
application/libraries/index.html
Normal file
10
application/libraries/index.html
Normal file
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
10
application/logs/index.html
Normal file
10
application/logs/index.html
Normal file
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
23
application/models/dictionary_model.php
Normal file
23
application/models/dictionary_model.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
class Dictionary_Model extends CI_Model {
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
}
|
||||
public function en_search_all($word) {
|
||||
$sql = 'CALL en_search_all(?)';
|
||||
$params = array($word);
|
||||
$query = $this->db->query($sql, $params);
|
||||
return $query->result_array();
|
||||
}
|
||||
public function search($language_abbr, $word) {
|
||||
$sql = 'CALL ' . $language_abbr . '_search(?)';
|
||||
$params = array($word);
|
||||
$query = $this->db->query($sql, $params);
|
||||
return $query->result_array();
|
||||
}
|
||||
public function lang_get_active() {
|
||||
$sql = 'CALL lang_get_active()';
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result_array();
|
||||
}
|
||||
}
|
||||
10
application/models/index.html
Normal file
10
application/models/index.html
Normal file
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
10
application/third_party/index.html
vendored
Normal file
10
application/third_party/index.html
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
8
application/views/block-success.php
Normal file
8
application/views/block-success.php
Normal file
@ -0,0 +1,8 @@
|
||||
<div class="r">
|
||||
<div class="c -m12">
|
||||
<div class="success">
|
||||
<h4>Mission Complete!!</h4>
|
||||
<p>All duties were performed without problem. We are proud.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
11
application/views/dictionary/result.php
Normal file
11
application/views/dictionary/result.php
Normal file
@ -0,0 +1,11 @@
|
||||
<table>
|
||||
<?php foreach($result as $r): ?>
|
||||
<tr>
|
||||
<td><?= $r['w_id'] ?></td>
|
||||
<td><?= $r['name'] ?></td>
|
||||
<td><?= $r['d_id'] ?></td>
|
||||
<td><?= $r['type'] ?></td>
|
||||
<td><?= $r['definition'] ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
10
application/views/index.html
Normal file
10
application/views/index.html
Normal file
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
53
application/views/masters/default.php
Normal file
53
application/views/masters/default.php
Normal file
@ -0,0 +1,53 @@
|
||||
<!doctype html>
|
||||
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
|
||||
<!--[if lt IE 8]><html class="ie-legacy"><![endif]-->
|
||||
<!--[if IE 8]><html class="ie-8"><![endif]-->
|
||||
<!--[if gt IE 8]><!--><html><!--<![endif]-->
|
||||
<head>
|
||||
<title><?= $this->config->item('site_name') ?></title>
|
||||
|
||||
<!-- META -->
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
<base href="<?= $this->config->item('base_url') ?>" />
|
||||
|
||||
<!-- CSS -->
|
||||
<?= link_tag('css/main.css') ?>
|
||||
|
||||
<!-- JS -->
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<script src="<?= base_url('js/init.js') ?>"></script>
|
||||
<script data-main="<?= base_url('js/main') ?>" src="<?= base_url('js/libs/require.js') ?>"></script>
|
||||
|
||||
<!-- IE Fixes -->
|
||||
<!--[if lt IE 8]>
|
||||
<link rel="stylesheet" href="<?= base_url('css/ie-legacy.css') ?>">
|
||||
<![endif]-->
|
||||
<!--[if IE 8]>
|
||||
<link rel="stylesheet" href="<?= base_url('css/ie-8.css') ?>">
|
||||
<![endif]-->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<script src="<?= base_url('js/libs/respond.min.js') ?>"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header class="r">
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
<?= $content ?>
|
||||
<footer class="r">
|
||||
<div class="c -m12">
|
||||
<div class="p">
|
||||
<span class="-fl">Copyright Whitemill AB 2013</span>
|
||||
<span class="-fr">Site credits | Terms of Use</span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
42
application/views/masters/login.php
Normal file
42
application/views/masters/login.php
Normal file
@ -0,0 +1,42 @@
|
||||
<!doctype html>
|
||||
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
|
||||
<!--[if lt IE 8]><html class="ie-legacy"><![endif]-->
|
||||
<!--[if IE 8]><html class="ie-8"><![endif]-->
|
||||
<!--[if gt IE 8]><!--><html><!--<![endif]-->
|
||||
<head>
|
||||
<title></title>
|
||||
|
||||
<!-- META -->
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
|
||||
<!-- CSS -->
|
||||
<link type="text/css" rel="stylesheet" href="<?= base_url('css/ms.css') ?>" />
|
||||
|
||||
<!-- JS -->
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
|
||||
<!-- IE Fixes -->
|
||||
<!--[if lt IE 8]>
|
||||
<link rel="stylesheet" href="<?= base_url('css/ie-legacy.css') ?>">
|
||||
<![endif]-->
|
||||
<!--[if IE 8]>
|
||||
<link rel="stylesheet" href="<?= base_url('css/ie-8.css') ?>">
|
||||
<![endif]-->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<script src="<?= base_url('js/bower_components/respond/respond.min.js') ?>"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="w">
|
||||
<div class="company">
|
||||
<h1 class="logo"><?= $this->config->item('site_name') ?></h1>
|
||||
</div>
|
||||
<div class="frm">
|
||||
<?= $content ?>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
53
application/views/ms/block-frm-details.php
Normal file
53
application/views/ms/block-frm-details.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?= form_open('ajax/ms/update_user', array('id' => 'frm-details')) ?>
|
||||
<div class="r">
|
||||
<?php if(isset($db_error) && $db_error == true): ?>
|
||||
<div class="c -m12">
|
||||
<span class="error">
|
||||
Oh my god. Something failed with the database. And we dont know why... :(
|
||||
</span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="c -m12">
|
||||
<?= form_error('username') ?>
|
||||
<input name="username" type="text" value="<?= isset($user) ? $user['username'] : set_value('username') ?>" placeholder="Username..." />
|
||||
</div>
|
||||
<div class="c -m6">
|
||||
<?= form_error('first_name') ?>
|
||||
<input name="first_name" type="text" value="<?= isset($user) ? $user['first_name'] : set_value('first_name') ?>" placeholder="First Name..." />
|
||||
</div>
|
||||
<div class="c -m6">
|
||||
<?= form_error('last_name') ?>
|
||||
<input name="last_name" type="text" value="<?= isset($user) ? $user['last_name'] : set_value('last_name') ?>" placeholder="Last Name..." />
|
||||
</div>
|
||||
<div class="c -m12">
|
||||
<?= form_error('email') ?>
|
||||
<input name="email" type="text" value="<?= isset($user) ? $user['email'] : set_value('email') ?>" placeholder="Email..." />
|
||||
</div>
|
||||
<div class="c -m12">
|
||||
<?= form_error('mobile') ?>
|
||||
<input name="mobile" type="text" value="<?= isset($user) ? $user['mobile'] : set_value('mobile') ?>" placeholder="Mobile..." />
|
||||
</div>
|
||||
<div class="c -m12">
|
||||
<?= form_error('social_security') ?>
|
||||
<input name="social_security" type="text" value="<?= isset($user) ? $user['social_security'] : set_value('social_security') ?>" placeholder="Social Security (YYYYMMDDPPPP)..." />
|
||||
</div>
|
||||
<div class="c -m12">
|
||||
<input type="submit" class="button -s -fr" value="Update" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
// NOTE: jQuery needs to be "reinserted" into the dom, otherwise the events wont be active when the firm is reinserted
|
||||
var submitting = false;
|
||||
$('form#frm-details').submit(function(ev){
|
||||
ev.preventDefault();
|
||||
if(!submitting) {
|
||||
submitting = true;
|
||||
var frm = $(this);
|
||||
frm.addClass('disabled');
|
||||
$.post($(this).attr('action'), $(this).serialize(), function(response){
|
||||
frm.closest('div.frm').html(response);
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
42
application/views/ms/block-frm-password.php
Normal file
42
application/views/ms/block-frm-password.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?= form_open('ajax/ms/update_user_password', array('id' => 'frm-password')) ?>
|
||||
<div class="r">
|
||||
<?php if(isset($login_error) && $login_error == true): ?>
|
||||
<div class="c -m12">
|
||||
<span class="error">
|
||||
You have given the wrong password!!!
|
||||
</span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="c -m12">
|
||||
<?= form_error('old_password') ?>
|
||||
<input name="old_password" type="password" placeholder="Current Password..." />
|
||||
</div>
|
||||
<div class="c -m12">
|
||||
<?= form_error('new_password') ?>
|
||||
<input name="new_password" type="password" placeholder="New Password..." />
|
||||
</div>
|
||||
<div class="c -m12">
|
||||
<?= form_error('new_password_conf') ?>
|
||||
<input name="new_password_conf" type="password" placeholder="Repeat Password..." />
|
||||
</div>
|
||||
<div class="c -m12">
|
||||
<input type="submit" class="button -s -fr" value="Update" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
// NOTE: jQuery needs to be "reinserted" into the dom, otherwise the events wont be active when the firm is reinserted
|
||||
var submitting = false;
|
||||
$('form#frm-password').submit(function(ev){
|
||||
ev.preventDefault();
|
||||
if(!submitting) {
|
||||
submitting = true;
|
||||
var frm = $(this);
|
||||
frm.addClass('disabled');
|
||||
$.post($(this).attr('action'), $(this).serialize(), function(response){
|
||||
frm.closest('div.frm').html(response);
|
||||
submitting = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
48
application/views/ms/block-login-frm.php
Normal file
48
application/views/ms/block-login-frm.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?= form_open('ajax/ms/login', array('id' => 'frm-login')) ?>
|
||||
<div class="r">
|
||||
<div class="c -m12">
|
||||
<h4>Login</h4>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(isset($login_error) && $login_error == true): ?>
|
||||
<div class="r">
|
||||
<div class="c -m12">
|
||||
<span class="error">
|
||||
You have given the wrong username or password!!!
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="r">
|
||||
<div class="c -m12">
|
||||
<?= form_error('username') ?>
|
||||
<input type="text" name="username" value="<?= set_value('username') ?>" placeholder="Ditt användarnamn..." />
|
||||
</div>
|
||||
</div>
|
||||
<div class="r">
|
||||
<div class="c -m12">
|
||||
<?= form_error('password') ?>
|
||||
<input type="password" name="password" placeholder="Ditt lösenord..." />
|
||||
</div>
|
||||
</div>
|
||||
<div class="r">
|
||||
<div class="c -m12">
|
||||
<input class="-s -fr -nm" type="submit" value="skicka" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
// NOTE: jQuery needs to be "reinserted" into the dom, otherwise the events wont be active when the firm is reinserted
|
||||
var submitting = false;
|
||||
$('form#frm-login').submit(function(ev){
|
||||
ev.preventDefault();
|
||||
if(!submitting) {
|
||||
submitting = true;
|
||||
var frm = $(this);
|
||||
frm.addClass('disabled');
|
||||
$.post($(this).attr('action'), $(this).serialize(), function(response){
|
||||
frm.closest('div.frm').html(response);
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
4
application/views/ms/block-login-success.php
Normal file
4
application/views/ms/block-login-success.php
Normal file
@ -0,0 +1,4 @@
|
||||
<div class="success">
|
||||
<h2>Du är nu inloggad</h2>
|
||||
<?= anchor('', 'Till startsidan') ?>
|
||||
</div>
|
||||
35
application/views/ms/page-user_profile.php
Normal file
35
application/views/ms/page-user_profile.php
Normal file
@ -0,0 +1,35 @@
|
||||
<div class="r">
|
||||
<div class="c -m4">
|
||||
<h1>Profile</h1>
|
||||
|
||||
<div class="details">
|
||||
<h3>Change Your Details</h3>
|
||||
<div class="frm">
|
||||
<?= $details_form ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="password">
|
||||
<h3>Change Your Password</h3>
|
||||
<div class="frm">
|
||||
<?= $password_form ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="c -m4">
|
||||
<h1>Information</h1>
|
||||
|
||||
<div class="information align">
|
||||
<span class="lbl">Last Login:</span> <span class="val"><?= $user['last_login'] != null ? $user['last_login'] : 'N/A' ?></span>
|
||||
<span class="lbl">Last Activity:</span> <span class="val"><?= $user['last_activity'] != null ? $user['last_activity'] : 'N/A' ?></span>
|
||||
<span class="lbl">Date Created</span> <span class="val"><?= $user['date_created'] != null ? $user['date_created'] : 'N/A' ?></span>
|
||||
<span class="lbl end">Date Modified</span> <span class="val"><?= $user['date_modified'] != null ? $user['date_modified'] : 'N/A' ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="c -m4">
|
||||
<h1>Projects</h1>
|
||||
|
||||
<div class="projects align">
|
||||
<p>This section is not functional.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
29
application/views/pages/hasher.php
Normal file
29
application/views/pages/hasher.php
Normal file
@ -0,0 +1,29 @@
|
||||
<div class="r">
|
||||
<div class="c -m7">
|
||||
<?= form_open('hasher') ?>
|
||||
|
||||
|
||||
<div class="r">
|
||||
<div class="c -m12">
|
||||
<h3>What would you like to hash?</h3>
|
||||
</div>
|
||||
<div class="c -m12">
|
||||
<input name="string" type="text">
|
||||
</div>
|
||||
<div class="c -m12">
|
||||
<input type="submit" class="-s -fr" value="Hash!">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="c -m5">
|
||||
<h3>This is the resault:</h3>
|
||||
<pre class="text">
|
||||
<?php
|
||||
if(isset($_POST['string']))
|
||||
echo $this->ms->generate_password_hash($_POST['string']);
|
||||
else
|
||||
echo "Nothing to hash";
|
||||
?>
|
||||
</pre>
|
||||
</div>
|
||||
12
application/views/pages/peeps.php
Normal file
12
application/views/pages/peeps.php
Normal file
@ -0,0 +1,12 @@
|
||||
<div class="peeps r">
|
||||
<div class="c -m12">
|
||||
<div class="w">
|
||||
<span class="username lbl">Username</span> <span class="name lbl">Name</span> <span class="email lbl">Email</span> <span class="mobile lbl">Mobile</span>
|
||||
<?php foreach($peeps as $p): ?>
|
||||
<span class="username val"><?= $p['username'] ?></span>
|
||||
<span class="name val"><?= $p['first_name'] != null ? $p['first_name'] . ' ' . $p['last_name'] : 'N/A' ?></span>
|
||||
<span class="email val"><a href="mailto:<?= $p['email'] ?>"><?= $p['email'] ?></a></span>
|
||||
<span class="mobile val"><?= $p['mobile'] != null ? $p['mobile'] : 'N/A' ?></span>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
48
application/views/pages/start.php
Normal file
48
application/views/pages/start.php
Normal file
@ -0,0 +1,48 @@
|
||||
<div class="r">
|
||||
<div class="c -m6 -m_c">
|
||||
<div class="row">
|
||||
<div class="c -m12">
|
||||
<h1 class="logo"><span>W</span><span>o</span><span>r</span><span>d</span><span>y</span><span>G</span><span>o</span></h1>
|
||||
</div>
|
||||
</div>
|
||||
<?= form_open('ajax/dictionary/search', array('id' => 'frm-search')) ?>
|
||||
<div class="r -c">
|
||||
<div class="c -m2">
|
||||
<select name="language">
|
||||
<?php foreach($languages as $l): ?>
|
||||
<option value="<?= $l['abbreviation'] ?>"><?= $l['name'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="c -m8">
|
||||
<input type="text" name="word" placeholder="Search for..." />
|
||||
</div>
|
||||
<div class="c -m2">
|
||||
<input type="submit" class="-s postfix" value="Search" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="results r">
|
||||
<div class="c -m6 -m_c">
|
||||
<div id="result">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
// NOTE: jQuery needs to be "reinserted" into the dom, otherwise the events wont be active when the firm is reinserted
|
||||
var submitting = false;
|
||||
$('form#frm-search').submit(function(ev){
|
||||
ev.preventDefault();
|
||||
if(!submitting) {
|
||||
submitting = true;
|
||||
var frm = $(this);
|
||||
frm.addClass('disabled');
|
||||
$.post($(this).attr('action'), $(this).serialize(), function(response){
|
||||
$('#result').html(response);
|
||||
submitting = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
130
application/views/templates/learn.php
Normal file
130
application/views/templates/learn.php
Normal file
@ -0,0 +1,130 @@
|
||||
<div class="learn r">
|
||||
<div class="c -m2">
|
||||
<nav class="side">
|
||||
<ul>
|
||||
<li><a href="<?= site_url('learn') ?>" class="A<?= $current == 'start' ? ' -c' : '' ?>">Start</a></li>
|
||||
<li class="dd">
|
||||
<a href="#" class="A<?= $current == 'html' ? ' -c' : '' ?>">HTML</a>
|
||||
<ul class="Dh A">
|
||||
<li><?= anchor('learn/html/introduction', 'Introduction') ?></li>
|
||||
<li><?= anchor('learn/html/canvas_api', 'Canvas API') ?></li>
|
||||
<li><?= anchor('learn/html/websocket_api', 'Websocket API') ?></li>
|
||||
<li><?= anchor('learn/html/webworkers_api', 'WebWorkers API') ?></li>
|
||||
<li><?= anchor('learn/html/storage_api', 'Storage API') ?></li>
|
||||
<li><?= anchor('learn/html/audio_video', 'Audio & Video') ?></li>
|
||||
<li><?= anchor('learn/html/forms_api', 'Forms API') ?></li>
|
||||
<li><?= anchor('learn/html/geolocation_api', 'Geolocation API') ?></li>
|
||||
<li><?= anchor('learn/html/drag_drop', 'Drag n Drop') ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dd">
|
||||
<a href="#" class="A<?= $current == 'css' ? ' -c' : '' ?>">CSS</a>
|
||||
<ul class="Dh A">
|
||||
<li><?= anchor('learn/css/introduction', 'Introduction') ?></li>
|
||||
<li><?= anchor('learn/css/selectors', 'Selectors') ?></li>
|
||||
<li><?= anchor('learn/css/display_modes', 'Display Modes') ?></li>
|
||||
<li><?= anchor('learn/css/box_models', 'Box Models') ?></li>
|
||||
<li><?= anchor('learn/css/floating', 'Floating') ?></li>
|
||||
<li><?= anchor('learn/css/positioning', 'Positioning') ?></li>
|
||||
<li><?= anchor('learn/css/pseudo_stuff', 'Pseudo Stuff') ?></li>
|
||||
<li><?= anchor('learn/css/transitions', 'Transitions') ?></li>
|
||||
<li><?= anchor('learn/css/animation', 'Animation') ?></li>
|
||||
<li><?= anchor('learn/css/general', 'General') ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dd">
|
||||
<a href="#" class="A<?= $current == 'sass' ? ' -c' : '' ?>">SASS</a>
|
||||
<ul class="Dh A">
|
||||
<li><?= anchor('learn/sass/introduction', 'Introduction') ?></li>
|
||||
<li><?= anchor('learn/sass/variables', 'Variables') ?></li>
|
||||
<li><?= anchor('learn/sass/functions', 'Functions') ?></li>
|
||||
<li><?= anchor('learn/sass/mixins', 'Mixins') ?></li>
|
||||
<li><?= anchor('learn/sass/nesting', 'Nesting') ?></li>
|
||||
<li><?= anchor('learn/sass/extending', 'Extending') ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dd">
|
||||
<a href="#" class="A<?= $current == 'compass' ? ' -c' : '' ?>">Compass</a>
|
||||
<ul class="Dh A">
|
||||
<li><?= anchor('learn/compass/introduction', 'Introduction') ?></li>
|
||||
<li><?= anchor('learn/compass/css3', 'CSS3') ?></li>
|
||||
<li><?= anchor('learn/compass/helpers', 'Helpers') ?></li>
|
||||
<li><?= anchor('learn/compass/layout', 'Layout') ?></li>
|
||||
<li><?= anchor('learn/compass/reset', 'Reset') ?></li>
|
||||
<li><?= anchor('learn/compass/typography', 'Typography') ?></li>
|
||||
<li><?= anchor('learn/compass/utilities', 'Utilities') ?></li>
|
||||
<li><?= anchor('learn/compass/foundation', 'Foundation') ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dd">
|
||||
<a href="#" class="A<?= $current == 'svg' ? ' -c' : '' ?>">SVG & Inkscape</a>
|
||||
<ul class="Dh A">
|
||||
<li><?= anchor('learn/svg/introduction', 'Introduction') ?></li>
|
||||
<li><?= anchor('learn/svg/inkscape', 'Inkscape') ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dd">
|
||||
<a href="#" class="A<?= $current == 'js' ? ' -c' : '' ?>">JavaScript</a>
|
||||
<ul class="Dh A">
|
||||
<li><?= anchor('learn/js/introduction', 'Introduction') ?></li>
|
||||
<li><?= anchor('learn/js/jquery', 'jQuery') ?></li>
|
||||
<li><?= anchor('learn/js/modernizr', 'Modernizr') ?></li>
|
||||
<li><?= anchor('learn/js/requirejs', 'Require.js') ?></li>
|
||||
<li><?= anchor('learn/js/lodash', 'Lodash') ?></li>
|
||||
<li><?= anchor('learn/js/yeoman', 'Yeoman') ?></li>
|
||||
<li><?= anchor('learn/js/nodejs', 'Node.js') ?></li>
|
||||
<li><?= anchor('learn/js/libraries', 'More Libraries') ?></li>
|
||||
<li><?= anchor('learn/js/game_development', 'Game Development') ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dd">
|
||||
<a href="#" class="A<?= $current == 'php' ? ' -c' : '' ?>">PHP</a>
|
||||
<ul class="Dh A">
|
||||
<li><?= anchor('learn/php/introduction', 'Introduction') ?></li>
|
||||
<li><?= anchor('learn/php/codeigniter', 'CodeIgniter') ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dd">
|
||||
<a href="#" class="A<?= $current == 'ruby' ? ' -c' : '' ?>">Ruby</a>
|
||||
<ul class="Dh A">
|
||||
<li><?= anchor('learn/ruby/introduction', 'Introduction') ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dd">
|
||||
<a href="#" class="A<?= $current == 'markdown' ? ' -c' : '' ?>">Markdown</a>
|
||||
<ul class="Dh A">
|
||||
<li><?= anchor('learn/markdown/introduction', 'Introduction') ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dd">
|
||||
<a href="#" class="A<?= $current == 'git' ? ' -c' : '' ?>">Git</a>
|
||||
<ul class="Dh A">
|
||||
<li><?= anchor('learn/git/introduction', 'Introduction') ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dd">
|
||||
<a href="#" class="A<?= $current == 'vim' ? ' -c' : '' ?>">Vim</a>
|
||||
<ul class="Dh A">
|
||||
<li><?= anchor('learn/vim/introduction', 'Introduction') ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dd">
|
||||
<a href="#" class="A<?= $current == 'sublime' ? ' -c' : '' ?>">Sublime Text</a>
|
||||
<ul class="Dh A">
|
||||
<li><?= anchor('learn/sublime/introduction', 'Introduction') ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dd">
|
||||
<a href="#" class="A<?= $current == 'linux' ? ' -c' : '' ?>">Linux</a>
|
||||
<ul class="Dh A">
|
||||
<li><?= anchor('learn/linux/introduction', 'Introduction') ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="c -m10">
|
||||
<?= $current != 'start' ? '<h1>' . $current . '</h1>' : '' ?>
|
||||
<?= isset($content) ? $content : null ?>
|
||||
</div>
|
||||
</div>
|
||||
15
application/views/templates/projects.php
Normal file
15
application/views/templates/projects.php
Normal file
@ -0,0 +1,15 @@
|
||||
<div class="projects r">
|
||||
<div class="c -m2">
|
||||
<nav class="side">
|
||||
<ul>
|
||||
<li><a href="<?= site_url('projects') ?>" class="A<?= $current == 'start' ? ' -c' : '' ?>">Start</a></li>
|
||||
<li><a href="<?= site_url('projects/git') ?>" class="A<?= $current == 'git' ? ' -c' : '' ?>">Git</a></li>
|
||||
<li><a href="<?= site_url('projects/spawns') ?>" class="A<?= $current == 'spawns' ? ' -c' : '' ?>">Spawns</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="c -m10">
|
||||
<!-- <?= $current != 'start' ? '<h1>' . $current . '</h1>' : '' ?>-->
|
||||
<?= isset($content) ? $content : null ?>
|
||||
</div>
|
||||
</div>
|
||||
14
application/views/templates/projects.php!
Normal file
14
application/views/templates/projects.php!
Normal file
@ -0,0 +1,14 @@
|
||||
<div class="learn r">
|
||||
<div class="c -m2">
|
||||
<nav class="side">
|
||||
<ul>
|
||||
<li><?= anchor('projects/git') ?></li>
|
||||
<li><?= anchor('projects/spawns') ?></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="c -m10">
|
||||
<?= $current != null ? '<h1>' . $current . '</h1>' : '' ?>
|
||||
<?= isset($content) ? $content : null ?>
|
||||
</div>
|
||||
</div>
|
||||
13
application/views/templates/resources.php
Normal file
13
application/views/templates/resources.php
Normal file
@ -0,0 +1,13 @@
|
||||
<div class="resources r">
|
||||
<!--
|
||||
<div class="c -m12">
|
||||
<h1>Resources</h1>
|
||||
</div>
|
||||
-->
|
||||
<div class="c -m8">
|
||||
<?= $learning ?>
|
||||
</div>
|
||||
<div class="c -m4">
|
||||
<?= $inspiration ?>
|
||||
</div>
|
||||
</div>
|
||||
5
application/views/templates/wrapper.php
Normal file
5
application/views/templates/wrapper.php
Normal file
@ -0,0 +1,5 @@
|
||||
<div class="r">
|
||||
<div class="c -m12">
|
||||
<?= $content ?>
|
||||
</div>
|
||||
</div>
|
||||
88
application/views/welcome_message.php
Normal file
88
application/views/welcome_message.php
Normal file
@ -0,0 +1,88 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Welcome to CodeIgniter</title>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
::selection{ background-color: #E13300; color: white; }
|
||||
::moz-selection{ background-color: #E13300; color: white; }
|
||||
::webkit-selection{ background-color: #E13300; color: white; }
|
||||
|
||||
body {
|
||||
background-color: #fff;
|
||||
margin: 40px;
|
||||
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
||||
color: #4F5155;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #003399;
|
||||
background-color: transparent;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #444;
|
||||
background-color: transparent;
|
||||
border-bottom: 1px solid #D0D0D0;
|
||||
font-size: 19px;
|
||||
font-weight: normal;
|
||||
margin: 0 0 14px 0;
|
||||
padding: 14px 15px 10px 15px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||
font-size: 12px;
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #D0D0D0;
|
||||
color: #002166;
|
||||
display: block;
|
||||
margin: 14px 0 14px 0;
|
||||
padding: 12px 10px 12px 10px;
|
||||
}
|
||||
|
||||
#body{
|
||||
margin: 0 15px 0 15px;
|
||||
}
|
||||
|
||||
p.footer{
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
border-top: 1px solid #D0D0D0;
|
||||
line-height: 32px;
|
||||
padding: 0 10px 0 10px;
|
||||
margin: 20px 0 0 0;
|
||||
}
|
||||
|
||||
#container{
|
||||
margin: 10px;
|
||||
border: 1px solid #D0D0D0;
|
||||
-webkit-box-shadow: 0 0 8px #D0D0D0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
<h1>Welcome to CodeIgniter!</h1>
|
||||
|
||||
<div id="body">
|
||||
<p>The page you are looking at is being generated dynamically by CodeIgniter.</p>
|
||||
|
||||
<p>If you would like to edit this page you'll find it located at:</p>
|
||||
<code>application/views/welcome_message.php</code>
|
||||
|
||||
<p>The corresponding controller for this page is found at:</p>
|
||||
<code>application/controllers/welcome.php</code>
|
||||
|
||||
<p>If you are exploring CodeIgniter for the very first time, you should start by reading the <a href="user_guide/">User Guide</a>.</p>
|
||||
</div>
|
||||
|
||||
<p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds</p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
18
bower.json
Normal file
18
bower.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "wordwordgo",
|
||||
"version": "0.1.0",
|
||||
"description": "A Clever Dictionary.",
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
],
|
||||
"dependencies": {
|
||||
"modernizr": "~2.6.2",
|
||||
"respond": "~1.3.0",
|
||||
"requirejs": "~2.1.9"
|
||||
}
|
||||
}
|
||||
26
config.rb
Normal file
26
config.rb
Normal file
@ -0,0 +1,26 @@
|
||||
require 'animation'
|
||||
# Require any additional compass plugins here.
|
||||
|
||||
|
||||
# Set this to the root of your project when deployed:
|
||||
http_path = "/"
|
||||
css_dir = "css"
|
||||
sass_dir = "src/sass"
|
||||
images_dir = "img"
|
||||
javascripts_dir = "src/js"
|
||||
|
||||
# You can select your preferred output style here (can be overridden via the command line):
|
||||
# output_style = :expanded or :nested or :compact or :compressed
|
||||
output_style = :compact
|
||||
|
||||
# To enable relative paths to assets via compass helper functions. Uncomment:
|
||||
# relative_assets = true
|
||||
|
||||
# To disable debugging comments that display the original location of your selectors. Uncomment:
|
||||
line_comments = false
|
||||
|
||||
# If you prefer the indented syntax, you might want to regenerate this
|
||||
# project again passing --syntax sass, or you can uncomment this:
|
||||
# preferred_syntax = :sass
|
||||
# and then run:
|
||||
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
|
||||
205
index.php
Normal file
205
index.php
Normal file
@ -0,0 +1,205 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------------
|
||||
* APPLICATION ENVIRONMENT
|
||||
*---------------------------------------------------------------
|
||||
*
|
||||
* You can load different configurations depending on your
|
||||
* current environment. Setting the environment also influences
|
||||
* things like logging and error reporting.
|
||||
*
|
||||
* This can be set to anything, but default usage is:
|
||||
*
|
||||
* development
|
||||
* testing
|
||||
* production
|
||||
*
|
||||
* NOTE: If you change these, also change the error_reporting() code below
|
||||
*
|
||||
*/
|
||||
define('ENVIRONMENT', 'development');
|
||||
/*
|
||||
*---------------------------------------------------------------
|
||||
* ERROR REPORTING
|
||||
*---------------------------------------------------------------
|
||||
*
|
||||
* Different environments will require different levels of error reporting.
|
||||
* By default development will show errors but testing and live will hide them.
|
||||
*/
|
||||
|
||||
if (defined('ENVIRONMENT'))
|
||||
{
|
||||
switch (ENVIRONMENT)
|
||||
{
|
||||
case 'development':
|
||||
error_reporting(E_ALL);
|
||||
break;
|
||||
|
||||
case 'testing':
|
||||
case 'production':
|
||||
error_reporting(0);
|
||||
break;
|
||||
|
||||
default:
|
||||
exit('The application environment is not set correctly.');
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------------
|
||||
* SYSTEM FOLDER NAME
|
||||
*---------------------------------------------------------------
|
||||
*
|
||||
* This variable must contain the name of your "system" folder.
|
||||
* Include the path if the folder is not in the same directory
|
||||
* as this file.
|
||||
*
|
||||
*/
|
||||
$system_path = 'system';
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------------
|
||||
* APPLICATION FOLDER NAME
|
||||
*---------------------------------------------------------------
|
||||
*
|
||||
* If you want this front controller to use a different "application"
|
||||
* folder then the default one you can set its name here. The folder
|
||||
* can also be renamed or relocated anywhere on your server. If
|
||||
* you do, use a full server path. For more info please see the user guide:
|
||||
* http://codeigniter.com/user_guide/general/managing_apps.html
|
||||
*
|
||||
* NO TRAILING SLASH!
|
||||
*
|
||||
*/
|
||||
$application_folder = 'application';
|
||||
|
||||
/*
|
||||
* --------------------------------------------------------------------
|
||||
* DEFAULT CONTROLLER
|
||||
* --------------------------------------------------------------------
|
||||
*
|
||||
* Normally you will set your default controller in the routes.php file.
|
||||
* You can, however, force a custom routing by hard-coding a
|
||||
* specific controller class/function here. For most applications, you
|
||||
* WILL NOT set your routing here, but it's an option for those
|
||||
* special instances where you might want to override the standard
|
||||
* routing in a specific front controller that shares a common CI installation.
|
||||
*
|
||||
* IMPORTANT: If you set the routing here, NO OTHER controller will be
|
||||
* callable. In essence, this preference limits your application to ONE
|
||||
* specific controller. Leave the function name blank if you need
|
||||
* to call functions dynamically via the URI.
|
||||
*
|
||||
* Un-comment the $routing array below to use this feature
|
||||
*
|
||||
*/
|
||||
// The directory name, relative to the "controllers" folder. Leave blank
|
||||
// if your controller is not in a sub-folder within the "controllers" folder
|
||||
// $routing['directory'] = '';
|
||||
|
||||
// The controller class file name. Example: Mycontroller
|
||||
// $routing['controller'] = '';
|
||||
|
||||
// The controller function you wish to be called.
|
||||
// $routing['function'] = '';
|
||||
|
||||
|
||||
/*
|
||||
* -------------------------------------------------------------------
|
||||
* CUSTOM CONFIG VALUES
|
||||
* -------------------------------------------------------------------
|
||||
*
|
||||
* The $assign_to_config array below will be passed dynamically to the
|
||||
* config class when initialized. This allows you to set custom config
|
||||
* items or override any default config values found in the config.php file.
|
||||
* This can be handy as it permits you to share one application between
|
||||
* multiple front controller files, with each file containing different
|
||||
* config values.
|
||||
*
|
||||
* Un-comment the $assign_to_config array below to use this feature
|
||||
*
|
||||
*/
|
||||
// $assign_to_config['name_of_config_item'] = 'value of config item';
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* ---------------------------------------------------------------
|
||||
* Resolve the system path for increased reliability
|
||||
* ---------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// Set the current directory correctly for CLI requests
|
||||
if (defined('STDIN'))
|
||||
{
|
||||
chdir(dirname(__FILE__));
|
||||
}
|
||||
|
||||
if (realpath($system_path) !== FALSE)
|
||||
{
|
||||
$system_path = realpath($system_path).'/';
|
||||
}
|
||||
|
||||
// ensure there's a trailing slash
|
||||
$system_path = rtrim($system_path, '/').'/';
|
||||
|
||||
// Is the system path correct?
|
||||
if ( ! is_dir($system_path))
|
||||
{
|
||||
exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
|
||||
}
|
||||
|
||||
/*
|
||||
* -------------------------------------------------------------------
|
||||
* Now that we know the path, set the main path constants
|
||||
* -------------------------------------------------------------------
|
||||
*/
|
||||
// The name of THIS file
|
||||
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
|
||||
|
||||
// The PHP file extension
|
||||
// this global constant is deprecated.
|
||||
define('EXT', '.php');
|
||||
|
||||
// Path to the system folder
|
||||
define('BASEPATH', str_replace("\\", "/", $system_path));
|
||||
|
||||
// Path to the front controller (this file)
|
||||
define('FCPATH', str_replace(SELF, '', __FILE__));
|
||||
|
||||
// Name of the "system folder"
|
||||
define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
|
||||
|
||||
|
||||
// The path to the "application" folder
|
||||
if (is_dir($application_folder))
|
||||
{
|
||||
define('APPPATH', $application_folder.'/');
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ! is_dir(BASEPATH.$application_folder.'/'))
|
||||
{
|
||||
exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF);
|
||||
}
|
||||
|
||||
define('APPPATH', BASEPATH.$application_folder.'/');
|
||||
}
|
||||
|
||||
/*
|
||||
* --------------------------------------------------------------------
|
||||
* LOAD THE BOOTSTRAP FILE
|
||||
* --------------------------------------------------------------------
|
||||
*
|
||||
* And away we go...
|
||||
*
|
||||
*/
|
||||
require_once BASEPATH.'core/CodeIgniter.php';
|
||||
|
||||
/* End of file index.php */
|
||||
/* Location: ./index.php */
|
||||
16
package.json
Normal file
16
package.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"title": "Word Word Go",
|
||||
"name": "wordwordgo",
|
||||
"version": "0.1.0",
|
||||
"description": "A Clever Dictionary.",
|
||||
"devDependencies": {
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-contrib-jshint": "~0.6.4",
|
||||
"grunt-contrib-uglify": "~0.2.4",
|
||||
"grunt-smushit": "~1.1.2",
|
||||
"grunt-svgmin": "~0.2.0",
|
||||
"grunt-contrib-watch": "~0.5.3",
|
||||
"grunt-contrib-compass": "~0.6.0",
|
||||
"grunt-contrib-requirejs": "~0.4.1"
|
||||
}
|
||||
}
|
||||
56
src/js/init.js
Normal file
56
src/js/init.js
Normal file
@ -0,0 +1,56 @@
|
||||
'use strict';
|
||||
$(function () {
|
||||
console.log('hello');
|
||||
$('.Dw').each(function () {
|
||||
$(this).css({
|
||||
width: $(this).width() + 2 * 10//$(this).css('padding')
|
||||
});
|
||||
});
|
||||
$('.Dh').each(function () {
|
||||
$(this).css('height', $(this).height());
|
||||
});
|
||||
$('nav.side a.-c').addClass('-a');
|
||||
$('nav.side li.dd > a:not(.-a)').next('ul').addClass('-m');
|
||||
var navDud = $('nav.m div.d');
|
||||
var navCurrent = $('nav.m a.-c');
|
||||
|
||||
if (navCurrent.length > 0) {
|
||||
var navDudPos = $('nav.m a.-c').parent().get(0).offsetLeft + 15;
|
||||
var navDudWidth = $('nav.m a.-c').parent().width();
|
||||
navDud.css({
|
||||
width: navDudWidth,
|
||||
left: navDudPos
|
||||
});
|
||||
}
|
||||
$('nav.m a').hover(function () {
|
||||
var pos = $(this).parent().get(0).offsetLeft + 15;
|
||||
var width = $(this).parent().width();
|
||||
navDud.css({
|
||||
width: width,
|
||||
left: pos
|
||||
});
|
||||
}, function () {
|
||||
navDud.css({
|
||||
width: navDudWidth,
|
||||
left: navDudPos
|
||||
});
|
||||
});
|
||||
$('nav.side li.dd > a').click(function (ev) {
|
||||
ev.preventDefault();
|
||||
if ($(this).hasClass('-a')) {
|
||||
if (!$(this).hasClass('-c')) {
|
||||
$(this).removeClass('-a').next('ul').addClass('-m');
|
||||
$('nav.side li > a.-c').addClass('-a').next('ul').removeClass('-m');
|
||||
}
|
||||
} else {
|
||||
$('nav.side li > a.-a').removeClass('-a').next('ul').addClass('-m');
|
||||
$(this).addClass('-a').next('ul').removeClass('-m');
|
||||
}
|
||||
});
|
||||
$('#pwd_update').addClass('-m');
|
||||
$('#pwd_update-toggle').click(function (ev) {
|
||||
ev.preventDefault();
|
||||
$('#pwd_update').toggleClass('-m');
|
||||
});
|
||||
$('.A').addClass('on');
|
||||
});
|
||||
9
src/js/rjs/config.js
Normal file
9
src/js/rjs/config.js
Normal file
@ -0,0 +1,9 @@
|
||||
requirejs.config({
|
||||
baseUrl: './',
|
||||
optimize: 'uglify2',
|
||||
name: 'main',
|
||||
out: '../../../js/main.js',
|
||||
//paths: {
|
||||
// 'jquery': 'empty:'
|
||||
//}
|
||||
});
|
||||
8
src/js/rjs/main.js
Normal file
8
src/js/rjs/main.js
Normal file
@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
//requirejs.config({
|
||||
// paths: {
|
||||
// 'jquery': '//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min'
|
||||
// }
|
||||
//});
|
||||
define(function () {
|
||||
});
|
||||
6
src/sass/_content.scss
Normal file
6
src/sass/_content.scss
Normal file
@ -0,0 +1,6 @@
|
||||
// import all content files from content folder here, or right it straight in
|
||||
@import "content/start";
|
||||
@import "content/resources";
|
||||
@import "content/learn";
|
||||
@import "content/user";
|
||||
@import "content/peeps";
|
||||
2
src/sass/_corrections.scss
Normal file
2
src/sass/_corrections.scss
Normal file
@ -0,0 +1,2 @@
|
||||
// place corrections using modernizr classes here, such as
|
||||
// html.no-svg .img { background: url('_.png'); }
|
||||
2
src/sass/_fonts.scss
Normal file
2
src/sass/_fonts.scss
Normal file
@ -0,0 +1,2 @@
|
||||
@import url(http://fonts.googleapis.com/css?family=Roboto+Slab:700,400);
|
||||
@import url(http://fonts.googleapis.com/css?family=Inconsolata:400,700);
|
||||
1
src/sass/_keyframes.scss
Normal file
1
src/sass/_keyframes.scss
Normal file
@ -0,0 +1 @@
|
||||
// place all keyframes for animations here
|
||||
223
src/sass/_layout.scss
Normal file
223
src/sass/_layout.scss
Normal file
@ -0,0 +1,223 @@
|
||||
// general layout, including header, navigation mm
|
||||
@media #{$wm-screen} {
|
||||
header {
|
||||
padding-bottom: 20px;
|
||||
._t {
|
||||
margin: 10px 0;
|
||||
}
|
||||
.company {
|
||||
color: #666;
|
||||
float: left;
|
||||
> .address {
|
||||
display: none;
|
||||
}
|
||||
> .logo {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
> .slogan {
|
||||
text-align: right;
|
||||
font-size: emCalc(12px);
|
||||
text-transform: lowercase;
|
||||
}
|
||||
}
|
||||
.user_info {
|
||||
text-align: right;
|
||||
p {
|
||||
line-height: 1;
|
||||
margin: 0;
|
||||
&.name {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
&.menu {
|
||||
font-size: emCalc(12px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
nav {
|
||||
ul {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
> li {
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
&.m {
|
||||
position: relative;
|
||||
> .d {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
//left: $wm-column-gutter / 2 + 900;
|
||||
top: 1px;
|
||||
height: 36px;
|
||||
width: 0px;
|
||||
background: #eee;
|
||||
&.A.on {
|
||||
@include transition(left 0.2s, width 0.2s);
|
||||
}
|
||||
}
|
||||
> ul {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
border: 1px none #666;
|
||||
border-top-style: solid;
|
||||
border-bottom-style: solid;
|
||||
@include pie-clearfix;
|
||||
> li {
|
||||
float: left;
|
||||
> a {
|
||||
text-align: center;
|
||||
display: block;
|
||||
padding: 10px;
|
||||
@include transition(all 0.2s);
|
||||
&.-c {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&.side {
|
||||
> ul {
|
||||
border-bottom: 1px solid #666;
|
||||
> li {
|
||||
> a {
|
||||
color: #666;
|
||||
display: block;
|
||||
padding: 10px;
|
||||
padding-left: 17px;
|
||||
border: 1px solid #666;
|
||||
border-bottom: none;
|
||||
background: #eee;
|
||||
position: relative;
|
||||
&.A.on {
|
||||
@include transition(all 0.5s);
|
||||
}
|
||||
&:hover, &.-a {
|
||||
color: #555;
|
||||
background: #ccc;
|
||||
}
|
||||
// &.-c {
|
||||
// //background: desaturate(lighten($c-main-1,30%), 30%) !important;
|
||||
// background: #aaa !important;
|
||||
// color: #444 !important;
|
||||
// }
|
||||
}
|
||||
> ul {
|
||||
border-left: 1px solid #999;
|
||||
border-right: 1px solid #999;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
&.A.on {
|
||||
@include transition(height 0.5s);
|
||||
}
|
||||
&.-m {
|
||||
height: 0px !important;
|
||||
}
|
||||
> li {
|
||||
&:first-child {
|
||||
border-top: 1px solid #666;
|
||||
}
|
||||
> a {
|
||||
padding: 7px 10px;
|
||||
display: block;
|
||||
font-size: emCalc(16px);
|
||||
}
|
||||
}
|
||||
}
|
||||
&.dd {
|
||||
> a {
|
||||
&:before {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 13px;
|
||||
left: 6px;
|
||||
@include css-triangle($triangle-height:5px,$triangle-direction:right,$triangle-color:#777);
|
||||
}
|
||||
&.-a {
|
||||
&:before {
|
||||
@include transform(rotate(90deg));
|
||||
}
|
||||
}
|
||||
&.A.on {
|
||||
&:before {
|
||||
@include transition(transform 0.5s);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
section {
|
||||
position: relative;
|
||||
background: white;
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 15px;
|
||||
border: 1px solid #ccc;
|
||||
margin-bottom: 30px;
|
||||
//@include box-shadow(0px 0px 5px 0px rgba(0,0,0,0.3));
|
||||
> h1 {
|
||||
//@include border-top-left-radius(20px);
|
||||
font-size: emCalc(16px);
|
||||
//display: block;
|
||||
//width: 100px;
|
||||
//height: 40px;
|
||||
//background: red;
|
||||
}
|
||||
|
||||
&:before{
|
||||
@include transform(skew(0deg, -4deg));
|
||||
@include box-shadow(5px -5px 5px rgba(0,0,0,0.3));
|
||||
position:absolute;
|
||||
background-color:rgba(0,0,0,0.3);
|
||||
top:4px;
|
||||
content:'';
|
||||
z-index:-6;
|
||||
width:60px;
|
||||
height:10px;
|
||||
right:9px;
|
||||
}
|
||||
&:after{
|
||||
@include transform(skew(0deg, 4deg));
|
||||
@include box-shadow(5px 5px 5px rgba(0,0,0,0.3));
|
||||
position:absolute;
|
||||
background-color:rgba(0,0,0,0.3);
|
||||
bottom:4px;
|
||||
content:'';
|
||||
z-index:-6;
|
||||
width:60px;
|
||||
height:10px;
|
||||
right:9px;
|
||||
}
|
||||
}
|
||||
footer {
|
||||
.p {
|
||||
@include pie-clearfix;
|
||||
margin-top: 20px;
|
||||
border-top: 1px solid #666;
|
||||
padding: 15px 0;
|
||||
}
|
||||
span {
|
||||
font-size: emCalc(12px);
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
||||
Google Code style (c) Aahan Krish <geekpanth3r@gmail.com>
|
||||
|
||||
*/
|
||||
|
||||
table {
|
||||
td {
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@media #{$wm-small-max} {
|
||||
}
|
||||
@media #{$wm-medium-min} {
|
||||
}
|
||||
72
src/sass/_styles.scss
Normal file
72
src/sass/_styles.scss
Normal file
@ -0,0 +1,72 @@
|
||||
// general styles that are not included in codewhite/components/global or codewhite/components/type
|
||||
@media #{$wm-screen} {
|
||||
p > a {
|
||||
text-decoration: underline;
|
||||
@include transition(all 0.4s);
|
||||
}
|
||||
li > .description {
|
||||
color: #666;
|
||||
font-size: emCalc(12px);
|
||||
}
|
||||
.logo {
|
||||
text-align: center;
|
||||
text-transform: lowercase;
|
||||
> span {
|
||||
display: inline-block;
|
||||
font-size:30px;
|
||||
padding:10px 0;
|
||||
width:46px;
|
||||
margin-left:5px;
|
||||
color:#000;
|
||||
background: red;
|
||||
@for $i from 1 through 7 {
|
||||
&:nth-of-type(#{$i}) {
|
||||
@include transform(rotate(5deg * $i));
|
||||
background: adjust-hue($c-main-1, 30deg * ($i - 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
font-size: emCalc(45px);
|
||||
font-family: 'Roboto Slab', sans-serif;
|
||||
font-weight: 700;
|
||||
}
|
||||
pre.text, pre.command {
|
||||
padding: 15px;
|
||||
overflow: auto;
|
||||
}
|
||||
div.success {
|
||||
border: 1px solid $c-success;
|
||||
padding: 10px 20px 10px 78px;
|
||||
min-height: 82px;
|
||||
background: lighten($c-success, 45%) url('../img/trophy.svg') no-repeat 10px 10px;
|
||||
|
||||
h1, h2, h3, h4, h5, h6, p, span {
|
||||
color: $c-success;
|
||||
}
|
||||
p {
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.align {
|
||||
width: 100%;
|
||||
|
||||
> span {
|
||||
padding: 5px 0;
|
||||
display: block;
|
||||
width: 50%;
|
||||
&:not(.end) {
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
&.lbl {
|
||||
float: left;
|
||||
}
|
||||
&.val {
|
||||
text-align: right;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
10
src/sass/_utilities.scss
Normal file
10
src/sass/_utilities.scss
Normal file
@ -0,0 +1,10 @@
|
||||
// Import helpers here... such as the following
|
||||
|
||||
@import "compass/utilities/general";
|
||||
@import "compass/css3";
|
||||
|
||||
@import "animation";
|
||||
@import "codewhite/animate/bouncing";
|
||||
|
||||
@import "codewhite/mixins/headers";
|
||||
@import "codewhite/mixins/navigation";
|
||||
28
src/sass/codewhite/_animate.scss
Normal file
28
src/sass/codewhite/_animate.scss
Normal file
@ -0,0 +1,28 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
// Animations from Animate.css
|
||||
// Author : Dan Eden
|
||||
// URL : http://daneden.me/animate/
|
||||
//
|
||||
// Attention seekers
|
||||
// - flash bounce shake tada swing wobble pulse
|
||||
// Fading entrances
|
||||
// - fadeIn fadeInUp fadeInDown fadeInLeft fadeInRight fadeInUpBig fadeInDownBig fadeInLeftBig fadeInRightBig
|
||||
// Fading exits
|
||||
// - fadeOut fadeOutUp fadeOutDown fadeOutLeft fadeOutRight fadeOutUpBig fadeOutDownBig fadeOutLeftBig fadeOutRightBig
|
||||
// Bouncing entrances
|
||||
// - bounceIn bounceInDown bounceInUp bounceInLeft bounceInRight
|
||||
// Bouncing exits
|
||||
// - bounceOut bounceOutDown bounceOutUp bounceOutLeft bounceOutRight
|
||||
// Rotating entrances
|
||||
// - rotateIn rotateInDownLeft rotateInDownRight rotateInUpLeft rotateInUpRight
|
||||
// Rotating exits
|
||||
// - rotateOut rotateOutDownLeft rotateOutDownRight rotateOutUpLeft rotateOutUpRight
|
||||
// Specials
|
||||
// - hinge rollIn rollOut
|
||||
// ---------------------------------------------------------------------------
|
||||
@import "animate/fading";
|
||||
@import "animate/bouncing";
|
||||
@import "animate/rotating";
|
||||
@import "animate/flippers";
|
||||
@import "animate/attention-seekers";
|
||||
@import "animate/specials";
|
||||
10
src/sass/codewhite/_base.scss
Normal file
10
src/sass/codewhite/_base.scss
Normal file
@ -0,0 +1,10 @@
|
||||
// this must be imported before functions, as some functions use variables set here.
|
||||
@import "variables/base";
|
||||
|
||||
// this needs to be imported before are set media queries so they can be calculated correctly.
|
||||
@import "functions";
|
||||
|
||||
@import "user_variables";
|
||||
@import "variables/media_queries";
|
||||
@import "variables/visibility";
|
||||
|
||||
81
src/sass/codewhite/_functions.scss
Normal file
81
src/sass/codewhite/_functions.scss
Normal file
@ -0,0 +1,81 @@
|
||||
// It strips the unit of measure and returns it
|
||||
@function strip-unit($num) {
|
||||
@return $num / ($num * 0 + 1);
|
||||
}
|
||||
|
||||
// Converts "px" to "em" using the ($)em-base
|
||||
@function convert-to-em($value) {
|
||||
$value: strip-unit($value) / strip-unit($wm-em-base) * 1em;
|
||||
@if ($value == 0em) { $value: 0; } // Turn 0em into 0
|
||||
@return $value;
|
||||
}
|
||||
|
||||
// Working in ems is annoying. Think in pixels by using this handy function, emCalc(#)
|
||||
// Just enter the number, no need to mention "px"
|
||||
@function emCalc($values...) {
|
||||
$max: length($values); // Get the total number of parameters passed
|
||||
|
||||
// If there is only 1 parameter, then return it as an integer.
|
||||
// This is done because a list can't be multiplied or divided even if it contains a single value
|
||||
@if $max == 1 { @return convert-to-em(nth($values, 1)); }
|
||||
|
||||
$emValues: (); // This will eventually store the converted $values in a list
|
||||
@for $i from 1 through $max {
|
||||
$emValues: append($emValues, convert-to-em(nth($values, $i)));
|
||||
}
|
||||
@return $emValues;
|
||||
}
|
||||
|
||||
//
|
||||
// Grid Calc Function
|
||||
//
|
||||
|
||||
@function gridCalc($colNumber, $totalColumns) {
|
||||
@return percentage(($colNumber / $totalColumns));
|
||||
}
|
||||
|
||||
@mixin css-triangle($triangle-height, $triangle-direction, $triangle-width:2*$triangle-height, $triangle-color:$c-main-1) {
|
||||
width: 0;
|
||||
height: 0;
|
||||
@if ($triangle-direction == top) {
|
||||
border-left: $triangle-width / 2 solid transparent;
|
||||
border-bottom: $triangle-height solid $triangle-color;
|
||||
border-right: $triangle-width / 2 solid transparent;
|
||||
}
|
||||
@if ($triangle-direction == bottom) {
|
||||
border-left: $triangle-width / 2 solid transparent;
|
||||
border-top: $triangle-height solid $triangle-color;
|
||||
border-right: $triangle-width / 2 solid transparent;
|
||||
}
|
||||
@if ($triangle-direction == left) {
|
||||
border-top: $triangle-width / 2 solid transparent;
|
||||
border-right: $triangle-height solid $triangle-color;
|
||||
border-bottom: $triangle-width / 2 solid transparent;
|
||||
}
|
||||
@if ($triangle-direction == right) {
|
||||
border-top: $triangle-width / 2 solid transparent;
|
||||
border-left: $triangle-height solid $triangle-color;
|
||||
border-bottom: $triangle-width / 2 solid transparent;
|
||||
}
|
||||
}
|
||||
@mixin css-right_angle-triangle($triangle-size, $triangle-color, $triangle-direction) {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: inset $triangle-size;
|
||||
@if ($triangle-direction == top) {
|
||||
border-color: $triangle-color transparent transparent transparent;
|
||||
border-top-style: solid;
|
||||
}
|
||||
@if ($triangle-direction == bottom) {
|
||||
border-color: transparent transparent $triangle-color transparent;
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
@if ($triangle-direction == left) {
|
||||
border-color: transparent transparent transparent $triangle-color;
|
||||
border-left-style: solid;
|
||||
}
|
||||
@if ($triangle-direction == right) {
|
||||
border-color: transparent $triangle-color transparent transparent;
|
||||
border-right-style: solid;
|
||||
}
|
||||
}
|
||||
397
src/sass/codewhite/_user_variables.scss
Normal file
397
src/sass/codewhite/_user_variables.scss
Normal file
@ -0,0 +1,397 @@
|
||||
// USER VARIABLES
|
||||
//
|
||||
|
||||
//
|
||||
// Base Variables
|
||||
//
|
||||
|
||||
// The default font-size is set to 100% of the browser style sheet (usually 16px)
|
||||
// for compatibility with brower-based text zoom or user-set defaults.
|
||||
|
||||
// Since the typical default browser font-size is 16px, that makes the calculation for grid size.
|
||||
// If you want your base font-size to be different and not have it effect the grid breakpoints,
|
||||
// set $wm-em-base to $wm-base-font-size and make sure $wm-base-font-size is a px value.
|
||||
// $wm-base-font-size: 100%;
|
||||
|
||||
// $wm-base-line-height is 24px while $wm-base-font-size is 16px
|
||||
// $wm-base-line-height: 150%;
|
||||
|
||||
// This is the default html and body font-size for the base em value.
|
||||
// $wm-em-base: 16;
|
||||
|
||||
// We use these to control various global styles
|
||||
// $wm-body-bg: #fff;
|
||||
// $wm-body-font-color: #222;
|
||||
$wm-body-font-family: Georgia, serif;
|
||||
// $wm-body-font-weight: normal;
|
||||
// $wm-body-font-style: normal;
|
||||
|
||||
// We use this to control font-smoothing
|
||||
// $wm-font-smoothing: subpixel-antialiased;
|
||||
|
||||
// We use these to control text direction settings
|
||||
// $wm-text-direction: ltr;
|
||||
|
||||
// NOTE: No need to change this conditional statement, $wm-text-direction variable controls it all.
|
||||
// $wm-default-float: left;
|
||||
// $wm-opposite-direction: right;
|
||||
// @if $wm-text-direction == ltr {
|
||||
// $wm-default-float: left;
|
||||
// $wm-opposite-direction: right;
|
||||
// } @else {
|
||||
// $wm-default-float: right;
|
||||
// $wm-opposite-direction: left;
|
||||
// }
|
||||
|
||||
// We use this to control whether or not CSS classes come through in the gem files.
|
||||
// $wm-include-html-classes: true;
|
||||
// $wm-include-print-styles: true;
|
||||
// $wm-include-html-global-classes: $wm-include-html-classes;
|
||||
|
||||
//
|
||||
// Global Variables
|
||||
//
|
||||
|
||||
// We use these as default colors throughout
|
||||
|
||||
// vl - very light
|
||||
// l - light
|
||||
// d - dark
|
||||
// vd - very dark
|
||||
|
||||
$c-main-1: #2ba6cb;
|
||||
$c-main-1-vl: lighten($c-main-1, 20%);
|
||||
$c-main-1-l: lighten($c-main-1, 10%);
|
||||
$c-main-1-d: darken($c-main-1, 10%);
|
||||
$c-main-1-vd: darken($c-main-1, 20%);
|
||||
// $c-main-2: #2bcb88;
|
||||
// $c-main-2-vl: lighten($c-main-2, 20%);
|
||||
// $c-main-2-l: lighten($c-main-2, 10%);
|
||||
// $c-main-2-d: darken($c-main-2, 10%);
|
||||
// $c-main-2-vd: darken($c-main-2, 20%);
|
||||
// $c-main-3: #cb512b;
|
||||
// $c-main-3-vl: lighten($c-main-3, 20%);
|
||||
// $c-main-3-l: lighten($c-main-3, 10%);
|
||||
// $c-main-3-d: darken($c-main-3, 10%);
|
||||
// $c-main-3-vd: darken($c-main-3, 20%);
|
||||
// $c-grey: #e9e9e9;
|
||||
// $c-grey-vl: lighten($c-grey, 20%);
|
||||
// $c-grey-l: lighten($c-grey, 10%);
|
||||
// $c-grey-d: darken($c-grey, 10%);
|
||||
// $c-grey-vd: darken($c-grey, 20%);
|
||||
// $c-alert: #c60f13;
|
||||
// $c-alert-vl: lighten($c-alert, 20%);
|
||||
// $c-alert-l: lighten($c-alert, 10%);
|
||||
// $c-alert-d: darken($c-alert, 10%);
|
||||
// $c-alert-vd: darken($c-alert, 20%);
|
||||
// $c-success: #5da423;
|
||||
// $c-success-vl: lighten($c-success, 20%);
|
||||
// $c-success-l: lighten($c-success, 10%);
|
||||
// $c-success-d: darken($c-success, 10%);
|
||||
// $c-success-vd: darken($c-success, 20%);
|
||||
|
||||
// We use these to make sure border radius matches unless we want it different.
|
||||
// $wm-global-radius: 3px;
|
||||
// $wm-global-rounded: 1000px;
|
||||
|
||||
// We use these to control inset shadow shiny edges and depressions.
|
||||
// $wm-shiny-edge-size: 0 1px 0;
|
||||
// $wm-shiny-edge-color: rgba(#fff, .5);
|
||||
// $wm-shiny-edge-active-color: rgba(#000, .2);
|
||||
|
||||
//We use this as cursors values for enabling the option of having custom cursors in the whole site's stylesheet
|
||||
// $wm-cursor-crosshair-value: crosshair;
|
||||
// $wm-cursor-default-value: default;
|
||||
// $wm-cursor-pointer-value: pointer;
|
||||
// $wm-cursor-help-value: help;
|
||||
// $wm-cursor-text-value: text;
|
||||
|
||||
//
|
||||
// Typography Variables
|
||||
//
|
||||
|
||||
// $wm-include-html-type-classes: $wm-include-html-classes;
|
||||
|
||||
// We use these to control header font styles
|
||||
$wm-header-font-family: 'Roboto Slab', sans-serif;
|
||||
// $wm-header-font-weight: bold;
|
||||
// $wm-header-font-style: normal;
|
||||
$wm-header-font-color: $c-main-1;
|
||||
// $wm-header-line-height: 1.4;
|
||||
// $wm-header-top-margin: .2em;
|
||||
// $wm-header-bottom-margin: .5em;
|
||||
// $wm-header-text-rendering: optimizeLegibility;
|
||||
|
||||
// We use these to control header font sizes
|
||||
// $wm-h1-font-size: emCalc(44);
|
||||
// $wm-h2-font-size: emCalc(37);
|
||||
// $wm-h3-font-size: emCalc(27);
|
||||
// $wm-h4-font-size: emCalc(23);
|
||||
// $wm-h5-font-size: emCalc(18);
|
||||
// $wm-h6-font-size: 1em;
|
||||
|
||||
// These control how subheaders are styled.
|
||||
// $wm-subheader-line-height: 1.4;
|
||||
// $wm-subheader-font-color: lighten($wm-header-font-color, 30%);
|
||||
// $wm-subheader-font-weight: 300;
|
||||
// $wm-subheader-top-margin: .2em;
|
||||
// $wm-subheader-bottom-margin: .5em;
|
||||
|
||||
// A general <small> styling
|
||||
// $wm-small-font-size: 60%;
|
||||
// $wm-small-font-color: lighten($wm-header-font-color, 30%);
|
||||
|
||||
// We use these to style paragraphs
|
||||
// $wm-paragraph-font-family: inherit;
|
||||
// $wm-paragraph-font-weight: normal;
|
||||
// $wm-paragraph-font-size: 1em;
|
||||
// $wm-paragraph-line-height: 1.6;
|
||||
// $wm-paragraph-margin-bottom: emCalc(20);
|
||||
// $wm-paragraph-aside-font-size: emCalc(14);
|
||||
// $wm-paragraph-aside-line-height: 1.35;
|
||||
// $wm-paragraph-aside-font-style: italic;
|
||||
// $wm-paragraph-text-rendering: optimizeLegibility;
|
||||
|
||||
// We use these to style <code> tags
|
||||
$wm-code-color: #333;
|
||||
$wm-code-font-family: 'Inconsolata', Consolas, 'Liberation Mono', Courier, monospace;
|
||||
$wm-code-font-weight: 400;
|
||||
|
||||
// We use these to style anchors
|
||||
// $wm-anchor-text-decoration: none;
|
||||
// $wm-anchor-font-color: $c-main-1;
|
||||
$wm-anchor-font-color-hover: $c-main-1-vl;
|
||||
|
||||
// We use these to style the <hr> element
|
||||
// $wm-hr-border-width: 1px;
|
||||
// $wm-hr-border-style: solid;
|
||||
// $wm-hr-border-color: #ddd;
|
||||
// $wm-hr-margin: emCalc(20);
|
||||
|
||||
// We use these to style lists
|
||||
// $wm-ulist-style-type: disc;
|
||||
// $wm-ulist-style-position: outside;
|
||||
// $wm-ulist-side-margin: emCalc(20px);
|
||||
// $wm-ulist-nested-margin: emCalc(20px);
|
||||
// $wm-olist-style-type: decimal;
|
||||
// $wm-olist-style-position: outside;
|
||||
// $wm-olist-side-margin: emCalc(25px);
|
||||
// $wm-olist-nested-margin: emCalc(25px);
|
||||
// $wm-dlist-header-weight: bold;
|
||||
// $wm-dlist-header-margin-bottom: .3em;
|
||||
// $wm-dlist-margin-bottom: emCalc(12);
|
||||
|
||||
// We use these to style blockquotes
|
||||
// $wm-blockquote-font-color: lighten($wm-header-font-color, 30%);
|
||||
// $wm-blockquote-padding: emCalc(9, 20, 0, 19);
|
||||
// $wm-blockquote-border: 1px solid #ddd;
|
||||
// $wm-blockquote-cite-font-size: emCalc(13);
|
||||
// $wm-blockquote-cite-font-color: lighten($wm-header-font-color, 20%);
|
||||
// $wm-blockquote-cite-link-color: $wm-blockquote-cite-font-color;
|
||||
|
||||
// Acronym styles
|
||||
// $wm-acronym-underline: 1px dotted #ddd;
|
||||
|
||||
// We use these to control padding and margin
|
||||
// $wm-microformat-padding: emCalc(10, 12);
|
||||
// $wm-microformat-margin: emCalc(0, 0, 20, 0);
|
||||
|
||||
// We use these to control the border styles
|
||||
// $wm-microformat-border-width: 1px;
|
||||
// $wm-microformat-border-style: solid;
|
||||
// $wm-microformat-border-color: #ddd;
|
||||
|
||||
// We use these to control full name font styles
|
||||
// $wm-microformat-fullname-font-weight: bold;
|
||||
// $wm-microformat-fullname-font-size: emCalc(15);
|
||||
|
||||
// We use this to control the summary font styles
|
||||
// $wm-microformat-summary-font-weight: bold;
|
||||
|
||||
// We use this to control abbr padding
|
||||
// $wm-microformat-abbr-padding: emCalc(0, 1);
|
||||
|
||||
// We use this to control abbr font styles
|
||||
// $wm-microformat-abbr-font-weight: bold;
|
||||
// $wm-microformat-abbr-font-decoration: none;
|
||||
|
||||
// Control code in <pre><code>
|
||||
$wm-include-code-classes: true;
|
||||
|
||||
// This code control the color in the code
|
||||
// $c-code-pre-bg: #111;
|
||||
// $c-code-1-n: $c-main-1;
|
||||
// $c-code-1-vl: lighten($c-code-1-n, 10%);
|
||||
// $c-code-1-l: lighten($c-code-1-n, 5%);
|
||||
// $c-code-1-d: darken($c-code-1-n, 5%);
|
||||
// $c-code-1-vd: darken($c-code-1-n, 10%);
|
||||
// $c-code-2-n: $c-main-2;
|
||||
// $c-code-2-vl: lighten($c-code-2-n, 30%);
|
||||
// $c-code-2-l: lighten($c-code-2-n, 15%);
|
||||
// $c-code-2-d: darken($c-code-2-n, 15%);
|
||||
// $c-code-2-vd: darken($c-code-2-n, 30%);
|
||||
// $c-code-3-n: $c-main-3;
|
||||
// $c-code-3-vl: lighten($c-code-3-n, 30%);
|
||||
// $c-code-3-l: lighten($c-code-3-n, 15%);
|
||||
// $c-code-3-d: darken($c-code-3-n, 15%);
|
||||
// $c-code-3-vd: darken($c-code-3-n, 30%);
|
||||
|
||||
//
|
||||
// Media Queries
|
||||
//
|
||||
|
||||
// $wm-small-screen-min: 0px;
|
||||
// $wm-medium-screen-min: 640px;
|
||||
// $wm-large-screen-min: 1024px;
|
||||
// $wm-xlarge-screen-min: 1440px;
|
||||
|
||||
// $wm-small-screen-max: $wm-medium-screen-min - 1;
|
||||
// $wm-medium-screen-max: $wm-large-screen-min - 1;
|
||||
// $wm-large-screen-max: $wm-xlarge-screen-min - 1;
|
||||
|
||||
// $wm-screen: "only screen";
|
||||
// $wm-small-only: "only screen and (min-width: #{$wm-small-screen-min}) and (max-width: #{$wm-small-screen-max})";
|
||||
// $wm-small-min: "only screen and (min-width: #{$wm-small-screen-min})";
|
||||
// $wm-small-max: "only screen and (max-width: #{$wm-small-screen-max})";
|
||||
// $wm-medium-only: "only screen and (min-width: #{$wm-medium-screen-min}) and (max-width: #{$wm-medium-screen-max})";
|
||||
// $wm-medium-min: "only screen and (min-width: #{$wm-medium-screen-min})";
|
||||
// $wm-medium-max: "only screen and (max-width: #{$wm-medium-screen-max})";
|
||||
// $wm-large-only: "only screen and (min-width: #{$wm-large-screen-min}) and (max-width: #{$wm-large-screen-max})";
|
||||
// $wm-large-min: "only screen and (min-width: #{$wm-large-screen-min})";
|
||||
// $wm-large-max: "only screen and (max-width: #{$wm-large-screen-max})";
|
||||
// $wm-xlarge-only: "only screen and (min-width: #{$wm-xlarge-screen-min})";
|
||||
// $wm-xlarge-min: "only screen and (min-width: #{$wm-xlarge-screen-min})";
|
||||
// $wm-landscape: "only screen and (orientation: landscape)";
|
||||
// $wm-portrait: "only screen and (orientation: portrait)";
|
||||
|
||||
//
|
||||
// Grid Variables
|
||||
//
|
||||
|
||||
// $wm-include-html-grid-classes: true;
|
||||
$wm-row-width: emCalc(1200px);
|
||||
// $wm-column-gutter: emCalc(30px);
|
||||
// $wm-total-columns: 12;
|
||||
|
||||
//
|
||||
// Button Variables
|
||||
//
|
||||
|
||||
// $wm-include-html-button-classes: $wm-include-html-classes;
|
||||
|
||||
// We use these to build padding for buttons.
|
||||
// $wm-button-med: emCalc(12);
|
||||
// $wm-button-tny: emCalc(7);
|
||||
// $wm-button-sml: emCalc(9);
|
||||
// $wm-button-lrg: emCalc(16);
|
||||
|
||||
// We use this to control the display property.
|
||||
// $wm-button-display: inline-block;
|
||||
// $wm-button-margin-bottom: emCalc(20);
|
||||
|
||||
// We use these to control button text styles.
|
||||
// $wm-button-font-family: inherit;
|
||||
// $wm-button-font-color: #fff;
|
||||
// $wm-button-font-color-alt: #333;
|
||||
// $wm-button-font-med: emCalc(16);
|
||||
// $wm-button-font-tny: emCalc(11);
|
||||
// $wm-button-font-sml: emCalc(13);
|
||||
// $wm-button-font-lrg: emCalc(20);
|
||||
// $wm-button-font-weight: bold;
|
||||
// $wm-button-font-align: center;
|
||||
|
||||
// We use these to control various hover effects.
|
||||
// $wm-button-function-factor: 10%;
|
||||
|
||||
// We use these to control button border styles.
|
||||
// $wm-button-border-width: 1px;
|
||||
// $wm-button-border-style: solid;
|
||||
|
||||
// We use this to set the default radius used throughout the core.
|
||||
// $wm-button-radius: $wm-global-radius;
|
||||
// $wm-button-round: $wm-global-rounded;
|
||||
|
||||
// We use this to set default opacity for disabled buttons.
|
||||
// $wm-button-disabled-opacity: 0.6;
|
||||
|
||||
//
|
||||
// Form Variables
|
||||
//
|
||||
|
||||
// $wm-include-html-form-classes: $wm-include-html-classes;
|
||||
|
||||
// We use this to set the base for lots of form spacing and positioning styles
|
||||
// $wm-form-spacing: emCalc(16);
|
||||
|
||||
// We use these to style the labels in different ways
|
||||
// $wm-form-label-pointer: pointer;
|
||||
// $wm-form-label-font-size: emCalc(14);
|
||||
// $wm-form-label-font-weight: 500;
|
||||
// $wm-form-label-font-color: lighten(#000, 30%);
|
||||
// $wm-form-label-bottom-margin: emCalc(3);
|
||||
// $wm-input-font-family: inherit;
|
||||
// $wm-input-font-color: rgba(0,0,0,0.75);
|
||||
// $wm-input-font-size: emCalc(14);
|
||||
// $wm-input-bg-color: #fff;
|
||||
// $wm-input-focus-bg-color: darken(#fff, 2%);
|
||||
// $wm-input-border-color: darken(#fff, 20%);
|
||||
// $wm-input-focus-border-color: darken(#fff, 40%);
|
||||
// $wm-input-border-style: solid;
|
||||
// $wm-input-border-width: 1px;
|
||||
// $wm-input-disabled-bg: #ddd;
|
||||
// $wm-input-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
|
||||
// $wm-input-include-glowing-effect: true;
|
||||
|
||||
// We use these to style the select form element.
|
||||
// $wm-select-bg: #fff;
|
||||
// $wm-select-fade-to-color: #f3f3f3;
|
||||
// $wm-select-border-color: $wm-input-border-color;
|
||||
// $wm-select-triangle-color: #aaa;
|
||||
// $wm-select-triangle-color-open: #222;
|
||||
// $wm-select-height: emCalc(13) + ($wm-form-spacing * 1.5);
|
||||
// $wm-select-margin-bottom: emCalc(20);
|
||||
// $wm-select-font-color-selected: #141414;
|
||||
// $wm-select-disabled-color: #888;
|
||||
// $wm-select-font-size: $wm-input-font-size;
|
||||
// $wm-select-width-small: 134px;
|
||||
// $wm-select-width-medium: 254px;
|
||||
// $wm-select-width-large: 434px;
|
||||
|
||||
// We use these to style the fieldset border and spacing.
|
||||
// $wm-fieldset-border-style: solid;
|
||||
// $wm-fieldset-border-width: 1px;
|
||||
// $wm-fieldset-border-color: #ddd;
|
||||
// $wm-fieldset-padding: emCalc(20);
|
||||
// $wm-fieldset-margin: emCalc(18, 0);
|
||||
|
||||
// We use these to style the legends when you use them
|
||||
// $wm-legend-bg: #fff;
|
||||
// $wm-legend-font-weight: bold;
|
||||
// $wm-legend-padding: emCalc(0, 3);
|
||||
|
||||
// We use these to style the prefix and postfix input elements
|
||||
// $wm-input-prefix-bg: darken(#fff, 5%);
|
||||
// $wm-input-prefix-border-color: darken(#fff, 20%);
|
||||
// $wm-input-prefix-border-size: 1px;
|
||||
// $wm-input-prefix-border-type: solid;
|
||||
// $wm-input-prefix-overflow: hidden;
|
||||
// $wm-input-prefix-font-color: #333;
|
||||
// $wm-input-prefix-font-color-alt: #fff;
|
||||
|
||||
// We use these to style the error states for inputs and labels
|
||||
// $wm-input-error-message-padding: emCalc(6, 4);
|
||||
// $wm-input-error-message-top: -($wm-form-spacing) - emCalc(5);
|
||||
// $wm-input-error-message-font-size: emCalc(12);
|
||||
// $wm-input-error-message-font-weight: bold;
|
||||
// $wm-input-error-message-font-color: #fff;
|
||||
// $wm-input-error-message-font-color-alt: #333;
|
||||
|
||||
// We use this to style the glowing effect of inputs when focused
|
||||
// $wm-glowing-effect-fade-time: 0.45s;
|
||||
// $wm-glowing-effect-color: $wm-input-focus-border-color;
|
||||
|
||||
//
|
||||
// Visibility
|
||||
//
|
||||
|
||||
// $wm-include-html-visibility-classes: $wm-include-html-classes;
|
||||
126
src/sass/codewhite/animate/_attention-seekers.scss
Normal file
126
src/sass/codewhite/animate/_attention-seekers.scss
Normal file
@ -0,0 +1,126 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(flash) {
|
||||
0% {
|
||||
opacity: 1; }
|
||||
25% {
|
||||
opacity: 0; }
|
||||
50% {
|
||||
opacity: 1; }
|
||||
75% {
|
||||
opacity: 0; }
|
||||
100% {
|
||||
opacity: 1; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(bounce) {
|
||||
0% {
|
||||
@include translateY(0); }
|
||||
20% {
|
||||
@include translateY(0); }
|
||||
40% {
|
||||
@include translateY(-30px); }
|
||||
50% {
|
||||
@include translateY(0); }
|
||||
60% {
|
||||
@include translateY(-15px); }
|
||||
80% {
|
||||
@include translateY(0); }
|
||||
100% {
|
||||
@include translateY(0); } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(shake) {
|
||||
0% {
|
||||
@include translateX(0); }
|
||||
10% {
|
||||
@include translateX(-10px); }
|
||||
20% {
|
||||
@include translateX(10px); }
|
||||
30% {
|
||||
@include translateX(-10px); }
|
||||
40% {
|
||||
@include translateX(10px); }
|
||||
50% {
|
||||
@include translateX(-10px); }
|
||||
60% {
|
||||
@include translateX(10px); }
|
||||
70% {
|
||||
@include translateX(-10px); }
|
||||
80% {
|
||||
@include translateX(10px); }
|
||||
90% {
|
||||
@include translateX(-10px); }
|
||||
100% {
|
||||
@include translateX(0); } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(tada) {
|
||||
0% {
|
||||
@include scale(1); }
|
||||
10% {
|
||||
@include transform(scale(0.9) rotate(-3deg)); }
|
||||
20% {
|
||||
@include transform(scale(0.9) rotate(-3deg)); }
|
||||
30% {
|
||||
@include transform(scale(1.1) rotate(3deg)); }
|
||||
40% {
|
||||
@include transform(scale(1.1) rotate(-3deg)); }
|
||||
50% {
|
||||
@include transform(scale(1.1) rotate(3deg)); }
|
||||
60% {
|
||||
@include transform(scale(1.1) rotate(-3deg)); }
|
||||
70% {
|
||||
@include transform(scale(1.1) rotate(3deg)); }
|
||||
80% {
|
||||
@include transform(scale(1.1) rotate(-3deg)); }
|
||||
90% {
|
||||
@include transform(scale(1.1) rotate(3deg)); }
|
||||
100% {
|
||||
@include transform(scale(1) rotate(0)); } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(swing) {
|
||||
20%, 40%, 60%, 80%, 100% {
|
||||
@include transform-origin(top center); }
|
||||
20% {
|
||||
@include rotate(15deg); }
|
||||
40% {
|
||||
@include rotate(-10deg); }
|
||||
60% {
|
||||
@include rotate(5deg); }
|
||||
80% {
|
||||
@include rotate(-5deg); }
|
||||
100% {
|
||||
@include rotate(0deg); } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(wobble) {
|
||||
0% {
|
||||
@include translateX(0%); }
|
||||
15% {
|
||||
@include transform(translateX(-25%) rotate(-5deg)); }
|
||||
30% {
|
||||
@include transform(translateX(20%) rotate(3deg)); }
|
||||
45% {
|
||||
@include transform(translateX(-15%) rotate(-3deg)); }
|
||||
60% {
|
||||
@include transform(translateX(10%) rotate(2deg)); }
|
||||
75% {
|
||||
@include transform(translateX(-5%) rotate(-1deg)); }
|
||||
100% {
|
||||
@include transform(translateX(0%)); } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(pulse) {
|
||||
0% {
|
||||
@include scale(1); }
|
||||
50% {
|
||||
@include scale(1.1); }
|
||||
100% {
|
||||
@include scale(1); } }
|
||||
147
src/sass/codewhite/animate/_bouncing.scss
Normal file
147
src/sass/codewhite/animate/_bouncing.scss
Normal file
@ -0,0 +1,147 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin bounceIn() {
|
||||
@include keyframes(bounceIn) {
|
||||
0% {
|
||||
opacity: 0;
|
||||
@include scale(0.3);
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
@include scale(1.05);
|
||||
}
|
||||
70% {
|
||||
@include scale(0.9);
|
||||
}
|
||||
100% {
|
||||
@include scale(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@mixin bounceInDown {
|
||||
@include keyframes(bounceInDown) {
|
||||
0% {
|
||||
opacity: 0;
|
||||
@include translateY(-2000px); }
|
||||
60% {
|
||||
opacity: 1;
|
||||
@include translateY(30px); }
|
||||
80% {
|
||||
@include translateY(-10px); }
|
||||
100% {
|
||||
@include translateY(0); } }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@mixin bounceInUp {
|
||||
@include keyframes(bounceInUp) {
|
||||
0% {
|
||||
opacity: 0;
|
||||
@include translateY(2000px); }
|
||||
60% {
|
||||
opacity: 1;
|
||||
@include translateY(-30px); }
|
||||
80% {
|
||||
@include translateY(10px); }
|
||||
100% {
|
||||
@include translateY(0); } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin bounceInRight {
|
||||
@include keyframes(bounceInRight) {
|
||||
0% {
|
||||
opacity: 0;
|
||||
@include translateX(2000px); }
|
||||
60% {
|
||||
opacity: 1;
|
||||
@include translateX(-30px); }
|
||||
80% {
|
||||
@include translateX(10px); }
|
||||
100% {
|
||||
@include translateX(0); } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin bounceInLeft {
|
||||
@include keyframes(bounceInLeft) {
|
||||
0% {
|
||||
opacity: 0;
|
||||
@include translateX(-2000px); }
|
||||
60% {
|
||||
opacity: 1;
|
||||
@include translateX(30px); }
|
||||
80% {
|
||||
@include translateX(-10px); }
|
||||
100% {
|
||||
@include translateX(0); } }
|
||||
}
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin bounceOut {
|
||||
@include keyframes(bounceOut) {
|
||||
0% {
|
||||
@include scale(1); }
|
||||
25% {
|
||||
@include scale(0.95); }
|
||||
50% {
|
||||
opacity: 1;
|
||||
@include scale(1.1); }
|
||||
100% {
|
||||
opacity: 0;
|
||||
@include scale(0.3); } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin bounceOutUp {
|
||||
@include keyframes(bounceOutUp) {
|
||||
0% {
|
||||
@include translateY(0); }
|
||||
20% {
|
||||
opacity: 1;
|
||||
@include translateY(20px); }
|
||||
100% {
|
||||
opacity: 0;
|
||||
@include translateY(-2000px); } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin bounceOutDown {
|
||||
@include keyframes(bounceOutDown) {
|
||||
0% {
|
||||
@include translateY(0); }
|
||||
20% {
|
||||
opacity: 1;
|
||||
@include translateY(-20px); }
|
||||
100% {
|
||||
opacity: 0;
|
||||
@include translateY(2000px); } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin bounceOutLeft {
|
||||
@include keyframes(bounceOutLeft) {
|
||||
0% {
|
||||
@include translateX(0); }
|
||||
20% {
|
||||
opacity: 1;
|
||||
@include translateX(20px); }
|
||||
100% {
|
||||
opacity: 0;
|
||||
@include translateX(-2000px); } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin bounceOutRight {
|
||||
@include keyframes(bounceOutRight) {
|
||||
0% {
|
||||
@include translateX(0); }
|
||||
20% {
|
||||
opacity: 1;
|
||||
@include translateX(-20px); }
|
||||
100% {
|
||||
opacity: 0;
|
||||
@include translateX(2000px); } }
|
||||
}
|
||||
21
src/sass/codewhite/animate/_classes.scss
Normal file
21
src/sass/codewhite/animate/_classes.scss
Normal file
@ -0,0 +1,21 @@
|
||||
// .animated and .animated.hinge classes for external use
|
||||
.animated {
|
||||
@include animation(1s ease both); }
|
||||
|
||||
.animated.hinge {
|
||||
@include animation(2s ease both); }
|
||||
|
||||
// Animations list
|
||||
$animations: flash, shake, bounce, tada, swing, wobble, pulse, flip, flipInX, flipOutX, flipInY, flipOutY, fadeIn, fadeInUp, fadeInDown, fadeInLeft, fadeInRight, fadeInUpBig, fadeInDownBig, fadeInLeftBig, fadeInRightBig, fadeOut, fadeOutUp, fadeOutDown, fadeOutLeft, fadeOutRight, fadeOutUpBig, fadeOutDownBig, fadeOutLeftBig, fadeOutRightBig, bounceIn, bounceInDown, bounceInUp, bounceInLeft, bounceInRight, bounceOut, bounceOutDown, bounceOutUp, bounceOutLeft, bounceOutRight, rotateIn, rotateInDownLeft, rotateInDownRight, rotateInUpLeft, rotateInUpRight, rotateOut, rotateOutDownLeft, rotateOutDownRight, rotateOutUpLeft, rotateOutUpRight, hinge, rollIn, rollOut;
|
||||
|
||||
// Animations that require backface-visibility
|
||||
$backface: flip, flipInX, flipOutX, flipInY, flipOutY;
|
||||
|
||||
// Creation of the different classes
|
||||
@each $anim in $animations {
|
||||
.#{$anim} {
|
||||
@if index($backface, $anim) {
|
||||
@include backface-visibility(visible); }
|
||||
@if $anim == "swing" {
|
||||
@include transform-origin(top, center); }
|
||||
@include animation-name($anim); } }
|
||||
190
src/sass/codewhite/animate/_fading.scss
Normal file
190
src/sass/codewhite/animate/_fading.scss
Normal file
@ -0,0 +1,190 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin fadeIn {
|
||||
@include keyframes(fadeIn) {
|
||||
0% {
|
||||
opacity: 0; }
|
||||
100% {
|
||||
opacity: 1; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin fadeInUp {
|
||||
@include keyframes(fadeInUp) {
|
||||
0% {
|
||||
@include translateY(20px);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include translateY(0);
|
||||
opacity: 1; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin fadeInDown {
|
||||
@include keyframes(fadeInDown) {
|
||||
0% {
|
||||
@include translateY(-20px);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include translateY(0);
|
||||
opacity: 1; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin fadeInRight {
|
||||
@include keyframes(fadeInRight) {
|
||||
0% {
|
||||
@include translateX(20px);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include translateX(0);
|
||||
opacity: 1; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin fadeInLeft {
|
||||
@include keyframes(fadeInLeft) {
|
||||
0% {
|
||||
@include translateX(-20px);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include translateX(0);
|
||||
opacity: 1; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin fadeInUpBig {
|
||||
@include keyframes(fadeInUpBig) {
|
||||
0% {
|
||||
@include translateY(2000px);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include translateY(0);
|
||||
opacity: 1; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin fadeInDownBig {
|
||||
@include keyframes(fadeInDownBig) {
|
||||
0% {
|
||||
opacity: 0;
|
||||
@include translateY(-2000px); }
|
||||
100% {
|
||||
opacity: 1;
|
||||
@include translateY(0); } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin fadeInRightBig {
|
||||
@include keyframes(fadeInRightBig) {
|
||||
0% {
|
||||
opacity: 0;
|
||||
@include translateX(2000px); }
|
||||
100% {
|
||||
opacity: 1;
|
||||
@include translateX(0); } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin fadeInLeftBig {
|
||||
@include keyframes(fadeInLeftBig) {
|
||||
0% {
|
||||
opacity: 0;
|
||||
@include translateX(-2000px); }
|
||||
100% {
|
||||
opacity: 1;
|
||||
@include translateX(0); } }
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(fadeOut) {
|
||||
0% {
|
||||
opacity: 1; }
|
||||
100% {
|
||||
opacity: 0; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin fadeOutUp {
|
||||
@include keyframes(fadeOutUp) {
|
||||
0% {
|
||||
@include translateY(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include translateY(-20px);
|
||||
opacity: 0; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin fadeOutDown {
|
||||
@include keyframes(fadeOutDown) {
|
||||
0% {
|
||||
@include translateY(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include translateY(20px);
|
||||
opacity: 0; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin fadeOutRight {
|
||||
@include keyframes(fadeOutRight) {
|
||||
0% {
|
||||
@include translateX(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include translateX(20px);
|
||||
opacity: 0; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin fadeOutLeft {
|
||||
@include keyframes(fadeOutLeft) {
|
||||
0% {
|
||||
@include translateX(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include translateX(-20px);
|
||||
opacity: 0; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin fadeOutUpBig {
|
||||
@include keyframes(fadeOutUpBig) {
|
||||
0% {
|
||||
@include translateY(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include translateY(-2000px);
|
||||
opacity: 0; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin fadeOutDownBig {
|
||||
@include keyframes(fadeOutDownBig) {
|
||||
0% {
|
||||
opacity: 1;
|
||||
@include translateY(0); }
|
||||
100% {
|
||||
opacity: 0;
|
||||
@include translateY(2000px); } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin fadeOutRightBig {
|
||||
@include keyframes(fadeOutRightBig) {
|
||||
0% {
|
||||
opacity: 1;
|
||||
@include translateX(0); }
|
||||
100% {
|
||||
opacity: 0;
|
||||
@include translateX(2000px); } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin fadeOutLeftBig {
|
||||
@include keyframes(fadeOutLeftBig) {
|
||||
0% {
|
||||
opacity: 1;
|
||||
@include translateX(0); }
|
||||
100% {
|
||||
opacity: 0;
|
||||
@include translateX(-2000px); } }
|
||||
}
|
||||
93
src/sass/codewhite/animate/_flippers.scss
Normal file
93
src/sass/codewhite/animate/_flippers.scss
Normal file
@ -0,0 +1,93 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin flip {
|
||||
@include keyframes(flip) {
|
||||
0% {
|
||||
@include transform(perspective(400px) rotateY(0));
|
||||
@include animation-timing-function(ease-out);
|
||||
}
|
||||
40% {
|
||||
@include transform(perspective(400px) translateZ(150px) rotateY(170deg));
|
||||
@include animation-timing-function(ease-out);
|
||||
}
|
||||
50% {
|
||||
@include transform(perspective(400px) translateZ(150px) rotateY(190deg) scale(1));
|
||||
@include animation-timing-function(ease-in);
|
||||
}
|
||||
80% {
|
||||
@include transform(perspective(400px) rotateY(360deg) scale(0.95));
|
||||
@include animation-timing-function(ease-in);
|
||||
}
|
||||
100% {
|
||||
@include transform(perspective(400px) scale(1));
|
||||
@include animation-timing-function(ease-in);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin flipInX {
|
||||
@include keyframes(flipInX) {
|
||||
0% {
|
||||
@include transform(perspective(400px) rotateX(90deg));
|
||||
@include opacity(0);
|
||||
}
|
||||
40% {
|
||||
@include transform(perspective(400px) rotateX(-10deg));
|
||||
}
|
||||
70% {
|
||||
@include transform(perspective(400px) rotateX(10deg));
|
||||
}
|
||||
100% {
|
||||
@include transform(perspective(400px) rotateX(0deg));
|
||||
@include opacity(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin flipOutX {
|
||||
@include keyframes(flipOutX) {
|
||||
0% {
|
||||
@include transform(perspective(400px) rotateX(0deg));
|
||||
@include opacity(1);
|
||||
}
|
||||
100% {
|
||||
@include transform(perspective(400px) rotateX(90deg));
|
||||
@include opacity(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin flipInY {
|
||||
@include keyframes(flipInY) {
|
||||
0% {
|
||||
@include transform(perspective(400px) rotateY(90deg));
|
||||
@include opacity(0);
|
||||
}
|
||||
40% {
|
||||
@include transform(perspective(400px) rotateY(-10deg));
|
||||
}
|
||||
70% {
|
||||
@include transform(perspective(400px) rotateY(10deg));
|
||||
}
|
||||
100% {
|
||||
@include transform(perspective(400px) rotateY(0deg));
|
||||
@include opacity(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin flipOutY {
|
||||
@include keyframes(flipOutY) {
|
||||
0% {
|
||||
@include transform(perspective(400px) rotateY(0deg));
|
||||
@include opacity(1);
|
||||
}
|
||||
100% {
|
||||
@include transform(perspective(400px) rotateY(90deg));
|
||||
@include opacity(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
126
src/sass/codewhite/animate/_rotating.scss
Normal file
126
src/sass/codewhite/animate/_rotating.scss
Normal file
@ -0,0 +1,126 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin rotateIn {
|
||||
@include keyframes(rotateIn) {
|
||||
0% {
|
||||
@include transform-origin(center center);
|
||||
@include rotate(-200deg);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include transform-origin(center center);
|
||||
@include rotate(0);
|
||||
opacity: 1; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin rotateInDownLeft {
|
||||
@include keyframes(rotateInDownLeft) {
|
||||
0% {
|
||||
@include transform-origin(left bottom);
|
||||
@include rotate(-90deg);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include transform-origin(left bottom);
|
||||
@include rotate(0);
|
||||
opacity: 1; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin rotateInUpLeft {
|
||||
@include keyframes(rotateInUpLeft) {
|
||||
0% {
|
||||
@include transform-origin(left bottom);
|
||||
@include rotate(90deg);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include transform-origin(left bottom);
|
||||
@include rotate(0);
|
||||
opacity: 1; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin rotateInUpRight {
|
||||
@include keyframes(rotateInUpRight) {
|
||||
0% {
|
||||
@include transform-origin(right bottom);
|
||||
@include rotate(-90deg);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include transform-origin(right bottom);
|
||||
@include rotate(0);
|
||||
opacity: 1; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin rotateInDownRight {
|
||||
@include keyframes(rotateInDownRight) {
|
||||
0% {
|
||||
@include transform-origin(right bottom);
|
||||
@include rotate(90deg);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include transform-origin(right bottom);
|
||||
@include rotate(0);
|
||||
opacity: 1; } }
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(rotateOut) {
|
||||
0% {
|
||||
@include transform-origin(center center);
|
||||
@include rotate(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include transform-origin(center center);
|
||||
@include rotate(200deg);
|
||||
opacity: 0; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin rotateOutDownLeft {
|
||||
@include keyframes(rotateOutDownLeft) {
|
||||
0% {
|
||||
@include transform-origin(left bottom);
|
||||
@include rotate(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include transform-origin(left bottom);
|
||||
@include rotate(90deg);
|
||||
opacity: 0; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin rotateOutUpLeft {
|
||||
@include keyframes(rotateOutUpLeft) {
|
||||
0% {
|
||||
@include transform-origin(left bottom);
|
||||
@include rotate(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include transform-origin(left bottom);
|
||||
@include rotate(-90deg);
|
||||
opacity: 0; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin rotateOutDownRight {
|
||||
@include keyframes(rotateOutDownRight) {
|
||||
0% {
|
||||
@include transform-origin(right bottom);
|
||||
@include rotate(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include transform-origin(right bottom);
|
||||
@include rotate(-90deg);
|
||||
opacity: 0; } }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin rotateOutUpRight {
|
||||
@include keyframes(rotateOutUpRight) {
|
||||
0% {
|
||||
@include transform-origin(right bottom);
|
||||
@include rotate(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include transform-origin(right bottom);
|
||||
@include rotate(90deg);
|
||||
opacity: 0; } }
|
||||
}
|
||||
58
src/sass/codewhite/animate/_specials.scss
Normal file
58
src/sass/codewhite/animate/_specials.scss
Normal file
@ -0,0 +1,58 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin hinge {
|
||||
@include keyframes(hinge) {
|
||||
0% {
|
||||
@include rotate(0);
|
||||
@include transform-origin(top left);
|
||||
@include animation-timing-function(ease-in-out);
|
||||
}
|
||||
20%, 60% {
|
||||
@include rotate(80deg);
|
||||
@include transform-origin(top left);
|
||||
@include animation-timing-function(ease-in-out);
|
||||
}
|
||||
40% {
|
||||
@include rotate(60deg);
|
||||
@include transform-origin(top left);
|
||||
@include animation-timing-function(ease-in-out);
|
||||
}
|
||||
80% {
|
||||
@include transform(rotate(60deg) translateY(0));
|
||||
@include opacity(1);
|
||||
@include transform-origin(top left);
|
||||
@include animation-timing-function(ease-in-out);
|
||||
}
|
||||
100% {
|
||||
@include translateY(700px);
|
||||
@include opacity(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin rollIn {
|
||||
@include keyframes(rollIn) {
|
||||
0% {
|
||||
@include opacity(0);
|
||||
@include transform(translateX(-100%) rotate(-120deg));
|
||||
}
|
||||
100% {
|
||||
@include opacity(1);
|
||||
@include transform(translateX(0px) rotate(0deg));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@mixin rollOut {
|
||||
@include keyframes(rollOut) {
|
||||
0% {
|
||||
@include opacity(1);
|
||||
@include transform(translateX(0px) rotate(0deg));
|
||||
}
|
||||
100% {
|
||||
@include opacity(0);
|
||||
@include transform(translateX(-100%) rotate(-120deg));
|
||||
}
|
||||
}
|
||||
}
|
||||
86
src/sass/codewhite/animate/fading/_fading-entrances.scss
Normal file
86
src/sass/codewhite/animate/fading/_fading-entrances.scss
Normal file
@ -0,0 +1,86 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(fadeIn) {
|
||||
0% {
|
||||
opacity: 0; }
|
||||
100% {
|
||||
opacity: 1; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(fadeInUp) {
|
||||
0% {
|
||||
@include translateY(20px);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include translateY(0);
|
||||
opacity: 1; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(fadeInDown) {
|
||||
0% {
|
||||
@include translateY(-20px);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include translateY(0);
|
||||
opacity: 1; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(fadeInRight) {
|
||||
0% {
|
||||
@include translateX(20px);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include translateX(0);
|
||||
opacity: 1; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(fadeInLeft) {
|
||||
0% {
|
||||
@include translateX(-20px);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include translateX(0);
|
||||
opacity: 1; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(fadeInUpBig) {
|
||||
0% {
|
||||
@include translateY(2000px);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include translateY(0);
|
||||
opacity: 1; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(fadeInDownBig) {
|
||||
0% {
|
||||
opacity: 0;
|
||||
@include translateY(-2000px); }
|
||||
100% {
|
||||
opacity: 1;
|
||||
@include translateY(0); } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(fadeInRightBig) {
|
||||
0% {
|
||||
opacity: 0;
|
||||
@include translateX(2000px); }
|
||||
100% {
|
||||
opacity: 1;
|
||||
@include translateX(0); } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(fadeInLeftBig) {
|
||||
0% {
|
||||
opacity: 0;
|
||||
@include translateX(-2000px); }
|
||||
100% {
|
||||
opacity: 1;
|
||||
@include translateX(0); } }
|
||||
86
src/sass/codewhite/animate/fading/_fading-exits.scss
Normal file
86
src/sass/codewhite/animate/fading/_fading-exits.scss
Normal file
@ -0,0 +1,86 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(fadeOut) {
|
||||
0% {
|
||||
opacity: 1; }
|
||||
100% {
|
||||
opacity: 0; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(fadeOutUp) {
|
||||
0% {
|
||||
@include translateY(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include translateY(-20px);
|
||||
opacity: 0; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(fadeOutDown) {
|
||||
0% {
|
||||
@include translateY(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include translateY(20px);
|
||||
opacity: 0; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(fadeOutRight) {
|
||||
0% {
|
||||
@include translateX(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include translateX(20px);
|
||||
opacity: 0; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(fadeOutLeft) {
|
||||
0% {
|
||||
@include translateX(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include translateX(-20px);
|
||||
opacity: 0; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(fadeOutUpBig) {
|
||||
0% {
|
||||
@include translateY(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include translateY(-2000px);
|
||||
opacity: 0; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(fadeOutDownBig) {
|
||||
0% {
|
||||
opacity: 1;
|
||||
@include translateY(0); }
|
||||
100% {
|
||||
opacity: 0;
|
||||
@include translateY(2000px); } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(fadeOutRightBig) {
|
||||
0% {
|
||||
opacity: 1;
|
||||
@include translateX(0); }
|
||||
100% {
|
||||
opacity: 0;
|
||||
@include translateX(2000px); } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(fadeOutLeftBig) {
|
||||
0% {
|
||||
opacity: 1;
|
||||
@include translateX(0); }
|
||||
100% {
|
||||
opacity: 0;
|
||||
@include translateX(-2000px); } }
|
||||
58
src/sass/codewhite/animate/rotating/_rotating-entrances.scss
Normal file
58
src/sass/codewhite/animate/rotating/_rotating-entrances.scss
Normal file
@ -0,0 +1,58 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(rotateIn) {
|
||||
0% {
|
||||
@include transform-origin(center center);
|
||||
@include rotate(-200deg);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include transform-origin(center center);
|
||||
@include rotate(0);
|
||||
opacity: 1; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(rotateInDownLeft) {
|
||||
0% {
|
||||
@include transform-origin(left bottom);
|
||||
@include rotate(-90deg);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include transform-origin(left bottom);
|
||||
@include rotate(0);
|
||||
opacity: 1; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(rotateInUpLeft) {
|
||||
0% {
|
||||
@include transform-origin(left bottom);
|
||||
@include rotate(90deg);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include transform-origin(left bottom);
|
||||
@include rotate(0);
|
||||
opacity: 1; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(rotateInUpRight) {
|
||||
0% {
|
||||
@include transform-origin(right bottom);
|
||||
@include rotate(-90deg);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include transform-origin(right bottom);
|
||||
@include rotate(0);
|
||||
opacity: 1; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(rotateInDownRight) {
|
||||
0% {
|
||||
@include transform-origin(right bottom);
|
||||
@include rotate(90deg);
|
||||
opacity: 0; }
|
||||
100% {
|
||||
@include transform-origin(right bottom);
|
||||
@include rotate(0);
|
||||
opacity: 1; } }
|
||||
58
src/sass/codewhite/animate/rotating/_rotating-exits.scss
Normal file
58
src/sass/codewhite/animate/rotating/_rotating-exits.scss
Normal file
@ -0,0 +1,58 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(rotateOut) {
|
||||
0% {
|
||||
@include transform-origin(center center);
|
||||
@include rotate(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include transform-origin(center center);
|
||||
@include rotate(200deg);
|
||||
opacity: 0; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(rotateOutDownLeft) {
|
||||
0% {
|
||||
@include transform-origin(left bottom);
|
||||
@include rotate(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include transform-origin(left bottom);
|
||||
@include rotate(90deg);
|
||||
opacity: 0; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(rotateOutUpLeft) {
|
||||
0% {
|
||||
@include transform-origin(left bottom);
|
||||
@include rotate(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include transform-origin(left bottom);
|
||||
@include rotate(-90deg);
|
||||
opacity: 0; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(rotateOutDownRight) {
|
||||
0% {
|
||||
@include transform-origin(right bottom);
|
||||
@include rotate(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include transform-origin(right bottom);
|
||||
@include rotate(-90deg);
|
||||
opacity: 0; } }
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@include keyframes(rotateOutUpRight) {
|
||||
0% {
|
||||
@include transform-origin(right bottom);
|
||||
@include rotate(0);
|
||||
opacity: 1; }
|
||||
100% {
|
||||
@include transform-origin(right bottom);
|
||||
@include rotate(90deg);
|
||||
opacity: 0; } }
|
||||
71
src/sass/codewhite/components/_buttons.scss
Normal file
71
src/sass/codewhite/components/_buttons.scss
Normal file
@ -0,0 +1,71 @@
|
||||
//
|
||||
// Button Classes
|
||||
//
|
||||
|
||||
// initially copied from Foundation 4.3.1
|
||||
|
||||
@import "../mixins/buttons";
|
||||
|
||||
// Only include these classes if the variable is true, otherwise they'll be left out.
|
||||
@if $wm-include-html-button-classes != false {
|
||||
|
||||
// Default styles applied outside of media query
|
||||
input[type="submit"], button, .button {
|
||||
@include button-base;
|
||||
@include button-size;
|
||||
@include button-style;
|
||||
|
||||
&.secondary { @include button-style($bg:$c-grey); }
|
||||
&.success { @include button-style($bg:$c-success); }
|
||||
&.alert { @include button-style($bg:$c-alert); }
|
||||
|
||||
&.-t { @include button-size($padding:$wm-button-tny); }
|
||||
&.-s { @include button-size($padding:$wm-button-sml); }
|
||||
&.-l { @include button-size($padding:$wm-button-lrg); }
|
||||
&.expand { @include button-size($padding:null,$full-width:true); }
|
||||
|
||||
&.-tl { text-indent: emCalc(12); }
|
||||
&.-tr { padding-right: emCalc(12); }
|
||||
|
||||
&.disabled, &[disabled] { @include button-style($bg:$c-main-1, $disabled:true);
|
||||
&.secondary { @include button-style($bg:$c-main-2, $disabled:true); }
|
||||
&.success { @include button-style($bg:$c-alert, $disabled:true); }
|
||||
&.alert { @include button-style($bg:$c-alert, $disabled:true); }
|
||||
}
|
||||
}
|
||||
|
||||
input[type="submit"], button, .button {
|
||||
@include button-size($padding:false, $is-input:$wm-button-med);
|
||||
&.tiny { @include button-size($padding:false, $is-input:$wm-button-tny); }
|
||||
&.small { @include button-size($padding:false, $is-input:$wm-button-sml); }
|
||||
&.large { @include button-size($padding:false, $is-input:$wm-button-lrg); }
|
||||
}
|
||||
|
||||
// Styles for any browser or device that support media queries
|
||||
@media only screen {
|
||||
|
||||
input[type="submit"], button, .button {
|
||||
@include box-shadow($wm-shiny-edge-size $wm-shiny-edge-color inset);
|
||||
@include single-transition(background-color);
|
||||
|
||||
&.large { @include button-size($padding:false, $full-width:false); }
|
||||
&.small { @include button-size($padding:false, $full-width:false); }
|
||||
&.tiny { @include button-size($padding:false, $full-width:false); }
|
||||
|
||||
&.radius { @include button-style($bg:false, $radius:true); }
|
||||
&.round { @include button-style($bg:false, $radius:$wm-button-round); }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Additional styles for screens larger than 768px
|
||||
@media #{$wm-small-max} {
|
||||
|
||||
input[type="submit"], button, .button {
|
||||
@include button-base($style:false, $display:inline-block);
|
||||
@include button-size($padding:false, $full-width:false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
182
src/sass/codewhite/components/_forms.scss
Normal file
182
src/sass/codewhite/components/_forms.scss
Normal file
@ -0,0 +1,182 @@
|
||||
//
|
||||
// Form Classes
|
||||
//
|
||||
|
||||
// Copied by LKM from Foundation 4.3.1 2013-09-09 15:14
|
||||
|
||||
@import '../mixins/forms';
|
||||
|
||||
// Only include these classes if the variable is true, otherwise they'll be left out.
|
||||
@if $wm-include-html-form-classes != false {
|
||||
@include form-reset;
|
||||
/* Standard Forms */
|
||||
//form { margin: 0 0 $wm-form-spacing; }
|
||||
|
||||
/* Using forms within rows, we need to set some defaults */
|
||||
form .row { @include form-row-base; }
|
||||
|
||||
/* Label Styles */
|
||||
label {
|
||||
@include form-label;
|
||||
|
||||
&.right { @include form-label(right,false); }
|
||||
&.inline { @include form-label(inline,false); }
|
||||
|
||||
/* Styles for required inputs */
|
||||
small {
|
||||
text-transform: capitalize;
|
||||
color: lighten($wm-form-label-font-color, 10%);
|
||||
}
|
||||
}
|
||||
|
||||
/* Attach elements to the beginning or end of an input */
|
||||
.prefix,
|
||||
.postfix { @include prefix-postfix-base; }
|
||||
|
||||
/* Adjust padding, alignment and radius if pre/post element is a button */
|
||||
.postfix.button { @include button-size(false,false,false); @include postfix(false,true); }
|
||||
.prefix.button { @include button-size(false,false,false); @include prefix(false,true); }
|
||||
|
||||
.prefix.button.radius { @include border-radius(0); @include border-left-radius($wm-button-radius); }
|
||||
.postfix.button.radius { @include border-radius(0); @include border-right-radius($wm-button-radius); }
|
||||
.prefix.button.round { @include border-radius(0); @include border-left-radius($wm-button-round); }
|
||||
.postfix.button.round { @include border-radius(0); @include border-right-radius($wm-button-round); }
|
||||
|
||||
/* Separate prefix and postfix styles when on span or label so buttons keep their own */
|
||||
span.prefix,label.prefix {
|
||||
@include prefix();
|
||||
&.radius { @include border-radius(0); @include border-left-radius($wm-global-radius); }
|
||||
}
|
||||
span.postfix,label.postfix {
|
||||
@include postfix();
|
||||
&.radius { @include border-radius(0); @include border-right-radius($wm-global-radius); }
|
||||
}
|
||||
|
||||
/* Input groups will automatically style first and last elements of the group */
|
||||
.input-group {
|
||||
@if $wm-default-float == left {
|
||||
&.round {
|
||||
&>*:first-child, &>*:first-child * {
|
||||
@include border-left-radius($wm-button-round);
|
||||
}
|
||||
&>*:last-child, &>*:last-child * {
|
||||
@include border-right-radius($wm-button-round);
|
||||
}
|
||||
}
|
||||
&.radius {
|
||||
&>*:first-child, &>*:first-child * {
|
||||
@include border-left-radius($wm-global-radius);
|
||||
}
|
||||
&>*:last-child, &>*:last-child * {
|
||||
@include border-right-radius($wm-global-radius);
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
&.round {
|
||||
&>*:first-child, &>*:first-child * {
|
||||
@include border-right-radius($wm-button-round);
|
||||
}
|
||||
&>*:last-child, &>*:last-child * {
|
||||
@include border-left-radius($wm-button-round);
|
||||
}
|
||||
}
|
||||
&.radius {
|
||||
&>*:first-child, &>*:first-child * {
|
||||
@include border-right-radius($wm-global-radius);
|
||||
}
|
||||
&>*:last-child, &>*:last-child * {
|
||||
@include border-left-radius($wm-global-radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* We use this to get basic styling on all basic form elements */
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
input[type="date"],
|
||||
input[type="datetime"],
|
||||
input[type="datetime-local"],
|
||||
input[type="month"],
|
||||
input[type="week"],
|
||||
input[type="email"],
|
||||
input[type="number"],
|
||||
input[type="search"],
|
||||
input[type="tel"],
|
||||
input[type="time"],
|
||||
input[type="url"],
|
||||
textarea {
|
||||
@include form-element;
|
||||
@if not $wm-input-include-glowing-effect {
|
||||
@include single-transition(all, 0.15s, linear);
|
||||
}
|
||||
}
|
||||
|
||||
select {
|
||||
@include form-select;
|
||||
}
|
||||
|
||||
/* Adjust margin for form elements below */
|
||||
input[type="file"],
|
||||
input[type="checkbox"],
|
||||
input[type="radio"],
|
||||
select {
|
||||
margin: 0 0 $wm-form-spacing 0;
|
||||
}
|
||||
|
||||
/* Normalize file input width */
|
||||
input[type="file"] {
|
||||
width:100%;
|
||||
}
|
||||
|
||||
/* We add basic fieldset styling */
|
||||
fieldset {
|
||||
@include fieldset;
|
||||
}
|
||||
|
||||
/* Error Handling */
|
||||
|
||||
[data-abide] {
|
||||
.error small.error, span.error, small.error {
|
||||
@include form-error-message;
|
||||
margin-top: 0;
|
||||
}
|
||||
span.error, small.error { display: none; }
|
||||
}
|
||||
|
||||
span.error, small.error {
|
||||
@include form-error-message;
|
||||
}
|
||||
.error {
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
@include form-error-color;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
label,
|
||||
label.error {
|
||||
@include form-label-error-color;
|
||||
}
|
||||
|
||||
small.error {
|
||||
@include form-error-message;
|
||||
}
|
||||
|
||||
span.error-message {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
input.error,
|
||||
textarea.error {
|
||||
@include form-error-color;
|
||||
}
|
||||
|
||||
.error select {
|
||||
@include form-error-color;
|
||||
}
|
||||
|
||||
label.error { @include form-label-error-color; }
|
||||
}
|
||||
4
src/sass/codewhite/components/_global.scss
Normal file
4
src/sass/codewhite/components/_global.scss
Normal file
@ -0,0 +1,4 @@
|
||||
@import "../mixins/global";
|
||||
@if $wm-include-html-global-classes {
|
||||
@include global-base;
|
||||
}
|
||||
56
src/sass/codewhite/components/_grid-nr.scss
Normal file
56
src/sass/codewhite/components/_grid-nr.scss
Normal file
@ -0,0 +1,56 @@
|
||||
//
|
||||
// Whitemill Grid
|
||||
//
|
||||
// Copied by LKM from Foundation 4.3.1 2013-09-09 15:14
|
||||
//
|
||||
// @version
|
||||
// 0.1.0
|
||||
//
|
||||
// @title
|
||||
// Grid
|
||||
//
|
||||
// @description
|
||||
// With a default "small-#" grid, a 640-1024px "medium-#" grid, and a 1024+ "large-#" grid, we've got you covered for any layout you can think of.
|
||||
//
|
||||
|
||||
|
||||
@import "../mixins/grid";
|
||||
|
||||
// Right and Left "auto" for grid
|
||||
%right-auto { #{$wm-opposite-direction}: auto; }
|
||||
%left-auto { #{$wm-default-float}: auto; }
|
||||
|
||||
@if $wm-include-html-grid-classes != false {
|
||||
/* Grid HTML Classes */
|
||||
.row {
|
||||
@include grid-row($responsive:false);
|
||||
|
||||
&.collapse {
|
||||
.column,
|
||||
.columns { @include grid-column($collapse:true,$responsive:false); }
|
||||
}
|
||||
|
||||
.row { @include grid-row($behavior:nest,$responsive:false);
|
||||
&.collapse { @include grid-row($behavior:nest-collapse,$responsive:false); }
|
||||
}
|
||||
}
|
||||
|
||||
.column,
|
||||
.columns { @include grid-column($columns:$wm-total-columns, $include-position-relative: true, $responsive:true); }
|
||||
|
||||
|
||||
@for $i from 1 through $wm-total-columns {
|
||||
.medium#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false,$responsive:false); }
|
||||
}
|
||||
|
||||
.column.medium-centered,
|
||||
.columns.medium-centered { @include grid-column($center:true, $collapse:null, $float:false,$responsive:false); }
|
||||
|
||||
.column.medium-uncentered,
|
||||
.columns.medium-uncentered {
|
||||
margin-#{$wm-default-float}: 0;
|
||||
margin-#{$wm-opposite-direction}: 0;
|
||||
float: $wm-default-float !important;
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user