添加样式,添加用户和评论

车亮亮 9 years ago
parent d6d6fcd5b7
commit 9b5314c512

@ -15,7 +15,6 @@ import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
@ -27,7 +26,6 @@ DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
@ -37,7 +35,10 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'blog'
'blog',
'accounts',
'comments'
]
MIDDLEWARE = [
@ -71,22 +72,20 @@ TEMPLATES = [
WSGI_APPLICATION = 'DjangoBlog.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'djangoblog',
'USER': 'root',
'ENGINE': 'django.db.backends.mysql',
'NAME': 'djangoblog',
'USER': 'root',
'PASSWORD': 'root',
'HOST': '192.168.21.130',
'PORT': 3306,
'HOST': '192.168.21.130',
'PORT': 3306,
}
}
# Password validation
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
@ -105,7 +104,6 @@ AUTH_PASSWORD_VALIDATORS = [
},
]
# Internationalization
# https://docs.djangoproject.com/en/1.10/topics/i18n/
@ -119,8 +117,10 @@ USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.10/howto/static-files/
STATIC_URL = '/static/'
STATICFILES = os.path.join(BASE_DIR, 'static')
AUTH_USER_MODEL = 'accounts.BlogUser'

@ -13,9 +13,10 @@ Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'', include('blog.urls', namespace='blog', app_name='blog')),
]

@ -0,0 +1,6 @@
from django.contrib import admin
# Register your models here.
from .models import BlogUser
admin.site.register(BlogUser)

@ -0,0 +1,5 @@
from django.apps import AppConfig
class AccountsConfig(AppConfig):
name = 'accounts'

@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-11-02 12:49
from __future__ import unicode_literals
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0008_alter_user_username_max_length'),
]
operations = [
migrations.CreateModel(
name='BlogUser',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('password', models.CharField(max_length=128, verbose_name='password')),
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')),
('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
('nickname', models.CharField(blank=True, max_length=50, verbose_name='昵称')),
('mugshot', models.ImageField(blank=True, upload_to='upload/mugshots', verbose_name='头像')),
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
],
options={
'verbose_name_plural': 'users',
'abstract': False,
'verbose_name': 'user',
},
managers=[
('objects', django.contrib.auth.models.UserManager()),
],
),
]

@ -0,0 +1,8 @@
from django.db import models
from django.contrib.auth.models import AbstractUser
# Create your models here.
class BlogUser(AbstractUser):
nickname = models.CharField('昵称', max_length=50, blank=True)
mugshot = models.ImageField('头像', upload_to='upload/mugshots', blank=True)

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.

@ -1,3 +1,8 @@
from django.contrib import admin
# Register your models here.
from .models import Article,Category,Tag
admin.site.register(Article)
admin.site.register(Category)
admin.site.register(Tag)

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-11-02 12:49
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('comments', '0001_initial'),
('blog', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='article',
name='comment',
field=models.ManyToManyField(blank=True, to='comments.Comment', verbose_name='评论集合'),
),
]

@ -3,6 +3,7 @@ from django.core.urlresolvers import reverse
from django.conf import settings
class Article(models.Model):
STATUS_CHOICES = (
('d', '草稿'),
@ -22,6 +23,7 @@ class Article(models.Model):
category = models.ForeignKey('Category', verbose_name='分类', on_delete=models.CASCADE)
tags = models.ManyToManyField('Tag', verbose_name='标签集合', blank=True)
comment = models.ManyToManyField('comments.Comment', verbose_name='评论集合', blank=True)
def __str__(self):
return self.title

@ -0,0 +1,115 @@
<!DOCTYPE html>
<html>
<head>
<title>Black &amp; White</title>
<!-- meta -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- css -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/ionicons.min.css">
<link rel="stylesheet" href="css/pace.css">
<link rel="stylesheet" href="css/custom.css">
<!-- js -->
<script src="js/jquery-2.1.3.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/pace.min.js"></script>
<script src="js/modernizr.custom.js"></script>
</head>
<body id="page">
<div class="container">
<header id="site-header">
<div class="row">
<div class="col-md-4 col-sm-5 col-xs-8">
<div class="logo">
<h1><a href="index.html"><b>Black</b> &amp; White</a></h1>
</div>
</div><!-- col-md-4 -->
<div class="col-md-8 col-sm-7 col-xs-4">
<nav class="main-nav" role="navigation">
<div class="navbar-header">
<button type="button" id="trigger-overlay" class="navbar-toggle">
<span class="ion-navicon"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li class="cl-effect-11"><a href="index.html" data-hover="Home">Home</a></li>
<li class="cl-effect-11"><a href="full-width.html" data-hover="Blog">Blog</a></li>
<li class="cl-effect-11"><a href="about.html" data-hover="About">About</a></li>
<li class="cl-effect-11"><a href="contact.html" data-hover="Contact">Contact</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</nav>
<div id="header-search-box">
<a id="search-menu" href="#"><span id="search-icon" class="ion-ios-search-strong"></span></a>
<div id="search-form" class="search-form">
<form role="search" method="get" id="searchform" action="#">
<input type="search" placeholder="Search" required>
<button type="submit"><span class="ion-ios-search-strong"></span></button>
</form>
</div>
</div>
</div><!-- col-md-8 -->
</div>
</header>
</div>
<div class="content-body">
<div class="container">
<div class="row">
<main class="col-md-12">
<h1 class="page-title">About Me</h1>
<article class="post">
<div class="entry-content clearfix">
<figure class="img-responsive-center">
<img class="img-responsive" src="img/me.jpg" alt="Developer Image">
</figure>
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb and flow of things. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which dont look even slightly.</p>
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb and flow of things. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which dont look even slightly.</p>
<div class="height-40px"></div>
<h2 class="title text-center">Social</h2>
<ul class="social">
<li class="facebook"><a href="#"><span class="ion-social-facebook"></span></a></li>
<li class="twitter"><a href="#"><span class="ion-social-twitter"></span></a></li>
<li class="google-plus"><a href="#"><span class="ion-social-googleplus"></span></a></li>
<li class="tumblr"><a href="#"><span class="ion-social-tumblr"></span></a></li>
</ul>
</div>
</article>
</main>
</div>
</div>
</div>
<footer id="site-footer">
<div class="container">
<div class="row">
<div class="col-md-12">
<p class="copyright">&copy; 2014 ThemeWagon.com</p>
</div>
</div>
</div>
</footer>
<!-- Mobile Menu -->
<div class="overlay overlay-hugeinc">
<button type="button" class="overlay-close"><span class="ion-ios-close-empty"></span></button>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="full-width.html">Blog</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</div>
<script src="js/script.js"></script>
</body>
</html>

@ -0,0 +1,113 @@
<!DOCTYPE html>
<html>
<head>
<title>Black &amp; White</title>
<!-- meta -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- css -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/ionicons.min.css">
<link rel="stylesheet" href="css/pace.css">
<link rel="stylesheet" href="css/custom.css">
<!-- js -->
<script src="js/jquery-2.1.3.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/pace.min.js"></script>
<script src="js/modernizr.custom.js"></script>
</head>
<body id="page">
<div class="container">
<header id="site-header">
<div class="row">
<div class="col-md-4 col-sm-5 col-xs-8">
<div class="logo">
<h1><a href="index.html"><b>Black</b> &amp; White</a></h1>
</div>
</div><!-- col-md-4 -->
<div class="col-md-8 col-sm-7 col-xs-4">
<nav class="main-nav" role="navigation">
<div class="navbar-header">
<button type="button" id="trigger-overlay" class="navbar-toggle">
<span class="ion-navicon"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li class="cl-effect-11"><a href="index.html" data-hover="Home">Home</a></li>
<li class="cl-effect-11"><a href="full-width.html" data-hover="Blog">Blog</a></li>
<li class="cl-effect-11"><a href="about.html" data-hover="About">About</a></li>
<li class="cl-effect-11"><a href="contact.html" data-hover="Contact">Contact</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</nav>
<div id="header-search-box">
<a id="search-menu" href="#"><span id="search-icon" class="ion-ios-search-strong"></span></a>
<div id="search-form" class="search-form">
<form role="search" method="get" id="searchform" action="#">
<input type="search" placeholder="Search" required>
<button type="submit"><span class="ion-ios-search-strong"></span></button>
</form>
</div>
</div>
</div><!-- col-md-8 -->
</div>
</header>
</div>
<div class="content-body">
<div class="container">
<div class="row">
<main class="col-md-12">
<h1 class="page-title">Contact</h1>
<article class="post">
<div class="entry-content clearfix">
<form action="#" method="post" class="contact-form">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<input type="text" name="name" placeholder="Name" required>
<input type="email" name="email" placeholder="Email" required>
<input type="text" name="subject" placeholder="Subject" required>
<textarea name="message" rows="7" placeholder="Your Message" required></textarea>
<button class="btn-send btn-5 btn-5b ion-ios-paperplane"><span>Drop Me a Line</span></button>
</div>
</div> <!-- row -->
</form>
</div>
</article>
</main>
</div>
</div>
</div>
<footer id="site-footer">
<div class="container">
<div class="row">
<div class="col-md-12">
<p class="copyright">&copy; 2014 ThemeWagon.com</p>
</div>
</div>
</div>
</footer>
<!-- Mobile Menu -->
<div class="overlay overlay-hugeinc">
<button type="button" class="overlay-close"><span class="ion-ios-close-empty"></span></button>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="full-width.html">Blog</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</div>
<script src="js/script.js"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

@ -0,0 +1,804 @@
/**
* Table of Contents
*
* 1.0 - Google Font
* 2.0 - General Elements
* 3.0 - Site Header
* 3.1 - Logo
* 3.2 - Main Navigation
* 3.2.1 - Main Nav CSS 3 Hover Effect
* 4.0 - Home/Blog
* 4.1 - Read More Button CSS 3 style
* 5.0 - Widget
* 6.0 - Footer
* 7.0 - Header Search Bar
* 8.0 - Mobile Menu
* 9.0 - Contact Page Social
* 10.0 - Contact Form
* 11.0 - Media Query
*/
/**
* 1.0 - Google Font
*/
@import url(http://fonts.useso.com/css?family=Lato:300,400);
@import url(http://fonts.useso.com/css?family=Ubuntu:300,400);
/**
* 2.0 - General Elements
*/
* {outline: none;}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 0;
}
b {
font-weight: 400;
}
a {
color: #333;
}
a:hover, a:focus {
text-decoration: none;
color: #000;
}
::selection {
background-color: #eee;
}
body {
color: #444;
font-family: 'Lato', sans-serif;
}
p {
font-family: 'Ubuntu', sans-serif;
font-weight: 400;
word-spacing: 1px;
letter-spacing: 0.01em;
}
#single p,
#page p {
margin-bottom: 25px;
}
.page-title {
text-align: center;
}
.title {
margin-bottom: 30px;
}
figure {
margin-bottom: 25px;
}
.img-responsive-center img {
margin: 0 auto;
}
.height-40px {
margin-bottom: 40px;
}
/**
* 3.0 - Site Header
*/
#site-header {
background-color: #FFF;
padding: 25px 20px;
margin-bottom: 40px;
border-bottom: 1px solid #e7e7e7;
}
.copyrights{text-indent:-9999px;height:0;line-height:0;font-size:0;overflow:hidden;}
/**
* 3.1 - Logo
*/
.logo h1 a {
color: #000;
}
.logo h1 a:hover {
text-decoration: none;
border-bottom: none;
}
.logo h1 {
margin: 0;
font-family: 'Lato', sans-serif;
font-weight: 300;
}
/**
* 3.2 - Main Navigation
*/
.main-nav {
margin-top: 11px;
max-width: 95%;
}
.main-nav a {
color: #000000 !important;
padding: 0 0 5px 0 !important;
margin-right: 30px;
font-family: 'Lato', sans-serif;
font-weight: 300;
font-size: 24px;
}
.main-nav a:active,
.main-nav a:focus,
.main-nav a:hover {
background-color: transparent !important;
border-bottom: 0;
}
.navbar-toggle {
margin: 0;
border: 0;
padding: 0;
margin-right: 25px;
}
.navbar-toggle span {
font-size: 2em;
color: #000;
}
/**
* 3.2.1 - Main Nav CSS 3 Hover Effect
*/
.cl-effect-11 a {
padding: 10px 0;
color: #0972b4;
text-shadow: none;
}
.cl-effect-11 a::before {
position: absolute;
top: 0;
left: 0;
overflow: hidden;
padding: 0 0 5px 0 !important;
max-width: 0;
border-bottom: 1px solid #000;
color: #000;
content: attr(data-hover);
-webkit-transition: max-width 0.5s;
-moz-transition: max-width 0.5s;
transition: max-width 0.5s;
}
.cl-effect-11 a:hover::before,
.cl-effect-11 a:focus::before {
max-width: 100%;
}
/**
* 4.0 - Home/Blog
*/
.content-body {
padding-bottom: 4em;
}
.post {
background: #fff;
padding: 30px 30px 0;
}
.entry-title {
text-align: center;
font-size: 1.9em;
margin-bottom: 20px;
line-height: 1.6;
padding: 10px 20px 0;
}
.entry-meta {
text-align: center;
color: #DDDDDD;
font-size: 13px;
letter-spacing: 1px;
margin-bottom: 30px;
}
.entry-content {
font-size: 18px;
line-height: 1.9;
font-weight: 300;
color: #000;
}
.post-category,
.post-date,
.post-author {
position: relative;
padding-right: 15px;
}
.post-category::after,
.post-date::after,
.post-author::after {
position: absolute;
content: '.';
color: #000;
font-size: 30px;
top: -22px;
right: 1px;
}
/**
* 4.1 - Read More Button CSS 3 style
*/
.read-more {
font-family: 'Ubuntu', sans-serif;
font-weight: 400;
word-spacing: 1px;
letter-spacing: 0.01em;
text-align: center;
margin-top: 20px;
}
.cl-effect-14 a {
padding: 0 20px;
height: 45px;
line-height: 45px;
position: relative;
display: inline-block;
margin: 15px 25px;
letter-spacing: 1px;
font-weight: 400;
text-shadow: 0 0 1px rgba(255,255,255,0.3);
}
.cl-effect-14 a::before,
.cl-effect-14 a::after {
position: absolute;
width: 45px;
height: 1px;
background: #C3C3C3;
content: '';
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
transition: all 0.3s;
pointer-events: none;
}
.cl-effect-14 a::before {
top: 0;
left: 0;
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
transform: rotate(90deg);
-webkit-transform-origin: 0 0;
-moz-transform-origin: 0 0;
transform-origin: 0 0;
}
.cl-effect-14 a::after {
right: 0;
bottom: 0;
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
transform: rotate(90deg);
-webkit-transform-origin: 100% 0;
-moz-transform-origin: 100% 0;
transform-origin: 100% 0;
}
.cl-effect-14 a:hover::before,
.cl-effect-14 a:hover::after,
.cl-effect-14 a:focus::before,
.cl-effect-14 a:focus::after {
background: #000;
}
.cl-effect-14 a:hover::before,
.cl-effect-14 a:focus::before {
left: 50%;
-webkit-transform: rotate(0deg) translateX(-50%);
-moz-transform: rotate(0deg) translateX(-50%);
transform: rotate(0deg) translateX(-50%);
}
.cl-effect-14 a:hover::after,
.cl-effect-14 a:focus::after {
right: 50%;
-webkit-transform: rotate(0deg) translateX(50%);
-moz-transform: rotate(0deg) translateX(50%);
transform: rotate(0deg) translateX(50%);
}
/**
* 5.0 - Widget
*/
.widget {
background: #fff;
padding: 30px 0 0;
}
.widget-title {
font-size: 1.5em;
margin-bottom: 20px;
line-height: 1.6;
padding: 10px 0 0;
font-weight: 400;
}
.widget-recent-posts ul {
padding: 0;
margin: 0;
padding-left: 20px;
}
.widget-recent-posts ul li {
list-style-type: none;
position: relative;
line-height: 170%;
margin-bottom: 10px;
}
.widget-recent-posts ul li::before {
content: '\f3d3';
font-family: "Ionicons";
position: absolute;
left: -17px;
top: 3px;
font-size: 16px;
color: #000;
}
.widget-archives ul {
padding: 0;
margin: 0;
padding-left: 25px;
}
.widget-archives ul li {
list-style-type: none;
position: relative;
line-height: 170%;
margin-bottom: 10px;
}
.widget-archives ul li::before {
content: '\f3f3';
font-family: "Ionicons";
position: absolute;
left: -25px;
top: 1px;
font-size: 16px;
color: #000;
}
.widget-category ul {
padding: 0;
margin: 0;
padding-left: 25px;
}
.widget-category ul li {
list-style-type: none;
position: relative;
line-height: 170%;
margin-bottom: 10px;
}
.widget-category ul li::before {
content: '\f3fe';
font-family: "Ionicons";
position: absolute;
left: -25px;
top: 1px;
font-size: 18px;
color: #000;
}
/**
* 6.0 - Footer
*/
#site-footer {
padding-top: 10px;
padding: 0 0 1.5em 0;
}
.copyright {
text-align: center;
padding-top: 1em;
margin: 0;
border-top: 1px solid #eee;
color: #666;
}
/**
* 7.0 - Header Search Bar
*/
#header-search-box {
position: absolute;
right: 38px;
top: 8px;
}
.search-form {
display: none;
width: 25%;
position: absolute;
min-width: 200px;
right: -6px;
top: 33px;
}
#search-menu span {
font-size: 20px;
}
#searchform {
position: relative;
border: 1px solid #ddd;
min-height: 42px;
}
#searchform input[type=search] {
width: 100%;
border: none;
position: absolute;
left: 0;
padding: 10px 30px 10px 10px;
z-index: 99;
}
#searchform button {
position: absolute;
right: 6px;
top: 4px;
z-index: 999;
background: transparent;
border: 0;
padding: 0;
}
#searchform button span {
font-size: 22px;
}
#search-menu span.ion-ios-close-empty {
font-size: 40px;
line-height: 0;
position: relative;
top: -6px;
}
/**
* 8.0 - Mobile Menu
*/
.overlay {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
background: #fff;
}
.overlay .overlay-close {
position: absolute;
right: 25px;
top: 10px;
padding: 0;
overflow: hidden;
border: none;
color: transparent;
background-color: transparent;
z-index: 100;
}
.overlay-hugeinc.open .ion-ios-close-empty {
color: #000;
font-size: 50px;
}
.overlay nav {
text-align: center;
position: relative;
top: 50%;
height: 60%;
font-size: 54px;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
}
.overlay ul {
list-style: none;
padding: 0;
margin: 0 auto;
display: inline-block;
height: 100%;
position: relative;
}
.overlay ul li {
display: block;
height: 20%;
height: calc(100% / 5);
min-height: 54px;
}
.overlay ul li a {
font-weight: 300;
display: block;
-webkit-transition: color 0.2s;
transition: color 0.2s;
}
.overlay ul li a:hover,
.overlay ul li a:focus {
color: #000;
}
.overlay-hugeinc {
opacity: 0;
visibility: hidden;
-webkit-transition: opacity 0.5s, visibility 0s 0.5s;
transition: opacity 0.5s, visibility 0s 0.5s;
}
.overlay-hugeinc.open {
opacity: 1;
visibility: visible;
-webkit-transition: opacity 0.5s;
transition: opacity 0.5s;
}
.overlay-hugeinc nav {
-webkit-perspective: 1200px;
perspective: 1200px;
}
.overlay-hugeinc nav ul {
opacity: 0.4;
-webkit-transform: translateY(-25%) rotateX(35deg);
transform: translateY(-25%) rotateX(35deg);
-webkit-transition: -webkit-transform 0.5s, opacity 0.5s;
transition: transform 0.5s, opacity 0.5s;
}
.overlay-hugeinc.open nav ul {
opacity: 1;
-webkit-transform: rotateX(0deg);
transform: rotateX(0deg);
}
.overlay-hugeinc.close nav ul {
-webkit-transform: translateY(25%) rotateX(-35deg);
transform: translateY(25%) rotateX(-35deg);
}
/**
* 9.0 - Contact Page Social
*/
.social {
list-style-type: none;
padding: 0;
margin: 0;
text-align: center;
}
.social li {
display: inline-block;
margin-right: 10px;
margin-bottom: 20px;
}
.social li a {
border: 1px solid #888;
font-size: 22px;
color: #888;
transition: all 0.3s ease-in;
}
.social li a:hover {
background-color: #333;
color: #fff;
}
.facebook a {
padding: 12px 21px;
}
.twitter a {
padding: 12px 15px;
}
.google-plus a {
padding: 12px 15px;
}
.tumblr a {
padding: 12px 20px;
}
/**
* 10.0 - Contact Form
*/
.contact-form input {
border: 1px solid #aaa;
margin-bottom: 15px;
width: 100%;
padding: 15px 15px;
font-size: 16px;
line-height: 100%;
transition: 0.4s border-color linear;
}
.contact-form textarea {
border: 1px solid #aaa;
margin-bottom: 15px;
width: 100%;
padding: 15px 15px;
font-size: 16px;
line-height: 20px !important;
min-height: 183px;
transition: 0.4s border-color linear;
}
.contact-form input:focus,
.contact-form textarea:focus {
border-color: #666;
}
.btn-send {
background: none;
border: 1px solid #aaa;
cursor: pointer;
padding: 25px 80px;
display: inline-block;
letter-spacing: 1px;
position: relative;
transition: all 0.3s;
}
.btn-5 {
color: #666;
height: 70px;
min-width: 260px;
line-height: 15px;
font-size: 16px;
overflow: hidden;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
backface-visibility: hidden;
}
.btn-5 span {
display: inline-block;
width: 100%;
height: 100%;
-webkit-transition: all 0.3s;
-webkit-backface-visibility: hidden;
-moz-transition: all 0.3s;
-moz-backface-visibility: hidden;
transition: all 0.3s;
backface-visibility: hidden;
}
.btn-5:before {
position: absolute;
height: 100%;
width: 100%;
line-height: 2.5;
font-size: 180%;
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
transition: all 0.3s;
}
.btn-5:active:before {
color: #703b87;
}
.btn-5b:hover span {
-webkit-transform: translateX(200%);
-moz-transform: translateX(200%);
-ms-transform: translateX(200%);
transform: translateX(200%);
}
.btn-5b:before {
left: -100%;
top: 0;
}
.btn-5b:hover:before {
left: 0;
}
/**
* 11.0 - Media Query
*/
@media (max-width: 991px) {
.main-nav a {
margin-right: 20px;
}
#header-search-box {
position: absolute;
right: 20px;
}
}
@media (max-width: 767px) {
#header-search-box {
right: 20px;
top: 9px;
}
.main-nav {
margin-top: 2px;
}
.btn-5 span {
display: none;
}
.btn-5b:before {
left: 0;
}
}
@media (max-width: 431px) {
.logo h1 {
margin-top: 8px;
font-size: 24px;
}
.post {
background: #fff;
padding: 0 10px 0;
}
.more-link {
font-size: 0.9em;
line-height: 100%;
}
}
@media screen and (max-height: 30.5em) {
.overlay nav {
height: 70%;
font-size: 34px;
}
.overlay ul li {
min-height: 34px;
}
}

File diff suppressed because one or more lines are too long

@ -0,0 +1,13 @@
.pace .pace-progress {
background: #000;
position: fixed;
z-index: 2000;
top: 0;
left: 0;
height: 1px;
transition: width 1s;
}
.pace-inactive {
display: none;
}

@ -0,0 +1,188 @@
<!DOCTYPE html>
<html>
<head>
<title>Black &amp; White</title>
<!-- meta -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- css -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/ionicons.min.css">
<link rel="stylesheet" href="css/pace.css">
<link rel="stylesheet" href="css/custom.css">
<!-- js -->
<script src="js/jquery-2.1.3.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/pace.min.js"></script>
<script src="js/modernizr.custom.js"></script>
</head>
<body>
<div class="container">
<header id="site-header">
<div class="row">
<div class="col-md-4 col-sm-5 col-xs-8">
<div class="logo">
<h1><a href="index.html"><b>Black</b> &amp; White</a></h1>
</div>
</div><!-- col-md-4 -->
<div class="col-md-8 col-sm-7 col-xs-4">
<nav class="main-nav" role="navigation">
<div class="navbar-header">
<button type="button" id="trigger-overlay" class="navbar-toggle">
<span class="ion-navicon"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li class="cl-effect-11"><a href="index.html" data-hover="Home">Home</a></li>
<li class="cl-effect-11"><a href="full-width.html" data-hover="Blog">Blog</a></li>
<li class="cl-effect-11"><a href="about.html" data-hover="About">About</a></li>
<li class="cl-effect-11"><a href="contact.html" data-hover="Contact">Contact</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</nav>
<div id="header-search-box">
<a id="search-menu" href="#"><span id="search-icon" class="ion-ios-search-strong"></span></a>
<div id="search-form" class="search-form">
<form role="search" method="get" id="searchform" action="#">
<input type="search" placeholder="Search" required>
<button type="submit"><span class="ion-ios-search-strong"></span></button>
</form>
</div>
</div>
</div><!-- col-md-8 -->
</div>
</header>
</div>
<div class="content-body">
<div class="container">
<div class="row">
<main class="col-md-12">
<article class="post post-1">
<header class="entry-header">
<h1 class="entry-title">
<a href="single.html">Adaptive Vs. Responsive Layouts And Optimal Text Readability</a>
</h1>
<div class="entry-meta">
<span class="post-category"><a href="#">Web Design</a></span>
<span class="post-date"><a href="#"><time class="entry-date" datetime="2012-11-09T23:15:57+00:00">February 2, 2013</time></a></span>
<span class="post-author"><a href="#">Albert Einstein</a></span>
<span class="comments-link"><a href="">4 Comments</a></span>
</div>
</header>
<div class="entry-content clearfix">
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb and flow of things. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which dont look even slightly.</p>
<div class="read-more cl-effect-14">
<a href="#" class="more-link">Continue reading <span class="meta-nav"></span></a>
</div>
</div>
</article>
<article class="post post-2">
<header class="entry-header">
<h1 class="entry-title">
<a href="single.html">Adaptive Vs. Responsive Layouts And Optimal Text Readability</a>
</h1>
<div class="entry-meta">
<span class="post-category"><a href="#">Web Design</a></span>
<span class="post-date"><a href="#"><time class="entry-date" datetime="2012-11-09T23:15:57+00:00">February 2, 2013</time></a></span>
<span class="post-author"><a href="#">Albert Einstein</a></span>
<span class="comments-link"><a href="#">4 Comments</a></span>
</div>
</header>
<div class="entry-content clearfix">
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb and flow of things. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which dont look even slightly.</p>
<div class="read-more cl-effect-14">
<a href="#" class="more-link">Continue reading <span class="meta-nav"></span></a>
</div>
</div>
</article>
<article class="post post-3">
<header class="entry-header">
<h1 class="entry-title">
<a href="single.html">Adaptive Vs. Responsive Layouts And Optimal Text Readability</a>
</h1>
<div class="entry-meta">
<span class="post-category"><a href="#" rel="category tag">Web Design</a></span>
<span class="post-date"><a href="#"><time class="entry-date" datetime="2012-11-09T23:15:57+00:00">February 2, 2013</time></a></span>
<span class="post-author"><a href="#">Albert Einstein</a></span>
<span class="comments-link"><a href="#">4 Comments</a></span>
</div>
</header>
<div class="entry-content clearfix">
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb and flow of things. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which dont look even slightly.</p>
<div class="read-more cl-effect-14">
<a href="#" class="more-link">Continue reading <span class="meta-nav"></span></a>
</div>
</div>
</article>
<article class="post post-4">
<header class="entry-header">
<h1 class="entry-title">
<a href="single.html">Adaptive Vs. Responsive Layouts And Optimal Text Readability</a>
</h1>
<div class="entry-meta">
<span class="post-category"><a href="#" rel="category tag">Web Design</a></span>
<span class="post-date"><a href="#"><time class="entry-date" datetime="2012-11-09T23:15:57+00:00">February 2, 2013</time></a></span>
<span class="post-author"><a href="#">Albert Einstein</a></span>
<span class="comments-link"><a href="#">4 Comments</a></span>
</div>
</header>
<div class="entry-content clearfix">
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb and flow of things. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which dont look even slightly.</p>
<div class="read-more cl-effect-14">
<a href="#" class="more-link">Continue reading <span class="meta-nav"></span></a>
</div>
</div>
</article>
</main>
</div>
</div>
</div>
<footer id="site-footer">
<div class="container">
<div class="row">
<div class="col-md-12">
<p class="copyright">&copy; 2014 ThemeWagon.com</p>
</div>
</div>
</div>
</footer>
<!-- Mobile Menu -->
<div class="overlay overlay-hugeinc">
<button type="button" class="overlay-close"><span class="ion-ios-close-empty"></span></button>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="full-width.html">Blog</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</div>
<script src="js/script.js"></script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

@ -0,0 +1,234 @@
<!DOCTYPE html>
<html>
<head>
<title>Black &amp; White</title>
<!-- meta -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- css -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/ionicons.min.css">
<link rel="stylesheet" href="css/pace.css">
<link rel="stylesheet" href="css/custom.css">
<!-- js -->
<script src="js/jquery-2.1.3.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/pace.min.js"></script>
<script src="js/modernizr.custom.js"></script>
</head>
<body>
<div class="container">
<header id="site-header">
<div class="row">
<div class="col-md-4 col-sm-5 col-xs-8">
<div class="logo">
<h1><a href="index.html"><b>Black</b> &amp; White</a></h1>
</div>
</div><!-- col-md-4 -->
<div class="col-md-8 col-sm-7 col-xs-4">
<nav class="main-nav" role="navigation">
<div class="navbar-header">
<button type="button" id="trigger-overlay" class="navbar-toggle">
<span class="ion-navicon"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li class="cl-effect-11"><a href="index.html" data-hover="Home">Home</a></li>
<li class="cl-effect-11"><a href="full-width.html" data-hover="Blog">Blog</a></li>
<li class="cl-effect-11"><a href="about.html" data-hover="About">About</a></li>
<li class="cl-effect-11"><a href="contact.html" data-hover="Contact">Contact</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</nav>
<div id="header-search-box">
<a id="search-menu" href="#"><span id="search-icon" class="ion-ios-search-strong"></span></a>
<div id="search-form" class="search-form">
<form role="search" method="get" id="searchform" action="#">
<input type="search" placeholder="Search" required>
<button type="submit"><span class="ion-ios-search-strong"></span></button>
</form>
</div>
</div>
</div><!-- col-md-8 -->
</div>
</header>
</div>
<div class="copyrights">Collect from <a href="http://www.cssmoban.com/" >网页模板</a></div>
<div class="content-body">
<div class="container">
<div class="row">
<main class="col-md-8">
<article class="post post-1">
<header class="entry-header">
<h1 class="entry-title">
<a href="single.html">Adaptive Vs. Responsive Layouts And Optimal Text Readability</a>
</h1>
<div class="entry-meta">
<span class="post-category"><a href="#">Web Design</a></span>
<span class="post-date"><a href="#"><time class="entry-date" datetime="2012-11-09T23:15:57+00:00">February 2, 2013</time></a></span>
<span class="post-author"><a href="#">Albert Einstein</a></span>
<span class="comments-link"><a href="#">4 Comments</a></span>
</div>
</header>
<div class="entry-content clearfix">
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb and flow of things. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which dont look even slightly.</p>
<div class="read-more cl-effect-14">
<a href="#" class="more-link">Continue reading <span class="meta-nav"></span></a>
</div>
</div>
</article>
<article class="post post-2">
<header class="entry-header">
<h1 class="entry-title">
<a href="single.html">Adaptive Vs. Responsive Layouts And Optimal Text Readability</a>
</h1>
<div class="entry-meta">
<span class="post-category"><a href="#">Web Design</a></span>
<span class="post-date"><a href="#"><time class="entry-date" datetime="2012-11-09T23:15:57+00:00">February 2, 2013</time></a></span>
<span class="post-author"><a href="#">Albert Einstein</a></span>
<span class="comments-link"><a href="#">4 Comments</a></span>
</div>
</header>
<div class="entry-content clearfix">
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb and flow of things. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which dont look even slightly.</p>
<div class="read-more cl-effect-14">
<a href="#" class="more-link">Continue reading <span class="meta-nav"></span></a>
</div>
</div>
</article>
<article class="post post-3">
<header class="entry-header">
<h1 class="entry-title">
<a href="single.html">Adaptive Vs. Responsive Layouts And Optimal Text Readability</a>
</h1>
<div class="entry-meta">
<span class="post-category"><a href="#">Web Design</a></span>
<span class="post-date"><a href="#"><time class="entry-date" datetime="2012-11-09T23:15:57+00:00">February 2, 2013</time></a></span>
<span class="post-author"><a href="#">Albert Einstein</a></span>
<span class="comments-link"><a href="#">4 Comments</a></span>
</div>
</header>
<div class="entry-content clearfix">
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb and flow of things. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which dont look even slightly.</p>
<div class="read-more cl-effect-14">
<a href="#" class="more-link">Continue reading <span class="meta-nav"></span></a>
</div>
</div>
</article>
<article class="post post-4">
<header class="entry-header">
<h1 class="entry-title">
<a href="single.html">Adaptive Vs. Responsive Layouts And Optimal Text Readability</a>
</h1>
<div class="entry-meta">
<span class="post-category"><a href="#">Web Design</a></span>
<span class="post-date"><a href="#"><time class="entry-date" datetime="2012-11-09T23:15:57+00:00">February 2, 2013</time></a></span>
<span class="post-author"><a href="#">Albert Einstein</a></span>
<span class="comments-link"><a href="#">4 Comments</a></span>
</div>
</header>
<div class="entry-content clearfix">
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb and flow of things. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which dont look even slightly.</p>
<div class="read-more cl-effect-14">
<a href="#" class="more-link">Continue reading <span class="meta-nav"></span></a>
</div>
</div>
</article>
</main>
<aside class="col-md-4">
<div class="widget widget-recent-posts">
<h3 class="widget-title">Recent Posts</h3>
<ul>
<li>
<a href="#">Adaptive Vs. Responsive Layouts And Optimal Text Readability</a>
</li>
<li>
<a href="#">Web Design is 95% Typography</a>
</li>
<li>
<a href="#">Paper by FiftyThree</a>
</li>
</ul>
</div>
<div class="widget widget-archives">
<h3 class="widget-title">Archives</h3>
<ul>
<li>
<a href="#">November 2014</a>
</li>
<li>
<a href="#">September 2014</a>
</li>
<li>
<a href="#">January 2013</a>
</li>
</ul>
</div>
<div class="widget widget-category">
<h3 class="widget-title">Category</h3>
<ul>
<li>
<a href="#">Web Design</a>
</li>
<li>
<a href="#">Web Development</a>
</li>
<li>
<a href="#">SEO</a>
</li>
</ul>
</div>
</aside>
</div>
</div>
</div>
<footer id="site-footer">
<div class="container">
<div class="row">
<div class="col-md-12">
<p class="copyright">&copy; 2014 ThemeWagon.com -More Templates <a href="http://www.cssmoban.com/" target="_blank" title="模板之家">模板之家</a> - Collect from <a href="http://www.cssmoban.com/" title="网页模板" target="_blank">网页模板</a></p>
</div>
</div>
</div>
</footer>
<!-- Mobile Menu -->
<div class="overlay overlay-hugeinc">
<button type="button" class="overlay-close"><span class="ion-ios-close-empty"></span></button>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="full-width.html">Blog</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</div>
<script src="js/script.js"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,152 @@
var searchvisible = 0;
$("#search-menu").click(function(e){
//This stops the page scrolling to the top on a # link.
e.preventDefault();
var val = $('#search-icon');
if(val.hasClass('ion-ios-search-strong')){
val.addClass('ion-ios-close-empty');
val.removeClass('ion-ios-search-strong');
}
else{
val.removeClass('ion-ios-close-empty');
val.addClass('ion-ios-search-strong');
}
if (searchvisible ===0) {
//Search is currently hidden. Slide down and show it.
$("#search-form").slideDown(200);
$("#s").focus(); //Set focus on the search input field.
searchvisible = 1; //Set search visible flag to visible.
}
else {
//Search is currently showing. Slide it back up and hide it.
$("#search-form").slideUp(200);
searchvisible = 0;
}
});
/*!
* classie - class helper functions
* from bonzo https://github.com/ded/bonzo
*
* classie.has( elem, 'my-class' ) -> true/false
* classie.add( elem, 'my-new-class' )
* classie.remove( elem, 'my-unwanted-class' )
* classie.toggle( elem, 'my-class' )
*/
/*jshint browser: true, strict: true, undef: true */
/*global define: false */
( function( window ) {
'use strict';
// class helper functions from bonzo https://github.com/ded/bonzo
function classReg( className ) {
return new RegExp("(^|\\s+)" + className + "(\\s+|$)");
}
// classList support for class management
// altho to be fair, the api sucks because it won't accept multiple classes at once
var hasClass, addClass, removeClass;
if ( 'classList' in document.documentElement ) {
hasClass = function( elem, c ) {
return elem.classList.contains( c );
};
addClass = function( elem, c ) {
elem.classList.add( c );
};
removeClass = function( elem, c ) {
elem.classList.remove( c );
};
}
else {
hasClass = function( elem, c ) {
return classReg( c ).test( elem.className );
};
addClass = function( elem, c ) {
if ( !hasClass( elem, c ) ) {
elem.className = elem.className + ' ' + c;
}
};
removeClass = function( elem, c ) {
elem.className = elem.className.replace( classReg( c ), ' ' );
};
}
function toggleClass( elem, c ) {
var fn = hasClass( elem, c ) ? removeClass : addClass;
fn( elem, c );
}
var classie = {
// full names
hasClass: hasClass,
addClass: addClass,
removeClass: removeClass,
toggleClass: toggleClass,
// short names
has: hasClass,
add: addClass,
remove: removeClass,
toggle: toggleClass
};
// transport
if ( typeof define === 'function' && define.amd ) {
// AMD
define( classie );
} else {
// browser global
window.classie = classie;
}
})( window );
(function() {
var triggerBttn = document.getElementById( 'trigger-overlay' ),
overlay = document.querySelector( 'div.overlay' ),
closeBttn = overlay.querySelector( 'button.overlay-close' );
transEndEventNames = {
'WebkitTransition': 'webkitTransitionEnd',
'MozTransition': 'transitionend',
'OTransition': 'oTransitionEnd',
'msTransition': 'MSTransitionEnd',
'transition': 'transitionend'
},
transEndEventName = transEndEventNames[ Modernizr.prefixed( 'transition' ) ],
support = { transitions : Modernizr.csstransitions };
function toggleOverlay() {
if( classie.has( overlay, 'open' ) ) {
classie.remove( overlay, 'open' );
classie.add( overlay, 'close' );
var onEndTransitionFn = function( ev ) {
if( support.transitions ) {
if( ev.propertyName !== 'visibility' ) return;
this.removeEventListener( transEndEventName, onEndTransitionFn );
}
classie.remove( overlay, 'close' );
};
if( support.transitions ) {
overlay.addEventListener( transEndEventName, onEndTransitionFn );
}
else {
onEndTransitionFn();
}
}
else if( !classie.has( overlay, 'close' ) ) {
classie.add( overlay, 'open' );
}
}
triggerBttn.addEventListener( 'click', toggleOverlay );
closeBttn.addEventListener( 'click', toggleOverlay );
})();

@ -0,0 +1,162 @@
<!DOCTYPE html>
<html>
<head>
<title>Black &amp; White</title>
<!-- meta -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- css -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/ionicons.min.css">
<link rel="stylesheet" href="css/pace.css">
<link rel="stylesheet" href="css/custom.css">
<!-- js -->
<script src="js/jquery-2.1.3.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/pace.min.js"></script>
<script src="js/modernizr.custom.js"></script>
</head>
<body id="single">
<div class="container">
<header id="site-header">
<div class="row">
<div class="col-md-4 col-sm-5 col-xs-8">
<div class="logo">
<h1><a href="index.html"><b>Black</b> &amp; White</a></h1>
</div>
</div><!-- col-md-4 -->
<div class="col-md-8 col-sm-7 col-xs-4">
<nav class="main-nav" role="navigation">
<div class="navbar-header">
<button type="button" id="trigger-overlay" class="navbar-toggle">
<span class="ion-navicon"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li class="cl-effect-11"><a href="index.html" data-hover="Home">Home</a></li>
<li class="cl-effect-11"><a href="full-width.html" data-hover="Blog">Blog</a></li>
<li class="cl-effect-11"><a href="about.html" data-hover="About">About</a></li>
<li class="cl-effect-11"><a href="contact.html" data-hover="Contact">Contact</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</nav>
<div id="header-search-box">
<a id="search-menu" href="#"><span id="search-icon" class="ion-ios-search-strong"></span></a>
<div id="search-form" class="search-form">
<form role="search" method="get" id="searchform" action="#">
<input type="search" placeholder="Search" required>
<button type="submit"><span class="ion-ios-search-strong"></span></button>
</form>
</div>
</div>
</div><!-- col-md-8 -->
</div>
</header>
</div>
<div class="content-body">
<div class="container">
<div class="row">
<main class="col-md-8">
<article class="post post-1">
<header class="entry-header">
<h1 class="entry-title">Adaptive Vs. Responsive Layouts And Optimal Text Readability</h1>
<div class="entry-meta">
<span class="post-category"><a href="#">Web Design</a></span>
<span class="post-date"><a href="#"><time class="entry-date" datetime="2012-11-09T23:15:57+00:00">February 2, 2013</time></a></span>
<span class="post-author"><a href="#">Albert Einstein</a></span>
<span class="comments-link"><a href="#">4 Comments</a></span>
</div>
</header>
<div class="entry-content clearfix">
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb and flow of things. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which dont look even slightly.</p>
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb and flow of things. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which dont look even slightly.</p>
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb and flow of things. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which dont look even slightly.</p>
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb and flow of things. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which dont look even slightly.</p>
</div>
</article>
</main>
<aside class="col-md-4">
<div class="widget widget-recent-posts">
<h3 class="widget-title">Recent Posts</h3>
<ul>
<li>
<a href="#">Adaptive Vs. Responsive Layouts And Optimal Text Readability</a>
</li>
<li>
<a href="#">Web Design is 95% Typography</a>
</li>
<li>
<a href="#">Paper by FiftyThree</a>
</li>
</ul>
</div>
<div class="widget widget-archives">
<h3 class="widget-title">Archives</h3>
<ul>
<li>
<a href="#">November 2014</a>
</li>
<li>
<a href="#">September 2014</a>
</li>
<li>
<a href="#">January 2013</a>
</li>
</ul>
</div>
<div class="widget widget-category">
<h3 class="widget-title">Category</h3>
<ul>
<li>
<a href="#">Web Design</a>
</li>
<li>
<a href="#">Web Development</a>
</li>
<li>
<a href="#">SEO</a>
</li>
</ul>
</div>
</aside>
</div>
</div>
</div>
<footer id="site-footer">
<div class="container">
<div class="row">
<div class="col-md-12">
<p class="copyright">&copy; 2014 ThemeWagon.com</p>
</div>
</div>
</div>
</footer>
<!-- Mobile Menu -->
<div class="overlay overlay-hugeinc">
<button type="button" class="overlay-close"><span class="ion-ios-close-empty"></span></button>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="full-width.html">Blog</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</div>
<script src="js/script.js"></script>
</body>
</html>

@ -0,0 +1,22 @@
#!/usr/bin/env python
# encoding: utf-8
"""
@version: ??
@author: liangliangyy
@license: MIT Licence
@contact: liangliangyy@gmail.com
@site: https://www.lylinux.org/
@software: PyCharm
@file: urls.py
@time: 2016/11/2 下午7:15
"""
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
]

@ -7,9 +7,8 @@ import markdown2
class IndexView(ListView):
# template_name属性用于指定使用哪个模板进行渲染
template_name = 'blog/index.html'
template_name = 'index.html'
# context_object_name属性用于给上下文变量取名在模板中使用该名字
context_object_name = 'article_list'

@ -0,0 +1,6 @@
from django.contrib import admin
# Register your models here.
from .models import Comment
admin.site.register(Comment)

@ -0,0 +1,5 @@
from django.apps import AppConfig
class CommentsConfig(AppConfig):
name = 'comments'

@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-11-02 12:49
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Comment',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('body', models.TextField(verbose_name='正文')),
('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
('last_mod_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='作者')),
],
options={
'verbose_name_plural': '评论',
'ordering': ['created_time'],
'verbose_name': '评论',
},
),
]

@ -0,0 +1,21 @@
from django.db import models
from django.conf import settings
# Create your models here.
class Comment(models.Model):
body = models.TextField('正文')
created_time = models.DateTimeField('创建时间', auto_now_add=True)
last_mod_time = models.DateTimeField('修改时间', auto_now=True)
author = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name='作者', on_delete=models.CASCADE)
class Meta:
ordering = ['created_time']
verbose_name = "评论"
verbose_name_plural = verbose_name
def __str__(self):
return self.body

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.

@ -0,0 +1,261 @@
{% load staticfiles %}
<!DOCTYPE html>
<html>
<head>
<title>Black &amp; White</title>
<!-- meta -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- css -->
<link rel="stylesheet" href="{% static 'blog/css/bootstrap.min.css' %}">
<link rel="stylesheet" href="{% static 'blog/css/ionicons.min.css' %}">
<link rel="stylesheet" href="{% static 'blog/css/pace.css' %}">
<link rel="stylesheet" href="{% static 'blog/css/custom.css' %}">
<!-- js -->
<script src="{% static 'blog/js/jquery-2.1.3.min.js' %}"></script>
<script src="{% static 'blog/js/bootstrap.min.js' %}"></script>
<script src="{% static 'blog/js/pace.min.js' %}"></script>
<script src="{% static 'blog/js/modernizr.custom.js' %}"></script>
</head>
<body>
<div class="container">
<header id="site-header">
<div class="row">
<div class="col-md-4 col-sm-5 col-xs-8">
<div class="logo">
<h1><a href="index.html"><b>Black</b> &amp; White</a></h1>
</div>
</div><!-- col-md-4 -->
<div class="col-md-8 col-sm-7 col-xs-4">
<nav class="main-nav" role="navigation">
<div class="navbar-header">
<button type="button" id="trigger-overlay" class="navbar-toggle">
<span class="ion-navicon"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li class="cl-effect-11"><a href="index.html" data-hover="Home">Home</a></li>
<li class="cl-effect-11"><a href="full-width.html" data-hover="Blog">Blog</a></li>
<li class="cl-effect-11"><a href="about.html" data-hover="About">About</a></li>
<li class="cl-effect-11"><a href="contact.html" data-hover="Contact">Contact</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</nav>
<div id="header-search-box">
<a id="search-menu" href="#"><span id="search-icon" class="ion-ios-search-strong"></span></a>
<div id="search-form" class="search-form">
<form role="search" method="get" id="searchform" action="#">
<input type="search" placeholder="Search" required>
<button type="submit"><span class="ion-ios-search-strong"></span></button>
</form>
</div>
</div>
</div><!-- col-md-8 -->
</div>
</header>
</div>
<div class="copyrights">Collect from <a href="http://www.cssmoban.com/">网页模板</a></div>
{% block content %}{% endblock %}
{% comment %}<div class="content-body">
<div class="container">
<div class="row">
<main class="col-md-8">
<article class="post post-1">
<header class="entry-header">
<h1 class="entry-title">
<a href="single.html">Adaptive Vs. Responsive Layouts And Optimal Text Readability</a>
</h1>
<div class="entry-meta">
<span class="post-category"><a href="#">Web Design</a></span>
<span class="post-date"><a href="#"><time class="entry-date"
datetime="2012-11-09T23:15:57+00:00">February 2, 2013</time></a></span>
<span class="post-author"><a href="#">Albert Einstein</a></span>
<span class="comments-link"><a href="#">4 Comments</a></span>
</div>
</header>
<div class="entry-content clearfix">
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb and
flow of things. There are many variations of passages of Lorem Ipsum available, but the
majority have suffered alteration in some form, by injected humour, or randomised words
which dont look even slightly.</p>
<div class="read-more cl-effect-14">
<a href="#" class="more-link">Continue reading <span class="meta-nav"></span></a>
</div>
</div>
</article>
<article class="post post-2">
<header class="entry-header">
<h1 class="entry-title">
<a href="single.html">Adaptive Vs. Responsive Layouts And Optimal Text Readability</a>
</h1>
<div class="entry-meta">
<span class="post-category"><a href="#">Web Design</a></span>
<span class="post-date"><a href="#"><time class="entry-date"
datetime="2012-11-09T23:15:57+00:00">February 2, 2013</time></a></span>
<span class="post-author"><a href="#">Albert Einstein</a></span>
<span class="comments-link"><a href="#">4 Comments</a></span>
</div>
</header>
<div class="entry-content clearfix">
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb and
flow of things. There are many variations of passages of Lorem Ipsum available, but the
majority have suffered alteration in some form, by injected humour, or randomised words
which dont look even slightly.</p>
<div class="read-more cl-effect-14">
<a href="#" class="more-link">Continue reading <span class="meta-nav"></span></a>
</div>
</div>
</article>
<article class="post post-3">
<header class="entry-header">
<h1 class="entry-title">
<a href="single.html">Adaptive Vs. Responsive Layouts And Optimal Text Readability</a>
</h1>
<div class="entry-meta">
<span class="post-category"><a href="#">Web Design</a></span>
<span class="post-date"><a href="#"><time class="entry-date"
datetime="2012-11-09T23:15:57+00:00">February 2, 2013</time></a></span>
<span class="post-author"><a href="#">Albert Einstein</a></span>
<span class="comments-link"><a href="#">4 Comments</a></span>
</div>
</header>
<div class="entry-content clearfix">
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb and
flow of things. There are many variations of passages of Lorem Ipsum available, but the
majority have suffered alteration in some form, by injected humour, or randomised words
which dont look even slightly.</p>
<div class="read-more cl-effect-14">
<a href="#" class="more-link">Continue reading <span class="meta-nav"></span></a>
</div>
</div>
</article>
<article class="post post-4">
<header class="entry-header">
<h1 class="entry-title">
<a href="single.html">Adaptive Vs. Responsive Layouts And Optimal Text Readability</a>
</h1>
<div class="entry-meta">
<span class="post-category"><a href="#">Web Design</a></span>
<span class="post-date"><a href="#"><time class="entry-date"
datetime="2012-11-09T23:15:57+00:00">February 2, 2013</time></a></span>
<span class="post-author"><a href="#">Albert Einstein</a></span>
<span class="comments-link"><a href="#">4 Comments</a></span>
</div>
</header>
<div class="entry-content clearfix">
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb and
flow of things. There are many variations of passages of Lorem Ipsum available, but the
majority have suffered alteration in some form, by injected humour, or randomised words
which dont look even slightly.</p>
<div class="read-more cl-effect-14">
<a href="#" class="more-link">Continue reading <span class="meta-nav"></span></a>
</div>
</div>
</article>
</main>
<aside class="col-md-4">
<div class="widget widget-recent-posts">
<h3 class="widget-title">Recent Posts</h3>
<ul>
<li>
<a href="#">Adaptive Vs. Responsive Layouts And Optimal Text Readability</a>
</li>
<li>
<a href="#">Web Design is 95% Typography</a>
</li>
<li>
<a href="#">Paper by FiftyThree</a>
</li>
</ul>
</div>
<div class="widget widget-archives">
<h3 class="widget-title">Archives</h3>
<ul>
<li>
<a href="#">November 2014</a>
</li>
<li>
<a href="#">September 2014</a>
</li>
<li>
<a href="#">January 2013</a>
</li>
</ul>
</div>
<div class="widget widget-category">
<h3 class="widget-title">Category</h3>
<ul>
<li>
<a href="#">Web Design</a>
</li>
<li>
<a href="#">Web Development</a>
</li>
<li>
<a href="#">SEO</a>
</li>
</ul>
</div>
</aside>
</div>
</div>
</div>{% endcomment %}
<footer id="site-footer">
<div class="container">
<div class="row">
<div class="col-md-12">
<p class="copyright">&copy; 2014 ThemeWagon.com -More Templates <a href="http://www.cssmoban.com/"
target="_blank" title="模板之家">模板之家</a>
- Collect from <a href="http://www.cssmoban.com/" title="网页模板" target="_blank">网页模板</a></p>
</div>
</div>
</div>
</footer>
<!-- Mobile Menu -->
<div class="overlay overlay-hugeinc">
<button type="button" class="overlay-close"><span class="ion-ios-close-empty"></span></button>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="full-width.html">Blog</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</div>
<script src="js/script.js"></script>
</body>
</html>

@ -0,0 +1,186 @@
{% extends 'base.html' %}
{% block content %}
<div class="content-body">
<div class="container">
<div class="row">
<main class="col-md-8">
{% for article in article_list %}
<article class="post post-1">
<header class="entry-header">
<h1 class="entry-title">
<a href="single.html">{{ article.title }} </a>
</h1>
<div class="entry-meta">
<span class="post-category"><a href="#">{{ article.category.name }}</a></span>
<span class="post-date">
<a href="#">
<time class="entry-date"
datetime="{{ article.created_time }}">{{ article.created_time|date:'Y年n月j日' }}</time>
</a>
</span>
<span class="post-author"><a href="#">{{ article.author.username }}</a></span>
<span class="comments-link"><a href="#">4 Comments</a></span>
</div>
</header>
<div class="entry-content clearfix">
<p>Responsive web design offers us a way forward, finally allowing us to design for the
ebb
and
flow of things. There are many variations of passages of Lorem Ipsum available, but
the
majority have suffered alteration in some form, by injected humour, or randomised
words
which dont look even slightly.</p>
<div class="read-more cl-effect-14">
<a href="#" class="more-link">Continue reading <span class="meta-nav"></span></a>
</div>
</div>
</article>
{% endfor %}
<article class="post post-2">
<header class="entry-header">
<h1 class="entry-title">
<a href="single.html">Adaptive Vs. Responsive Layouts And Optimal Text Readability</a>
</h1>
<div class="entry-meta">
<span class="post-category"><a href="#">Web Design</a></span>
<span class="post-date"><a href="#"><time class="entry-date"
datetime="2012-11-09T23:15:57+00:00">February 2, 2013</time></a></span>
<span class="post-author"><a href="#">Albert Einstein</a></span>
<span class="comments-link"><a href="#">4 Comments</a></span>
</div>
</header>
<div class="entry-content clearfix">
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb
and
flow of things. There are many variations of passages of Lorem Ipsum available, but the
majority have suffered alteration in some form, by injected humour, or randomised words
which dont look even slightly.</p>
<div class="read-more cl-effect-14">
<a href="#" class="more-link">Continue reading <span class="meta-nav"></span></a>
</div>
</div>
</article>
<article class="post post-3">
<header class="entry-header">
<h1 class="entry-title">
<a href="single.html">Adaptive Vs. Responsive Layouts And Optimal Text Readability</a>
</h1>
<div class="entry-meta">
<span class="post-category"><a href="#">Web Design</a></span>
<span class="post-date"><a href="#"><time class="entry-date"
datetime="2012-11-09T23:15:57+00:00">February 2, 2013</time></a></span>
<span class="post-author"><a href="#">Albert Einstein</a></span>
<span class="comments-link"><a href="#">4 Comments</a></span>
</div>
</header>
<div class="entry-content clearfix">
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb
and
flow of things. There are many variations of passages of Lorem Ipsum available, but the
majority have suffered alteration in some form, by injected humour, or randomised words
which dont look even slightly.</p>
<div class="read-more cl-effect-14">
<a href="#" class="more-link">Continue reading <span class="meta-nav"></span></a>
</div>
</div>
</article>
<article class="post post-4">
<header class="entry-header">
<h1 class="entry-title">
<a href="single.html">Adaptive Vs. Responsive Layouts And Optimal Text Readability</a>
</h1>
<div class="entry-meta">
<span class="post-category"><a href="#">Web Design</a></span>
<span class="post-date"><a href="#"><time class="entry-date"
datetime="2012-11-09T23:15:57+00:00">February 2, 2013</time></a></span>
<span class="post-author"><a href="#">Albert Einstein</a></span>
<span class="comments-link"><a href="#">4 Comments</a></span>
</div>
</header>
<div class="entry-content clearfix">
<p>Responsive web design offers us a way forward, finally allowing us to design for the ebb
and
flow of things. There are many variations of passages of Lorem Ipsum available, but the
majority have suffered alteration in some form, by injected humour, or randomised words
which dont look even slightly.</p>
<div class="read-more cl-effect-14">
<a href="#" class="more-link">Continue reading <span class="meta-nav"></span></a>
</div>
</div>
</article>
</main>
<aside class="col-md-4">
<div class="widget widget-recent-posts">
<h3 class="widget-title">Recent Posts</h3>
<ul>
<li>
<a href="#">Adaptive Vs. Responsive Layouts And Optimal Text Readability</a>
</li>
<li>
<a href="#">Web Design is 95% Typography</a>
</li>
<li>
<a href="#">Paper by FiftyThree</a>
</li>
</ul>
</div>
<div class="widget widget-archives">
<h3 class="widget-title">Archives</h3>
<ul>
<li>
<a href="#">November 2014</a>
</li>
<li>
<a href="#">September 2014</a>
</li>
<li>
<a href="#">January 2013</a>
</li>
</ul>
</div>
<div class="widget widget-category">
<h3 class="widget-title">Category</h3>
<ul>
<li>
<a href="#">Web Design</a>
</li>
<li>
<a href="#">Web Development</a>
</li>
<li>
<a href="#">SEO</a>
</li>
</ul>
</div>
</aside>
</div>
</div>
</div>
{% endblock %}
Loading…
Cancel
Save