Use Python to make a novel website

Source: Internet
Author: User
Tags button type html header visibility

Tag: function strong func Django PSI button activates star other

HTML header

{% extends ' base.html '%} {% load static%} {% block title%} novel home {% endblock%}{% block content%} <div id= "Headerbox" > 

  

CSS Styles

/* @charset "gb2312"; *//** +------------------------------------------------------------------------------* Start Web site style rewrite (initialize) +------------------------------------------------------------------------------*/html {- Webkit-text-size-adjust:none;    /* Resolve the font below the Chrome browser to be less than 12px*/}body {color: #333;    Font-family: "Microsoft Jas Black", Verdana, Arial, Helvetica, Sans-serif;    Background-color: #f8f8f8}a {outline:none;    Text-decoration:none;    Color: #333}a:hover {text-decoration:none; Color: #4581e6}a:active {star:expression (This.onfocus=this.blur ());} A:focus {outline:0;} HTML {zoom:1;}    HTML * {outline:0; Zoom:1;} HTML Button::-moz-focus-inner {border-color:transparent!important;} body {font-size:14px;} Body, Div, DL, DT, DD, UL, OL, Li, H1, H2, H3, H4, H5, H6, pre, Code, form, fieldset, legend, input, textarea, p, blockquo    TE, Th, td {Margin:0; padding:0;} Table {/*border-collapse:collapse;border-spacing:0;*/}fieldset, a img {border:0;} AddRess, caption, cite, code, DFN, em, Th, var {font-style:normal; Font-weight:normal;} Li {list-style:none;} caption, th {text-align:left;}    H1, H2, H3, H4, H5, h6 {font-size:100%; Font-weight:normal;} Q:before, Q:after {content: ';} Input[type= "Submit"], input[type= "reset"], input[type= "button"], button {-webkit-appearance:none;/* Remove Apple's default UI to render the button * /}em, I {font-style:normal;} /** +------------------------------------------------------------------------------* End site style rewrite (initialize) +------------- ----------------------------------------------------------------- *//** +---------------------------------------- --------------------------------------* Public Class +-----------------------------------------------------------    -------------------*/.clearfix:after {content: ".";    Display:block;    height:0;    Clear:both; Visibility:hidden;}. Clearfix {display:block;}. clear {Clear:both;}    /* Clear floating */.colwrapper {Overflow:hidden; Zoom:1/*for Ie*/; margin:5px Auto;}. strong {font-weight:bold;}.    Left {float:left; Display:inline;}.    Right {float:right; Display:inline;}.    Center {margin:0 Auto; Text-align:center;}.    Show {display:block; visibility:visible;}.    hide {display:none; Visibility:hidden;}. block {display:block;}. inline {display:inline;}.    Transparent {filter:alpha (OPACITY=50); -moz-opacity:0.5;    /** Firefox 3.5 is about to natively support the Opacity property, so this property is only valid ***/-khtml-opacity:0.5 in the following version Firefox3; opacity:0.5;}.    break {Word-wrap:break-word; Overflow:hidden; /*word-break:break-all;*/}.tal {text-align:left}.tar {text-align:right;}    /* Align */.justify {text-align:justify on both sides of text; Text-justify:distribute-all-lines; /*ie6-8*/text-align-last:justify; /* ie9*/-moz-text-align-last:justify; /*ff*/-webkit-text-align-last:justify;    /*chrome 20+*/}.toe {/* exceeds ellipsis */word-break:keep-all;    White-space:nowrap;    Overflow:hidden; Text-overflow:elliPSIs;}        @media screen and (-webkit-min-device-pixel-ratio:0) {/* chrome*/. justify:after {content: ".";        Display:inline-block;        width:100%;        Overflow:hidden;    height:0; }}em {font-style:italic!important;} Strike {Text-decoration:line-through!important;}    Strong {Font-weight:bold!important; text-indent:0;} u {text-decoration:underline!important;}    #headerbox {float:right;    Position:absolute; Z-index:-1; /*?? ‰position?±?? €§??? È??? ¤§è????  ?? ¨é?????    */top:0;    left:0;    right:0;    height:100px;    Background-color: #9E9E9E; box-shadow:0 0 20px #999/*????  é?′?? ±*/} #headerbox. logo {padding:30px;}    #headerbox. Nav li {float:left;    line-height:80px; margin-right:40px;}    #headerbox. Nav Li a {color:black;    font-size:16px; Background-color: #9e9e9e;} /* #headerbox. Nav li Button {*//*background-color: #9e9e9e; *//*border:none;*//*color:black;*//*padding: 3px;*//*text-align:center;*//*text-decoration:none;*//*display:inline-block;*//*font-size:15px;*//*}    */.NAV1 {position:absolute;    Border-right:none;    Overflow:hidden;    Float:left;    margin: -10px-10px-10px 200px; font-size:15px;}. Nav1 ul li {float:left;}.    Nav1 ul Li a {width:150px;    height:60px;    Text-align:center;    line-height:50px;    Display:block;    border-right:2px solid #9e9e9e; Color: #666;}. Nav1 ul li a:hover {color: #f00;}.    Nav1 ul Li ul {position:fixed; Display:none;}. Nav1 ul Li ul li {float:none;}. Nav1 ul Li ul li a {border-right:none;}. NAV1 UL Li:hover ul {display:block;}

Base

<! DOCTYPE html>{% load static%}
"" "Novelnet URL configurationthe ' urlpatterns ' list routes URLs to views. For more information-see:    https://docs.djangoproject.com/en/1.11/topics/http/urls/Examples:Function Views    1. Add an import: from  My_app import views    2. Add a URL to urlpatterns:  url (r ' ^$ ', views.home, Name= ' home ") class-based views    1. Add an import: from  other_app.views import Home    2. Add a URL to urlpatterns:  url (r ' ^$ ', Home.as_view (), name= ' Home ') 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 Urlfrom Django.conf.urls Import includefrom django.contrib Import adminurlpatterns = [    url (R ' ^admin/', admin.site.urls), C13/>url (R ' ^novelnet1/', include (' Novelnet1.urls '))]

  

URL of the module

From django.conf.urls import urlfrom django.contrib.auth import views as Auth_viewsfrom django.views.generic.base Import Templateviewfrom Novelnet1 import views as core_viewsfrom. Import views# app_name = ' App1 ' urlpatterns = [    # start Login    url (r ' ^$ ', Templateview.as_view (template_name= ') Home.html '), Name= ' home '),    url (r ' ^login/$ ', Auth_views.login, {' template_name ': ' login.html '}, name= ' login '),    URL (r ' ^logout/$ ', auth_views.logout, {' template_name ': ' logged_out.html '}, name= ' logout '),    # End Login    # Start Register    URL (r ' ^register/$ ', core_views.register, name= ' register '),    # end Register    url (r ' ^ Testform/$ ', Views.testform, name= ' Testform '),]

  

Use Python to make a novel website

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.