Skip to content
Browse files

init

  • Loading branch information...
1 parent 308c6e4 commit 741447e73706b120e60b0371bf7cac1bc14ab8cf @tizac committed Nov 21, 2012
View
18 .gitignore
@@ -0,0 +1,18 @@
+*.elc
+*.pyc
+*~
+*.swp
+*.swo
+*.bak
+*.log
+*.svn
+.svn
+*.nohup
+
+*.htm.py
+*.txt.py
+.*.js
+.*.css
+
+*.db
+sessions
View
91 code.py
@@ -0,0 +1,91 @@
+#!/usr/bin/python
+#coding:utf-8
+
+import web
+
+#for import view and other local module
+if __name__!='__main__':
+ import os
+ import sys
+ abspath = os.path.dirname(__file__)
+ sys.path.append(abspath)
+ os.chdir(abspath)
+
+import sys
+if sys.getdefaultencoding() != 'utf-8':
+ reload(sys)
+ sys.setdefaultencoding('utf-8')
+
+from view import *
+from sqlalchemy.orm import scoped_session, sessionmaker
+
+def load_sqlalchemy(handler):
+ web.ctx.orm = scoped_session(sessionmaker(bind=engine))
+ try:
+ return handler()
+ except web.HTTPError:
+ web.ctx.orm.commit()
+ raise
+ except:
+ web.ctx.orm.rollback()
+ raise
+ finally:
+ web.ctx.orm.commit()
+
+
+#--- Control settings ----
+urls = (
+ '/', 'index',
+ '/login', 'login',
+ '/logout', 'logout',
+ '/events', 'events',
+ '/event/(\d+)', 'event',
+ '/articles', 'articles',
+ '/articles/catalog/(\d+)', 'catalog',
+ '/articles/catalog/create/(\d+)', 'articles_create',
+ '/article/(\d+)', 'article_view',
+ '/article/edit/(\d+)', 'article_edit',
+ '/article/image/upload/(\d+)', 'article_image_upload',
+ '/image/delete/(\d+)', 'image_delete',
+ '/photos', 'photos',
+ '/photos/year/(\d+)', 'photos_year',
+ '/photo/(\d+)/(\d+)','photo_view',
+ '/memories', 'memories',
+ '/words', 'words',
+ '/words/create', 'words_create',
+ '/word/delete/(\d+)', 'word_delete',
+ '/word/show/(\d+)', 'word_show',
+ '/word/hide/(\d+)', 'word_hide',
+ '/vedios', 'vedios',
+ '/vedio/(\d+)', 'vedio_view',
+ '/vedio/create', 'vedio_create',
+ '/vedio/edit/(\d+)', 'vedio_edit',
+ '/activity/goldencampass', 'activity',
+ )
+
+
+app = web.application(urls, globals())
+app.add_processor(load_sqlalchemy)
+
+
+#web.config.debug = False
+
+if __name__!='__main__':
+ session = web.session.Session(app, web.session.DiskStore(os.path.join(abspath,'sessions')),initializer={'isAdmin':0})
+else:
+ session = web.session.Session(app, web.session.DiskStore('sessions'),initializer={'isAdmin':0})
+
+def session_hook():
+ web.ctx.session = session
+ web.template.Template.globals['session'] = session
+
+
+if __name__ == "__main__":
+ app.add_processor(web.loadhook(session_hook))
+ app.run()
+else:
+ app.add_processor(web.loadhook(session_hook))
+ application=app.wsgifunc()
+
+
+
View
5 config.py
@@ -0,0 +1,5 @@
+import os
+
+MAIN_PATH = os.getcwd()
+STATIC_PATH = MAIN_PATH + '/static'
+PASSWD = '73a21e6a277f2b4c365cfde2fa8e8bb64f566f8eeb8d069dab8a36e0'
View
20 merge_static
@@ -0,0 +1,20 @@
+#!/usr/bin/python
+#coding:utf8
+
+import os
+import re
+
+m = re.compile('.*/')
+s = m.match(os.getcwd())
+path = s.group(0)
+
+#path = '/home/tizac/camp/sites/static'
+
+dirs = ['book', 'icon210', 'img', 'photo', 'vedio_img']
+
+for d in dirs:
+ cmd = 'rm ./static/%s' % (d)
+ os.system(cmd)
+ cmd = 'ln -s %sstatic/%s ./static/' % (path, d)
+ os.system(cmd)
+
View
168 model.py
@@ -0,0 +1,168 @@
+#!/usr/bin/python
+#coding:utf-8
+
+import web
+import re
+import time
+
+from datetime import datetime
+from web.utils import storage
+
+
+from sqlalchemy import create_engine
+#engine = create_engine("mysql://tizac:m1y4q5tb@localhost/dongdong?charset=utf8" , echo=False)
+engine = create_engine("sqlite:///dongdong.db" , echo=False)
+
+from sqlalchemy.ext.declarative import declarative_base
+Base = declarative_base()
+
+
+from sqlalchemy import Column, Integer, String, DateTime
+from sqlalchemy import Table, Text
+from sqlalchemy import ForeignKey
+from sqlalchemy import and_, or_
+from sqlalchemy.orm import relationship, backref
+
+
+class Word(Base):
+ __tablename__ = 'Word'
+
+ id = Column(Integer, unique=True, primary_key=True)
+ title = Column(String(256), nullable=False)
+ content = Column(Text, nullable=False)
+ author = Column(String(256), nullable=False)
+ time = Column(DateTime, nullable=False)
+ hide = Column(Integer, nullable=False)
+
+ def __init__(self, args):
+ self.title = args.title
+ self.content = args.content
+ self.author = args.author
+ self.time = datetime.now()
+ self.hide = 0
+
+ def __repr__(self):
+ return "<Word('%r')>" % self.id
+
+
+class Article(Base):
+ __tablename__ = 'Article'
+
+ id = Column(Integer, unique=True, primary_key=True)
+ title = Column(String(256), nullable=False)
+ time = Column(DateTime)
+ source = Column(String(256))
+ content = Column(Text, nullable=False)
+ catalog_id = Column(Integer, ForeignKey('Catalog.id'))
+ ishtml = Column(Integer, nullable=False )
+ catalog = relationship('Catalog', backref = backref('article', order_by=time))
+
+ def __init__(self, args):
+ self.update(args)
+
+ def update(self, args):
+ self.title = args.title
+ if args.time:
+ ttuple = time.strptime(args.time, "%Y-%m-%d")
+ tdate = datetime(ttuple[0],ttuple[1],ttuple[2])
+ self.time = tdate
+ self.source = args.source
+ self.content = args.content
+ try:
+ c1 = web.ctx.orm.query(Catalog).filter_by(name = args.catalog).one()
+ except:
+ c1 = Catalog(args.catalog)
+ self.catalog = c1
+
+ def __repr__(self):
+ return "<Article('%r')>" % self.id
+
+ def content_to_html(self):
+ #print "%r"%self.content
+ if self.ishtml==1:
+ html=self.content
+ else:
+ strbr = re.compile(r'\r\n')
+ html = strbr.sub('<br/>', self.content)
+ #strspace = re.compile(r' ')
+ #html = strspace.sub('&nbsp;', html)
+ #html = markdown.markdown(html)
+ #print html
+ return html
+
+
+class Catalog(Base):
+ __tablename__ = 'Catalog'
+
+ id = Column(Integer, unique=True, primary_key=True, autoincrement=True)
+ name = Column(String(64), nullable=False, unique=True)
+ weight = Column(Integer, nullable=False )
+ channel = Column(Integer, nullable=False )
+
+ def __init__(self,name):
+ self.name=name
+
+ def __repr__(self):
+ return 'Catalog(%r)' % (self.name)
+
+
+class Image(Base):
+ __tablename__='Image'
+
+ id = Column(Integer, unique=True, primary_key=True, autoincrement=True)
+ name = Column(String(256), nullable=False, unique=True)
+ article_id = Column(Integer, ForeignKey('Article.id'))
+ article = relationship('Article', backref = backref('image'))
+
+ def __init__(self, name, article_id):
+ self.name = name
+ a1 = web.ctx.orm.query(Article).filter_by(id = article_id).one()
+ self.article = a1
+
+ def __repr__(self):
+ return 'Image(%r, %r)' % (self.id, self.name)
+
+
+class Photo(Base):
+ __tablename__='Photo'
+
+ id = Column(Integer, unique=True, primary_key=True, autoincrement=True)
+ year = Column(Integer)
+ name = Column(String(256), nullable=False, unique=True)
+
+
+class Vedio(Base):
+ __tablename__='Vedio'
+
+ id = Column(Integer, unique=True, primary_key=True, autoincrement=True)
+ #name = Column(String(256), nullable=False, unique=True)
+ title = Column(String(256), nullable=False, unique=True)
+ url = Column(String(512), nullable=False, unique=True)
+ catalog_id = Column(Integer, ForeignKey('Catalog.id'))
+ catalog = relationship('Catalog', backref = backref('vedio', order_by=title))
+
+
+
+ def __init__(self, args):
+ self.update(args)
+
+ def update(self, args):
+ self.title= args.title
+ self.url = args.url
+ try:
+ c1 = web.ctx.orm.query(Catalog).filter_by(name = args.catalog).one()
+ except:
+ c1 = Catalog(args.catalog)
+ self.catalog = c1
+
+
+
+#---------------------------------------------------------------------
+
+metadata = Base.metadata
+
+if __name__ == "__main__":
+ metadata.create_all(engine)
+ from sqlalchemy.orm import sessionmaker
+ Session = sessionmaker(bind=engine)
+ session = Session()
View
1 static/book
View
556 static/css/style.css
@@ -0,0 +1,556 @@
+body{
+margin:0;
+padding:0;
+}
+
+div.body {
+width:80%;
+background:white;
+margin:0px auto;
+padding:0px;
+overflow:auto;
+}
+
+a{
+text-decoration:none;
+color:black;
+font-size:18px;
+padding:2px 5px;
+}
+
+a:hover {
+color:white;
+background:black;
+}
+
+h3 {
+margin:20px 0;
+font-size:22px;
+}
+
+div.h3 {
+font-size:24px;
+}
+
+a.h3 {
+font-size:24px;
+}
+
+div.h4 {
+font-size:20px;
+color:black;
+}
+
+a.h4 {
+font-size:20px;
+}
+
+ul.article {
+color:black;
+}
+
+ul.article li {
+margin:8px 0;
+}
+
+ul.article li span{
+color:black;
+}
+
+div.shelf{
+width:70%;
+margin:0px auto;
+padding:0px;
+}
+
+div.head{
+width:100%;
+color:black;
+overflow:auto;
+text-align:center;
+}
+
+div.head h1 {
+font-size:35px;
+margin:10px;
+margin-top:20px;
+}
+
+div.head h2 {
+font-size:18px;
+margin:5px;
+font-weight:normal;
+}
+
+div.menu {
+background:black;
+width:100%;
+margin:8px 0;
+overflow:auto;
+text-align:center;
+}
+
+div.menu ul{
+float: left;
+width: 90%;
+margin: 0% 5%;
+padding: 0;
+padding-left: 25px;
+list-style-type:none;
+}
+
+div.menu ul li {
+width:16%;
+float:left;
+}
+
+div.menu ul li a {
+width:80%;
+float:left;
+margin:0 2%;
+padding:8px 8%;
+color:white;
+font-size: 20px;
+}
+
+div.menu ul li a:hover {
+color:white;
+background:#bbbbbb;
+}
+
+div.menu ul li a.selected {
+color:white;
+background:#bbbbbb;
+}
+
+div.profile {
+margin:10px auto;
+padding:10px;
+border: 1px solid gray;
+width:300px;
+overflow:auto;
+}
+
+img.profile {
+width:100%;
+}
+
+p{
+font-size: 18px;
+}
+
+div.foot {
+height:10px
+}
+
+pre {
+font-size:18px;
+}
+
+div.events {
+background: red;
+overflow:auto;
+}
+
+h3.title {
+margin:0;
+padding:0;
+font-size:24px;
+}
+
+hr {
+margin: 20px 0;
+}
+
+div.photo img {
+float:left;
+margin:auto;
+}
+
+div.photo {
+height:210px;
+width:210px;
+float:left;
+margin:5px;
+padding:5px;
+}
+
+
+div.word {
+margin:20px auto;
+margin-bottom:50px;
+overflow:auto;
+}
+
+table.words {
+width:100%;
+}
+
+table.words tr{
+width:100%;
+}
+
+table.words th {
+font-weight: normal;
+width:15%;
+font-size:18px;
+}
+
+table.words td {
+width:85%;
+font-size:18px;
+}
+
+table.words input {
+width:100%;
+padding:5px;
+border: 1px solid #bbbbbb;
+font-size:18px;
+}
+
+table.words input.submit {
+float:right;
+width:100px;
+margin-right:20px;
+padding:2px;
+}
+
+table.words textarea {
+width:100%;
+height:100px;
+padding:5px;
+border: 1px solid #bbbbbb;
+font-size:18px;
+}
+
+a.word_create {
+float:right;
+}
+
+div.line {
+overflow:auto;
+width:100%;
+}
+
+div.m20 {
+width:100%;
+margin:20px auto;
+}
+
+
+div.words {
+width:70%;
+margin:0 auto;
+}
+
+h4 {
+margin:0;
+padding:0;
+}
+
+ul.word {
+margin:20px 0;
+padding:0;
+float:left;
+width:100%;
+list-style-type:none;
+}
+
+ul.word li {
+margin:3px 0;
+float:left;
+width:100%;
+font-size:20px;
+}
+
+
+
+ul.word li.author {
+color:gray;
+font-size:16px;
+}
+
+div.login {
+margin:50px auto ;
+width:300px;
+}
+
+table.words textarea.content {
+width:100%;
+height:400px;
+padding:5px;
+border: 1px solid #bbbbbb;
+font-size:18px;
+}
+
+
+
+table.upload img{
+width:200px;
+}
+
+table.upload td{
+padding:0px 20px;
+}
+
+span.right {
+float:right;
+color:black;
+font-size:18px;
+}
+
+span.content {
+color:gray;
+}
+
+a.button {
+background:#bbbbbb;
+color:black;
+border:1px solid gray;
+}
+
+a.button:hover {
+color:white;
+background:#444444;
+}
+
+ul.catalog li {
+margin:10px 0;
+}
+
+div.intro {
+width:250px;
+overflow:auto;
+background:#eeeeee;
+margin:20px 0;
+padding:13px;
+border:1px solid #aaaaaa;
+}
+
+div.intro ul {
+float:left;
+margin:5px 0;
+color:black;
+}
+
+div.intro li {
+font-size:18px;
+margin:2px 0;
+}
+
+div.intro hr {
+width:92%;
+margin:5px 4%;
+margin-bottom:0;
+float:left;
+}
+
+div.intro span {
+width:92%;
+margin:0px 4%;
+margin-bottom:0;
+font-size:20px;
+overflow:auto;
+float:left;
+}
+
+div.photos {
+margin:20px 0;
+}
+
+ul.photos {
+margin:0;
+padding:0;
+width:100%;
+float:left;
+list-style-type:none;
+}
+
+ul.photos li {
+float:left;
+width:270px;
+height:220px;
+border:1px solid gray;
+padding:10px;
+margin:10px;
+}
+
+
+ul.photos li:hover {
+color:white;
+background:#dddddd;
+}
+
+ul.photos a {
+margin:0;
+padding:0;
+}
+
+ul.photos img {
+width:100%;
+}
+
+ul.photos div {
+margin:10px auto;
+color:black;
+width:80px;
+font-size:20px;
+}
+
+div.photo_view {
+margin:20px 0;
+width:100%;
+}
+
+
+div.photo_view img {
+width:100%;
+}
+
+p {
+font-size:20px;
+}
+
+ul.word span {
+background:#eeeeee;
+overflow:auto;
+}
+
+ul.word li.content {
+margin:20px 0;
+}
+
+ul.word img {
+margin:20px;
+margin-left:0;
+}
+
+ul.word img.left {
+margin:20px;
+float:left;
+margin-left:0px;
+}
+
+
+ul.word img.right {
+margin:20px;
+float:right;
+margin-right:0px;
+}
+
+
+ul.word img.center{
+margin:20px 0px;
+}
+
+ul.word img.w100 {
+width:100%;
+margin:20px 0;
+}
+
+ul.word img.w50{
+width:50%;
+}
+
+ul.word img.w40{
+width:40%;
+}
+
+ul.word img.w60{
+width:60%;
+}
+
+ul.word img.w30{
+width:30%;
+}
+
+ul.word img.w70{
+width:70%;
+}
+
+
+ul.word img.w80{
+width:80%;
+}
+
+div.page {
+width:200px;
+margin:20px auto;
+}
+
+a.photo {
+background:none;
+padding:0;
+margin:0;
+}
+
+table.events {
+font-size:18px;
+}
+
+table.events td {
+padding:0 10px;
+}
+
+table.events td.t1 {
+width:220px;
+}
+
+table.events td.t2 {
+width:100px;
+}
+
+div.book{
+width:33%;
+float:left;
+margin:10px 0;
+padding:0;
+height:160px;
+}
+
+div.book span.img{
+float:left;
+width:40%;
+}
+
+div.book img{
+width:90%;
+float:left;
+}
+
+div.book span.title{
+float:left;
+margin:0;
+padding:0;
+width:55%;
+}
+
+div.book ul {
+margin:0;
+padding:0;
+list-style-type:none;
+float:left;
+}
+
+div.book ul li {
+margin:0;
+padding:0;
+float:left;
+width:100%;
+font-size:16px;
+color:gray;
+}
+
+div.book ul li.title {
+color:#006699;
+}
+
+div.bottom {
+width:100%;
+margin-bottom:100px;
+float:left;
+}
+
+ul.word li.gray {
+font-color:gray;
+}
View
480 static/css/style0801.css
@@ -0,0 +1,480 @@
+body{
+margin:0;
+padding:0;
+}
+
+div.body {
+width:80%;
+background:white;
+margin:0px auto;
+padding:0px;
+overflow:auto;
+}
+
+
+a{
+text-decoration:none;
+color:#006699;
+font-size:18px;
+padding:2px 5px;
+}
+
+a:hover {
+color:white;
+background:#006699;
+}
+
+div.h3 {
+font-size:24px;
+}
+
+a.h3 {
+font-size:24px;
+}
+
+div.h4 {
+font-size:20px;
+color:#006699;
+}
+
+a.h4 {
+font-size:20px;
+}
+
+ul.article {
+color:#006699;
+}
+
+ul.article li {
+margin:8px 0;
+}
+
+ul.article li span{
+color:#006699;
+}
+
+div.shelf{
+width:70%;
+margin:0px auto;
+padding:0px;
+}
+
+div.head{
+width:100%;
+color:black;
+overflow:auto;
+text-align:center;
+}
+
+div.head h1 {
+font-size:35px;
+margin:10px;
+margin-top:20px;
+}
+
+div.head h2 {
+font-size:18px;
+margin:5px;
+font-weight:normal;
+}
+
+div.menu {
+background:black;
+width:100%;
+margin:8px 0;
+overflow:auto;
+text-align:center;
+}
+
+div.menu ul{
+float: left;
+width: 90%;
+margin: 0% 5%;
+padding: 0;
+padding-left: 25px;
+list-style-type:none;
+}
+
+div.menu ul li {
+width:16%;
+float:left;
+}
+
+div.menu ul li a {
+width:80%;
+float:left;
+margin:0 2%;
+padding:8px 8%;
+color:white;
+font-size: 20px;
+}
+
+div.menu ul li a:hover {
+color:white;
+background:#bbbbbb;
+}
+
+div.menu ul li a.selected {
+color:white;
+background:#bbbbbb;
+}
+
+div.profile {
+margin:10px auto;
+padding:10px;
+border: 1px solid gray;
+width:300px;
+overflow:auto;
+}
+
+img.profile {
+width:100%;
+}
+
+p{
+font-size: 18px;
+}
+
+div.foot {
+height:10px
+}
+
+pre {
+font-size:18px;
+}
+
+div.events {
+background: red;
+overflow:auto;
+}
+
+h3.title {
+margin:0;
+padding:0;
+font-size:24px;
+}
+
+hr {
+margin: 20px 0;
+}
+
+div.photo img {
+float:left;
+margin:auto;
+}
+
+div.photo {
+height:210px;
+width:210px;
+float:left;
+margin:5px;
+padding:5px;
+}
+
+
+div.word {
+margin:20px auto;
+margin-bottom:50px;
+overflow:auto;
+}
+
+table.words {
+width:100%;
+}
+
+table.words tr{
+width:100%;
+}
+
+table.words th {
+font-weight: normal;
+width:15%;
+font-size:18px;
+}
+
+table.words td {
+width:85%;
+font-size:18px;
+}
+
+table.words input {
+width:100%;
+padding:5px;
+border: 1px solid #bbbbbb;
+font-size:18px;
+}
+
+table.words input.submit {
+float:right;
+width:100px;
+margin-right:20px;
+padding:2px;
+}
+
+table.words textarea {
+width:100%;
+height:100px;
+padding:5px;
+border: 1px solid #bbbbbb;
+font-size:18px;
+}
+
+a.word_create {
+float:right;
+}
+
+div.line {
+overflow:auto;
+width:100%;
+}
+
+div.m20 {
+width:100%;
+margin:20px auto;
+}
+
+
+div.words {
+width:70%;
+margin:0 auto;
+}
+
+h4 {
+margin:0;
+padding:0;
+}
+
+ul.word {
+margin:20px 0;
+padding:0;
+float:left;
+width:100%;
+list-style-type:none;
+}
+
+ul.word li {
+margin:3px 0;
+float:left;
+width:100%;
+font-size:20px;
+}
+
+ul.word li.author {
+color:gray;
+font-size:16px;
+}
+
+div.login {
+margin:50px auto ;
+width:300px;
+}
+
+table.words textarea.content {
+width:100%;
+height:400px;
+padding:5px;
+border: 1px solid #bbbbbb;
+font-size:18px;
+}
+
+
+
+table.upload img{
+width:200px;
+}
+
+table.upload td{
+padding:0px 20px;
+}
+
+span.right {
+float:right;
+color:black;
+font-size:18px;
+}
+
+span.content {
+color:gray;
+}
+
+a.button {
+background:#bbbbbb;
+color:black;
+border:1px solid gray;
+}
+
+a.button:hover {
+color:white;
+background:#444444;
+}
+
+ul.catalog li {
+margin:10px 0;
+}
+
+div.intro {
+width:250px;
+overflow:auto;
+background:#eeeeee;
+margin:20px 0;
+padding:13px;
+border:1px solid #aaaaaa;
+}
+
+div.intro ul {
+float:left;
+margin:5px 0;
+color:#006699;
+}
+
+div.intro li {
+font-size:18px;
+margin:2px 0;
+}
+
+div.intro hr {
+width:92%;
+margin:5px 4%;
+margin-bottom:0;
+float:left;
+}
+
+div.intro span {
+width:92%;
+margin:0px 4%;
+margin-bottom:0;
+font-size:20px;
+overflow:auto;
+float:left;
+color:#006699;
+}
+
+div.photos {
+margin:20px 0;
+}
+
+ul.photos {
+margin:0;
+padding:0;
+width:100%;
+float:left;
+list-style-type:none;
+}
+
+ul.photos li {
+float:left;
+width:270px;
+height:240px;
+border:1px solid gray;
+padding:10px;
+margin:10px;
+}
+
+
+ul.photos li:hover {
+background: #dddddd;
+}
+
+ul.photos a {
+margin:0;
+padding:0;
+}
+
+ul.photos img {
+width:100%;
+}
+
+ul.photos div {
+margin:10px auto;
+color:black;
+width:80px;
+font-size:18px;
+}
+
+div.photo_view {
+margin:20px 0;
+width:100%;
+}
+
+
+div.photo_view img {
+width:100%;
+}
+
+p {
+font-size:20px;
+}
+
+ul.word span {
+background:#eeeeee;
+overflow:auto;
+}
+
+ul.word li.content {
+margin:20px 0;
+}
+
+ul.word img {
+margin:20px;
+margin-left:0;
+}
+
+ul.word img.left {
+margin:20px;
+float:left;
+margin-left:0px;
+}
+
+
+ul.word img.right {
+margin:20px;
+float:right;
+margin-right:0px;
+}
+
+
+ul.word img.center{
+margin:20px 0px;
+}
+
+ul.word img.w100 {
+width:100%;
+margin:20px 0;
+}
+
+ul.word img.w50{
+width:50%;
+}
+
+ul.word img.w40{
+width:40%;
+}
+
+ul.word img.w60{
+width:60%;
+}
+
+ul.word img.w30{
+width:30%;
+}
+
+ul.word img.w70{
+width:70%;
+}
+
+
+ul.word img.w80{
+width:80%;
+}
+
+div.page {
+width:200px;
+margin:20px auto;
+}
+
+a.photo {
+background:none;
+padding:0;
+margin:0;
+}
+
View
693 static/css/style0803.css
@@ -0,0 +1,693 @@
+body{
+margin:0;
+padding:0;
+}
+
+div.body {
+width:80%;
+background:white;
+margin:0px auto;
+padding:0px;
+overflow:auto;
+}
+
+a{
+text-decoration:none;
+color:black;
+font-size:20px;
+padding:2px 5px;
+}
+
+a:hover {
+color:white;
+background:black;
+}
+
+a.active {
+color:white;
+background:black;
+}
+
+h3 {
+margin:20px 0;
+font-size:22px;
+}
+
+div.h3 {
+font-size:24px;
+}
+
+a.h3 {
+font-size:24px;
+}
+
+div.h4 {
+font-size:20px;
+color:black;
+background:#eeeeee;
+padding:10px 2%;
+border:1px solid #aaaaaa;
+margin-bottom:20px;
+}
+
+a.h4 {
+font-size:20px;
+}
+
+ul.article {
+color:black;
+}
+
+ul.article li {
+margin:8px 0;
+}
+
+ul.article li a {
+font-size:20px;
+}
+
+ul.article li span{
+color:black;
+}
+
+div.shelf{
+width:70%;
+margin:0px auto;
+padding:0px;
+}
+
+div.head{
+width:100%;
+color:black;
+overflow:auto;
+text-align:center;
+}
+
+div.head h1 {
+font-size:35px;
+margin:10px;
+margin-top:20px;
+}
+
+div.head h2 {
+font-size:20px;
+margin:5px;
+font-weight:normal;
+}
+
+div.menu {
+background:black;
+width:100%;
+margin:8px 0;
+overflow:auto;
+text-align:center;
+}
+
+div.menu ul{
+float: left;
+width: 90%;
+margin: 0% 5%;
+padding: 0;
+list-style-type:none;
+}
+
+div.menu ul li {
+padding:0;
+margin:0;
+width:14.2%;
+float:left;
+}
+
+div.menu ul li a {
+width:80%;
+float:left;
+margin:0 2%;
+padding:8px 8%;
+color:white;
+font-size: 20px;
+}
+
+div.menu ul li a:hover {
+color:white;
+background:#bbbbbb;
+}
+
+div.menu ul li a.selected {
+color:white;
+background:#bbbbbb;
+}
+
+div.profile {
+margin:5px auto;
+padding:10px;
+border: 1px solid gray;
+width:300px;
+overflow:auto;
+}
+
+img.profile {
+width:100%;
+}
+
+p{
+font-size: 18px;
+}
+
+div.foot {
+float:left;
+width:100%;
+text-align:center;
+overflow:auto;
+padding:20px 0;
+border-top: 1px dashed gray;
+margin:30px 0;
+#background:#eeeeee;
+color:gray;
+}
+
+pre {
+font-size:18px;
+}
+
+div.events {
+background: red;
+overflow:auto;
+}
+
+h3.title {
+margin:0;
+padding:0;
+font-size:24px;
+}
+
+hr {
+margin: 20px 0;
+}
+
+div.photo img {
+float:left;
+margin:auto;
+}
+
+div.photo {
+height:210px;
+width:210px;
+float:left;
+margin:5px;
+padding:5px;
+}
+
+
+div.word {
+margin:20px auto;
+margin-bottom:50px;
+overflow:auto;
+}
+
+table.words {
+width:100%;
+}
+
+table.words tr{
+width:100%;
+}
+
+table.words th {
+font-weight: normal;
+width:15%;
+font-size:18px;
+}
+
+table.words td {
+width:85%;
+font-size:18px;
+}
+
+table.words input {
+width:95%;
+padding:5px;
+border: 1px solid #bbbbbb;
+font-size:18px;
+}
+
+table.words input.submit {
+float:right;
+width:100px;
+margin-right:5%;
+padding:2px;
+}
+
+
+table.words textarea {
+width:95%;
+height:100px;
+padding:5px;
+border: 1px solid #bbbbbb;
+font-size:18px;
+}
+
+a.word_create {
+float:right;
+}
+
+div.line {
+overflow:auto;
+width:100%;
+}
+
+div.m20 {
+width:100%;
+margin:20px auto;
+}
+
+div.vedio {
+width:100%;
+margin:20px 0 60px 0;
+}
+
+div.words {
+width:70%;
+margin:0 auto;
+}
+
+h4 {
+margin:0;
+padding:0;
+}
+
+ul.word {
+margin:0px 0;
+padding:0;
+float:left;
+width:100%;
+list-style-type:none;
+}
+
+ul.word li {
+margin:3px 0;
+float:left;
+width:100%;
+font-size:20px;
+}
+
+ul.word li.gray {
+color:gray;
+}
+
+ul.word li.gray a {
+color:gray;
+font-size:20px;
+}
+
+
+ul.word li.author {
+color:gray;
+font-size:16px;
+}
+
+ul.words {
+margin:20px 0;
+padding:0;
+float:left;
+width:100%;
+list-style-type:none;
+}
+
+ul.words li {
+margin:3px 0;
+float:left;
+width:100%;
+font-size:20px;
+}
+
+ul.words li.gray {
+color:gray;
+}
+
+ul.words li.gray a {
+color:gray;
+font-size:20px;
+}
+
+
+ul.words li.author {
+color:gray;
+font-size:16px;
+}
+
+
+div.login {
+margin:50px auto ;
+width:300px;
+}
+
+table.words textarea.content {
+width:100%;
+height:400px;
+padding:5px;
+border: 1px solid #bbbbbb;
+font-size:18px;
+}
+
+
+
+table.upload img{
+width:200px;
+}
+
+table.upload td{
+padding:0px 20px;
+}
+
+span.right {
+float:right;
+color:black;
+font-size:18px;
+}
+
+span.content {
+color:gray;
+}
+
+a.button {
+background:#bbbbbb;
+color:black;
+border:1px solid gray;
+padding:3px 7px;
+}
+
+a.button:hover {
+color:white;
+background:#444444;
+}
+
+ul.catalog li {
+margin:10px 0;
+}
+
+
+div.content {
+ width:77%;
+ padding:0;
+ overflow:auto;
+ float:right;
+}
+
+div.intro {
+width:22%;
+overflow:auto;
+background:#eeeeee;
+margin:0;
+padding:0;
+padding-bottom:10px;
+border:1px solid #aaaaaa;
+float:left;
+}
+
+div.intro ul {
+ width:100%;
+float:left;
+margin:0;
+color:black;
+padding:0;
+list-style : none;
+}
+
+div.intro li {
+width:80%;
+padding:6px 10%;
+}
+
+
+div.intro li a {
+font-size:20px;
+}
+
+
+div.intro hr {
+width:92%;
+color:#aaaaaa;
+margin:10px 4%;
+float:left;
+}
+
+div.intro span {
+margin:12px 10%;
+margin-bottom:0;
+font-size:22px;
+overflow:auto;
+float:left;
+}
+
+div.photos {
+margin:20px 0;
+}
+
+ul.photos {
+margin:0;
+padding:0;
+width:100%;
+float:left;
+list-style-type:none;
+}
+
+ul.photos li {
+float:left;
+width:285px;
+height:240px;
+border:1px solid gray;
+padding:10px;
+margin:10px;
+}
+
+
+ul.photos li:hover {
+color:white;
+background:#dddddd;
+}
+
+ul.photos a {
+margin:0;
+padding:0;
+}
+
+ul.photos img {
+width:100%;
+}
+
+ul.photos div {
+margin:10px auto;
+color:black;
+width:80px;
+font-size:20px;
+}
+
+div.photo_view {
+margin:20px 0;
+width:100%;
+}
+
+
+div.photo_view img {
+width:100%;
+}
+
+p {
+font-size:20px;
+}
+
+ul.word span {
+background:#eeeeee;
+overflow:auto;
+}
+
+ul.word li.content {
+ width:100%;
+ float:left;
+margin:20px 0;
+}
+
+ul.word img {
+margin:20px;
+margin-left:0;
+}
+
+ul.word img.left {
+margin:20px;
+float:left;
+margin-left:0px;
+}
+
+
+ul.word img.right {
+margin:20px;
+float:right;
+margin-right:0px;
+}
+
+
+ul.word img.center{
+margin:20px 0px;
+}
+
+ul.word img.w100 {
+width:100%;
+margin:20px 0;
+}
+
+ul.word img.w50{
+width:50%;
+}
+
+ul.word img.w40{
+width:40%;
+}
+
+ul.word img.w60{
+width:60%;
+}
+
+ul.word img.w30{
+width:30%;
+}
+
+ul.word img.w70{
+width:70%;
+}
+
+
+ul.word img.w80{
+width:80%;
+}
+
+div.page {
+width:250px;
+margin:20px auto;
+}
+
+a.photo {
+background:none;
+padding:0;
+margin:0;
+}
+
+table.events {
+ width:100%;
+font-size:20px;
+}
+
+table.events td {
+padding:0 10px;
+}
+
+table.events td.t1 {
+width:220px;
+}
+
+table.events td.t2 {
+width:100px;
+}
+
+
+div.bottom {
+width:100%;
+margin-bottom:100px;
+float:left;
+}
+
+
+ul.vedio{
+margin:20px 0;
+padding:0;
+float:left;
+width:100%;
+list-style-type:none;
+}
+
+ul.vedio li {
+width:18%;
+margin:1%;
+text-align:center;
+float:left;
+}
+
+ul.vedio li img {
+width:93%;
+padding:3%;
+border:1px solid gray;
+}
+
+
+ul.vedio li a:hover {
+color:black;
+background:none;
+width:100%;
+}
+
+ul.vedio li span {
+width:100%;
+color:gray;
+font-size:18px;
+}
+
+div.article {
+ padding:0 3%;
+}
+
+div.book{
+width:350px;
+float:left;
+margin:0px 0;
+padding:0;
+height:220px;
+}
+
+div.book img {
+ padding:0;
+ margin:0;
+}
+
+div.book span{
+ background:white;
+ }
+
+div.book span.img{
+float:left;
+width:140px;
+padding:0;
+margin:0;
+}
+
+div.book img{
+width:90%;
+float:left;
+}
+
+div.book span.title{
+float:left;
+margin:0;
+padding:0;
+width:55%;
+}
+
+div.book ul {
+margin:0;
+padding:0;
+list-style-type:none;
+float:left;
+}
+
+div.book ul li {
+margin:0;
+padding:0;
+float:left;
+width:100%;
+font-size:18px;
+color:gray;
+}
+
+div.book ul li.title {
+color:#006699;
+margin-bottom:8px;
+}
+
View
696 static/css/style1031.css
@@ -0,0 +1,696 @@
+body{
+margin:0;
+padding:0;
+}
+
+div.body {
+width:80%;
+background:white;
+margin:0px auto;
+padding:0px;
+overflow:auto;
+}
+
+a{
+text-decoration:none;
+color:black;
+font-size:20px;
+padding:2px 5px;
+}
+
+a:hover {
+color:white;
+background:black;
+}
+
+a.active {
+color:white;
+background:black;
+}
+
+h3 {
+margin:20px 0;
+font-size:22px;
+}
+
+div.h3 {
+font-size:24px;
+}
+
+a.h3 {
+font-size:24px;
+}
+
+div.h4 {
+font-size:20px;
+color:black;
+background:#eeeeee;
+padding:10px 2%;
+border:1px solid #aaaaaa;
+margin-bottom:20px;
+}
+
+a.h4 {
+font-size:20px;
+}
+
+ul.article {
+color:black;
+}
+
+ul.article li {
+margin:8px 0;
+}
+
+ul.article li a {
+font-size:20px;
+}
+
+ul.article li span{
+color:black;
+}
+
+div.shelf{
+width:70%;
+margin:0px auto;
+padding:0px;
+}
+
+div.head{
+width:100%;
+color:black;
+overflow:auto;
+text-align:center;
+}
+
+div.head h1 {
+font-size:35px;
+margin:10px;
+margin-top:20px;
+}
+
+div.head h2 {
+font-size:20px;
+margin:5px;
+font-weight:normal;
+}
+
+div.menu {
+background:black;
+width:100%;
+margin:8px 0;
+overflow:auto;
+text-align:center;
+}
+
+div.menu ul{
+float: left;
+width: 90%;
+margin: 0% 5%;
+padding: 0;
+list-style-type:none;
+}
+
+div.menu ul li {
+padding:0;
+margin:0;
+width:14.2%;
+float:left;
+}
+
+div.menu ul li a {
+width:80%;
+float:left;
+margin:0 2%;
+padding:8px 8%;
+color:white;
+font-size: 20px;
+}
+
+div.menu ul li a:hover {
+color:white;
+background:#bbbbbb;
+}
+
+div.menu ul li a.selected {
+color:white;
+background:#bbbbbb;
+}
+
+div.profile {
+margin:5px auto;
+padding:10px;
+border: 1px solid gray;
+width:300px;
+overflow:auto;
+}
+
+img.profile {
+width:100%;
+}
+
+p{
+font-size: 18px;
+}
+
+div.foot {
+float:left;
+width:100%;
+text-align:center;
+overflow:auto;
+padding:20px 0;
+border-top: 1px dashed gray;
+margin:30px 0;
+#background:#eeeeee;
+color:gray;
+}
+
+pre {
+font-size:18px;
+}
+
+div.events {
+background: red;
+overflow:auto;
+}
+
+h3.title {
+margin:0;
+padding:0;
+font-size:24px;
+}
+
+hr {
+margin: 20px 0;
+}
+
+div.photo img {
+float:left;
+margin:auto;
+}
+
+div.photo {
+height:210px;
+width:210px;
+float:left;
+margin:5px;
+padding:5px;
+}
+
+
+div.word {
+margin:20px auto;
+margin-bottom:50px;
+overflow:auto;
+}
+
+table.words {
+width:100%;
+}
+
+table.words tr{
+width:100%;
+}
+
+table.words th {
+font-weight: normal;
+width:15%;
+font-size:18px;
+}
+
+table.words td {
+width:85%;
+font-size:18px;
+}
+
+table.words input {
+width:95%;
+padding:5px;
+border: 1px solid #bbbbbb;
+font-size:18px;
+}
+
+table.words input.submit {
+float:right;
+width:100px;
+margin-right:5%;
+padding:2px;
+}
+
+
+table.words textarea {
+width:95%;
+height:100px;
+padding:5px;
+border: 1px solid #bbbbbb;
+font-size:18px;
+}
+
+a.word_create {
+float:right;
+}
+
+div.line {
+overflow:auto;
+width:100%;
+}
+
+div.m20 {
+width:100%;
+margin:20px auto;
+}
+
+div.vedio {
+width:100%;
+margin:20px 0 60px 0;
+}
+
+div.words {
+width:70%;
+margin:0 auto;
+}
+
+h4 {
+margin:0;
+padding:0;
+}
+
+ul.word {
+margin:0px 0;
+padding:0;
+float:left;
+width:100%;
+list-style-type:none;
+}
+
+ul.word li {
+margin:3px 0;
+float:left;
+width:100%;
+font-size:20px;
+}
+
+ul.word li.gray {
+color:gray;
+}
+
+ul.word li.gray a {
+color:gray;
+font-size:20px;
+}
+
+
+ul.word li.author {
+color:gray;
+font-size:16px;
+}
+
+ul.words {
+margin:20px 0;
+padding:0;
+float:left;
+width:100%;
+list-style-type:none;
+}
+
+ul.words li {
+margin:3px 0;
+float:left;
+width:100%;
+font-size:20px;
+}
+
+ul.words li.gray {
+color:gray;
+}
+
+ul.words li.gray a {
+color:gray;
+font-size:20px;
+}
+
+
+ul.words li.author {
+color:gray;
+font-size:16px;
+}
+
+
+div.login {
+margin:50px auto ;
+width:300px;
+}
+
+table.words textarea.content {
+width:100%;
+height:400px;
+padding:5px;
+border: 1px solid #bbbbbb;
+font-size:18px;
+}
+
+
+
+table.upload img{
+width:200px;
+}
+
+table.upload td{
+padding:0px 20px;
+}
+
+span.right {
+float:right;
+color:black;
+font-size:18px;
+}
+
+span.content {
+color:gray;
+}
+
+a.button {
+background:#bbbbbb;
+color:black;
+border:1px solid gray;
+padding:3px 7px;
+}
+
+a.button:hover {
+color:white;
+background:#444444;
+}
+
+ul.catalog li {
+margin:10px 0;
+}
+
+
+div.content {
+ width:75%;
+ padding:0;
+ overflow:auto;
+ float:right;
+}
+
+div.intro {
+width:24%;
+overflow:auto;
+background:#eeeeee;
+margin:0;
+padding:0;
+padding-bottom:10px;
+border:1px solid #aaaaaa;
+float:left;
+}
+
+div.intro ul {
+ width:100%;
+float:left;