|
@ -146,6 +146,14 @@ define('ADMIN_URI_FILTER', 'admin');
|
|||
// Default language file, in this case is English
|
||||
define('DEFAULT_LANGUAGE_FILE', 'en.json');
|
||||
|
||||
// Session timeout server side, gc_maxlifetime
|
||||
// 3600 = 1hour
|
||||
define('SESSION_GC_MAXLIFETIME', 3600);
|
||||
|
||||
// Session lifetime of the cookie in seconds which is sent to the browser
|
||||
// The value 0 means until the browser is closed
|
||||
define('SESSION_COOKIE_LIFE_TIME', 0);
|
||||
|
||||
// Set internal character encoding
|
||||
mb_internal_encoding(CHARSET);
|
||||
|
||||
|
@ -302,6 +310,8 @@ define('DOMAIN_UPLOADS', DOMAIN.HTML_PATH_UPLOADS);
|
|||
define('DOMAIN_UPLOADS_PROFILES', DOMAIN.HTML_PATH_UPLOADS_PROFILES);
|
||||
define('DOMAIN_UPLOADS_THUMBNAILS', DOMAIN.HTML_PATH_UPLOADS_THUMBNAILS);
|
||||
|
||||
define('DOMAIN_ADMIN', DOMAIN_BASE.ADMIN_URI_FILTER);
|
||||
|
||||
define('DOMAIN_TAGS', Text::addSlashes(DOMAIN_BASE.TAG_URI_FILTER, false, true));
|
||||
define('DOMAIN_CATEGORIES', Text::addSlashes(DOMAIN_BASE.CATEGORY_URI_FILTER, false, true));
|
||||
define('DOMAIN_PAGES', Text::addSlashes(DOMAIN_BASE.PAGE_URI_FILTER, false, true));
|
||||
|
|
|
@ -68,7 +68,7 @@ $pagesByParent = array(PARENT=>array());
|
|||
*/
|
||||
$pagesByParentByKey = array(PARENT=>array());
|
||||
|
||||
$posts = array();
|
||||
$staticContent = $staticPages = buildStaticPages();
|
||||
|
||||
// ============================================================================
|
||||
// Main
|
||||
|
|
|
@ -277,7 +277,7 @@ class dbPages extends dbJSON
|
|||
|
||||
// Returns an array with a list of keys/database of static pages
|
||||
// By default the static pages are sort by position
|
||||
public function getStaticDB()
|
||||
public function getStaticDB($onlyKeys=false)
|
||||
{
|
||||
$tmp = $this->db;
|
||||
foreach ($tmp as $key=>$fields) {
|
||||
|
@ -286,6 +286,9 @@ class dbPages extends dbJSON
|
|||
}
|
||||
}
|
||||
uasort($tmp, array($this, 'sortByPositionLowToHigh'));
|
||||
if ($onlyKeys) {
|
||||
return array_keys($tmp);
|
||||
}
|
||||
return $tmp;
|
||||
}
|
||||
|
||||
|
|
|
@ -199,6 +199,18 @@ function buildPagesByParent($onlyPublished=true) {
|
|||
}
|
||||
}
|
||||
|
||||
function buildStaticPages() {
|
||||
global $dbPages;
|
||||
|
||||
$tmp = array();
|
||||
$staticPages = $dbPages->getStaticDB($onlyKeys=true);
|
||||
foreach ($staticPages as $pageKey) {
|
||||
$staticPage = buildPage($pageKey);
|
||||
array_push($tmp, $staticPage);
|
||||
}
|
||||
return $tmp;
|
||||
}
|
||||
|
||||
// Returns an Array with all pages existing on the system
|
||||
// (boolean) $allPages, TRUE returns all pages with any status, FALSE all published pages
|
||||
/*
|
||||
|
|
|
@ -10,7 +10,10 @@
|
|||
// return true;
|
||||
|
||||
// DEBUG: Ver un nombre con alguna llave random al momentode instalar.
|
||||
$session_name = 'Bludit-KEY';
|
||||
$session_name = 'BLUDIT-KEY';
|
||||
|
||||
// Try to set the session timeout on server side, 1 hour of timeout
|
||||
ini_set('session.gc_maxlifetime', SESSION_GC_MAXLIFETIME);
|
||||
|
||||
// If TRUE cookie will only be sent over secure connections.
|
||||
$secure = false;
|
||||
|
@ -18,15 +21,11 @@
|
|||
// If set to TRUE then PHP will attempt to send the httponly flag when setting the session cookie.
|
||||
$httponly = true;
|
||||
|
||||
// This specifies the lifetime of the cookie in seconds which is sent to the browser.
|
||||
// The value 0 means until the browser is closed.
|
||||
$cookieLifetime = 0;
|
||||
|
||||
// Gets current cookies params.
|
||||
$cookieParams = session_get_cookie_params();
|
||||
|
||||
session_set_cookie_params(
|
||||
$cookieLifetime,
|
||||
SESSION_COOKIE_LIFE_TIME,
|
||||
$cookieParams["path"],
|
||||
$cookieParams["domain"],
|
||||
$secure,
|
||||
|
|
|
@ -44,7 +44,7 @@ class TCP {
|
|||
|
||||
public static function download($url, $destination)
|
||||
{
|
||||
$data = self::http($url, $method='GET', $verifySSL=true, $timeOut=3, $followRedirections=true, $binary=true, $headers=false);
|
||||
$data = self::http($url, $method='GET', $verifySSL=true, $timeOut=30, $followRedirections=true, $binary=true, $headers=false);
|
||||
return file_put_contents($destination, $data);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,9 +50,7 @@ class Theme {
|
|||
|
||||
public static function adminUrl()
|
||||
{
|
||||
global $Site;
|
||||
$siteUrl = $Site->url();
|
||||
return $siteUrl.ADMIN_URI_FILTER;
|
||||
return DOMAIN_ADMIN;
|
||||
}
|
||||
|
||||
// Return the metatag <title> with a predefine structure
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
node_modules
|
|
@ -0,0 +1,11 @@
|
|||
sudo: false
|
||||
language: node_js
|
||||
node_js:
|
||||
- "node"
|
||||
install: npm install
|
||||
script:
|
||||
- npm test
|
||||
- gulp
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013-2017 Blackrock Digital LLC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -0,0 +1,62 @@
|
|||
# [Start Bootstrap - Clean Blog](https://startbootstrap.com/template-overviews/clean-blog/)
|
||||
|
||||
[Clean Blog](http://startbootstrap.com/template-overviews/clean-blog/) is a stylish, responsive blog theme for [Bootstrap](http://getbootstrap.com/) created by [Start Bootstrap](http://startbootstrap.com/). This theme features a blog homepage, about page, contact page, and an example post page along with a working PHP contact form.
|
||||
|
||||
## Preview
|
||||
|
||||
[![Clean Blog Preview](https://startbootstrap.com/assets/img/templates/clean-blog.jpg)](https://blackrockdigital.github.io/startbootstrap-clean-blog/)
|
||||
|
||||
**[View Live Preview](https://blackrockdigital.github.io/startbootstrap-clean-blog/)**
|
||||
|
||||
## Status
|
||||
|
||||
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/BlackrockDigital/startbootstrap-clean-blog/master/LICENSE)
|
||||
[![npm version](https://img.shields.io/npm/v/startbootstrap-clean-blog.svg)](https://www.npmjs.com/package/startbootstrap-clean-blog)
|
||||
[![Build Status](https://travis-ci.org/BlackrockDigital/startbootstrap-clean-blog.svg?branch=master)](https://travis-ci.org/BlackrockDigital/startbootstrap-clean-blog)
|
||||
[![dependencies Status](https://david-dm.org/BlackrockDigital/startbootstrap-clean-blog/status.svg)](https://david-dm.org/BlackrockDigital/startbootstrap-clean-blog)
|
||||
[![devDependencies Status](https://david-dm.org/BlackrockDigital/startbootstrap-clean-blog/dev-status.svg)](https://david-dm.org/BlackrockDigital/startbootstrap-clean-blog?type=dev)
|
||||
|
||||
## Download and Installation
|
||||
|
||||
To begin using this template, choose one of the following options to get started:
|
||||
* [Download the latest release on Start Bootstrap](https://startbootstrap.com/template-overviews/clean-blog/)
|
||||
* Install via npm: `npm i startbootstrap-clean-blog`
|
||||
* Clone the repo: `git clone https://github.com/BlackrockDigital/startbootstrap-clean-blog.git`
|
||||
* [Fork, Clone, or Download on GitHub](https://github.com/BlackrockDigital/startbootstrap-clean-blog)
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic Usage
|
||||
|
||||
After downloading, simply edit the HTML and CSS files included with the template in your favorite text editor to make changes. These are the only files you need to worry about, you can ignore everything else! To preview the changes you make to the code, you can open the `index.html` file in your web browser.
|
||||
|
||||
### Advanced Usage
|
||||
|
||||
After installation, run `npm install` and then run `gulp dev` which will open up a preview of the template in your default browser, watch for changes to core template files, and live reload the browser when changes are saved. You can view the `gulpfile.js` to see which tasks are included with the dev environment.
|
||||
|
||||
## Bugs and Issues
|
||||
|
||||
Have a bug or an issue with this template? [Open a new issue](https://github.com/BlackrockDigital/startbootstrap-clean-blog/issues) here on GitHub or leave a comment on the [template overview page at Start Bootstrap](http://startbootstrap.com/template-overviews/clean-blog/).
|
||||
|
||||
## Custom Builds
|
||||
|
||||
You can hire Start Bootstrap to create a custom build of any template, or create something from scratch using Bootstrap. For more information, visit the **[custom design services page](https://startbootstrap.com/bootstrap-design-services/)**.
|
||||
|
||||
## About
|
||||
|
||||
Start Bootstrap is an open source library of free Bootstrap templates and themes. All of the free templates and themes on Start Bootstrap are released under the MIT license, which means you can use them for any purpose, even for commercial projects.
|
||||
|
||||
* https://startbootstrap.com
|
||||
* https://twitter.com/SBootstrap
|
||||
|
||||
Start Bootstrap was created by and is maintained by **[David Miller](http://davidmiller.io/)**, Owner of [Blackrock Digital](http://blackrockdigital.io/).
|
||||
|
||||
* http://davidmiller.io
|
||||
* https://twitter.com/davidmillerskt
|
||||
* https://github.com/davidtmiller
|
||||
|
||||
Start Bootstrap is based on the [Bootstrap](http://getbootstrap.com/) framework created by [Mark Otto](https://twitter.com/mdo) and [Jacob Thorton](https://twitter.com/fat).
|
||||
|
||||
## Copyright and License
|
||||
|
||||
Copyright 2013-2017 Blackrock Digital LLC. Code released under the [MIT](https://github.com/BlackrockDigital/startbootstrap-clean-blog/blob/gh-pages/LICENSE) license.
|
|
@ -0,0 +1,129 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<title>Clean Blog - Start Bootstrap Theme</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom fonts for this template -->
|
||||
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
||||
<link href='https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
|
||||
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="css/clean-blog.min.css" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="index.html">Start Bootstrap</a>
|
||||
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||
Menu
|
||||
<i class="fa fa-bars"></i>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="index.html">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="about.html">About</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="post.html">Sample Post</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="contact.html">Contact</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Page Header -->
|
||||
<header class="masthead" style="background-image: url('img/about-bg.jpg')">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-10 mx-auto">
|
||||
<div class="page-heading">
|
||||
<h1>About Me</h1>
|
||||
<span class="subheading">This is what I do.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Main Content -->
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-10 mx-auto">
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe nostrum ullam eveniet pariatur voluptates odit, fuga atque ea nobis sit soluta odio, adipisci quas excepturi maxime quae totam ducimus consectetur?</p>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eius praesentium recusandae illo eaque architecto error, repellendus iusto reprehenderit, doloribus, minus sunt. Numquam at quae voluptatum in officia voluptas voluptatibus, minus!</p>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nostrum molestiae debitis nobis, quod sapiente qui voluptatum, placeat magni repudiandae accusantium fugit quas labore non rerum possimus, corrupti enim modi! Et.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-10 mx-auto">
|
||||
<ul class="list-inline text-center">
|
||||
<li class="list-inline-item">
|
||||
<a href="#">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a href="#">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a href="#">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="copyright text-muted">Copyright © Your Website 2017</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Bootstrap core JavaScript -->
|
||||
<script src="vendor/jquery/jquery.min.js"></script>
|
||||
<script src="vendor/popper/popper.min.js"></script>
|
||||
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
|
||||
|
||||
<!-- Custom scripts for this template -->
|
||||
<script src="js/clean-blog.min.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,169 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<title>Clean Blog - Start Bootstrap Theme</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom fonts for this template -->
|
||||
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
||||
<link href='https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
|
||||
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="css/clean-blog.min.css" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="index.html">Start Bootstrap</a>
|
||||
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||
Menu
|
||||
<i class="fa fa-bars"></i>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="index.html">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="about.html">About</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="post.html">Sample Post</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="contact.html">Contact</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Page Header -->
|
||||
<header class="masthead" style="background-image: url('img/contact-bg.jpg')">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-10 mx-auto">
|
||||
<div class="page-heading">
|
||||
<h1>Contact Me</h1>
|
||||
<span class="subheading">Have questions? I have answers (maybe).</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Main Content -->
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-10 mx-auto">
|
||||
<p>Want to get in touch with me? Fill out the form below to send me a message and I will try to get back to you within 24 hours!</p>
|
||||
<!-- Contact Form - Enter your email address on line 19 of the mail/contact_me.php file to make this form work. -->
|
||||
<!-- WARNING: Some web hosts do not allow emails to be sent through forms to common mail hosts like Gmail or Yahoo. It's recommended that you use a private domain email address! -->
|
||||
<!-- NOTE: To use the contact form, your site must be on a live web host with PHP! The form will not work locally! -->
|
||||
<form name="sentMessage" id="contactForm" novalidate>
|
||||
<div class="control-group">
|
||||
<div class="form-group floating-label-form-group controls">
|
||||
<label>Name</label>
|
||||
<input type="text" class="form-control" placeholder="Name" id="name" required data-validation-required-message="Please enter your name.">
|
||||
<p class="help-block text-danger"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="form-group floating-label-form-group controls">
|
||||
<label>Email Address</label>
|
||||
<input type="email" class="form-control" placeholder="Email Address" id="email" required data-validation-required-message="Please enter your email address.">
|
||||
<p class="help-block text-danger"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="form-group col-xs-12 floating-label-form-group controls">
|
||||
<label>Phone Number</label>
|
||||
<input type="tel" class="form-control" placeholder="Phone Number" id="phone" required data-validation-required-message="Please enter your phone number.">
|
||||
<p class="help-block text-danger"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="form-group floating-label-form-group controls">
|
||||
<label>Message</label>
|
||||
<textarea rows="5" class="form-control" placeholder="Message" id="message" required data-validation-required-message="Please enter a message."></textarea>
|
||||
<p class="help-block text-danger"></p>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div id="success"></div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-secondary" id="sendMessageButton">Send</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-10 mx-auto">
|
||||
<ul class="list-inline text-center">
|
||||
<li class="list-inline-item">
|
||||
<a href="#">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a href="#">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a href="#">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="copyright text-muted">Copyright © Your Website 2017</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Bootstrap core JavaScript -->
|
||||
<script src="vendor/jquery/jquery.min.js"></script>
|
||||
<script src="vendor/popper/popper.min.js"></script>
|
||||
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
|
||||
|
||||
<!-- Contact Form JavaScript -->
|
||||
<script src="js/jqBootstrapValidation.js"></script>
|
||||
<script src="js/contact_me.js"></script>
|
||||
|
||||
<!-- Custom scripts for this template -->
|
||||
<script src="js/clean-blog.min.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,351 @@
|
|||
/*!
|
||||
* Start Bootstrap - Clean Blog v4.0.0-beta (https://startbootstrap.com/template-overviews/clean-blog)
|
||||
* Copyright 2013-2017 Start Bootstrap
|
||||
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-clean-blog/blob/master/LICENSE)
|
||||
*/
|
||||
body {
|
||||
font-size: 20px;
|
||||
color: #333333;
|
||||
font-family: 'Lora', 'Times New Roman', serif; }
|
||||
|
||||
p {
|
||||
line-height: 1.5;
|
||||
margin: 30px 0; }
|
||||
p a {
|
||||
text-decoration: underline; }
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-weight: 800;
|
||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; }
|
||||
|
||||
a {
|
||||
color: #333333;
|
||||
-webkit-transition: all 0.2s;
|
||||
-moz-transition: all 0.2s;
|
||||
transition: all 0.2s; }
|
||||
a:focus, a:hover {
|
||||
color: #0085A1; }
|
||||
|
||||
a img:focus, a img:hover {
|
||||
cursor: zoom-in; }
|
||||
|
||||
blockquote {
|
||||
font-style: italic;
|
||||
color: #777777; }
|
||||
|
||||
.section-heading {
|
||||
font-size: 36px;
|
||||
font-weight: 700;
|
||||
margin-top: 60px; }
|
||||
|
||||
.caption {
|
||||
font-size: 14px;
|
||||
font-style: italic;
|
||||
display: block;
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
border-bottom-right-radius: 5px;
|
||||
border-bottom-left-radius: 5px; }
|
||||
|
||||
::-moz-selection {
|
||||
color: white;
|
||||
background: #0085A1;
|
||||
text-shadow: none; }
|
||||
|
||||
::selection {
|
||||
color: white;
|
||||
background: #0085A1;
|
||||
text-shadow: none; }
|
||||
|
||||
img::selection {
|
||||
color: white;
|
||||
background: transparent; }
|
||||
|
||||
img::-moz-selection {
|
||||
color: white;
|
||||
background: transparent; }
|
||||
|
||||
body {
|
||||
-webkit-tap-highlight-color: #0085A1; }
|
||||
|
||||
#mainNav {
|
||||
position: absolute;
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
background-color: white;
|
||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; }
|
||||
#mainNav .navbar-brand {
|
||||
font-weight: 800;
|
||||
color: #777777; }
|
||||
#mainNav .navbar-toggler {
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
padding: 13px;
|
||||
text-transform: uppercase;
|
||||
color: #777777; }
|
||||
#mainNav .navbar-nav > li.nav-item > a {
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 1px;
|
||||
text-transform: uppercase; }
|
||||
@media only screen and (min-width: 992px) {
|
||||
#mainNav {
|
||||
border-bottom: 1px solid transparent;
|
||||
background: transparent; }
|
||||
#mainNav .navbar-brand {
|
||||
padding: 15px 20px;
|
||||
color: white; }
|
||||
#mainNav .navbar-brand:focus, #mainNav .navbar-brand:hover {
|
||||
color: rgba(255, 255, 255, 0.8); }
|
||||
#mainNav .navbar-nav > li.nav-item > a {
|
||||
padding: 15px 20px;
|
||||
color: white; }
|
||||
#mainNav .navbar-nav > li.nav-item > a:focus, #mainNav .navbar-nav > li.nav-item > a:hover {
|
||||
color: rgba(255, 255, 255, 0.8); } }
|
||||
@media only screen and (min-width: 1170px) {
|
||||
#mainNav {
|
||||
-webkit-transition: background-color 0.2s;
|
||||
-moz-transition: background-color 0.2s;
|
||||
transition: background-color 0.2s;
|
||||
/* Force Hardware Acceleration in WebKit */
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
-moz-transform: translate3d(0, 0, 0);
|
||||
-ms-transform: translate3d(0, 0, 0);
|
||||
-o-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
-webkit-backface-visibility: hidden; }
|
||||
#mainNav.is-fixed {
|
||||
/* when the user scrolls down, we hide the header right above the viewport */
|
||||
position: fixed;
|
||||
top: -77px;
|
||||
-webkit-transition: -webkit-transform 0.2s;
|
||||
-moz-transition: -moz-transform 0.2s;
|
||||
transition: transform 0.2s;
|
||||
border-bottom: 1px solid white;
|
||||
background-color: rgba(255, 255, 255, 0.9); }
|
||||
#mainNav.is-fixed .navbar-brand {
|
||||
color: #333333; }
|
||||
#mainNav.is-fixed .navbar-brand:focus, #mainNav.is-fixed .navbar-brand:hover {
|
||||
color: #0085A1; }
|
||||
#mainNav.is-fixed .navbar-nav > li.nav-item > a {
|
||||
color: #333333; }
|
||||
#mainNav.is-fixed .navbar-nav > li.nav-item > a:focus, #mainNav.is-fixed .navbar-nav > li.nav-item > a:hover {
|
||||
color: #0085A1; }
|
||||
#mainNav.is-visible {
|
||||
/* if the user changes the scrolling direction, we show the header */
|
||||
-webkit-transform: translate3d(0, 100%, 0);
|
||||
-moz-transform: translate3d(0, 100%, 0);
|
||||
-ms-transform: translate3d(0, 100%, 0);
|
||||
-o-transform: translate3d(0, 100%, 0);
|
||||
transform: translate3d(0, 100%, 0); } }
|
||||
|
||||
header.masthead {
|
||||
margin-bottom: 50px;
|
||||
background: no-repeat center center;
|
||||
background-color: #777777;
|
||||
background-attachment: scroll;
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
-o-background-size: cover;
|
||||
background-size: cover; }
|
||||
header.masthead .page-heading,
|
||||
header.masthead .post-heading,
|
||||
header.masthead .site-heading {
|
||||
padding: 200px 0 150px;
|
||||
color: white; }
|
||||
@media only screen and (min-width: 768px) {
|
||||
header.masthead .page-heading,
|
||||
header.masthead .post-heading,
|
||||
header.masthead .site-heading {
|
||||
padding: 200px 0; } }
|
||||
header.masthead .page-heading,
|
||||
header.masthead .site-heading {
|
||||
text-align: center; }
|
||||
header.masthead .page-heading h1,
|
||||
header.masthead .site-heading h1 {
|
||||
font-size: 50px;
|
||||
margin-top: 0; }
|
||||
header.masthead .page-heading .subheading,
|
||||
header.masthead .site-heading .subheading {
|
||||
font-size: 24px;
|
||||
font-weight: 300;
|
||||
line-height: 1.1;
|
||||
display: block;
|
||||
margin: 10px 0 0;
|
||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; }
|
||||
@media only screen and (min-width: 768px) {
|
||||
header.masthead .page-heading h1,
|
||||
header.masthead .site-heading h1 {
|
||||
font-size: 80px; } }
|
||||
header.masthead .post-heading h1 {
|
||||
font-size: 35px; }
|
||||
header.masthead .post-heading .meta,
|
||||
header.masthead .post-heading .subheading {
|
||||
line-height: 1.1;
|
||||
display: block; }
|
||||
header.masthead .post-heading .subheading {
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
margin: 10px 0 30px;
|
||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; }
|
||||
header.masthead .post-heading .meta {
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
font-style: italic;
|
||||
font-family: 'Lora', 'Times New Roman', serif; }
|
||||
header.masthead .post-heading .meta a {
|
||||
color: white; }
|
||||
@media only screen and (min-width: 768px) {
|
||||
header.masthead .post-heading h1 {
|
||||
font-size: 55px; }
|
||||
header.masthead .post-heading .subheading {
|
||||
font-size: 30px; } }
|
||||
|
||||
.post-preview > a {
|
||||
color: #333333; }
|
||||
.post-preview > a:focus, .post-preview > a:hover {
|
||||
text-decoration: none;
|
||||
color: #0085A1; }
|
||||
.post-preview > a > .post-title {
|
||||
font-size: 30px;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 10px; }
|
||||
.post-preview > a > .post-subtitle {
|
||||
font-weight: 300;
|
||||
margin: 0 0 10px; }
|
||||
|
||||
.post-preview > .post-meta {
|
||||
font-size: 18px;
|
||||
font-style: italic;
|
||||
margin-top: 0;
|
||||
color: #777777; }
|
||||
.post-preview > .post-meta > a {
|
||||
text-decoration: none;
|
||||
color: #333333; }
|
||||
.post-preview > .post-meta > a:focus, .post-preview > .post-meta > a:hover {
|
||||
text-decoration: underline;
|
||||
color: #0085A1; }
|
||||
|
||||
@media only screen and (min-width: 768px) {
|
||||
.post-preview > a > .post-title {
|
||||
font-size: 36px; } }
|
||||
|
||||
.floating-label-form-group {
|
||||
font-size: 14px;
|
||||
position: relative;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0.5em;
|
||||
border-bottom: 1px solid #eeeeee; }
|
||||
.floating-label-form-group input,
|
||||
.floating-label-form-group textarea {
|
||||
font-size: 1.5em;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
padding: 0;
|
||||
resize: none;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
background: none;
|
||||
box-shadow: none !important;
|
||||
font-family: 'Lora', 'Times New Roman', serif; }
|
||||
.floating-label-form-group input::-webkit-input-placeholder,
|
||||
.floating-label-form-group textarea::-webkit-input-placeholder {
|
||||
color: #777777;
|
||||
font-family: 'Lora', 'Times New Roman', serif; }
|
||||
.floating-label-form-group label {
|
||||
font-size: 0.85em;
|
||||
line-height: 1.764705882em;
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
top: 2em;
|
||||
display: block;
|
||||
margin: 0;
|
||||
-webkit-transition: top 0.3s ease, opacity 0.3s ease;
|
||||
-moz-transition: top 0.3s ease, opacity 0.3s ease;
|
||||
-ms-transition: top 0.3s ease, opacity 0.3s ease;
|
||||
transition: top 0.3s ease, opacity 0.3s ease;
|
||||
vertical-align: middle;
|
||||
vertical-align: baseline;
|
||||
opacity: 0; }
|
||||
.floating-label-form-group .help-block {
|
||||
margin: 15px 0; }
|
||||
|
||||
.floating-label-form-group-with-value label {
|
||||
top: 0;
|
||||
opacity: 1; }
|
||||
|
||||
.floating-label-form-group-with-focus label {
|
||||
color: #0085A1; }
|
||||
|
||||
form .form-group:first-child .floating-label-form-group {
|
||||
border-top: 1px solid #eeeeee; }
|
||||
|
||||
footer {
|
||||
padding: 50px 0 65px; }
|
||||
footer .list-inline {
|
||||
margin: 0;
|
||||
padding: 0; }
|
||||
footer .copyright {
|
||||
font-size: 14px;
|
||||
margin-bottom: 0;
|
||||
text-align: center; }
|
||||
|
||||
.btn {
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
padding: 15px 25px;
|
||||
letter-spacing: 1px;
|
||||
text-transform: uppercase;
|
||||
border-radius: 0;
|
||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; }
|
||||
|
||||
.btn-primary {
|
||||
color: white;
|
||||
border-color: #0085A1;
|
||||
background-color: #0085A1; }
|
||||
.btn-primary.focus, .btn-primary:focus {
|
||||
color: white;
|
||||
border-color: #001c22;
|
||||
background-color: #005b6e; }
|
||||
.btn-primary:hover {
|
||||
color: white;
|
||||
border-color: #005264;
|
||||
background-color: #005b6e; }
|
||||
.btn-primary.active, .btn-primary:active,
|
||||
.open > .btn-primary.dropdown-toggle {
|
||||
color: white;
|
||||
border-color: #005264;
|
||||
background-color: #005b6e; }
|
||||
.btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover, .btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover,
|
||||
.open > .btn-primary.dropdown-toggle.focus,
|
||||
.open > .btn-primary.dropdown-toggle:focus,
|
||||
.open > .btn-primary.dropdown-toggle:hover {
|
||||
color: white;
|
||||
border-color: #001c22;
|
||||
background-color: #003d4a; }
|
||||
.btn-primary.active, .btn-primary:active,
|
||||
.open > .btn-primary.dropdown-toggle {
|
||||
background-image: none; }
|
||||
.btn-primary.disabled.focus, .btn-primary.disabled:focus, .btn-primary.disabled:hover, .btn-primary[disabled].focus, .btn-primary[disabled]:focus, .btn-primary[disabled]:hover,
|
||||
fieldset[disabled] .btn-primary.focus,
|
||||
fieldset[disabled] .btn-primary:focus,
|
||||
fieldset[disabled] .btn-primary:hover {
|
||||
border-color: #0085A1;
|
||||
background-color: #0085A1; }
|
||||
.btn-primary .badge {
|
||||
color: #0085A1;
|
||||
background-color: white; }
|
||||
|
||||
.btn-lg {
|
||||
font-size: 16px;
|
||||
padding: 25px 35px; }
|
||||
|
||||
.btn-default:focus, .btn-default:hover {
|
||||
color: white;
|
||||
border: 1px solid #0085A1;
|
||||
background-color: #0085A1; }
|
|
@ -0,0 +1,111 @@
|
|||
var gulp = require('gulp');
|
||||
var sass = require('gulp-sass');
|
||||
var browserSync = require('browser-sync').create();
|
||||
var header = require('gulp-header');
|
||||
var cleanCSS = require('gulp-clean-css');
|
||||
var rename = require("gulp-rename");
|
||||
var uglify = require('gulp-uglify');
|
||||
var pkg = require('./package.json');
|
||||
|
||||
// Set the banner content
|
||||
var banner = ['/*!\n',
|
||||
' * Start Bootstrap - <%= pkg.title %> v<%= pkg.version %> (<%= pkg.homepage %>)\n',
|
||||
' * Copyright 2013-' + (new Date()).getFullYear(), ' <%= pkg.author %>\n',
|
||||
' * Licensed under <%= pkg.license %> (https://github.com/BlackrockDigital/<%= pkg.name %>/blob/master/LICENSE)\n',
|
||||
' */\n',
|
||||
''
|
||||
].join('');
|
||||
|
||||
// Compiles SCSS files from /scss into /css
|
||||
gulp.task('sass', function() {
|
||||
return gulp.src('scss/clean-blog.scss')
|
||||
.pipe(sass())
|
||||
.pipe(header(banner, {
|
||||
pkg: pkg
|
||||
}))
|
||||
.pipe(gulp.dest('css'))
|
||||
.pipe(browserSync.reload({
|
||||
stream: true
|
||||
}))
|
||||
});
|
||||
|
||||
// Minify compiled CSS
|
||||
gulp.task('minify-css', ['sass'], function() {
|
||||
return gulp.src('css/clean-blog.css')
|
||||
.pipe(cleanCSS({
|
||||
compatibility: 'ie8'
|
||||
}))
|
||||
.pipe(rename({
|
||||
suffix: '.min'
|
||||
}))
|
||||
.pipe(gulp.dest('css'))
|
||||
.pipe(browserSync.reload({
|
||||
stream: true
|
||||
}))
|
||||
});
|
||||
|
||||
// Minify custom JS
|
||||
gulp.task('minify-js', function() {
|
||||
return gulp.src('js/clean-blog.js')
|
||||
.pipe(uglify())
|
||||
.pipe(header(banner, {
|
||||
pkg: pkg
|
||||
}))
|
||||
.pipe(rename({
|
||||
suffix: '.min'
|
||||
}))
|
||||
.pipe(gulp.dest('js'))
|
||||
.pipe(browserSync.reload({
|
||||
stream: true
|
||||
}))
|
||||
});
|
||||
|
||||
// Copy vendor files from /node_modules into /vendor
|
||||
// NOTE: requires `npm install` before running!
|
||||
gulp.task('copy', function() {
|
||||
gulp.src([
|
||||
'node_modules/bootstrap/dist/**/*',
|
||||
'!**/npm.js',
|
||||
'!**/bootstrap-theme.*',
|
||||
'!**/*.map'
|
||||
])
|
||||
.pipe(gulp.dest('vendor/bootstrap'))
|
||||
|
||||
gulp.src(['node_modules/jquery/dist/jquery.js', 'node_modules/jquery/dist/jquery.min.js'])
|
||||
.pipe(gulp.dest('vendor/jquery'))
|
||||
|
||||
gulp.src(['node_modules/popper.js/dist/umd/popper.js', 'node_modules/popper.js/dist/umd/popper.min.js'])
|
||||
.pipe(gulp.dest('vendor/popper'))
|
||||
|
||||
gulp.src([
|
||||
'node_modules/font-awesome/**',
|
||||
'!node_modules/font-awesome/**/*.map',
|
||||
'!node_modules/font-awesome/.npmignore',
|
||||
'!node_modules/font-awesome/*.txt',
|
||||
'!node_modules/font-awesome/*.md',
|
||||
'!node_modules/font-awesome/*.json'
|
||||
])
|
||||
.pipe(gulp.dest('vendor/font-awesome'))
|
||||
})
|
||||
|
||||
// Default task
|
||||
gulp.task('default', ['sass', 'minify-css', 'minify-js', 'copy']);
|
||||
|
||||
// Configure the browserSync task
|
||||
gulp.task('browserSync', function() {
|
||||
browserSync.init({
|
||||
server: {
|
||||
baseDir: ''
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
// Dev task with browserSync
|
||||
gulp.task('dev', ['browserSync', 'sass', 'minify-css', 'minify-js'], function() {
|
||||
gulp.watch('scss/*.scss', ['sass']);
|
||||
gulp.watch('css/*.css', ['minify-css']);
|
||||
gulp.watch('js/*.js', ['minify-js']);
|
||||
// Reloads the browser whenever HTML or JS files change
|
||||
gulp.watch('*.html', browserSync.reload);
|
||||
gulp.watch('js/**/*.js', browserSync.reload);
|
||||
});
|
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 283 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 169 KiB |
After Width: | Height: | Size: 138 KiB |
After Width: | Height: | Size: 112 KiB |
|
@ -0,0 +1,183 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<title>Clean Blog - Start Bootstrap Theme</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom fonts for this template -->
|
||||
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
||||
<link href='https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
|
||||
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="css/clean-blog.min.css" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="index.html">Start Bootstrap</a>
|
||||
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||
Menu
|
||||
<i class="fa fa-bars"></i>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="index.html">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="about.html">About</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="post.html">Sample Post</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="contact.html">Contact</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Page Header -->
|
||||
<header class="masthead" style="background-image: url('https://source.unsplash.com/1600x900/?nature,water')">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-10 mx-auto">
|
||||
<div class="site-heading">
|
||||
<h1>Clean Blog</h1>
|
||||
<span class="subheading">A Blog Theme by Start Bootstrap</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Main Content -->
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-10 mx-auto">
|
||||
<div class="post-preview">
|
||||
<a href="post.html">
|
||||
<h2 class="post-title">
|
||||
Man must explore, and this is exploration at its greatest
|
||||
</h2>
|
||||
<h3 class="post-subtitle">
|
||||
Problems look mighty small from 150 miles up
|
||||
</h3>
|
||||
</a>
|
||||
<p class="post-meta">Posted by
|
||||
<a href="#">Start Bootstrap</a>
|
||||
on September 24, 2017</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="post-preview">
|
||||
<a href="post.html">
|
||||
<h2 class="post-title">
|
||||
I believe every human has a finite number of heartbeats. I don't intend to waste any of mine.
|
||||
</h2>
|
||||
</a>
|
||||
<p class="post-meta">Posted by
|
||||
<a href="#">Start Bootstrap</a>
|
||||
on September 18, 2017</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="post-preview">
|
||||
<a href="post.html">
|
||||
<h2 class="post-title">
|
||||
Science has not yet mastered prophecy
|
||||
</h2>
|
||||
<h3 class="post-subtitle">
|
||||
We predict too much for the next year and yet far too little for the next ten.
|
||||
</h3>
|
||||
</a>
|
||||
<p class="post-meta">Posted by
|
||||
<a href="#">Start Bootstrap</a>
|
||||
on August 24, 2017</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="post-preview">
|
||||
<a href="post.html">
|
||||
<h2 class="post-title">
|
||||
Failure is not an option
|
||||
</h2>
|
||||
<h3 class="post-subtitle">
|
||||
Many say exploration is part of our destiny, but it’s actually our duty to future generations.
|
||||
</h3>
|
||||
</a>
|
||||
<p class="post-meta">Posted by
|
||||
<a href="#">Start Bootstrap</a>
|
||||
on July 8, 2017</p>
|
||||
</div>
|
||||
<hr>
|
||||
<!-- Pager -->
|
||||
<div class="clearfix">
|
||||
<a class="btn btn-secondary float-right" href="#">Older Posts →</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-10 mx-auto">
|
||||
<ul class="list-inline text-center">
|
||||
<li class="list-inline-item">
|
||||
<a href="#">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a href="#">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a href="#">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="copyright text-muted">Copyright © Your Website 2017</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Bootstrap core JavaScript -->
|
||||
<script src="vendor/jquery/jquery.min.js"></script>
|
||||
<script src="vendor/popper/popper.min.js"></script>
|
||||
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
|
||||
|
||||
<!-- Custom scripts for this template -->
|
||||
<script src="js/clean-blog.min.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,98 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<?php
|
||||
include(THEME_DIR_PHP.'head.php')
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
Theme::plugins('siteBodyBegin')
|
||||
?>
|
||||
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="<?php echo $Site->url() ?>"><?php echo $Site->title() ?></a>
|
||||
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||
Menu
|
||||
<i class="fa fa-bars"></i>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href=<?php echo $Site->url() ?>>Home</a>
|
||||
</li>
|
||||
<?php
|
||||
foreach ($staticPages as $staticPage) {
|
||||
echo '<li class="nav-item">';
|
||||
echo '<a class="nav-link" href="'.$staticPage->permalink().'">'.$staticPage->title().'</a>';
|
||||
echo '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Main Content -->
|
||||
<?php
|
||||
if ($WHERE_AM_I=='page') {
|
||||
include(THEME_DIR_PHP.'page.php');
|
||||
} else {
|
||||
include(THEME_DIR_PHP.'home.php');
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-10 mx-auto">
|
||||
<ul class="list-inline text-center">
|
||||
<li class="list-inline-item">
|
||||
<a href="#">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a href="#">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a href="#">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="copyright text-muted">Copyright © Your Website 2017</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Scripts -->
|
||||
<?php
|
||||
echo Theme::jquery(); // Jquery from Bludit Core
|
||||
echo Theme::js('vendor/popper/popper.min.js');
|
||||
echo Theme::js('vendor/bootstrap/js/bootstrap.min.js');
|
||||
echo Theme::js('js/clean-blog.min.js');
|
||||
?>
|
||||
|
||||
<?php
|
||||
Theme::plugins('siteBodyEnd')
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,41 @@
|
|||
(function($) {
|
||||
"use strict"; // Start of use strict
|
||||
|
||||
// Floating label headings for the contact form
|
||||
$("body").on("input propertychange", ".floating-label-form-group", function(e) {
|
||||
$(this).toggleClass("floating-label-form-group-with-value", !!$(e.target).val());
|
||||
}).on("focus", ".floating-label-form-group", function() {
|
||||
$(this).addClass("floating-label-form-group-with-focus");
|
||||
}).on("blur", ".floating-label-form-group", function() {
|
||||
$(this).removeClass("floating-label-form-group-with-focus");
|
||||
});
|
||||
|
||||
// Show the navbar when the page is scrolled up
|
||||
var MQL = 1170;
|
||||
|
||||
//primary navigation slide-in effect
|
||||
if ($(window).width() > MQL) {
|
||||
var headerHeight = $('#mainNav').height();
|
||||
$(window).on('scroll', {
|
||||
previousTop: 0
|
||||
},
|
||||
function() {
|
||||
var currentTop = $(window).scrollTop();
|
||||
//check if user is scrolling up
|
||||
if (currentTop < this.previousTop) {
|
||||
//if scrolling up...
|
||||
if (currentTop > 0 && $('#mainNav').hasClass('is-fixed')) {
|
||||
$('#mainNav').addClass('is-visible');
|
||||
} else {
|
||||
$('#mainNav').removeClass('is-visible is-fixed');
|
||||
}
|
||||
} else if (currentTop > this.previousTop) {
|
||||
//if scrolling down...
|
||||
$('#mainNav').removeClass('is-visible');
|
||||
if (currentTop > headerHeight && !$('#mainNav').hasClass('is-fixed')) $('#mainNav').addClass('is-fixed');
|
||||
}
|
||||
this.previousTop = currentTop;
|
||||
});
|
||||
}
|
||||
|
||||
})(jQuery); // End of use strict
|
|
@ -0,0 +1,6 @@
|
|||
/*!
|
||||
* Start Bootstrap - Clean Blog v4.0.0-beta (https://startbootstrap.com/template-overviews/clean-blog)
|
||||
* Copyright 2013-2017 Start Bootstrap
|
||||
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-clean-blog/blob/master/LICENSE)
|
||||
*/
|
||||
!function(i){"use strict";i("body").on("input propertychange",".floating-label-form-group",function(o){i(this).toggleClass("floating-label-form-group-with-value",!!i(o.target).val())}).on("focus",".floating-label-form-group",function(){i(this).addClass("floating-label-form-group-with-focus")}).on("blur",".floating-label-form-group",function(){i(this).removeClass("floating-label-form-group-with-focus")});if(i(window).width()>1170){var o=i("#mainNav").height();i(window).on("scroll",{previousTop:0},function(){var s=i(window).scrollTop();s<this.previousTop?s>0&&i("#mainNav").hasClass("is-fixed")?i("#mainNav").addClass("is-visible"):i("#mainNav").removeClass("is-visible is-fixed"):s>this.previousTop&&(i("#mainNav").removeClass("is-visible"),s>o&&!i("#mainNav").hasClass("is-fixed")&&i("#mainNav").addClass("is-fixed")),this.previousTop=s})}}(jQuery);
|
|
@ -0,0 +1,75 @@
|
|||
$(function() {
|
||||
|
||||
$("#contactForm input,#contactForm textarea").jqBootstrapValidation({
|
||||
preventSubmit: true,
|
||||
submitError: function($form, event, errors) {
|
||||
// additional error messages or events
|
||||
},
|
||||
submitSuccess: function($form, event) {
|
||||
event.preventDefault(); // prevent default submit behaviour
|
||||
// get values from FORM
|
||||
var name = $("input#name").val();
|
||||
var email = $("input#email").val();
|
||||
var phone = $("input#phone").val();
|
||||
var message = $("textarea#message").val();
|
||||
var firstName = name; // For Success/Failure Message
|
||||
// Check for white space in name for Success/Fail message
|
||||
if (firstName.indexOf(' ') >= 0) {
|
||||
firstName = name.split(' ').slice(0, -1).join(' ');
|
||||
}
|
||||
$this = $("#sendMessageButton");
|
||||
$this.prop("disabled", true); // Disable submit button until AJAX call is complete to prevent duplicate messages
|
||||
$.ajax({
|
||||
url: "././mail/contact_me.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
name: name,
|
||||
phone: phone,
|
||||
email: email,
|
||||
message: message
|
||||
},
|
||||
cache: false,
|
||||
success: function() {
|
||||
// Success message
|
||||
$('#success').html("<div class='alert alert-success'>");
|
||||
$('#success > .alert-success').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×")
|
||||
.append("</button>");
|
||||
$('#success > .alert-success')
|
||||
.append("<strong>Your message has been sent. </strong>");
|
||||
$('#success > .alert-success')
|
||||
.append('</div>');
|
||||
//clear all fields
|
||||
$('#contactForm').trigger("reset");
|
||||
},
|
||||
error: function() {
|
||||
// Fail message
|
||||
$('#success').html("<div class='alert alert-danger'>");
|
||||
$('#success > .alert-danger').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×")
|
||||
.append("</button>");
|
||||
$('#success > .alert-danger').append($("<strong>").text("Sorry " + firstName + ", it seems that my mail server is not responding. Please try again later!"));
|
||||
$('#success > .alert-danger').append('</div>');
|
||||
//clear all fields
|
||||
$('#contactForm').trigger("reset");
|
||||
},
|
||||
complete: function() {
|
||||
setTimeout(function() {
|
||||
$this.prop("disabled", false); // Re-enable submit button when AJAX call is complete
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
},
|
||||
filter: function() {
|
||||
return $(this).is(":visible");
|
||||
},
|
||||
});
|
||||
|
||||
$("a[data-toggle=\"tab\"]").click(function(e) {
|
||||
e.preventDefault();
|
||||
$(this).tab("show");
|
||||
});
|
||||
});
|
||||
|
||||
/*When clicking on Full hide fail/success boxes */
|
||||
$('#name').focus(function() {
|
||||
$('#success').html('');
|
||||
});
|
|
@ -0,0 +1,937 @@
|
|||
/* jqBootstrapValidation
|
||||
* A plugin for automating validation on Twitter Bootstrap formatted forms.
|
||||
*
|
||||
* v1.3.6
|
||||
*
|
||||
* License: MIT <http://opensource.org/licenses/mit-license.php> - see LICENSE file
|
||||
*
|
||||
* http://ReactiveRaven.github.com/jqBootstrapValidation/
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
|
||||
var createdElements = [];
|
||||
|
||||
var defaults = {
|
||||
options: {
|
||||
prependExistingHelpBlock: false,
|
||||
sniffHtml: true, // sniff for 'required', 'maxlength', etc
|
||||
preventSubmit: true, // stop the form submit event from firing if validation fails
|
||||
submitError: false, // function called if there is an error when trying to submit
|
||||
submitSuccess: false, // function called just before a successful submit event is sent to the server
|
||||
semanticallyStrict: false, // set to true to tidy up generated HTML output
|
||||
autoAdd: {
|
||||
helpBlocks: true
|
||||
},
|
||||
filter: function() {
|
||||
// return $(this).is(":visible"); // only validate elements you can see
|
||||
return true; // validate everything
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init: function(options) {
|
||||
|
||||
var settings = $.extend(true, {}, defaults);
|
||||
|
||||
settings.options = $.extend(true, settings.options, options);
|
||||
|
||||
var $siblingElements = this;
|
||||
|
||||
var uniqueForms = $.unique(
|
||||
$siblingElements.map(function() {
|
||||
return $(this).parents("form")[0];
|
||||
}).toArray()
|
||||
);
|
||||
|
||||
$(uniqueForms).bind("submit", function(e) {
|
||||
var $form = $(this);
|
||||
var warningsFound = 0;
|
||||
var $inputs = $form.find("input,textarea,select").not("[type=submit],[type=image]").filter(settings.options.filter);
|
||||
$inputs.trigger("submit.validation").trigger("validationLostFocus.validation");
|
||||
|
||||
$inputs.each(function(i, el) {
|
||||
var $this = $(el),
|
||||
$controlGroup = $this.parents(".form-group").first();
|
||||
if (
|
||||
$controlGroup.hasClass("warning")
|
||||
) {
|
||||
$controlGroup.removeClass("warning").addClass("error");
|
||||
warningsFound++;
|
||||
}
|
||||
});
|
||||
|
||||
$inputs.trigger("validationLostFocus.validation");
|
||||
|
||||
if (warningsFound) {
|
||||
if (settings.options.preventSubmit) {
|
||||
e.preventDefault();
|
||||
}
|
||||
$form.addClass("error");
|
||||
if ($.isFunction(settings.options.submitError)) {
|
||||
settings.options.submitError($form, e, $inputs.jqBootstrapValidation("collectErrors", true));
|
||||
}
|
||||
} else {
|
||||
$form.removeClass("error");
|
||||
if ($.isFunction(settings.options.submitSuccess)) {
|
||||
settings.options.submitSuccess($form, e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return this.each(function() {
|
||||
|
||||
// Get references to everything we're interested in
|
||||
var $this = $(this),
|
||||
$controlGroup = $this.parents(".form-group").first(),
|
||||
$helpBlock = $controlGroup.find(".help-block").first(),
|
||||
$form = $this.parents("form").first(),
|
||||
validatorNames = [];
|
||||
|
||||
// create message container if not exists
|
||||
if (!$helpBlock.length && settings.options.autoAdd && settings.options.autoAdd.helpBlocks) {
|
||||
$helpBlock = $('<div class="help-block" />');
|
||||
$controlGroup.find('.controls').append($helpBlock);
|
||||
createdElements.push($helpBlock[0]);
|
||||
}
|
||||
|
||||
// =============================================================
|
||||
// SNIFF HTML FOR VALIDATORS
|
||||
// =============================================================
|
||||
|
||||
// *snort sniff snuffle*
|
||||
|
||||
if (settings.options.sniffHtml) {
|
||||
var message = "";
|
||||
// ---------------------------------------------------------
|
||||
// PATTERN
|
||||
// ---------------------------------------------------------
|
||||
if ($this.attr("pattern") !== undefined) {
|
||||
message = "Not in the expected format<!-- data-validation-pattern-message to override -->";
|
||||
if ($this.data("validationPatternMessage")) {
|
||||
message = $this.data("validationPatternMessage");
|
||||
}
|
||||
$this.data("validationPatternMessage", message);
|
||||
$this.data("validationPatternRegex", $this.attr("pattern"));
|
||||
}
|
||||
// ---------------------------------------------------------
|
||||
// MAX
|
||||
// ---------------------------------------------------------
|
||||
if ($this.attr("max") !== undefined || $this.attr("aria-valuemax") !== undefined) {
|
||||
var max = ($this.attr("max") !== undefined ? $this.attr("max") : $this.attr("aria-valuemax"));
|
||||
message = "Too high: Maximum of '" + max + "'<!-- data-validation-max-message to override -->";
|
||||
if ($this.data("validationMaxMessage")) {
|
||||
message = $this.data("validationMaxMessage");
|
||||
}
|
||||
$this.data("validationMaxMessage", message);
|
||||
$this.data("validationMaxMax", max);
|
||||
}
|
||||
// ---------------------------------------------------------
|
||||
// MIN
|
||||
// ---------------------------------------------------------
|
||||
if ($this.attr("min") !== undefined || $this.attr("aria-valuemin") !== undefined) {
|
||||
var min = ($this.attr("min") !== undefined ? $this.attr("min") : $this.attr("aria-valuemin"));
|
||||
message = "Too low: Minimum of '" + min + "'<!-- data-validation-min-message to override -->";
|
||||
if ($this.data("validationMinMessage")) {
|
||||
message = $this.data("validationMinMessage");
|
||||
}
|
||||
$this.data("validationMinMessage", message);
|
||||
$this.data("validationMinMin", min);
|
||||
}
|
||||
// ---------------------------------------------------------
|
||||
// MAXLENGTH
|
||||
// ---------------------------------------------------------
|
||||
if ($this.attr("maxlength") !== undefined) {
|
||||
message = "Too long: Maximum of '" + $this.attr("maxlength") + "' characters<!-- data-validation-maxlength-message to override -->";
|
||||
if ($this.data("validationMaxlengthMessage")) {
|
||||
message = $this.data("validationMaxlengthMessage");
|
||||
}
|
||||
$this.data("validationMaxlengthMessage", message);
|
||||
$this.data("validationMaxlengthMaxlength", $this.attr("maxlength"));
|
||||
}
|
||||
// ---------------------------------------------------------
|
||||
// MINLENGTH
|
||||
// ---------------------------------------------------------
|
||||
if ($this.attr("minlength") !== undefined) {
|
||||
message = "Too short: Minimum of '" + $this.attr("minlength") + "' characters<!-- data-validation-minlength-message to override -->";
|
||||
if ($this.data("validationMinlengthMessage")) {
|
||||
message = $this.data("validationMinlengthMessage");
|
||||
}
|
||||
$this.data("validationMinlengthMessage", message);
|
||||
$this.data("validationMinlengthMinlength", $this.attr("minlength"));
|
||||
}
|
||||
// ---------------------------------------------------------
|
||||
// REQUIRED
|
||||
// ---------------------------------------------------------
|
||||
if ($this.attr("required") !== undefined || $this.attr("aria-required") !== undefined) {
|
||||
message = settings.builtInValidators.required.message;
|
||||
if ($this.data("validationRequiredMessage")) {
|
||||
message = $this.data("validationRequiredMessage");
|
||||
}
|
||||
$this.data("validationRequiredMessage", message);
|
||||
}
|
||||
// ---------------------------------------------------------
|
||||
// NUMBER
|
||||
// ---------------------------------------------------------
|
||||
if ($this.attr("type") !== undefined && $this.attr("type").toLowerCase() === "number") {
|
||||
message = settings.builtInValidators.number.message;
|
||||
if ($this.data("validationNumberMessage")) {
|
||||
message = $this.data("validationNumberMessage");
|
||||
}
|
||||
$this.data("validationNumberMessage", message);
|
||||
}
|
||||
// ---------------------------------------------------------
|
||||
// EMAIL
|
||||
// ---------------------------------------------------------
|
||||
if ($this.attr("type") !== undefined && $this.attr("type").toLowerCase() === "email") {
|
||||
message = "Not a valid email address<!-- data-validator-validemail-message to override -->";
|
||||
if ($this.data("validationValidemailMessage")) {
|
||||
message = $this.data("validationValidemailMessage");
|
||||
} else if ($this.data("validationEmailMessage")) {
|
||||
message = $this.data("validationEmailMessage");
|
||||
}
|
||||
$this.data("validationValidemailMessage", message);
|
||||
}
|
||||
// ---------------------------------------------------------
|
||||
// MINCHECKED
|
||||
// ---------------------------------------------------------
|
||||
if ($this.attr("minchecked") !== undefined) {
|
||||
message = "Not enough options checked; Minimum of '" + $this.attr("minchecked") + "' required<!-- data-validation-minchecked-message to override -->";
|
||||
if ($this.data("validationMincheckedMessage")) {
|
||||
message = $this.data("validationMincheckedMessage");
|
||||
}
|
||||
$this.data("validationMincheckedMessage", message);
|
||||
$this.data("validationMincheckedMinchecked", $this.attr("minchecked"));
|
||||
}
|
||||
// ---------------------------------------------------------
|
||||
// MAXCHECKED
|
||||
// ---------------------------------------------------------
|
||||
if ($this.attr("maxchecked") !== undefined) {
|
||||
message = "Too many options checked; Maximum of '" + $this.attr("maxchecked") + "' required<!-- data-validation-maxchecked-message to override -->";
|
||||
if ($this.data("validationMaxcheckedMessage")) {
|
||||
message = $this.data("validationMaxcheckedMessage");
|
||||
}
|
||||
$this.data("validationMaxcheckedMessage", message);
|
||||
$this.data("validationMaxcheckedMaxchecked", $this.attr("maxchecked"));
|
||||
}
|
||||
}
|
||||
|
||||
// =============================================================
|
||||
// COLLECT VALIDATOR NAMES
|
||||
// =============================================================
|
||||
|
||||
// Get named validators
|
||||
if ($this.data("validation") !== undefined) {
|
||||
validatorNames = $this.data("validation").split(",");
|
||||
}
|
||||
|
||||
// Get extra ones defined on the element's data attributes
|
||||
$.each($this.data(), function(i, el) {
|
||||
var parts = i.replace(/([A-Z])/g, ",$1").split(",");
|
||||
if (parts[0] === "validation" && parts[1]) {
|
||||
validatorNames.push(parts[1]);
|
||||
}
|
||||
});
|
||||
|
||||
// =============================================================
|
||||
// NORMALISE VALIDATOR NAMES
|
||||
// =============================================================
|
||||
|
||||
var validatorNamesToInspect = validatorNames;
|
||||
var newValidatorNamesToInspect = [];
|
||||
|
||||
do // repeatedly expand 'shortcut' validators into their real validators
|
||||
{
|
||||
// Uppercase only the first letter of each name
|
||||
$.each(validatorNames, function(i, el) {
|
||||
validatorNames[i] = formatValidatorName(el);
|
||||
});
|
||||
|
||||
// Remove duplicate validator names
|
||||
validatorNames = $.unique(validatorNames);
|
||||
|
||||
// Pull out the new validator names from each shortcut
|
||||
newValidatorNamesToInspect = [];
|
||||
$.each(validatorNamesToInspect, function(i, el) {
|
||||
if ($this.data("validation" + el + "Shortcut") !== undefined) {
|
||||
// Are these custom validators?
|
||||
// Pull them out!
|
||||
$.each($this.data("validation" + el + "Shortcut").split(","), function(i2, el2) {
|
||||
newValidatorNamesToInspect.push(el2);
|
||||
});
|
||||
} else if (settings.builtInValidators[el.toLowerCase()]) {
|
||||
// Is this a recognised built-in?
|
||||
// Pull it out!
|
||||
var validator = settings.builtInValidators[el.toLowerCase()];
|
||||
if (validator.type.toLowerCase() === "shortcut") {
|
||||
$.each(validator.shortcut.split(","), function(i, el) {
|
||||
el = formatValidatorName(el);
|
||||
newValidatorNamesToInspect.push(el);
|
||||
validatorNames.push(el);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
validatorNamesToInspect = newValidatorNamesToInspect;
|
||||
|
||||
} while (validatorNamesToInspect.length > 0)
|
||||
|
||||
// =============================================================
|
||||
// SET UP VALIDATOR ARRAYS
|
||||
// =============================================================
|
||||
|
||||
var validators = {};
|
||||
|
||||
$.each(validatorNames, function(i, el) {
|
||||
// Set up the 'override' message
|
||||
var message = $this.data("validation" + el + "Message");
|
||||
var hasOverrideMessage = (message !== undefined);
|
||||
var foundValidator = false;
|
||||
message =
|
||||
(
|
||||
message ?
|
||||
message :
|
||||
"'" + el + "' validation failed <!-- Add attribute 'data-validation-" + el.toLowerCase() + "-message' to input to change this message -->"
|
||||
);
|
||||
|
||||
$.each(
|
||||
settings.validatorTypes,
|
||||
function(validatorType, validatorTemplate) {
|
||||
if (validators[validatorType] === undefined) {
|
||||
validators[validatorType] = [];
|
||||
}
|
||||
if (!foundValidator && $this.data("validation" + el + formatValidatorName(validatorTemplate.name)) !== undefined) {
|
||||
validators[validatorType].push(
|
||||
$.extend(
|
||||
true, {
|
||||
name: formatValidatorName(validatorTemplate.name),
|
||||
message: message
|
||||
},
|
||||
validatorTemplate.init($this, el)
|
||||
)
|
||||
);
|
||||
foundValidator = true;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
if (!foundValidator && settings.builtInValidators[el.toLowerCase()]) {
|
||||
|
||||
var validator = $.extend(true, {}, settings.builtInValidators[el.toLowerCase()]);
|
||||
if (hasOverrideMessage) {
|
||||
validator.message = message;
|
||||
}
|
||||
var validatorType = validator.type.toLowerCase();
|
||||
|
||||
if (validatorType === "shortcut") {
|
||||
foundValidator = true;
|
||||
} else {
|
||||
$.each(
|
||||
settings.validatorTypes,
|
||||
function(validatorTemplateType, validatorTemplate) {
|
||||
if (validators[validatorTemplateType] === undefined) {
|
||||
validators[validatorTemplateType] = [];
|
||||
}
|
||||
if (!foundValidator && validatorType === validatorTemplateType.toLowerCase()) {
|
||||
$this.data("validation" + el + formatValidatorName(validatorTemplate.name), validator[validatorTemplate.name.toLowerCase()]);
|
||||
validators[validatorType].push(
|
||||
$.extend(
|
||||
validator,
|
||||
validatorTemplate.init($this, el)
|
||||
)
|
||||
);
|
||||
foundValidator = true;
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (!foundValidator) {
|
||||
$.error("Cannot find validation info for '" + el + "'");
|
||||
}
|
||||
});
|
||||
|
||||
// =============================================================
|
||||
// STORE FALLBACK VALUES
|
||||
// =============================================================
|
||||
|
||||
$helpBlock.data(
|
||||
"original-contents",
|
||||
(
|
||||
$helpBlock.data("original-contents") ?
|
||||
$helpBlock.data("original-contents") :
|
||||
$helpBlock.html()
|
||||
)
|
||||
);
|
||||
|
||||
$helpBlock.data(
|
||||
"original-role",
|
||||
(
|
||||
$helpBlock.data("original-role") ?
|
||||
$helpBlock.data("original-role") :
|
||||
$helpBlock.attr("role")
|
||||
)
|
||||
);
|
||||
|
||||
$controlGroup.data(
|
||||
"original-classes",
|
||||
(
|
||||
$controlGroup.data("original-clases") ?
|
||||
$controlGroup.data("original-classes") :
|
||||
$controlGroup.attr("class")
|
||||
)
|
||||
);
|
||||
|
||||
$this.data(
|
||||
"original-aria-invalid",
|
||||
(
|
||||
$this.data("original-aria-invalid") ?
|
||||
$this.data("original-aria-invalid") :
|
||||
$this.attr("aria-invalid")
|
||||
)
|
||||
);
|
||||
|
||||
// =============================================================
|
||||
// VALIDATION
|
||||
// =============================================================
|
||||
|
||||
$this.bind(
|
||||
"validation.validation",
|
||||
function(event, params) {
|
||||
|
||||
var value = getValue($this);
|
||||
|
||||
// Get a list of the errors to apply
|
||||
var errorsFound = [];
|
||||
|
||||
$.each(validators, function(validatorType, validatorTypeArray) {
|
||||
if (value || value.length || (params && params.includeEmpty) || (!!settings.validatorTypes[validatorType].blockSubmit && params && !!params.submitting)) {
|
||||
$.each(validatorTypeArray, function(i, validator) {
|
||||
if (settings.validatorTypes[validatorType].validate($this, value, validator)) {
|
||||
errorsFound.push(validator.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return errorsFound;
|
||||
}
|
||||
);
|
||||
|
||||
$this.bind(
|
||||
"getValidators.validation",
|
||||
function() {
|
||||
return validators;
|
||||
}
|
||||
);
|
||||
|
||||
// =============================================================
|
||||
// WATCH FOR CHANGES
|
||||
// =============================================================
|
||||
$this.bind(
|
||||
"submit.validation",
|
||||
function() {
|
||||
return $this.triggerHandler("change.validation", {
|
||||
submitting: true
|
||||
});
|
||||
}
|
||||
);
|
||||
$this.bind(
|
||||
[
|
||||
"keyup",
|
||||
"focus",
|
||||
"blur",
|
||||
"click",
|
||||
"keydown",
|
||||
"keypress",
|
||||
"change"
|
||||
].join(".validation ") + ".validation",
|
||||
function(e, params) {
|
||||
|
||||
var value = getValue($this);
|
||||
|
||||
var errorsFound = [];
|
||||
|
||||
$controlGroup.find("input,textarea,select").each(function(i, el) {
|
||||
var oldCount = errorsFound.length;
|
||||
$.each($(el).triggerHandler("validation.validation", params), function(j, message) {
|
||||
errorsFound.push(message);
|
||||
});
|
||||
if (errorsFound.length > oldCount) {
|
||||
$(el).attr("aria-invalid", "true");
|
||||
} else {
|
||||
var original = $this.data("original-aria-invalid");
|
||||
$(el).attr("aria-invalid", (original !== undefined ? original : false));
|
||||
}
|
||||
});
|
||||
|
||||
$form.find("input,select,textarea").not($this).not("[name=\"" + $this.attr("name") + "\"]").trigger("validationLostFocus.validation");
|
||||
|
||||
errorsFound = $.unique(errorsFound.sort());
|
||||
|
||||
// Were there any errors?
|
||||
if (errorsFound.length) {
|
||||
// Better flag it up as a warning.
|
||||
$controlGroup.removeClass("success error").addClass("warning");
|
||||
|
||||
// How many errors did we find?
|
||||
if (settings.options.semanticallyStrict && errorsFound.length === 1) {
|
||||
// Only one? Being strict? Just output it.
|
||||
$helpBlock.html(errorsFound[0] +
|
||||
(settings.options.prependExistingHelpBlock ? $helpBlock.data("original-contents") : ""));
|
||||
} else {
|
||||
// Multiple? Being sloppy? Glue them together into an UL.
|
||||
$helpBlock.html("<ul role=\"alert\"><li>" + errorsFound.join("</li><li>") + "</li></ul>" +
|
||||
(settings.options.prependExistingHelpBlock ? $helpBlock.data("original-contents") : ""));
|
||||
}
|
||||
} else {
|
||||
$controlGroup.removeClass("warning error success");
|
||||
if (value.length > 0) {
|
||||
$controlGroup.addClass("success");
|
||||
}
|
||||
$helpBlock.html($helpBlock.data("original-contents"));
|
||||
}
|
||||
|
||||
if (e.type === "blur") {
|
||||
$controlGroup.removeClass("success");
|
||||
}
|
||||
}
|
||||
);
|
||||
$this.bind("validationLostFocus.validation", function() {
|
||||
$controlGroup.removeClass("success");
|
||||
});
|
||||
});
|
||||
},
|
||||
destroy: function() {
|
||||
|
||||
return this.each(
|
||||
function() {
|
||||
|
||||
var
|
||||
$this = $(this),
|
||||
$controlGroup = $this.parents(".form-group").first(),
|
||||
$helpBlock = $controlGroup.find(".help-block").first();
|
||||
|
||||
// remove our events
|
||||
$this.unbind('.validation'); // events are namespaced.
|
||||
// reset help text
|
||||
$helpBlock.html($helpBlock.data("original-contents"));
|
||||
// reset classes
|
||||
$controlGroup.attr("class", $controlGroup.data("original-classes"));
|
||||
// reset aria
|
||||
$this.attr("aria-invalid", $this.data("original-aria-invalid"));
|
||||
// reset role
|
||||
$helpBlock.attr("role", $this.data("original-role"));
|
||||
// remove all elements we created
|
||||
if (createdElements.indexOf($helpBlock[0]) > -1) {
|
||||
$helpBlock.remove();
|
||||
}
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
},
|
||||
collectErrors: function(includeEmpty) {
|
||||
|
||||
var errorMessages = {};
|
||||
this.each(function(i, el) {
|
||||
var $el = $(el);
|
||||
var name = $el.attr("name");
|
||||
var errors = $el.triggerHandler("validation.validation", {
|
||||
includeEmpty: true
|
||||
});
|
||||
errorMessages[name] = $.extend(true, errors, errorMessages[name]);
|
||||
});
|
||||
|
||||
$.each(errorMessages, function(i, el) {
|
||||
if (el.length === 0) {
|
||||
delete errorMessages[i];
|
||||
}
|
||||
});
|
||||
|
||||
return errorMessages;
|
||||
|
||||
},
|
||||
hasErrors: function() {
|
||||
|
||||
var errorMessages = [];
|
||||
|
||||
this.each(function(i, el) {
|
||||
errorMessages = errorMessages.concat(
|
||||
$(el).triggerHandler("getValidators.validation") ? $(el).triggerHandler("validation.validation", {
|
||||
submitting: true
|
||||
}) : []
|
||||
);
|
||||
});
|
||||
|
||||
return (errorMessages.length > 0);
|
||||
},
|
||||
override: function(newDefaults) {
|
||||
defaults = $.extend(true, defaults, newDefaults);
|
||||
}
|
||||
},
|
||||
validatorTypes: {
|
||||
callback: {
|
||||
name: "callback",
|
||||
init: function($this, name) {
|
||||
return {
|
||||
validatorName: name,
|
||||
callback: $this.data("validation" + name + "Callback"),
|
||||
lastValue: $this.val(),
|
||||
lastValid: true,
|
||||
lastFinished: true
|
||||
};
|
||||
},
|
||||
validate: function($this, value, validator) {
|
||||
if (validator.lastValue === value && validator.lastFinished) {
|
||||
return !validator.lastValid;
|
||||
}
|
||||
|
||||
if (validator.lastFinished === true) {
|
||||
validator.lastValue = value;
|
||||
validator.lastValid = true;
|
||||
validator.lastFinished = false;
|
||||
|
||||
var rrjqbvValidator = validator;
|
||||
var rrjqbvThis = $this;
|
||||
executeFunctionByName(
|
||||
validator.callback,
|
||||
window,
|
||||
$this,
|
||||
value,
|
||||
function(data) {
|
||||
if (rrjqbvValidator.lastValue === data.value) {
|
||||
rrjqbvValidator.lastValid = data.valid;
|
||||
if (data.message) {
|
||||
rrjqbvValidator.message = data.message;
|
||||
}
|
||||
rrjqbvValidator.lastFinished = true;
|
||||
rrjqbvThis.data("validation" + rrjqbvValidator.validatorName + "Message", rrjqbvValidator.message);
|
||||
// Timeout is set to avoid problems with the events being considered 'already fired'
|
||||
setTimeout(function() {
|
||||
rrjqbvThis.trigger("change.validation");
|
||||
}, 1); // doesn't need a long timeout, just long enough for the event bubble to burst
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
},
|
||||
ajax: {
|
||||
name: "ajax",
|
||||
init: function($this, name) {
|
||||
return {
|
||||
validatorName: name,
|
||||
url: $this.data("validation" + name + "Ajax"),
|
||||
lastValue: $this.val(),
|
||||
lastValid: true,
|
||||
lastFinished: true
|
||||
};
|
||||
},
|
||||
validate: function($this, value, validator) {
|
||||
if ("" + validator.lastValue === "" + value && validator.lastFinished === true) {
|
||||
return validator.lastValid === false;
|
||||
}
|
||||
|
||||
if (validator.lastFinished === true) {
|
||||
validator.lastValue = value;
|
||||
validator.lastValid = true;
|
||||
validator.lastFinished = false;
|
||||
$.ajax({
|
||||
url: validator.url,
|
||||
data: "value=" + value + "&field=" + $this.attr("name"),
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if ("" + validator.lastValue === "" + data.value) {
|
||||
validator.lastValid = !!(data.valid);
|
||||
if (data.message) {
|
||||
validator.message = data.message;
|
||||
}
|
||||
validator.lastFinished = true;
|
||||
$this.data("validation" + validator.validatorName + "Message", validator.message);
|
||||
// Timeout is set to avoid problems with the events being considered 'already fired'
|
||||
setTimeout(function() {
|
||||
$this.trigger("change.validation");
|
||||
}, 1); // doesn't need a long timeout, just long enough for the event bubble to burst
|
||||
}
|
||||
},
|
||||
failure: function() {
|
||||
validator.lastValid = true;
|
||||
validator.message = "ajax call failed";
|
||||
validator.lastFinished = true;
|
||||
$this.data("validation" + validator.validatorName + "Message", validator.message);
|
||||
// Timeout is set to avoid problems with the events being considered 'already fired'
|
||||
setTimeout(function() {
|
||||
$this.trigger("change.validation");
|
||||
}, 1); // doesn't need a long timeout, just long enough for the event bubble to burst
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
},
|
||||
regex: {
|
||||
name: "regex",
|
||||
init: function($this, name) {
|
||||
return {
|
||||
regex: regexFromString($this.data("validation" + name + "Regex"))
|
||||
};
|
||||
},
|
||||
validate: function($this, value, validator) {
|
||||
return (!validator.regex.test(value) && !validator.negative) ||
|
||||
(validator.regex.test(value) && validator.negative);
|
||||
}
|
||||
},
|
||||
required: {
|
||||
name: "required",
|
||||
init: function($this, name) {
|
||||
return {};
|
||||
},
|
||||
validate: function($this, value, validator) {
|
||||
return !!(value.length === 0 && !validator.negative) ||
|
||||
!!(value.length > 0 && validator.negative);
|
||||
},
|
||||
blockSubmit: true
|
||||
},
|
||||
match: {
|
||||
name: "match",
|
||||
init: function($this, name) {
|
||||
var element = $this.parents("form").first().find("[name=\"" + $this.data("validation" + name + "Match") + "\"]").first();
|
||||
element.bind("validation.validation", function() {
|
||||
$this.trigger("change.validation", {
|
||||
submitting: true
|
||||
});
|
||||
});
|
||||
return {
|
||||
"element": element
|
||||
};
|
||||
},
|
||||
validate: function($this, value, validator) {
|
||||
return (value !== validator.element.val() && !validator.negative) ||
|
||||
(value === validator.element.val() && validator.negative);
|
||||
},
|
||||
blockSubmit: true
|
||||
},
|
||||
max: {
|
||||
name: "max",
|
||||
init: function($this, name) {
|
||||
return {
|
||||
max: $this.data("validation" + name + "Max")
|
||||
};
|
||||
},
|
||||
validate: function($this, value, validator) {
|
||||
return (parseFloat(value, 10) > parseFloat(validator.max, 10) && !validator.negative) ||
|
||||
(parseFloat(value, 10) <= parseFloat(validator.max, 10) && validator.negative);
|
||||
}
|
||||
},
|
||||
min: {
|
||||
name: "min",
|
||||
init: function($this, name) {
|
||||
return {
|
||||
min: $this.data("validation" + name + "Min")
|
||||
};
|
||||
},
|
||||
validate: function($this, value, validator) {
|
||||
return (parseFloat(value) < parseFloat(validator.min) && !validator.negative) ||
|
||||
(parseFloat(value) >= parseFloat(validator.min) && validator.negative);
|
||||
}
|
||||
},
|
||||
maxlength: {
|
||||
name: "maxlength",
|
||||
init: function($this, name) {
|
||||
return {
|
||||
maxlength: $this.data("validation" + name + "Maxlength")
|
||||
};
|
||||
},
|
||||
validate: function($this, value, validator) {
|
||||
return ((value.length > validator.maxlength) && !validator.negative) ||
|
||||
((value.length <= validator.maxlength) && validator.negative);
|
||||
}
|
||||
},
|
||||
minlength: {
|
||||
name: "minlength",
|
||||
init: function($this, name) {
|
||||
return {
|
||||
minlength: $this.data("validation" + name + "Minlength")
|
||||
};
|
||||
},
|
||||
validate: function($this, value, validator) {
|
||||
return ((value.length < validator.minlength) && !validator.negative) ||
|
||||
((value.length >= validator.minlength) && validator.negative);
|
||||
}
|
||||
},
|
||||
maxchecked: {
|
||||
name: "maxchecked",
|
||||
init: function($this, name) {
|
||||
var elements = $this.parents("form").first().find("[name=\"" + $this.attr("name") + "\"]");
|
||||
elements.bind("click.validation", function() {
|
||||
$this.trigger("change.validation", {
|
||||
includeEmpty: true
|
||||
});
|
||||
});
|
||||
return {
|
||||
maxchecked: $this.data("validation" + name + "Maxchecked"),
|
||||
elements: elements
|
||||
};
|
||||
},
|
||||
validate: function($this, value, validator) {
|
||||
return (validator.elements.filter(":checked").length > validator.maxchecked && !validator.negative) ||
|
||||
(validator.elements.filter(":checked").length <= validator.maxchecked && validator.negative);
|
||||
},
|
||||
blockSubmit: true
|
||||
},
|
||||
minchecked: {
|
||||
name: "minchecked",
|
||||
init: function($this, name) {
|
||||
var elements = $this.parents("form").first().find("[name=\"" + $this.attr("name") + "\"]");
|
||||
elements.bind("click.validation", function() {
|
||||
$this.trigger("change.validation", {
|
||||
includeEmpty: true
|
||||
});
|
||||
});
|
||||
return {
|
||||
minchecked: $this.data("validation" + name + "Minchecked"),
|
||||
elements: elements
|
||||
};
|
||||
},
|
||||
validate: function($this, value, validator) {
|
||||
return (validator.elements.filter(":checked").length < validator.minchecked && !validator.negative) ||
|
||||
(validator.elements.filter(":checked").length >= validator.minchecked && validator.negative);
|
||||
},
|
||||
blockSubmit: true
|
||||
}
|
||||
},
|
||||
builtInValidators: {
|
||||
email: {
|
||||
name: "Email",
|
||||
type: "shortcut",
|
||||
shortcut: "validemail"
|
||||
},
|
||||
validemail: {
|
||||
name: "Validemail",
|
||||
type: "regex",
|
||||
regex: "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\\.[A-Za-z]{2,4}",
|
||||
message: "Not a valid email address<!-- data-validator-validemail-message to override -->"
|
||||
},
|
||||
passwordagain: {
|
||||
name: "Passwordagain",
|
||||
type: "match",
|
||||
match: "password",
|
||||
message: "Does not match the given password<!-- data-validator-paswordagain-message to override -->"
|
||||
},
|
||||
positive: {
|
||||
name: "Positive",
|
||||
type: "shortcut",
|
||||
shortcut: "number,positivenumber"
|
||||
},
|
||||
negative: {
|
||||
name: "Negative",
|
||||
type: "shortcut",
|
||||
shortcut: "number,negativenumber"
|
||||
},
|
||||
number: {
|
||||
name: "Number",
|
||||
type: "regex",
|
||||
regex: "([+-]?\\\d+(\\\.\\\d*)?([eE][+-]?[0-9]+)?)?",
|
||||
message: "Must be a number<!-- data-validator-number-message to override -->"
|
||||
},
|
||||
integer: {
|
||||
name: "Integer",
|
||||
type: "regex",
|
||||
regex: "[+-]?\\\d+",
|
||||
message: "No decimal places allowed<!-- data-validator-integer-message to override -->"
|
||||
},
|
||||
positivenumber: {
|
||||
name: "Positivenumber",
|
||||
type: "min",
|
||||
min: 0,
|
||||
message: "Must be a positive number<!-- data-validator-positivenumber-message to override -->"
|
||||
},
|
||||
negativenumber: {
|
||||
name: "Negativenumber",
|
||||
type: "max",
|
||||
max: 0,
|
||||
message: "Must be a negative number<!-- data-validator-negativenumber-message to override -->"
|
||||
},
|
||||
required: {
|
||||
name: "Required",
|
||||
type: "required",
|
||||
message: "This is required<!-- data-validator-required-message to override -->"
|
||||
},
|
||||
checkone: {
|
||||
name: "Checkone",
|
||||
type: "minchecked",
|
||||
minchecked: 1,
|
||||
message: "Check at least one option<!-- data-validation-checkone-message to override -->"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var formatValidatorName = function(name) {
|
||||
return name
|
||||
.toLowerCase()
|
||||
.replace(
|
||||
/(^|\s)([a-z])/g,
|
||||
function(m, p1, p2) {
|
||||
return p1 + p2.toUpperCase();
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
var getValue = function($this) {
|
||||
// Extract the value we're talking about
|
||||
var value = $this.val();
|
||||
var type = $this.attr("type");
|
||||
if (type === "checkbox") {
|
||||
value = ($this.is(":checked") ? value : "");
|
||||
}
|
||||
if (type === "radio") {
|
||||
value = ($('input[name="' + $this.attr("name") + '"]:checked').length > 0 ? value : "");
|
||||
}
|
||||
return value;
|
||||
};
|
||||
|
||||
function regexFromString(inputstring) {
|
||||
return new RegExp("^" + inputstring + "$");
|
||||
}
|
||||
|
||||
/**
|
||||
* Thanks to Jason Bunting via StackOverflow.com
|
||||
*
|
||||
* http://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string#answer-359910
|
||||
* Short link: http://tinyurl.com/executeFunctionByName
|
||||
**/
|
||||
function executeFunctionByName(functionName, context /*, args*/ ) {
|
||||
var args = Array.prototype.slice.call(arguments).splice(2);
|
||||
var namespaces = functionName.split(".");
|
||||
var func = namespaces.pop();
|
||||
for (var i = 0; i < namespaces.length; i++) {
|
||||
context = context[namespaces[i]];
|
||||
}
|
||||
return context[func].apply(this, args);
|
||||
}
|
||||
|
||||
$.fn.jqBootstrapValidation = function(method) {
|
||||
|
||||
if (defaults.methods[method]) {
|
||||
return defaults.methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
|
||||
} else if (typeof method === 'object' || !method) {
|
||||
return defaults.methods.init.apply(this, arguments);
|
||||
} else {
|
||||
$.error('Method ' + method + ' does not exist on jQuery.jqBootstrapValidation');
|
||||
return null;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
$.jqBootstrapValidation = function(options) {
|
||||
$(":input").not("[type=image],[type=submit]").jqBootstrapValidation.apply(this, arguments);
|
||||
};
|
||||
|
||||
})(jQuery);
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"theme-data":
|
||||
{
|
||||
"name": "Clean Blog",
|
||||
"description": "Clean blog is a carefully styled Bootstrap blog theme that is perfect for personal or company blogs. This theme features four HTML pages including a blog index, an about page, a sample post, and a contact page."
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
// Check for empty fields
|
||||
if(empty($_POST['name']) ||
|
||||
empty($_POST['email']) ||
|
||||
empty($_POST['phone']) ||
|
||||
empty($_POST['message']) ||
|
||||
!filter_var($_POST['email'],FILTER_VALIDATE_EMAIL))
|
||||
{
|
||||
echo "No arguments Provided!";
|
||||
return false;
|
||||
}
|
||||
|
||||
$name = strip_tags(htmlspecialchars($_POST['name']));
|
||||
$email_address = strip_tags(htmlspecialchars($_POST['email']));
|
||||
$phone = strip_tags(htmlspecialchars($_POST['phone']));
|
||||
$message = strip_tags(htmlspecialchars($_POST['message']));
|
||||
|
||||
// Create the email and send the message
|
||||
$to = 'yourname@yourdomain.com'; // Add your email address inbetween the '' replacing yourname@yourdomain.com - This is where the form will send a message to.
|
||||
$email_subject = "Website Contact Form: $name";
|
||||
$email_body = "You have received a new message from your website contact form.\n\n"."Here are the details:\n\nName: $name\n\nEmail: $email_address\n\nPhone: $phone\n\nMessage:\n$message";
|
||||
$headers = "From: noreply@yourdomain.com\n"; // This is the email address the generated message will be from. We recommend using something like noreply@yourdomain.com.
|
||||
$headers .= "Reply-To: $email_address";
|
||||
mail($to,$email_subject,$email_body,$headers);
|
||||
return true;
|
||||
?>
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"author": "Start Bootstrap",
|
||||
"email": "",
|
||||
"website": "https://startbootstrap.com/template-overviews/clean-blog/",
|
||||
"version": "1.0",
|
||||
"releaseDate": "2017-10-13",
|
||||
"license": "MIT",
|
||||
"compatible": "2.0",
|
||||
"notes": ""
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"title": "Clean Blog",
|
||||
"name": "startbootstrap-clean-blog",
|
||||
"version": "4.0.0-beta",
|
||||
"description": "Clean Blog is a Medium inspired blog theme for Bootstrap.",
|
||||
"keywords": [
|
||||
"css",
|
||||
"sass",
|
||||
"html",
|
||||
"responsive",
|
||||
"theme",
|
||||
"template"
|
||||
],
|
||||
"homepage": "https://startbootstrap.com/template-overviews/clean-blog",
|
||||
"bugs": {
|
||||
"url": "https://github.com/BlackrockDigital/startbootstrap-clean-blog/issues",
|
||||
"email": "feedback@startbootstrap.com"
|
||||
},
|
||||
"license": "MIT",
|
||||
"author": "Start Bootstrap",
|
||||
"contributors": [
|
||||
"David Miller (http://davidmiller.io/)"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/BlackrockDigital/startbootstrap-clean-blog.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"bootstrap": "^4.0.0-beta",
|
||||
"font-awesome": "4.7.0",
|
||||
"jquery": "^3.2.1",
|
||||
"popper.js": "^1.11.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browser-sync": "2.18.13",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-clean-css": "3.7.0",
|
||||
"gulp-header": "1.8.9",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-sass": "^3.1.0",
|
||||
"gulp-uglify": "3.0.0"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
echo Theme::charset('utf-8');
|
||||
echo Theme::viewport('width=device-width, initial-scale=1, shrink-to-fit=no');
|
||||
|
||||
// Title and description
|
||||
echo Theme::headTitle();
|
||||
echo Theme::headDescription();
|
||||
|
||||
// Favicon
|
||||
echo Theme::favicon('img/favicon.png');
|
||||
|
||||
// CSS
|
||||
echo Theme::css('vendor/bootstrap/css/bootstrap.min.css');
|
||||
echo Theme::css('css/clean-blog.min.css');
|
||||
|
||||
// FontAwesome from Bludit Core
|
||||
echo Theme::fontAwesome();
|
||||
|
||||
// Load plugins
|
||||
Theme::plugins('siteHead');
|
||||
?>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
|
||||
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
|
|
@ -0,0 +1,47 @@
|
|||
<!-- Page Header -->
|
||||
<header class="masthead" style="background-image: url('https://source.unsplash.com/1600x900/?nature')">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-10 mx-auto">
|
||||
<div class="site-heading">
|
||||
<h1><?php echo $Site->title() ?></h1>
|
||||
<span class="subheading"><?php echo $Site->description() ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Main Content -->
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-10 mx-auto">
|
||||
|
||||
<!-- Content -->
|
||||
<?php
|
||||
foreach ($content as $page):
|
||||
?>
|
||||
|
||||
<div class="post-preview">
|
||||
<a href="<?php echo $page->permalink() ?>">
|
||||
<h2 class="post-title"><?php echo $page->title() ?></h2>
|
||||
<h3 class="post-subtitle"><?php echo $page->description() ?></h3>
|
||||
</a>
|
||||
<p class="post-meta">Posted by <a href="#">Start Bootstrap</a> on September 18, 2017</p>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<?php
|
||||
endforeach
|
||||
?>
|
||||
|
||||
<!-- Pager -->
|
||||
<div class="clearfix">
|
||||
<a class="btn btn-secondary float-right" href="#">Older Posts →</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
|
@ -0,0 +1,27 @@
|
|||
<!-- Page Header -->
|
||||
<header class="masthead" style="background-image: url('img/post-bg.jpg')">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-10 mx-auto">
|
||||
<div class="post-heading">
|
||||
<h1><?php echo $page->title() ?></h1>
|
||||
<h2 class="subheading"><?php echo $page->description() ?></h2>
|
||||
<span class="meta">Posted by <a href="#">Start Bootstrap</a> on August 24, 2017</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Post Content -->
|
||||
<article>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-10 mx-auto">
|
||||
<?php echo $page->content($fullContent=true) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<hr>
|
|
@ -0,0 +1,167 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<title>Clean Blog - Start Bootstrap Theme</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom fonts for this template -->
|
||||
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
||||
<link href='https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
|
||||
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="css/clean-blog.min.css" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="index.html">Start Bootstrap</a>
|
||||
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||
Menu
|
||||
<i class="fa fa-bars"></i>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="index.html">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="about.html">About</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="post.html">Sample Post</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="contact.html">Contact</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Page Header -->
|
||||
<header class="masthead" style="background-image: url('img/post-bg.jpg')">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-10 mx-auto">
|
||||
<div class="post-heading">
|
||||
<h1>Man must explore, and this is exploration at its greatest</h1>
|
||||
<h2 class="subheading">Problems look mighty small from 150 miles up</h2>
|
||||
<span class="meta">Posted by
|
||||
<a href="#">Start Bootstrap</a>
|
||||
on August 24, 2017</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Post Content -->
|
||||
<article>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-10 mx-auto">
|
||||
<p>Never in all their history have men been able truly to conceive of the world as one: a single sphere, a globe, having the qualities of a globe, a round earth in which all the directions eventually meet, in which there is no center because every point, or none, is center — an equal earth which all men occupy as equals. The airman's earth, if free men make it, will be truly round: a globe in practice, not in theory.</p>
|
||||
|
||||
<p>Science cuts two ways, of course; its products can be used for both good and evil. But there's no turning back from science. The early warnings about technological dangers also come from science.</p>
|
||||
|
||||
<p>What was most significant about the lunar voyage was not that man set foot on the Moon but that they set eye on the earth.</p>
|
||||
|
||||
<p>A Chinese tale tells of some men sent to harm a young girl who, upon seeing her beauty, become her protectors rather than her violators. That's how I felt seeing the Earth for the first time. I could not help but love and cherish her.</p>
|
||||
|
||||
<p>For those who have seen the Earth from space, and for the hundreds and perhaps thousands more who will, the experience most certainly changes your perspective. The things that we share in our world are far more valuable than those which divide us.</p>
|
||||
|
||||
<h2 class="section-heading">The Final Frontier</h2>
|
||||
|
||||
<p>There can be no thought of finishing for ‘aiming for the stars.’ Both figuratively and literally, it is a task to occupy the generations. And no matter how much progress one makes, there is always the thrill of just beginning.</p>
|
||||
|
||||
<p>There can be no thought of finishing for ‘aiming for the stars.’ Both figuratively and literally, it is a task to occupy the generations. And no matter how much progress one makes, there is always the thrill of just beginning.</p>
|
||||
|
||||
<blockquote class="blockquote">The dreams of yesterday are the hopes of today and the reality of tomorrow. Science has not yet mastered prophecy. We predict too much for the next year and yet far too little for the next ten.</blockquote>
|
||||
|
||||
<p>Spaceflights cannot be stopped. This is not the work of any one man or even a group of men. It is a historical process which mankind is carrying out in accordance with the natural laws of human development.</p>
|
||||
|
||||
<h2 class="section-heading">Reaching for the Stars</h2>
|
||||
|
||||
<p>As we got further and further away, it [the Earth] diminished in size. Finally it shrank to the size of a marble, the most beautiful you can imagine. That beautiful, warm, living object looked so fragile, so delicate, that if you touched it with a finger it would crumble and fall apart. Seeing this has to change a man.</p>
|
||||
|
||||
<a href="#">
|
||||
<img class="img-fluid" src="img/post-sample-image.jpg" alt="">
|
||||
</a>
|
||||
<span class="caption text-muted">To go places and do things that have never been done before – that’s what living is all about.</span>
|
||||
|
||||
<p>Space, the final frontier. These are the voyages of the Starship Enterprise. Its five-year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no man has gone before.</p>
|
||||
|
||||
<p>As I stand out here in the wonders of the unknown at Hadley, I sort of realize there’s a fundamental truth to our nature, Man must explore, and this is exploration at its greatest.</p>
|
||||
|
||||
<p>Placeholder text by
|
||||
<a href="http://spaceipsum.com/">Space Ipsum</a>. Photographs by
|
||||
<a href="https://www.flickr.com/photos/nasacommons/">NASA on The Commons</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<hr>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-10 mx-auto">
|
||||
<ul class="list-inline text-center">
|
||||
<li class="list-inline-item">
|
||||
<a href="#">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a href="#">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a href="#">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="copyright text-muted">Copyright © Your Website 2017</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Bootstrap core JavaScript -->
|
||||
<script src="vendor/jquery/jquery.min.js"></script>
|
||||
<script src="vendor/popper/popper.min.js"></script>
|
||||
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
|
||||
|
||||
<!-- Custom scripts for this template -->
|
||||
<script src="js/clean-blog.min.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
// Bootstrap overrides for this template
|
||||
.btn {
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
padding: 15px 25px;
|
||||
letter-spacing: 1px;
|
||||
text-transform: uppercase;
|
||||
border-radius: 0;
|
||||
@include sans-serif-font;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
@include button-variant(white, $theme-primary, $theme-primary);
|
||||
}
|
||||
|
||||
.btn-lg {
|
||||
font-size: 16px;
|
||||
padding: 25px 35px;
|
||||
}
|
||||
|
||||
.btn-default {
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: white;
|
||||
border: 1px solid $theme-primary;
|
||||
background-color: $theme-primary;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
// Styling for the contact page
|
||||
.floating-label-form-group {
|
||||
font-size: 14px;
|
||||
position: relative;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0.5em;
|
||||
border-bottom: 1px solid $gray-lighter;
|
||||
input,
|
||||
textarea {
|
||||
font-size: 1.5em;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
padding: 0;
|
||||
resize: none;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
background: none;
|
||||
box-shadow: none !important;
|
||||
@include serif-font;
|
||||
&::-webkit-input-placeholder {
|
||||
color: $gray-light;
|
||||
@include serif-font;
|
||||
}
|
||||
}
|
||||
label {
|
||||
font-size: 0.85em;
|
||||
line-height: 1.764705882em;
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
top: 2em;
|
||||
display: block;
|
||||
margin: 0;
|
||||
-webkit-transition: top 0.3s ease, opacity 0.3s ease;
|
||||
-moz-transition: top 0.3s ease, opacity 0.3s ease;
|
||||
-ms-transition: top 0.3s ease, opacity 0.3s ease;
|
||||
transition: top 0.3s ease, opacity 0.3s ease;
|
||||
vertical-align: middle;
|
||||
vertical-align: baseline;
|
||||
opacity: 0;
|
||||
}
|
||||
.help-block {
|
||||
margin: 15px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.floating-label-form-group-with-value {
|
||||
label {
|
||||
top: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.floating-label-form-group-with-focus {
|
||||
label {
|
||||
color: $theme-primary;
|
||||
}
|
||||
}
|
||||
form .form-group:first-child .floating-label-form-group {
|
||||
border-top: 1px solid $gray-lighter;
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
// Styling for the footer
|
||||
footer {
|
||||
padding: 50px 0 65px;
|
||||
.list-inline {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.copyright {
|
||||
font-size: 14px;
|
||||
margin-bottom: 0;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
// Global styling for this template
|
||||
body {
|
||||
font-size: 20px;
|
||||
color: $gray-dark;
|
||||
@include serif-font;
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: 1.5;
|
||||
margin: 30px 0;
|
||||
a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-weight: 800;
|
||||
@include sans-serif-font;
|
||||
}
|
||||
|
||||
a {
|
||||
color: $gray-dark;
|
||||
@include transition-all;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: $theme-primary;
|
||||
}
|
||||
}
|
||||
|
||||
a img {
|
||||
&:focus,
|
||||
&:hover {
|
||||
cursor: zoom-in;
|
||||
}
|
||||
}
|
||||
|
||||
blockquote {
|
||||
font-style: italic;
|
||||
color: $gray-light;
|
||||
}
|
||||
|
||||
.section-heading {
|
||||
font-size: 36px;
|
||||
font-weight: 700;
|
||||
margin-top: 60px;
|
||||
}
|
||||
|
||||
.caption {
|
||||
font-size: 14px;
|
||||
font-style: italic;
|
||||
display: block;
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
border-bottom-right-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
}
|
||||
|
||||
::-moz-selection {
|
||||
color: white;
|
||||
background: $theme-primary;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
::selection {
|
||||
color: white;
|
||||
background: $theme-primary;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
img::selection {
|
||||
color: white;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
img::-moz-selection {
|
||||
color: white;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
body {
|
||||
-webkit-tap-highlight-color: $theme-primary;
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
// Styling for the masthead
|
||||
header.masthead {
|
||||
// NOTE: Background images are set within the HTML using inline CSS!
|
||||
margin-bottom: 50px;
|
||||
background: no-repeat center center;
|
||||
background-color: $gray-light;
|
||||
background-attachment: scroll;
|
||||
@include background-cover;
|
||||
.page-heading,
|
||||
.post-heading,
|
||||
.site-heading {
|
||||
padding: 200px 0 150px;
|
||||
color: white;
|
||||
@media only screen and (min-width: 768px) {
|
||||
padding: 200px 0;
|
||||
}
|
||||
}
|
||||
.page-heading,
|
||||
.site-heading {
|
||||
text-align: center;
|
||||
h1 {
|
||||
font-size: 50px;
|
||||
margin-top: 0;
|
||||
}
|
||||
.subheading {
|
||||
font-size: 24px;
|
||||
font-weight: 300;
|
||||
line-height: 1.1;
|
||||
display: block;
|
||||
margin: 10px 0 0;
|
||||
@include sans-serif-font;
|
||||
}
|
||||
@media only screen and (min-width: 768px) {
|
||||
h1 {
|
||||
font-size: 80px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.post-heading {
|
||||
h1 {
|
||||
font-size: 35px;
|
||||
}
|
||||
.meta,
|
||||
.subheading {
|
||||
line-height: 1.1;
|
||||
display: block;
|
||||
}
|
||||
.subheading {
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
margin: 10px 0 30px;
|
||||
@include sans-serif-font;
|
||||
}
|
||||
.meta {
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
font-style: italic;
|
||||
@include serif-font;
|
||||
a {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 768px) {
|
||||
h1 {
|
||||
font-size: 55px;
|
||||
}
|
||||
.subheading {
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
// Mixins
|
||||
// Bootstrap Button Variant
|
||||
@mixin button-variant($color, $background, $border) {
|
||||
color: $color;
|
||||
border-color: $border;
|
||||
background-color: $background;
|
||||
&.focus,
|
||||
&:focus {
|
||||
color: $color;
|
||||
border-color: darken($border, 25%);
|
||||
background-color: darken($background, 10%);
|
||||
}
|
||||
&:hover {
|
||||
color: $color;
|
||||
border-color: darken($border, 12%);
|
||||
background-color: darken($background, 10%);
|
||||
}
|
||||
&.active,
|
||||
&:active,
|
||||
.open > &.dropdown-toggle {
|
||||
color: $color;
|
||||
border-color: darken($border, 12%);
|
||||
background-color: darken($background, 10%);
|
||||
&.focus,
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: $color;
|
||||
border-color: darken($border, 25%);
|
||||
background-color: darken($background, 17%);
|
||||
}
|
||||
}
|
||||
&.active,
|
||||
&:active,
|
||||
.open > &.dropdown-toggle {
|
||||
background-image: none;
|
||||
}
|
||||
&.disabled,
|
||||
&[disabled],
|
||||
fieldset[disabled] & {
|
||||
&.focus,
|
||||
&:focus,
|
||||
&:hover {
|
||||
border-color: $border;
|
||||
background-color: $background;
|
||||
}
|
||||
}
|
||||
.badge {
|
||||
color: $background;
|
||||
background-color: $color;
|
||||
}
|
||||
}
|
||||
@mixin transition-all() {
|
||||
-webkit-transition: all 0.2s;
|
||||
-moz-transition: all 0.2s;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
@mixin background-cover() {
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
-o-background-size: cover;
|
||||
background-size: cover;
|
||||
}
|
||||
@mixin serif-font() {
|
||||
font-family: 'Lora', 'Times New Roman', serif;
|
||||
}
|
||||
@mixin sans-serif-font() {
|
||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
// Styling for the navbar
|
||||
#mainNav {
|
||||
position: absolute;
|
||||
border-bottom: 1px solid $gray-lighter;
|
||||
background-color: white;
|
||||
@include sans-serif-font;
|
||||
.navbar-brand {
|
||||
font-weight: 800;
|
||||
color: $gray-light;
|
||||
}
|
||||
.navbar-toggler {
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
padding: 13px;
|
||||
text-transform: uppercase;
|
||||
color: $gray-light;
|
||||
}
|
||||
.navbar-nav {
|
||||
> li.nav-item {
|
||||
> a {
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 1px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 992px) {
|
||||
border-bottom: 1px solid transparent;
|
||||
background: transparent;
|
||||
.navbar-brand {
|
||||
padding: 15px 20px;
|
||||
color: white;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: fade-out(white, .2);
|
||||
}
|
||||
}
|
||||
.navbar-nav {
|
||||
> li.nav-item {
|
||||
> a {
|
||||
padding: 15px 20px;
|
||||
color: white;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: fade-out(white, .2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1170px) {
|
||||
-webkit-transition: background-color 0.2s;
|
||||
-moz-transition: background-color 0.2s;
|
||||
transition: background-color 0.2s;
|
||||
/* Force Hardware Acceleration in WebKit */
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
-moz-transform: translate3d(0, 0, 0);
|
||||
-ms-transform: translate3d(0, 0, 0);
|
||||
-o-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
-webkit-backface-visibility: hidden;
|
||||
&.is-fixed {
|
||||
/* when the user scrolls down, we hide the header right above the viewport */
|
||||
position: fixed;
|
||||
top: -77px;
|
||||
-webkit-transition: -webkit-transform 0.2s;
|
||||
-moz-transition: -moz-transform 0.2s;
|
||||
transition: transform 0.2s;
|
||||
border-bottom: 1px solid darken(white, .05);
|
||||
background-color: fade-out(white, .1);
|
||||
.navbar-brand {
|
||||
color: $gray-dark;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: $theme-primary;
|
||||
}
|
||||
}
|
||||
.navbar-nav {
|
||||
> li.nav-item {
|
||||
> a {
|
||||
color: $gray-dark;
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: $theme-primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&.is-visible {
|
||||
/* if the user changes the scrolling direction, we show the header */
|
||||
-webkit-transform: translate3d(0, 100%, 0);
|
||||
-moz-transform: translate3d(0, 100%, 0);
|
||||
-ms-transform: translate3d(0, 100%, 0);
|
||||
-o-transform: translate3d(0, 100%, 0);
|
||||
transform: translate3d(0, 100%, 0);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
// Styling for the post page
|
||||
.post-preview {
|
||||
> a {
|
||||
color: $gray-dark;
|
||||
&:focus,
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
color: $theme-primary;
|
||||
}
|
||||
> .post-title {
|
||||
font-size: 30px;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
> .post-subtitle {
|
||||
font-weight: 300;
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
}
|
||||
> .post-meta {
|
||||
font-size: 18px;
|
||||
font-style: italic;
|
||||
margin-top: 0;
|
||||
color: $gray-light;
|
||||
> a {
|
||||
text-decoration: none;
|
||||
color: $gray-dark;
|
||||
&:focus,
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
color: $theme-primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 768px) {
|
||||
> a {
|
||||
> .post-title {
|
||||
font-size: 36px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
// Variables
|
||||
|
||||
// Gray and Brand Colors for use across theme
|
||||
|
||||
$theme-primary: #0085A1;
|
||||
|
||||
$gray-base: #000 !default;
|
||||
$gray-darker: lighten($gray-base, 13.5%) !default;
|
||||
$gray-dark: lighten($gray-base, 20%) !default;
|
||||
$gray: lighten($gray-base, 33.5%) !default;
|
||||
$gray-light: lighten($gray-base, 46.7%) !default;
|
||||
$gray-lighter: lighten($gray-base, 93.5%) !default;
|
|
@ -0,0 +1,9 @@
|
|||
@import "variables.scss";
|
||||
@import "mixins.scss";
|
||||
@import "global.scss";
|
||||
@import "navbar.scss";
|
||||
@import "masthead.scss";
|
||||
@import "post.scss";
|
||||
@import "contact.scss";
|
||||
@import "footer.scss";
|
||||
@import "bootstrap-overrides.scss";
|
|
@ -0,0 +1,330 @@
|
|||
html {
|
||||
box-sizing: border-box;
|
||||
font-family: sans-serif;
|
||||
line-height: 1.15;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-ms-overflow-style: scrollbar;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
@-ms-viewport {
|
||||
width: device-width;
|
||||
}
|
||||
|
||||
article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
font-size: 1rem;
|
||||
font-weight: normal;
|
||||
line-height: 1.5;
|
||||
color: #212529;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
[tabindex="-1"]:focus {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
hr {
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
margin-top: 0;
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title],
|
||||
abbr[data-original-title] {
|
||||
text-decoration: underline;
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
address {
|
||||
margin-bottom: 1rem;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: .5rem;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -.5em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #007bff;
|
||||
text-decoration: none;
|
||||
background-color: transparent;
|
||||
-webkit-text-decoration-skip: objects;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #0056b3;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:not([href]):not([tabindex]) {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:not([href]):not([tabindex]):focus, a:not([href]):not([tabindex]):hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:not([href]):not([tabindex]):focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img {
|
||||
vertical-align: middle;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
a,
|
||||
area,
|
||||
button,
|
||||
[role="button"],
|
||||
input,
|
||||
label,
|
||||
select,
|
||||
summary,
|
||||
textarea {
|
||||
-ms-touch-action: manipulation;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: 0.75rem;
|
||||
padding-bottom: 0.75rem;
|
||||
color: #868e96;
|
||||
text-align: left;
|
||||
caption-side: bottom;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
outline: 1px dotted;
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
button,
|
||||
input {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
button,
|
||||
html [type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
input[type="radio"],
|
||||
input[type="checkbox"] {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
input[type="date"],
|
||||
input[type="time"],
|
||||
input[type="datetime-local"],
|
||||
input[type="month"] {
|
||||
-webkit-appearance: listbox;
|
||||
}
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: .5rem;
|
||||
font-size: 1.5rem;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type="search"] {
|
||||
outline-offset: -2px;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
[type="search"]::-webkit-search-cancel-button,
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
|
@ -0,0 +1,2 @@
|
|||
html{box-sizing:border-box;font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}*,::after,::before{box-sizing:inherit}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}[role=button],a,area,button,input,label,select,summary,textarea{-ms-touch-action:manipulation;touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#868e96;text-align:left;caption-side:bottom}th{text-align:left}label{display:inline-block;margin-bottom:.5rem}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}
|
||||
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
|
@ -2,6 +2,6 @@
|
|||
"theme-data":
|
||||
{
|
||||
"name": "Editorial",
|
||||
"description": "Good option for a big website or blog, with a full support of cover images. Designed by HTML5up."
|
||||
"description": "Good option to create a blog/magazine, with a full support of cover images and plugins."
|
||||
}
|
||||
}
|
|
@ -2,6 +2,6 @@
|
|||
"theme-data":
|
||||
{
|
||||
"name": "Editorial",
|
||||
"description": "Buena opción para un crear un sitio web o blog, con un soporte para imágenes de portada."
|
||||
"description": "Buena opción para un crear un blog/revista, con soporte para imágenes de portada y complementos."
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"theme-data":
|
||||
{
|
||||
"name": "Kernel Panic",
|
||||
"description": "Tema sencillo y limpio para micrositios o microblogs. Soporte completo para imágenes de portada y para complementos."
|
||||
}
|
||||
}
|
|
@ -1,339 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
{description}
|
||||
Copyright (C) {year} {fullname}
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
{signature of Ty Coon}, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
|
@ -1,38 +0,0 @@
|
|||
![Lingonberry preview.](https://raw.githubusercontent.com/acrox999/lingonberry/master/preview.png)
|
||||
|
||||
*[Demo here.](http://www.iamnobuna.ga/)*
|
||||
|
||||
# Lingonberry
|
||||
Lingonberry is a clean and simple theme for bloggers, with responsive design and beautiful typography.
|
||||
|
||||
Lingonberry is developed by Anders Norén. Ported to Bludit by Hakim Zulkufli.
|
||||
# Keep it simple, stupid
|
||||
Lingonberry’s got all the features you need, and none that you don’t. It’s designed to be easy to install, use and visit.
|
||||
# Beautiful design
|
||||
As the name implies, Lingonberry has a charming, simple and colorful visual style that is easy on the eyes (and on the loading times).
|
||||
# Responsive & retina
|
||||
Responsive design and high-resolution assets means that Lingonberry will scale gracefully and look great on all devices – big and small, retina and non-retina.
|
||||
|
||||
Licenses
|
||||
--------
|
||||
Font Awesome icons license : SIL Open Font License 1.1 http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL
|
||||
|
||||
Fitvids.js license : WTFPL http://www.wtfpl.net/
|
||||
|
||||
Flexslider 2 license : GPLv2 http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
Lato font license : SIL Open Font License, 1.1 http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL
|
||||
|
||||
Raleway font license : SIL Open Font License, 1.1 http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL
|
||||
|
||||
-------
|
||||
|
||||
Lingonberry WordPress Theme, Copyright 2015 Anders Norén
|
||||
|
||||
Lingonberry is distributed under the terms of the GNU GPL v2
|
||||
|
||||
Ported to Bludit by Hakim Zulkufli (@acrox999)
|
||||
|
||||
-------
|
||||
|
||||
NOTES: Does not support sidebar plugins. To customize or add links to the bottom widget bar, modify php/sidebar.php.
|
|
@ -1,17 +0,0 @@
|
|||
/* Custom for Bludit */
|
||||
|
||||
.post-category {
|
||||
margin: 0 0.1em;
|
||||
padding: 0.3em 1em;
|
||||
color: #fff;
|
||||
background: #FF706C;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
.comment-respond {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.featured-media img {
|
||||
min-width: 100%;
|
||||
}
|
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1000 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.7 KiB |